@bootpay/client-js 5.4.0 → 5.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(':root{--bootpay-progress-bg-overlay: transparent;--bootpay-progress-accent: #3a5fd9;--bootpay-progress-accent-light: rgba(58, 95, 217, .5);--bootpay-progress-accent-glow: rgba(58, 95, 217, .8);--bootpay-progress-text: rgba(255, 255, 255, .95);--bootpay-progress-text-sub: rgba(255, 255, 255, .6)}.bootpay-progress-background{position:fixed;display:flex!important;align-items:center;justify-content:center;background:var(--bootpay-progress-bg-overlay);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:200000;opacity:0;animation:bootpay-fade-in .25s ease-out forwards}.bootpay-progress-background.blur-off{background-color:transparent}.bootpay-progress-background .progress-message-window{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px 36px 24px;background:transparent;border-radius:20px;animation:bootpay-card-in .35s ease-out forwards}@media (min-width: 600px){.bootpay-progress-background .progress-message-window{padding:32px 44px 28px;border-radius:24px}}.bootpay-progress-background .progress-message-window .alfred-loading{position:relative;display:flex;align-items:center;justify-content:center;height:48px}@media (min-width: 600px){.bootpay-progress-background .progress-message-window .alfred-loading{height:56px}}.bootpay-progress-background .progress-message-window .bootpay-spinner{display:flex;align-items:center;justify-content:center;gap:10px}@media (min-width: 600px){.bootpay-progress-background .progress-message-window .bootpay-spinner{gap:12px}}.bootpay-progress-background .progress-message-window .bootpay-dot{display:block;width:10px;height:10px;border-radius:50%;background:var(--bootpay-progress-accent);box-shadow:0 0 10px var(--bootpay-progress-accent-glow);animation:bootpay-bounce 1.4s ease-in-out infinite}@media (min-width: 600px){.bootpay-progress-background .progress-message-window .bootpay-dot{width:12px;height:12px}}.bootpay-progress-background .progress-message-window .bootpay-dot:nth-child(1){animation-delay:0s}.bootpay-progress-background .progress-message-window .bootpay-dot:nth-child(2){animation-delay:.16s}.bootpay-progress-background .progress-message-window .bootpay-dot:nth-child(3){animation-delay:.32s}.bootpay-progress-background .progress-message-window .alfred-text{margin-top:10px;text-align:center;opacity:0;transform:translateY(6px);animation:bootpay-text-in .4s ease-out .2s forwards}@media (min-width: 600px){.bootpay-progress-background .progress-message-window .alfred-text{margin-top:12px}}.bootpay-progress-background .progress-message-window .alfred-text span.alfred-inner-text{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:13px;font-weight:400;color:var(--bootpay-progress-text-sub);letter-spacing:.02em}@media (min-width: 600px){.bootpay-progress-background .progress-message-window .alfred-text span.alfred-inner-text{font-size:14px}}@keyframes bootpay-fade-in{0%{opacity:0}to{opacity:1}}@keyframes bootpay-card-in{0%{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}@keyframes bootpay-bounce{0%,80%,to{transform:translateY(0);opacity:.4;box-shadow:0 0 6px var(--bootpay-progress-accent-light)}40%{transform:translateY(-18px);opacity:1;box-shadow:0 0 16px var(--bootpay-progress-accent-glow)}}@keyframes bootpay-text-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}:root{--bootpay-popup-bottom: 72px;--bootpay-primary: #507cf3;--bootpay-primary-hover: #3f6be2;--bootpay-white: #ffffff;--bootpay-black: #000000;--bootpay-gray-dark: #333333;--bootpay-gray-light: #888888;--bootpay-gray-bg: #f2f2f2;--bootpay-overlay: rgba(0, 0, 0, .7);--bootpay-radius: 12px;--bootpay-radius-sm: 5px;--bootpay-radius-lg: 16px;--bootpay-radius-xl: 20px;--bootpay-radius-xxl: 24px;--bootpay-shadow: 0 0 10px rgba(0, 0, 0, .1);--bootpay-z-modal: 9999;--bootpay-z-spinner: 200000;--bootpay-z-close: 10001;--bootpay-blur: blur(5px)}body.bootpay-open{position:fixed!important;left:0;right:0;bottom:0;top:0;padding:0;margin:0;height:100vh!important;overflow:hidden!important;-webkit-overflow-scrolling:auto!important}body.bootpay-inherit .fade-in,body.bootpay-open .fade-in{animation:__bootpay-fade-in .1s linear}body.bootpay-inherit .fade-out,body.bootpay-open .fade-out{animation:__bootpay-fade-out .1s linear}body.bootpay-inherit .slide-up,body.bootpay-open .slide-up{animation:__bootpay-slide-up .3s cubic-bezier(.25,.46,.45,.94) forwards!important}@media (max-width: 600px){body.bootpay-inherit .slide-up,body.bootpay-open .slide-up{animation:__bootpay-slide-up-mobile .1s cubic-bezier(.25,.46,.45,.94) forwards!important}}body.bootpay-inherit .slide-static-up,body.bootpay-open .slide-static-up{animation:__bootpay-slide-up-mobile .1s cubic-bezier(.25,.46,.45,.94) forwards!important}body.bootpay-inherit .slide-down,body.bootpay-open .slide-down{animation:__bootpay-slide-down .1s ease-in forwards!important}@media (max-width: 600px){body.bootpay-inherit .slide-down,body.bootpay-open .slide-down{animation:__bootpay-slide-down-mobile .1s ease-in forwards!important}}body.bootpay-inherit .slide-static-down,body.bootpay-open .slide-static-down{animation:__bootpay-slide-down-mobile .1s ease-in forwards!important}body.bootpay-inherit.bootpay-mobile .bootpay-payment-background,body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:transparent}@media (min-width: 600px){body.bootpay-inherit.bootpay-mobile .bootpay-payment-background,body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:var(--bootpay-overlay)}}body.bootpay-inherit .bootpay-transparent-background,body.bootpay-open .bootpay-transparent-background{position:relative;height:100%;z-index:var(--bootpay-z-modal)}body.bootpay-inherit .bootpay-transparent-background.__overflow-y,body.bootpay-open .bootpay-transparent-background.__overflow-y{overflow-y:auto}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window{position:relative;display:block;width:500px;height:auto}@media (max-width: 768px){body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window{width:100%}}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window>iframe{width:100%!important;border-radius:0}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window>iframe.transparent,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}body.bootpay-inherit .bootpay-payment-background,body.bootpay-open .bootpay-payment-background{position:fixed;left:0;right:0;top:0;bottom:0;display:block;text-align:center;background-color:var(--bootpay-overlay);z-index:var(--bootpay-z-modal);backdrop-filter:var(--bootpay-blur);-webkit-backdrop-filter:var(--bootpay-blur);overflow:hidden}@media (max-height: 850px){body.bootpay-inherit .bootpay-payment-background,body.bootpay-open .bootpay-payment-background{overflow-y:auto}}body.bootpay-inherit .bootpay-payment-background:before,body.bootpay-open .bootpay-payment-background:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-inherit .bootpay-payment-background.__alert,body.bootpay-open .bootpay-payment-background.__alert{padding:1rem}body.bootpay-inherit .bootpay-payment-background.__alert:before,body.bootpay-open .bootpay-payment-background.__alert:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-inherit .bootpay-payment-background.__alert>.slider-window,body.bootpay-open .bootpay-payment-background.__alert>.slider-window{max-width:480px;position:absolute;width:100%;background-color:var(--bootpay-white);border-radius:24px;left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;box-shadow:0 10px 40px #00000014,0 4px 12px #0000000a;border:1px solid #f1f5f9}body.bootpay-inherit .bootpay-payment-background.__alert>.slider-window.__bootpay-hidden,body.bootpay-open .bootpay-payment-background.__alert>.slider-window.__bootpay-hidden{display:none}@media (max-width: 600px){body.bootpay-inherit .bootpay-payment-background.__alert>.slider-window,body.bootpay-open .bootpay-payment-background.__alert>.slider-window{left:0;right:0;bottom:0;width:100%;max-width:inherit;top:auto;border-bottom-left-radius:0;border-bottom-right-radius:0;transform:translateY(0) translate(0)}}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{position:absolute;max-width:400px;width:100%;background-color:var(--bootpay-white);border-radius:var(--bootpay-radius-xl);left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;box-shadow:0 10px 40px #00000014,0 4px 12px #0000000a;border:1px solid #f1f5f9}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{left:1rem;right:1rem;width:auto;top:50%;transform:translateY(-50%)}}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header{display:flex;align-items:center;gap:.75rem;padding:1.5rem 1.5rem .75rem;text-align:left;position:relative;background-color:var(--bootpay-white)}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-icon,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:40px;height:40px;border-radius:50%;color:var(--bootpay-primary);background-color:#507cf31a}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-icon>svg,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-icon>svg{width:22px;height:22px}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-title,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-title{flex:1;font-size:18px;font-weight:700;line-height:1.4;color:#1e293b}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn{top:1rem;right:1rem;width:32px;height:32px;padding:0;border-radius:8px;background-color:transparent;transition:background-color .15s ease}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:hover,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:hover{background-color:#f1f5f9}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after{left:50%;top:50%;width:1.5px;height:16px;background-color:#64748b}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before{transform:translate(-50%,-50%) rotate(45deg)}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after{transform:translate(-50%,-50%) rotate(-45deg)}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-body,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-body{padding:.25rem 1.5rem 1.25rem;text-align:left;font-size:15px;line-height:1.6;color:#475569;background:transparent}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer{display:flex;gap:.75rem;padding:.75rem 1.5rem 1.5rem;background-color:#f8fafc}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close{flex:1;padding:.875rem 1rem;border-radius:var(--bootpay-radius);background-color:var(--bootpay-white);border:1px solid #e2e8f0;color:#475569;font-size:15px;font-weight:600;cursor:pointer;outline:none;transition:all .2s ease}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover{background-color:#f1f5f9;border-color:#cbd5e1}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary{background-color:var(--bootpay-primary);border-color:var(--bootpay-primary);color:var(--bootpay-white);box-shadow:0 4px 12px #507cf340}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover{background-color:var(--bootpay-primary-hover);border-color:var(--bootpay-primary-hover)}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__slider-icon,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__slider-icon{display:flex;align-items:center;justify-content:center;width:64px;height:64px;margin:1.5rem auto 1.25rem;border-radius:50%;color:var(--bootpay-primary);background-color:#507cf31a;box-shadow:0 0 0 6px #507cf30f}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__slider-icon>svg,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__slider-icon>svg{width:32px;height:32px}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header{padding:0 2rem .5rem;text-align:center;font-size:20px;font-weight:700;line-height:1.4;color:#1e293b;background-color:var(--bootpay-white)}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header.__text-center,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header.__text-center{text-align:center}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body{padding:.5rem 1rem 1.5rem;text-align:center;font-size:16px;color:var(--bootpay-gray-dark);line-height:1.5;background:transparent}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body.slider-body,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body.slider-body{padding:.5rem 1.5rem 1.75rem;background:transparent}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button{display:block;width:100%;height:52px;padding:0 1.5rem;color:#4e5968;font-size:16px;font-weight:600;border-radius:14px;outline:none;border:0;cursor:pointer;margin-top:.5rem;background-color:#f2f4f6;transition:background-color .2s ease,transform .1s ease}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:first-child,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:first-child{margin-top:0}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:hover,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:hover{background-color:#e5e8eb}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:active,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:active{transform:scale(.98)}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active{color:var(--bootpay-white);background-color:var(--bootpay-primary);box-shadow:0 4px 12px #507cf340}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active:hover,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active:hover{background-color:var(--bootpay-primary-hover)}body.bootpay-inherit .bootpay-payment-background>.bootpay-confirm-form,body.bootpay-open .bootpay-payment-background>.bootpay-confirm-form{position:absolute;right:0;bottom:0;height:0;line-height:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:relative;display:inline-block;vertical-align:middle}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}@media (max-width: 1120px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice{position:absolute;left:0;right:0;top:0;bottom:0;border-radius:0!important}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice>iframe{width:100%!important;height:100%!important;border-radius:0}}@media (max-height: 1020px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice{position:absolute;left:0;right:0;top:0;bottom:0;border-radius:0!important}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice>iframe{width:100%!important;height:100%!important;border-radius:0}}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:absolute;left:0;right:0;top:0;bottom:0;border-radius:0!important}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{position:absolute;max-width:inherit;left:0;right:0;top:0;bottom:0;height:100%}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%!important;height:100%!important;border-radius:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.transparent,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{position:absolute;display:none;top:-32px;right:4px;color:var(--bootpay-white);font-size:32px;text-decoration:none;outline:none;box-shadow:none;border:0;background-color:transparent}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:var(--bootpay-white)!important}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{top:1rem;right:16px;color:var(--bootpay-black);padding:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:var(--bootpay-black)!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:relative;width:400px;height:600px;display:none;background-color:var(--bootpay-white);border-radius:var(--bootpay-radius-sm);overflow:hidden}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;border-radius:0}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header{position:absolute;left:0;right:0;top:0;height:50px;color:var(--bootpay-gray-dark);background-color:var(--bootpay-white);text-align:left}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body{position:absolute;left:0;right:0;top:50px;bottom:var(--bootpay-popup-bottom);padding:1rem;text-align:left;font-size:14px}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id{font-size:16px;color:var(--bootpay-gray-light);font-weight:400!important;text-align:center}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id{font-size:36px;color:var(--bootpay-gray-dark);font-weight:700;text-align:center;line-height:normal}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text{position:absolute;bottom:1rem;left:0;right:0;color:var(--bootpay-gray-light);font-size:14px;text-align:center}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer{position:absolute;left:0;right:0;bottom:0;height:var(--bootpay-popup-bottom);padding:0 1rem;margin:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button{display:block;width:100%;padding:1rem;outline:none;border:none;background-color:var(--bootpay-primary);border-radius:var(--bootpay-radius-sm);color:#fff;font-size:16px}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active{outline:none;box-shadow:none}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe{width:100%;height:100%;display:none;border:0!important;outline:0!important;border-radius:0;box-shadow:none}@media (max-width: 1100px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe{width:100%!important;height:100%!important;overflow-y:auto}}@media (min-width: 1100px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe{width:0;height:0;border:0;outline:0;border-radius:0;box-shadow:none!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%;height:100%;display:none;border:0!important;outline:0!important;border-radius:0;box-shadow:none}@media (min-width: 600px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:0;height:0;border:0;outline:0;border-radius:0;box-shadow:none!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{border-radius:0}@media (min-width: 600px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{width:0;height:0;border:0;outline:0;border-radius:var(--bootpay-radius-sm)!important;box-shadow:none!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-up,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-up{animation:__bootpay-slide-up .3s linear}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-down,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-down{animation:__bootpay-slide-down .3s linear}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-confirm-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-confirm-window>iframe{display:none;width:1px;height:1px;background:transparent;border:0!important;outline:0!important}.bootpay-close-btn{position:absolute;box-shadow:none;background-color:transparent;outline:0;z-index:var(--bootpay-z-close);right:8px;top:8px;height:21px;width:21px;border:0!important;outline:none!important}@media (min-width: 600px){.bootpay-close-btn{right:4px;top:-32px;width:25px;height:25px;background:transparent;outline:none!important;border:0!important}}.bootpay-close-btn.active,.bootpay-close-btn:focus{outline:none!important;border:0!important}.bootpay-close-btn:before,.bootpay-close-btn:after{position:absolute;left:8px;top:2px;content:" ";height:24px;width:1px;background-color:var(--bootpay-gray-dark)}@media (min-width: 600px){.bootpay-close-btn:before,.bootpay-close-btn:after{height:23px;top:0;width:2px;background-color:var(--bootpay-white)}}.bootpay-close-btn:before{transform:rotate(45deg)}.bootpay-close-btn:after{transform:rotate(-45deg)}@keyframes __bootpay-slide-up{0%{transform:translate(-50%,150%);opacity:1}to{transform:translate(-50%,-50%);opacity:1}}@keyframes __bootpay-slide-down{0%{transform:translate(-50%,-50%);opacity:1}to{transform:translate(-50%,150%);opacity:1}}@keyframes __bootpay-slide-up-mobile{0%{transform:translateY(100%);opacity:1}to{transform:translateY(0);opacity:1}}@keyframes __bootpay-slide-down-mobile{0%{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:1}}@keyframes __bootpay-fade-in{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes __bootpay-fade-out{0%{opacity:1;scale:1}to{opacity:0;scale:.9}}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- (function(ye,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(ye=typeof globalThis<"u"?globalThis:ye||self,Z(ye.Bootpay={}))})(this,function(ye){"use strict";const Z={PLATFORM:{JS:1,ANDROID:2,IOS:3,REST:4},STORAGE_PREFIX(r){return`__bootpay_track_${r}__`}},k0=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)}),se=r=>{let e=!1;return typeof r=="string"||Array.isArray(r)?e=r.length===0:e=r==null||ze(r,"object")&&r.constructor===Object&&Object.keys(r).length===0,e},q=r=>!se(r),ze=(r,e)=>typeof r===e,gs=(r,e=void 0)=>{if(q(e)){const t=typeof e!="string"?new URLSearchParams(JSON.parse(JSON.stringify(e))).toString():e;return/\?/.test(r)?`${r.replace(/&amp;/g,"&")}&${t}`:`${r.replace(/&amp;/g,"&")}?${t}`}else return r},mt=(r,e)=>{for(let t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r};var N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Bs(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),t}var P0={exports:{}};function bs(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Et={exports:{}};const _s=Bs(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var S0;function L(){return S0||(S0=1,function(r,e){(function(t,s){r.exports=s()})(N,function(){var t=t||function(s,i){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof N<"u"&&N.crypto&&(n=N.crypto),!n&&typeof bs=="function")try{n=_s}catch{}var m=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},d=Object.create||function(){function x(){}return function(l){var v;return x.prototype=l,v=new x,x.prototype=null,v}}(),p={},a=p.lib={},c=a.Base=function(){return{extend:function(x){var l=d(this);return x&&l.mixIn(x),(!l.hasOwnProperty("init")||this.init===l.init)&&(l.init=function(){l.$super.init.apply(this,arguments)}),l.init.prototype=l,l.$super=this,l},create:function(){var x=this.extend();return x.init.apply(x,arguments),x},init:function(){},mixIn:function(x){for(var l in x)x.hasOwnProperty(l)&&(this[l]=x[l]);x.hasOwnProperty("toString")&&(this.toString=x.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=a.WordArray=c.extend({init:function(x,l){x=this.words=x||[],l!=i?this.sigBytes=l:this.sigBytes=x.length*4},toString:function(x){return(x||u).stringify(this)},concat:function(x){var l=this.words,v=x.words,E=this.sigBytes,_=x.sigBytes;if(this.clamp(),E%4)for(var A=0;A<_;A++){var w=v[A>>>2]>>>24-A%4*8&255;l[E+A>>>2]|=w<<24-(E+A)%4*8}else for(var I=0;I<_;I+=4)l[E+I>>>2]=v[I>>>2];return this.sigBytes+=_,this},clamp:function(){var x=this.words,l=this.sigBytes;x[l>>>2]&=4294967295<<32-l%4*8,x.length=s.ceil(l/4)},clone:function(){var x=c.clone.call(this);return x.words=this.words.slice(0),x},random:function(x){for(var l=[],v=0;v<x;v+=4)l.push(m());return new g.init(l,x)}}),o=p.enc={},u=o.Hex={stringify:function(x){for(var l=x.words,v=x.sigBytes,E=[],_=0;_<v;_++){var A=l[_>>>2]>>>24-_%4*8&255;E.push((A>>>4).toString(16)),E.push((A&15).toString(16))}return E.join("")},parse:function(x){for(var l=x.length,v=[],E=0;E<l;E+=2)v[E>>>3]|=parseInt(x.substr(E,2),16)<<24-E%8*4;return new g.init(v,l/2)}},h=o.Latin1={stringify:function(x){for(var l=x.words,v=x.sigBytes,E=[],_=0;_<v;_++){var A=l[_>>>2]>>>24-_%4*8&255;E.push(String.fromCharCode(A))}return E.join("")},parse:function(x){for(var l=x.length,v=[],E=0;E<l;E++)v[E>>>2]|=(x.charCodeAt(E)&255)<<24-E%4*8;return new g.init(v,l)}},y=o.Utf8={stringify:function(x){try{return decodeURIComponent(escape(h.stringify(x)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(x){return h.parse(unescape(encodeURIComponent(x)))}},f=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(x){typeof x=="string"&&(x=y.parse(x)),this._data.concat(x),this._nDataBytes+=x.sigBytes},_process:function(x){var l,v=this._data,E=v.words,_=v.sigBytes,A=this.blockSize,w=A*4,I=_/w;x?I=s.ceil(I):I=s.max((I|0)-this._minBufferSize,0);var B=I*A,C=s.min(B*4,_);if(B){for(var F=0;F<B;F+=A)this._doProcessBlock(E,F);l=E.splice(0,B),v.sigBytes-=C}return new g.init(l,C)},clone:function(){var x=c.clone.call(this);return x._data=this._data.clone(),x},_minBufferSize:0});a.Hasher=f.extend({cfg:c.extend(),init:function(x){this.cfg=this.cfg.extend(x),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(x){return this._append(x),this._process(),this},finalize:function(x){x&&this._append(x);var l=this._doFinalize();return l},blockSize:16,_createHelper:function(x){return function(l,v){return new x.init(v).finalize(l)}},_createHmacHelper:function(x){return function(l,v){return new b.HMAC.init(x,v).finalize(l)}}});var b=p.algo={};return p}(Math);return t})}(Et)),Et.exports}(function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return t.enc.Utf8})})(P0);var Cs=P0.exports;const I0=Te(Cs);var T0={exports:{}};(function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.enc;m.Base64={stringify:function(p){var a=p.words,c=p.sigBytes,g=this._map;p.clamp();for(var o=[],u=0;u<c;u+=3)for(var h=a[u>>>2]>>>24-u%4*8&255,y=a[u+1>>>2]>>>24-(u+1)%4*8&255,f=a[u+2>>>2]>>>24-(u+2)%4*8&255,b=h<<16|y<<8|f,x=0;x<4&&u+x*.75<c;x++)o.push(g.charAt(b>>>6*(3-x)&63));var l=g.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(p){var a=p.length,c=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var o=0;o<c.length;o++)g[c.charCodeAt(o)]=o}var u=c.charAt(64);if(u){var h=p.indexOf(u);h!==-1&&(a=h)}return d(p,a,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function d(p,a,c){for(var g=[],o=0,u=0;u<a;u++)if(u%4){var h=c[p.charCodeAt(u-1)]<<u%4*2,y=c[p.charCodeAt(u)]>>>6-u%4*2,f=h|y;g[o>>>2]|=f<<24-o%4*8,o++}return n.create(g,o)}}(),t.enc.Base64})})(T0);var Be=T0.exports;const Re=Te(Be);class je{$blank(e){return se(e)}$present(e){return!this.$blank(e)}$type(e,t){return ze(e,t)}$uuid(){return k0()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),Re.stringify(I0.parse(e))}$decrypt(e){return I0.stringify(Re.parse(e))}getUserAgent(){return window.navigator.userAgent}}const Ke={debug:1,info:2,warning:3,error:4},H={level:Ke.warning,setLogLevel(r){this.level=r},messageStringify(r,e){try{return e=`${r}: ${ze(e,"object")?JSON.stringify(e):e}`}catch(t){console.error(`log parse error: ${t}`)}},debug(r,e){this.level<=Ke.debug&&console.log(this.messageStringify(r,e))},info(r,e){this.level<=Ke.info&&console.info(this.messageStringify(r,e))},warn(r,e){this.level<=Ke.warning&&console.warn(this.messageStringify(r,e))},error(r,e){this.level<=Ke.error&&console.error(this.messageStringify(r,e))}};class As extends je{constructor(){super(),this.$storage={}}get(e){let t="";try{t=window.localStorage.getItem(e)}catch{t=this.$storage[e]}return this.$present(t)?this.$decrypt(t):void 0}set(e,t){try{window.localStorage.setItem(e,this.$encrypt(t))}catch{this.$storage[e]=this.$encrypt(t)}return t}currentUserUUID(){const e=Z.STORAGE_PREFIX("uuid"),t=this.get(e);return this.$blank(t)?this.set(e,this.$uuid()):t}setUUID(e){const t=Z.STORAGE_PREFIX("uuid");return this.set(t,e)}getToJSON(e){const t=this.get(e);return this.$present(t)?this.caseMarshalToJson(t):t}setToJSON(e,t){return this.set(e,JSON.stringify(t)),t}caseMarshalToJson(e){try{return JSON.parse(e)}catch{return JSON.parse(e.replace(/\\\"/g,'"'))}}}class ws extends As{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round(new Date().getTime()/1e3),t=Z.STORAGE_PREFIX("session"),s=this.getToJSON(t);return this.$blank(s)||s.time+1800<e?this.setToJSON(t,{time:e,term:this.$blank(s)?-1:e-s.time,uuid:`${this.$uuid()}-${e}`}).uuid:s.uuid}currentTimeTerm(){const e=Z.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.term)?-1:t.term}currentTime(){const e=Z.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.time)?-1:t.time}setTime(e){const t=Math.round(new Date().getTime()/1e3),s=Z.STORAGE_PREFIX("session"),i=this.getToJSON(s),n=this.$blank(i)?{time:e>0?e:t,term:e>0?t-e:-1,uuid:`${this.$uuid()}-${t}`}:i;n.time=e,this.setToJSON(s,n)}generateKey(){return`${this.$uuid()}-${new Date().getTime()}`}setUser(e){return this.set(Z.STORAGE_PREFIX("user"),e===void 0?void 0:JSON.stringify(e)),e}getUser(){try{return JSON.parse(this.get(Z.STORAGE_PREFIX("user")))}catch(e){H.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`);return}}}const $e=new ws,ke={name:"@bootpay/client-js",version:"5.4.0",main:"dist/index.mjs",exports:{".":{import:"./dist/index.mjs",types:"./dist/index.d.ts"}},styles:"dist/index.css",scripts:{test:'echo "Error: no test specified" && exit 1',build:"rm -rf ./dist && vite build",deploy:"NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"},dependencies:{typescript:"^5.5.4"},devDependencies:{"@types/ws":"^8.5.5","@types/node":"^18.15.3","@webpack-cli/serve":"^2.0.5","webpack-dev-server":"^4.15.1",webpack:"^5.87.0","webpack-cli":"^5.1.4",axios:"^0.27.2","crypto-js":"^4.1.1","@types/crypto-js":"^4.1.1","@babel/core":"^7.22.5","@babel/plugin-transform-regenerator":"^7.22.5","@babel/plugin-transform-runtime":"^7.22.5","@babel/plugin-transform-object-assign":"^7.22.5","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-transform-destructuring":"^7.24.8","@babel/plugin-proposal-export-default-from":"^7.27.1","@babel/plugin-transform-class-properties":"^7.27.1","@babel/plugin-proposal-decorators":"^7.28.0","@babel/plugin-transform-private-methods":"^7.27.1","@babel/plugin-transform-typescript":"^7.28.0","@babel/preset-env":"^7.22.5","@babel/preset-typescript":"^7.22.5","@babel/runtime-corejs3":"^7.22.5","@babel/plugin-transform-classes":"^7.22.5","core-js":"^3.31.0","babel-loader":"^9.1.2","css-loader":"^6.8.1",sass:"^1.63.4","sass-loader":"^13.3.2","style-loader":"^3.3.3",vite:"^5.4.3","vite-plugin-dts":"^3.6.4","vite-plugin-tsconfig":"^1.0.4","vite-plugin-css-injected-by-js":"3.3.1"},resolutions:{"@webpack-cli/serve":"^1.3.1"},keywords:[],author:"",license:"ISC",description:""},R={mode:"production",locale:"ko",isSetLocale:!1,packageVersion:ke.version,applicationId:"",API_URL:{development:"https://dev-api.bootpay.co.kr/v2",stage:"https://stage-api.bootpay.co.kr/v2",production:"https://api.bootpay.co.kr/v2"},ANALYTICS_URL:{development:"https://dev-analytics.bootpay.co.kr",stage:"https://stage-analytics.bootpay.co.kr",production:"https://analytics.bootpay.co.kr"},DOOR_URL:{development:"https://door-dev.bootpay.co.kr",stage:"https://door-stage.bootpay.co.kr",production:"https://door.bootpay.co.kr"},WIDGET_URL:{development:"https://dev-widget.bootpay.co.kr",stage:"https://stage-widget.bootpay.co.kr",production:"https://widget.bootpay.co.kr"},sdkNames:{android:100,android_react_native:101,android_flutter:102,android_unity:103,ios:200,ios_react_native:201,ios_flutter:202,ios_unity:203,ios_objc:204,ios_swift_ui:205,mac_swift:206,mac_flutter:207},sdkVersion:"",sdkName:0,set(r){this.mode=r},setApplicationId(r){return this.applicationId=r,this.currentApplicationId(void 0)},setLocale(r){this.locale=r,this.isSetLocale=!0},currentApplicationId(r=void 0){return r===void 0?this.applicationId:r},setDevelopmentHost(r){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,r)},setVersion(r,e,t=void 0){this.sdkName=this.sdkNames[e]===void 0?0:this.sdkNames[e],this.sdkVersion=r,this.packageVersion=t===void 0||t===""?ke.version:t},toApi(r){return[this.API_URL[this.mode],r].join("/")},toDoor(r){return[this.DOOR_URL[this.mode],r].join("/")},toWidget(r){return[this.WIDGET_URL[this.mode],r].join("/")},isMobile(){if(typeof window>"u")return!1;const r=window.navigator.userAgent||window.navigator.vendor;return/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/.test(r)},isMobileSafari(){if(typeof window>"u")return!1;const r=window.navigator.userAgent;return(r.match(/iPad/i)||r.match(/iPhone/i))&&!r.match(/CriOS/i)},toAnalytics(r){return[this.ANALYTICS_URL[this.mode],r].join("/")}};class ae extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const Pe={__BOOTPAY_NAMESPACE:{},isBind:!1,initialize(){this.isBind||(typeof window<"u"&&(window.addBootpayEventListener=this.on,window.removeBootpayEventListener=this.off,window.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),typeof document<"u"&&(document.addBootpayEventListener=this.on,document.removeBootpayEventListener=this.off,document.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),typeof Element<"u"&&(Element.prototype.addBootpayEventListener=this.on,Element.prototype.removeBootpayEventListener=this.off,Element.prototype.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),this.isBind=!0)},on(r,e,t=void 0){return se(Pe.__BOOTPAY_NAMESPACE)&&(Pe.__BOOTPAY_NAMESPACE={}),this.addEventListener(r.split(".")[0],e,t||!1),Pe.__BOOTPAY_NAMESPACE[r]=e,this},off(r){return q(Pe.__BOOTPAY_NAMESPACE)&&q(Pe.__BOOTPAY_NAMESPACE[r])&&this.removeEventListener(r.split(".")[0],Pe.__BOOTPAY_NAMESPACE[r]),this}};class Ge extends je{constructor(e){super(),this.$resolve=null,this.$reject=null,this.$messageEventName=(e==null?void 0:e.messageEventName)??"message.BootpayEvent",this.$eventHooks=(e==null?void 0:e.messageEventHooks)??{},this.afterBind=e==null?void 0:e.afterBind,this.$childInstance=null,Pe.initialize()}setChildInstance(e){this.$childInstance=e}bind(e,t){this.$messageEventName&&window.resetBootpayEventListener(this.$messageEventName,s=>{const i=this.parseEvent(s.data);if(H.debug("event received",JSON.stringify(i)),q(i)&&q(i.event)){const n=this.hookFunction(i.hook);if(q(n)&&q(n[i.event]))return n[i.event](i.data,this);H.debug("event",`${this.$messageEventName}: ${i.event} is not defined`)}}),this.afterBind&&this.afterBind(),this.setCallbackFunction(e,t)}hookFunction(e){return this.$eventHooks[e]}reject(e){q(this.$reject)&&this.$reject(e)}resolve(e){q(this.$resolve)&&this.$resolve(e)}setCallbackFunction(e,t){this.$resolve=e,this.$reject=t}parseEvent(e){let t={};if(this.$present(e)&&this.$type(e,"string")){try{t=JSON.parse(e)}catch(s){H.info("json parsing failed",`data: ${e}, message: ${Xe(s)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}else return null}}const Xe=r=>typeof r=="string"?r.toUpperCase():r instanceof Error?r.message:r;class be extends je{constructor(e={}){super();const{iframeId:t="bootpay-iframe",template:s=this.defaultIframeHtml(),el:i=void 0}=e;this.el=i,this.$windowId=t,this.$template=s}defaultIframeHtml(){return`
1
+ (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(':root{--bootpay-progress-bg-overlay: transparent;--bootpay-progress-accent: #3a5fd9;--bootpay-progress-accent-light: rgba(58, 95, 217, .5);--bootpay-progress-accent-glow: rgba(58, 95, 217, .8);--bootpay-progress-text: rgba(255, 255, 255, .95);--bootpay-progress-text-sub: rgba(255, 255, 255, .6)}.bootpay-progress-background{position:fixed;display:flex!important;align-items:center;justify-content:center;background:var(--bootpay-progress-bg-overlay);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:200000;opacity:0;animation:bootpay-fade-in .25s ease-out forwards}.bootpay-progress-background.blur-off{background-color:transparent}.bootpay-progress-background .progress-message-window{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px 36px 24px;background:transparent;border-radius:20px;animation:bootpay-card-in .35s ease-out forwards}@media (min-width: 600px){.bootpay-progress-background .progress-message-window{padding:32px 44px 28px;border-radius:24px}}.bootpay-progress-background .progress-message-window .alfred-loading{position:relative;display:flex;align-items:center;justify-content:center;height:48px}@media (min-width: 600px){.bootpay-progress-background .progress-message-window .alfred-loading{height:56px}}.bootpay-progress-background .progress-message-window .bootpay-spinner{display:flex;align-items:center;justify-content:center;gap:10px}@media (min-width: 600px){.bootpay-progress-background .progress-message-window .bootpay-spinner{gap:12px}}.bootpay-progress-background .progress-message-window .bootpay-dot{display:block;width:10px;height:10px;border-radius:50%;background:var(--bootpay-progress-accent);box-shadow:0 0 10px var(--bootpay-progress-accent-glow);animation:bootpay-bounce 1.4s ease-in-out infinite}@media (min-width: 600px){.bootpay-progress-background .progress-message-window .bootpay-dot{width:12px;height:12px}}.bootpay-progress-background .progress-message-window .bootpay-dot:nth-child(1){animation-delay:0s}.bootpay-progress-background .progress-message-window .bootpay-dot:nth-child(2){animation-delay:.16s}.bootpay-progress-background .progress-message-window .bootpay-dot:nth-child(3){animation-delay:.32s}.bootpay-progress-background .progress-message-window .alfred-text{margin-top:10px;text-align:center;opacity:0;transform:translateY(6px);animation:bootpay-text-in .4s ease-out .2s forwards}@media (min-width: 600px){.bootpay-progress-background .progress-message-window .alfred-text{margin-top:12px}}.bootpay-progress-background .progress-message-window .alfred-text span.alfred-inner-text{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:13px;font-weight:400;color:var(--bootpay-progress-text-sub);letter-spacing:.02em}@media (min-width: 600px){.bootpay-progress-background .progress-message-window .alfred-text span.alfred-inner-text{font-size:14px}}@keyframes bootpay-fade-in{0%{opacity:0}to{opacity:1}}@keyframes bootpay-card-in{0%{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}@keyframes bootpay-bounce{0%,80%,to{transform:translateY(0);opacity:.4;box-shadow:0 0 6px var(--bootpay-progress-accent-light)}40%{transform:translateY(-18px);opacity:1;box-shadow:0 0 16px var(--bootpay-progress-accent-glow)}}@keyframes bootpay-text-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}:root{--bootpay-popup-bottom: 72px;--bootpay-primary: #507cf3;--bootpay-primary-hover: #3f6be2;--bootpay-white: #ffffff;--bootpay-black: #000000;--bootpay-gray-dark: #333333;--bootpay-gray-light: #888888;--bootpay-gray-bg: #f2f2f2;--bootpay-overlay: rgba(0, 0, 0, .7);--bootpay-radius: 12px;--bootpay-radius-sm: 5px;--bootpay-radius-lg: 16px;--bootpay-radius-xl: 20px;--bootpay-radius-xxl: 24px;--bootpay-shadow: 0 0 10px rgba(0, 0, 0, .1);--bootpay-z-modal: 9999;--bootpay-z-spinner: 200000;--bootpay-z-close: 10001;--bootpay-blur: blur(5px)}body.bootpay-open{position:fixed!important;left:0;right:0;bottom:0;top:0;padding:0;margin:0;height:100vh!important;overflow:hidden!important;-webkit-overflow-scrolling:auto!important}body.bootpay-inherit .fade-in,body.bootpay-open .fade-in{animation:__bootpay-fade-in .1s linear}body.bootpay-inherit .fade-out,body.bootpay-open .fade-out{animation:__bootpay-fade-out .1s linear}body.bootpay-inherit .slide-up,body.bootpay-open .slide-up{animation:__bootpay-slide-up .3s cubic-bezier(.25,.46,.45,.94) forwards!important}@media (max-width: 600px){body.bootpay-inherit .slide-up,body.bootpay-open .slide-up{animation:__bootpay-slide-up-mobile .1s cubic-bezier(.25,.46,.45,.94) forwards!important}}body.bootpay-inherit .slide-static-up,body.bootpay-open .slide-static-up{animation:__bootpay-slide-up-mobile .1s cubic-bezier(.25,.46,.45,.94) forwards!important}body.bootpay-inherit .slide-down,body.bootpay-open .slide-down{animation:__bootpay-slide-down .1s ease-in forwards!important}@media (max-width: 600px){body.bootpay-inherit .slide-down,body.bootpay-open .slide-down{animation:__bootpay-slide-down-mobile .1s ease-in forwards!important}}body.bootpay-inherit .slide-static-down,body.bootpay-open .slide-static-down{animation:__bootpay-slide-down-mobile .1s ease-in forwards!important}body.bootpay-inherit.bootpay-mobile .bootpay-payment-background,body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:transparent}@media (min-width: 600px){body.bootpay-inherit.bootpay-mobile .bootpay-payment-background,body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:var(--bootpay-overlay)}}body.bootpay-inherit .bootpay-transparent-background,body.bootpay-open .bootpay-transparent-background{position:relative;height:100%;z-index:var(--bootpay-z-modal)}body.bootpay-inherit .bootpay-transparent-background.__overflow-y,body.bootpay-open .bootpay-transparent-background.__overflow-y{overflow-y:auto}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window{position:relative;display:block;width:500px;height:auto}@media (max-width: 768px){body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window{width:100%}}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window>iframe{width:100%!important;border-radius:0}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window>iframe.transparent,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}body.bootpay-inherit .bootpay-payment-background,body.bootpay-open .bootpay-payment-background{position:fixed;left:0;right:0;top:0;bottom:0;display:block;text-align:center;background-color:var(--bootpay-overlay);z-index:var(--bootpay-z-modal);backdrop-filter:var(--bootpay-blur);-webkit-backdrop-filter:var(--bootpay-blur);overflow:hidden}@media (max-height: 850px){body.bootpay-inherit .bootpay-payment-background,body.bootpay-open .bootpay-payment-background{overflow-y:auto}}body.bootpay-inherit .bootpay-payment-background:before,body.bootpay-open .bootpay-payment-background:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-inherit .bootpay-payment-background.__alert,body.bootpay-open .bootpay-payment-background.__alert{padding:1rem}body.bootpay-inherit .bootpay-payment-background.__alert:before,body.bootpay-open .bootpay-payment-background.__alert:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-inherit .bootpay-payment-background.__alert>.slider-window,body.bootpay-open .bootpay-payment-background.__alert>.slider-window{max-width:480px;position:absolute;width:100%;background-color:var(--bootpay-white);border-radius:24px;left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;box-shadow:0 10px 40px #00000014,0 4px 12px #0000000a;border:1px solid #f1f5f9}body.bootpay-inherit .bootpay-payment-background.__alert>.slider-window.__bootpay-hidden,body.bootpay-open .bootpay-payment-background.__alert>.slider-window.__bootpay-hidden{display:none}@media (max-width: 600px){body.bootpay-inherit .bootpay-payment-background.__alert>.slider-window,body.bootpay-open .bootpay-payment-background.__alert>.slider-window{left:0;right:0;bottom:0;width:100%;max-width:inherit;top:auto;border-bottom-left-radius:0;border-bottom-right-radius:0;transform:translateY(0) translate(0)}}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{position:absolute;max-width:400px;width:100%;background-color:var(--bootpay-white);border-radius:var(--bootpay-radius-xl);left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;box-shadow:0 10px 40px #00000014,0 4px 12px #0000000a;border:1px solid #f1f5f9}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{left:1rem;right:1rem;width:auto;top:50%;transform:translateY(-50%)}}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header{display:flex;align-items:center;gap:.75rem;padding:1.5rem 1.5rem .75rem;text-align:left;position:relative;background-color:var(--bootpay-white)}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-icon,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:40px;height:40px;border-radius:50%;color:var(--bootpay-primary);background-color:#507cf31a}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-icon>svg,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-icon>svg{width:22px;height:22px}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-title,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay__alert-title{flex:1;font-size:18px;font-weight:700;line-height:1.4;color:#1e293b}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn{top:1rem;right:1rem;width:32px;height:32px;padding:0;border-radius:8px;background-color:transparent;transition:background-color .15s ease}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:hover,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:hover{background-color:#f1f5f9}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after{left:50%;top:50%;width:1.5px;height:16px;background-color:#64748b}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before{transform:translate(-50%,-50%) rotate(45deg)}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after{transform:translate(-50%,-50%) rotate(-45deg)}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-body,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-body{padding:.25rem 1.5rem 1.25rem;text-align:left;font-size:15px;line-height:1.6;color:#475569;background:transparent}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer{display:flex;gap:.75rem;padding:.75rem 1.5rem 1.5rem;background-color:#f8fafc}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close{flex:1;padding:.875rem 1rem;border-radius:var(--bootpay-radius);background-color:var(--bootpay-white);border:1px solid #e2e8f0;color:#475569;font-size:15px;font-weight:600;cursor:pointer;outline:none;transition:all .2s ease}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover{background-color:#f1f5f9;border-color:#cbd5e1}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary{background-color:var(--bootpay-primary);border-color:var(--bootpay-primary);color:var(--bootpay-white);box-shadow:0 4px 12px #507cf340}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover{background-color:var(--bootpay-primary-hover);border-color:var(--bootpay-primary-hover)}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__slider-icon,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__slider-icon{display:flex;align-items:center;justify-content:center;width:64px;height:64px;margin:1.5rem auto 1.25rem;border-radius:50%;color:var(--bootpay-primary);background-color:#507cf31a;box-shadow:0 0 0 6px #507cf30f}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__slider-icon>svg,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__slider-icon>svg{width:32px;height:32px}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header{padding:0 2rem .5rem;text-align:center;font-size:20px;font-weight:700;line-height:1.4;color:#1e293b;background-color:var(--bootpay-white)}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header.__text-center,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header.__text-center{text-align:center}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body{padding:.5rem 1rem 1.5rem;text-align:center;font-size:16px;color:var(--bootpay-gray-dark);line-height:1.5;background:transparent}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body.slider-body,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body.slider-body{padding:.5rem 1.5rem 1.75rem;background:transparent}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button{display:block;width:100%;height:52px;padding:0 1.5rem;color:#4e5968;font-size:16px;font-weight:600;border-radius:14px;outline:none;border:0;cursor:pointer;margin-top:.5rem;background-color:#f2f4f6;transition:background-color .2s ease,transform .1s ease}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:first-child,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:first-child{margin-top:0}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:hover,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:hover{background-color:#e5e8eb}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:active,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:active{transform:scale(.98)}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active{color:var(--bootpay-white);background-color:var(--bootpay-primary);box-shadow:0 4px 12px #507cf340}body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active:hover,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active:hover{background-color:var(--bootpay-primary-hover)}body.bootpay-inherit .bootpay-payment-background>.bootpay-confirm-form,body.bootpay-open .bootpay-payment-background>.bootpay-confirm-form{position:absolute;right:0;bottom:0;height:0;line-height:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:relative;display:inline-block;vertical-align:middle}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}@media (max-width: 1120px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice{position:absolute;left:0;right:0;top:0;bottom:0;border-radius:0!important}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice>iframe{width:100%!important;height:100%!important;border-radius:0}}@media (max-height: 1020px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice{position:absolute;left:0;right:0;top:0;bottom:0;border-radius:0!important}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.bootpay-commerce-invoice>iframe{width:100%!important;height:100%!important;border-radius:0}}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:absolute;left:0;right:0;top:0;bottom:0;border-radius:0!important}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{position:absolute;max-width:inherit;left:0;right:0;top:0;bottom:0;height:100%}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%!important;height:100%!important;border-radius:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.transparent,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{position:absolute;display:none;top:-32px;right:4px;color:var(--bootpay-white);font-size:32px;text-decoration:none;outline:none;box-shadow:none;border:0;background-color:transparent}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:var(--bootpay-white)!important}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{top:1rem;right:16px;color:var(--bootpay-black);padding:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:var(--bootpay-black)!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{--bootpay-popup-accent: var(--bootpay-primary);--bootpay-popup-accent-hover: var(--bootpay-primary-hover);--bootpay-popup-accent-soft: rgba(80, 124, 243, .08);--bootpay-popup-accent-text: #3f6be2;--bootpay-popup-on-accent: var(--bootpay-white);position:relative;width:400px;height:600px;display:none;background-color:var(--bootpay-white);border-radius:var(--bootpay-radius-lg);box-shadow:0 24px 48px -12px #0f172a47;overflow:hidden}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;border-radius:0;box-shadow:none}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header{position:absolute;left:0;right:0;top:0;height:56px;color:var(--bootpay-gray-dark);background-color:var(--bootpay-white);text-align:left}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn{top:12px;right:12px;width:32px;height:32px;padding:0;border-radius:8px;cursor:pointer;transition:background-color .15s ease}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:hover,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:hover{background-color:var(--bootpay-gray-bg)}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:focus-visible,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:focus-visible{outline:2px solid var(--bootpay-popup-accent)!important;outline-offset:2px}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:before,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:after,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:after{left:50%;top:50%;width:1.5px;height:16px;background-color:var(--bootpay-gray-light)}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:before{transform:translate(-50%,-50%) rotate(45deg)}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:after,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header>.bootpay-close-btn:after{transform:translate(-50%,-50%) rotate(-45deg)}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body{position:absolute;left:0;right:0;top:56px;bottom:var(--bootpay-popup-bottom);display:flex;flex-direction:column;align-items:center;padding:1rem 1.5rem;text-align:center;font-size:14px}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id{max-width:100%;margin:auto 0 .5rem;font-size:15px;line-height:1.4;color:var(--bootpay-gray-light);font-weight:500!important;text-wrap:balance;word-break:keep-all;overflow-wrap:anywhere}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id{margin:0;font-size:36px;color:var(--bootpay-gray-dark);font-weight:700;letter-spacing:-.02em;line-height:1.2;font-variant-numeric:tabular-nums}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text{display:flex;align-items:flex-start;gap:8px;width:100%;margin-top:auto;padding:12px 14px;border-radius:var(--bootpay-radius);background-color:var(--bootpay-popup-accent-soft);color:var(--bootpay-popup-accent-text);font-size:14px;font-weight:500;line-height:1.5;text-align:left;word-break:keep-all;box-sizing:border-box}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text>svg,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text>svg{flex:none;width:18px;height:18px;margin-top:1px}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:flex-start;height:var(--bootpay-popup-bottom);padding:0 1.5rem;margin:0;box-sizing:border-box}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer{height:calc(var(--bootpay-popup-bottom) + env(safe-area-inset-bottom,0px));padding-bottom:env(safe-area-inset-bottom,0px)}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button{display:block;width:100%;height:52px;padding:0 1rem;outline:none;border:none;background-color:var(--bootpay-popup-accent);border-radius:var(--bootpay-radius);color:var(--bootpay-popup-on-accent);font-size:16px;font-weight:600;cursor:pointer;transition:background-color .2s ease,transform .1s ease}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover{background-color:var(--bootpay-popup-accent-hover)}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active{transform:scale(.98)}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active{box-shadow:none}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:focus-visible,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:focus-visible{outline:2px solid var(--bootpay-popup-accent);outline-offset:2px}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe{width:100%;height:100%;display:none;border:0!important;outline:0!important;border-radius:0;box-shadow:none}@media (max-width: 1100px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe{width:100%!important;height:100%!important;overflow-y:auto}}@media (min-width: 1100px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.bootpay-commerce-checkout-iframe{width:0;height:0;border:0;outline:0;border-radius:0;box-shadow:none!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%;height:100%;display:none;border:0!important;outline:0!important;border-radius:0;box-shadow:none}@media (min-width: 600px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:0;height:0;border:0;outline:0;border-radius:0;box-shadow:none!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{border-radius:0}@media (min-width: 600px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{width:0;height:0;border:0;outline:0;border-radius:var(--bootpay-radius-sm)!important;box-shadow:none!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-up,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-up{animation:__bootpay-slide-up .3s linear}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-down,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-down{animation:__bootpay-slide-down .3s linear}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-confirm-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-confirm-window>iframe{display:none;width:1px;height:1px;background:transparent;border:0!important;outline:0!important}.bootpay-close-btn{position:absolute;box-shadow:none;background-color:transparent;outline:0;z-index:var(--bootpay-z-close);right:8px;top:8px;height:21px;width:21px;border:0!important;outline:none!important}@media (min-width: 600px){.bootpay-close-btn{right:4px;top:-32px;width:25px;height:25px;background:transparent;outline:none!important;border:0!important}}.bootpay-close-btn.active,.bootpay-close-btn:focus{outline:none!important;border:0!important}.bootpay-close-btn:before,.bootpay-close-btn:after{position:absolute;left:8px;top:2px;content:" ";height:24px;width:1px;background-color:var(--bootpay-gray-dark)}@media (min-width: 600px){.bootpay-close-btn:before,.bootpay-close-btn:after{height:23px;top:0;width:2px;background-color:var(--bootpay-white)}}.bootpay-close-btn:before{transform:rotate(45deg)}.bootpay-close-btn:after{transform:rotate(-45deg)}@keyframes __bootpay-slide-up{0%{transform:translate(-50%,150%);opacity:1}to{transform:translate(-50%,-50%);opacity:1}}@keyframes __bootpay-slide-down{0%{transform:translate(-50%,-50%);opacity:1}to{transform:translate(-50%,150%);opacity:1}}@keyframes __bootpay-slide-up-mobile{0%{transform:translateY(100%);opacity:1}to{transform:translateY(0);opacity:1}}@keyframes __bootpay-slide-down-mobile{0%{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:1}}@keyframes __bootpay-fade-in{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes __bootpay-fade-out{0%{opacity:1;scale:1}to{opacity:0;scale:.9}}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ (function(Q,q){typeof exports=="object"&&typeof module<"u"?q(exports):typeof define=="function"&&define.amd?define(["exports"],q):(Q=typeof globalThis<"u"?globalThis:Q||self,q(Q.Bootpay={}))})(this,function(Q){"use strict";const q={PLATFORM:{JS:1,ANDROID:2,IOS:3,REST:4},STORAGE_PREFIX(s){return`__bootpay_track_${s}__`}},Fe=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{let e=Math.random()*16|0;return(s=="x"?e:e&3|8).toString(16)}),j=s=>{let e=!1;return typeof s=="string"||Array.isArray(s)?e=s.length===0:e=s==null||fe(s,"object")&&s.constructor===Object&&Object.keys(s).length===0,e},N=s=>!j(s),fe=(s,e)=>typeof s===e,dt=(s,e=void 0)=>{if(N(e)){const t=typeof e!="string"?new URLSearchParams(JSON.parse(JSON.stringify(e))).toString():e;return/\?/.test(s)?`${s.replace(/&amp;/g,"&")}&${t}`:`${s.replace(/&amp;/g,"&")}?${t}`}else return s},Pe=(s,e)=>{for(let t in e)e.hasOwnProperty(t)&&(s[t]=e[t]);return s};var K=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pe(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function ct(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var o=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return s[r]}})}),t}var We={exports:{}};function lt(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xe={exports:{}};const pt=ct(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Le;function Z(){return Le||(Le=1,function(s,e){(function(t,r){s.exports=r()})(K,function(){var t=t||function(r,o){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof K<"u"&&K.crypto&&(i=K.crypto),!i&&typeof lt=="function")try{i=pt}catch{}var g=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},$=Object.create||function(){function c(){}return function(n){var l;return c.prototype=n,l=new c,c.prototype=null,l}}(),T={},a=T.lib={},E=a.Base=function(){return{extend:function(c){var n=$(this);return c&&n.mixIn(c),(!n.hasOwnProperty("init")||this.init===n.init)&&(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var c=this.extend();return c.init.apply(c,arguments),c},init:function(){},mixIn:function(c){for(var n in c)c.hasOwnProperty(n)&&(this[n]=c[n]);c.hasOwnProperty("toString")&&(this.toString=c.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),B=a.WordArray=E.extend({init:function(c,n){c=this.words=c||[],n!=o?this.sigBytes=n:this.sigBytes=c.length*4},toString:function(c){return(c||w).stringify(this)},concat:function(c){var n=this.words,l=c.words,b=this.sigBytes,I=c.sigBytes;if(this.clamp(),b%4)for(var C=0;C<I;C++){var W=l[C>>>2]>>>24-C%4*8&255;n[b+C>>>2]|=W<<24-(b+C)%4*8}else for(var F=0;F<I;F+=4)n[b+F>>>2]=l[F>>>2];return this.sigBytes+=I,this},clamp:function(){var c=this.words,n=this.sigBytes;c[n>>>2]&=4294967295<<32-n%4*8,c.length=r.ceil(n/4)},clone:function(){var c=E.clone.call(this);return c.words=this.words.slice(0),c},random:function(c){for(var n=[],l=0;l<c;l+=4)n.push(g());return new B.init(n,c)}}),p=T.enc={},w=p.Hex={stringify:function(c){for(var n=c.words,l=c.sigBytes,b=[],I=0;I<l;I++){var C=n[I>>>2]>>>24-I%4*8&255;b.push((C>>>4).toString(16)),b.push((C&15).toString(16))}return b.join("")},parse:function(c){for(var n=c.length,l=[],b=0;b<n;b+=2)l[b>>>3]|=parseInt(c.substr(b,2),16)<<24-b%8*4;return new B.init(l,n/2)}},S=p.Latin1={stringify:function(c){for(var n=c.words,l=c.sigBytes,b=[],I=0;I<l;I++){var C=n[I>>>2]>>>24-I%4*8&255;b.push(String.fromCharCode(C))}return b.join("")},parse:function(c){for(var n=c.length,l=[],b=0;b<n;b++)l[b>>>2]|=(c.charCodeAt(b)&255)<<24-b%4*8;return new B.init(l,n)}},_=p.Utf8={stringify:function(c){try{return decodeURIComponent(escape(S.stringify(c)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(c){return S.parse(unescape(encodeURIComponent(c)))}},P=a.BufferedBlockAlgorithm=E.extend({reset:function(){this._data=new B.init,this._nDataBytes=0},_append:function(c){typeof c=="string"&&(c=_.parse(c)),this._data.concat(c),this._nDataBytes+=c.sigBytes},_process:function(c){var n,l=this._data,b=l.words,I=l.sigBytes,C=this.blockSize,W=C*4,F=I/W;c?F=r.ceil(F):F=r.max((F|0)-this._minBufferSize,0);var d=F*C,h=r.min(d*4,I);if(d){for(var k=0;k<d;k+=C)this._doProcessBlock(b,k);n=b.splice(0,d),l.sigBytes-=h}return new B.init(n,h)},clone:function(){var c=E.clone.call(this);return c._data=this._data.clone(),c},_minBufferSize:0});a.Hasher=P.extend({cfg:E.extend(),init:function(c){this.cfg=this.cfg.extend(c),this.reset()},reset:function(){P.reset.call(this),this._doReset()},update:function(c){return this._append(c),this._process(),this},finalize:function(c){c&&this._append(c);var n=this._doFinalize();return n},blockSize:16,_createHelper:function(c){return function(n,l){return new c.init(l).finalize(n)}},_createHmacHelper:function(c){return function(n,l){return new D.HMAC.init(c,l).finalize(n)}}});var D=T.algo={};return T}(Math);return t})}(xe)),xe.exports}(function(s,e){(function(t,r){s.exports=r(Z())})(K,function(t){return t.enc.Utf8})})(We);var ht=We.exports;const ve=pe(ht);var Te={exports:{}},He;function qe(){return He||(He=1,function(s,e){(function(t,r){s.exports=r(Z())})(K,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,g=r.enc;g.Base64={stringify:function(T){var a=T.words,E=T.sigBytes,B=this._map;T.clamp();for(var p=[],w=0;w<E;w+=3)for(var S=a[w>>>2]>>>24-w%4*8&255,_=a[w+1>>>2]>>>24-(w+1)%4*8&255,P=a[w+2>>>2]>>>24-(w+2)%4*8&255,D=S<<16|_<<8|P,c=0;c<4&&w+c*.75<E;c++)p.push(B.charAt(D>>>6*(3-c)&63));var n=B.charAt(64);if(n)for(;p.length%4;)p.push(n);return p.join("")},parse:function(T){var a=T.length,E=this._map,B=this._reverseMap;if(!B){B=this._reverseMap=[];for(var p=0;p<E.length;p++)B[E.charCodeAt(p)]=p}var w=E.charAt(64);if(w){var S=T.indexOf(w);S!==-1&&(a=S)}return $(T,a,B)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function $(T,a,E){for(var B=[],p=0,w=0;w<a;w++)if(w%4){var S=E[T.charCodeAt(w-1)]<<w%4*2,_=E[T.charCodeAt(w)]>>>6-w%4*2,P=S|_;B[p>>>2]|=P<<24-p%4*8,p++}return i.create(B,p)}}(),t.enc.Base64})}(Te)),Te.exports}var ut=qe();const he=pe(ut);class ge{$blank(e){return j(e)}$present(e){return!this.$blank(e)}$type(e,t){return fe(e,t)}$uuid(){return Fe()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),he.stringify(ve.parse(e))}$decrypt(e){return ve.stringify(he.parse(e))}getUserAgent(){return window.navigator.userAgent}}const be={debug:1,info:2,warning:3,error:4},A={level:be.warning,setLogLevel(s){this.level=s},messageStringify(s,e){try{return e=`${s}: ${fe(e,"object")?JSON.stringify(e):e}`}catch(t){console.error(`log parse error: ${t}`)}},debug(s,e){this.level<=be.debug&&console.log(this.messageStringify(s,e))},info(s,e){this.level<=be.info&&console.info(this.messageStringify(s,e))},warn(s,e){this.level<=be.warning&&console.warn(this.messageStringify(s,e))},error(s,e){this.level<=be.error&&console.error(this.messageStringify(s,e))}};class yt extends ge{constructor(){super(),this.$storage={}}get(e){let t="";try{t=window.localStorage.getItem(e)}catch{t=this.$storage[e]}return this.$present(t)?this.$decrypt(t):void 0}set(e,t){try{window.localStorage.setItem(e,this.$encrypt(t))}catch{this.$storage[e]=this.$encrypt(t)}return t}currentUserUUID(){const e=q.STORAGE_PREFIX("uuid"),t=this.get(e);return this.$blank(t)?this.set(e,this.$uuid()):t}setUUID(e){const t=q.STORAGE_PREFIX("uuid");return this.set(t,e)}getToJSON(e){const t=this.get(e);return this.$present(t)?this.caseMarshalToJson(t):t}setToJSON(e,t){return this.set(e,JSON.stringify(t)),t}caseMarshalToJson(e){try{return JSON.parse(e)}catch{return JSON.parse(e.replace(/\\\"/g,'"'))}}}class mt extends yt{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round(new Date().getTime()/1e3),t=q.STORAGE_PREFIX("session"),r=this.getToJSON(t);return this.$blank(r)||r.time+1800<e?this.setToJSON(t,{time:e,term:this.$blank(r)?-1:e-r.time,uuid:`${this.$uuid()}-${e}`}).uuid:r.uuid}currentTimeTerm(){const e=q.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.term)?-1:t.term}currentTime(){const e=q.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.time)?-1:t.time}setTime(e){const t=Math.round(new Date().getTime()/1e3),r=q.STORAGE_PREFIX("session"),o=this.getToJSON(r),i=this.$blank(o)?{time:e>0?e:t,term:e>0?t-e:-1,uuid:`${this.$uuid()}-${t}`}:o;i.time=e,this.setToJSON(r,i)}generateKey(){return`${this.$uuid()}-${new Date().getTime()}`}setUser(e){return this.set(q.STORAGE_PREFIX("user"),e===void 0?void 0:JSON.stringify(e)),e}getUser(){try{return JSON.parse(this.get(q.STORAGE_PREFIX("user")))}catch(e){A.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`);return}}}const ae=new mt,de={name:"@bootpay/client-js",version:"5.5.2",main:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.mjs"},"./payment":{types:"./dist/payment.d.ts",import:"./dist/payment.mjs"}},typesVersions:{"*":{payment:["dist/payment.d.ts"]}},styles:"dist/index.css",scripts:{test:'echo "Error: no test specified" && exit 1',build:"rm -rf ./dist && vite build && vite build --mode umd",deploy:"NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"},dependencies:{typescript:"^5.5.4"},devDependencies:{"@types/ws":"^8.5.5","@types/node":"^18.15.3","@webpack-cli/serve":"^2.0.5","webpack-dev-server":"^4.15.1",webpack:"^5.87.0","webpack-cli":"^5.1.4",axios:"^0.27.2","crypto-js":"^4.1.1","@types/crypto-js":"^4.1.1","@babel/core":"^7.22.5","@babel/plugin-transform-regenerator":"^7.22.5","@babel/plugin-transform-runtime":"^7.22.5","@babel/plugin-transform-object-assign":"^7.22.5","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-transform-destructuring":"^7.24.8","@babel/plugin-proposal-export-default-from":"^7.27.1","@babel/plugin-transform-class-properties":"^7.27.1","@babel/plugin-proposal-decorators":"^7.28.0","@babel/plugin-transform-private-methods":"^7.27.1","@babel/plugin-transform-typescript":"^7.28.0","@babel/preset-env":"^7.22.5","@babel/preset-typescript":"^7.22.5","@babel/runtime-corejs3":"^7.22.5","@babel/plugin-transform-classes":"^7.22.5","core-js":"^3.31.0","babel-loader":"^9.1.2","css-loader":"^6.8.1",sass:"^1.63.4","sass-loader":"^13.3.2","style-loader":"^3.3.3",vite:"^5.4.3","vite-plugin-dts":"^3.6.4","vite-plugin-tsconfig":"^1.0.4","vite-plugin-css-injected-by-js":"3.3.1"},resolutions:{"@webpack-cli/serve":"^1.3.1"},keywords:[],author:"",license:"ISC",description:""},x={mode:"production",locale:"ko",isSetLocale:!1,packageVersion:de.version,applicationId:"",API_URL:{development:"https://dev-api.bootpay.co.kr/v2",stage:"https://stage-api.bootpay.co.kr/v2",production:"https://api.bootpay.co.kr/v2"},ANALYTICS_URL:{development:"https://dev-analytics.bootpay.co.kr",stage:"https://stage-analytics.bootpay.co.kr",production:"https://analytics.bootpay.co.kr"},DOOR_URL:{development:"https://door-dev.bootpay.co.kr",stage:"https://door-stage.bootpay.co.kr",production:"https://door.bootpay.co.kr"},WIDGET_URL:{development:"https://dev-widget.bootpay.co.kr",stage:"https://stage-widget.bootpay.co.kr",production:"https://widget.bootpay.co.kr"},ONBOARDING_URL:{development:"https://dev-admin.bootpay.co.kr",stage:"https://stage-admin.bootpay.co.kr",production:"https://admin.bootpay.co.kr"},sdkNames:{android:100,android_react_native:101,android_flutter:102,android_unity:103,ios:200,ios_react_native:201,ios_flutter:202,ios_unity:203,ios_objc:204,ios_swift_ui:205,mac_swift:206,mac_flutter:207},sdkVersion:"",sdkName:0,set(s){this.mode=s},setApplicationId(s){return this.applicationId=s,this.currentApplicationId(void 0)},setLocale(s){this.locale=s,this.isSetLocale=!0},currentApplicationId(s=void 0){return s===void 0?this.applicationId:s},setDevelopmentHost(s){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,s)},setVersion(s,e,t=void 0){this.sdkName=this.sdkNames[e]===void 0?0:this.sdkNames[e],this.sdkVersion=s,this.packageVersion=t===void 0||t===""?de.version:t},toApi(s){return[this.API_URL[this.mode],s].join("/")},toDoor(s){return[this.DOOR_URL[this.mode],s].join("/")},toWidget(s){return[this.WIDGET_URL[this.mode],s].join("/")},toOnboarding(s){return[this.ONBOARDING_URL[this.mode],s].join("/")},isMobile(){if(typeof window>"u")return!1;const s=window.navigator.userAgent||window.navigator.vendor;return/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/.test(s)},isMobileSafari(){if(typeof window>"u")return!1;const s=window.navigator.userAgent;return(s.match(/iPad/i)||s.match(/iPhone/i))&&!s.match(/CriOS/i)},toAnalytics(s){return[this.ANALYTICS_URL[this.mode],s].join("/")}};class V extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const ce={__BOOTPAY_NAMESPACE:{},isBind:!1,initialize(){this.isBind||(typeof window<"u"&&(window.addBootpayEventListener=this.on,window.removeBootpayEventListener=this.off,window.resetBootpayEventListener=function(s,e,t){this.removeBootpayEventListener(s).addBootpayEventListener(s,e,t)}),typeof document<"u"&&(document.addBootpayEventListener=this.on,document.removeBootpayEventListener=this.off,document.resetBootpayEventListener=function(s,e,t){this.removeBootpayEventListener(s).addBootpayEventListener(s,e,t)}),typeof Element<"u"&&(Element.prototype.addBootpayEventListener=this.on,Element.prototype.removeBootpayEventListener=this.off,Element.prototype.resetBootpayEventListener=function(s,e,t){this.removeBootpayEventListener(s).addBootpayEventListener(s,e,t)}),this.isBind=!0)},on(s,e,t=void 0){return j(ce.__BOOTPAY_NAMESPACE)&&(ce.__BOOTPAY_NAMESPACE={}),this.addEventListener(s.split(".")[0],e,t||!1),ce.__BOOTPAY_NAMESPACE[s]=e,this},off(s){return N(ce.__BOOTPAY_NAMESPACE)&&N(ce.__BOOTPAY_NAMESPACE[s])&&this.removeEventListener(s.split(".")[0],ce.__BOOTPAY_NAMESPACE[s]),this}};class ue extends ge{constructor(e){super(),this.$resolve=null,this.$reject=null,this.$messageEventName=(e==null?void 0:e.messageEventName)??"message.BootpayEvent",this.$eventHooks=(e==null?void 0:e.messageEventHooks)??{},this.afterBind=e==null?void 0:e.afterBind,this.$childInstance=null,ce.initialize()}setChildInstance(e){this.$childInstance=e}bind(e,t){this.$messageEventName&&window.resetBootpayEventListener(this.$messageEventName,r=>{const o=this.parseEvent(r.data);if(A.debug("event received",JSON.stringify(o)),N(o)&&N(o.event)){const i=this.hookFunction(o.hook);if(N(i)&&N(i[o.event]))return i[o.event](o.data,this);A.debug("event",`${this.$messageEventName}: ${o.event} is not defined`)}}),this.afterBind&&this.afterBind(),this.setCallbackFunction(e,t)}hookFunction(e){return this.$eventHooks[e]}reject(e){N(this.$reject)&&this.$reject(e)}resolve(e){N(this.$resolve)&&this.$resolve(e)}setCallbackFunction(e,t){this.$resolve=e,this.$reject=t}parseEvent(e){let t={};if(this.$present(e)&&this.$type(e,"string")){try{t=JSON.parse(e)}catch(r){A.info("json parsing failed",`data: ${e}, message: ${ye(r)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}else return null}}const ye=s=>typeof s=="string"?s.toUpperCase():s instanceof Error?s.message:s;class ee extends ge{constructor(e={}){super();const{iframeId:t="bootpay-iframe",template:r=this.defaultIframeHtml(),el:o=void 0}=e;this.el=o,this.$windowId=t,this.$template=r}defaultIframeHtml(){return`
3
3
  <iframe id="${this.$iFrameId}" src="" frameborder="0" allowtransparency="true" scrolling="no" style="background: transparent; width: 100%; height: 100%;"></iframe>
4
- `}byId(e){return document.getElementById(e)}createTemplateHtml(){this.byId(this.$windowId)===null&&document.body.insertAdjacentHTML("beforeend",this.$template)}bodyOpen(e=void 0,t=!1){const s=document.querySelector("body");t||(this.$present(s.className)?s.className=`${s.className} bootpay-open`:s.className="bootpay-open"),this.$present(e)&&(s.className=`${s.className} ${e}`)}bodyClose(){const e=document.querySelector("body");e.className=e.className.replace("bootpay-open","")}templateResize(e,t){const s=this.byId(e);s!==void 0&&this.applyStylesToElement(s,t)}applyStylesToElement(e,t){if(t!==void 0)for(let s in Object.keys(t)){let i=Object.keys(t)[s],n=t[i];this.$present(n)&&!String(n).match(/%/)&&!String(n).match(/vh/)&&(i.match(/width/)||i.match(/Width/)||i.match(/height/)||i.match(/Height/))&&(n=`${String(t[i]).replace(/px/gi,"")}px`),e.style.setProperty(i,n)}}isRendered(){const e=document.getElementById(this.$iFrameId);return H.debug("isRendered",`iFrameElement: ${e}`),e!==null&&e.src!==null&&e.src!==""}postMessage(e,t=void 0){var i;const s=this.byId(this.$iFrameId);(i=s==null?void 0:s.contentWindow)==null||i.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}defaultRender(e){this.el=String(this.el).replace(/#/g,"");const t=document.getElementById(this.el);if(this.$blank(this.el)||t===null)throw new Error("렌더링할 DOM Element ID를 입력해주세요.");t.style.setProperty("height","0"),t.innerHTML=this.$template,this.byId(this.$iFrameId).setAttribute("src",e)}}class Fs extends be{constructor(){super(),this.$alfredId="bootpay-alfred-progress-id",this.$alfredTextId="__alfred-text-message__"}template(e){return`
4
+ `}byId(e){return document.getElementById(e)}createTemplateHtml(){this.byId(this.$windowId)===null&&document.body.insertAdjacentHTML("beforeend",this.$template)}bodyOpen(e=void 0,t=!1){const r=document.querySelector("body");t||(this.$present(r.className)?r.className=`${r.className} bootpay-open`:r.className="bootpay-open"),this.$present(e)&&(r.className=`${r.className} ${e}`)}bodyClose(){const e=document.querySelector("body");e.className=e.className.replace("bootpay-open","")}templateResize(e,t){const r=this.byId(e);r!==void 0&&this.applyStylesToElement(r,t)}applyStylesToElement(e,t){if(t!==void 0)for(let r in Object.keys(t)){let o=Object.keys(t)[r],i=t[o];this.$present(i)&&!String(i).match(/%/)&&!String(i).match(/vh/)&&(o.match(/width/)||o.match(/Width/)||o.match(/height/)||o.match(/Height/))&&(i=`${String(t[o]).replace(/px/gi,"")}px`),e.style.setProperty(o,i)}}isRendered(){const e=document.getElementById(this.$iFrameId);return A.debug("isRendered",`iFrameElement: ${e}`),e!==null&&e.src!==null&&e.src!==""}postMessage(e,t=void 0){var o;const r=this.byId(this.$iFrameId);(o=r==null?void 0:r.contentWindow)==null||o.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}defaultRender(e){this.el=String(this.el).replace(/#/g,"");const t=document.getElementById(this.el);if(this.$blank(this.el)||t===null)throw new Error("렌더링할 DOM Element ID를 입력해주세요.");t.style.setProperty("height","0"),t.innerHTML=this.$template,this.byId(this.$iFrameId).setAttribute("src",e)}}const we="local-network-access *; local-network *; loopback-network *";class ft extends ee{constructor(){super(),this.$alfredId="bootpay-alfred-progress-id",this.$alfredTextId="__alfred-text-message__"}template(e){return`
5
5
  <div class="bootpay-progress-background" id="${this.$alfredId}" style="display: none;">
6
6
  <div class="progress-message-window">
7
7
  <div class="alfred-loading">
@@ -16,25 +16,27 @@
16
16
  </div>
17
17
  </div>
18
18
  </div>
19
- `}showProgress(e){this.$present(this.byId(this.$alfredId))?this.byId(this.$alfredTextId).innerText=e:document.body.insertAdjacentHTML("beforeend",this.template(e)),this.byId(this.$alfredId).style.setProperty("display","flex")}hideProgress(){try{this.byId(this.$alfredId).outerHTML=""}catch{}}}const me=new Fs;var gt={exports:{}},R0=function(e,t){return function(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];return e.apply(t,i)}},Ds=R0,Bt=Object.prototype.toString,bt=function(r){return function(e){var t=Bt.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())}}(Object.create(null));function Se(r){return r=r.toLowerCase(),function(t){return bt(t)===r}}function _t(r){return Array.isArray(r)}function nt(r){return typeof r>"u"}function $s(r){return r!==null&&!nt(r)&&r.constructor!==null&&!nt(r.constructor)&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}var O0=Se("ArrayBuffer");function ks(r){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&O0(r.buffer),e}function Ps(r){return typeof r=="string"}function Ss(r){return typeof r=="number"}function U0(r){return r!==null&&typeof r=="object"}function ot(r){if(bt(r)!=="object")return!1;var e=Object.getPrototypeOf(r);return e===null||e===Object.prototype}var Is=Se("Date"),Ts=Se("File"),Rs=Se("Blob"),Os=Se("FileList");function Ct(r){return Bt.call(r)==="[object Function]"}function Us(r){return U0(r)&&Ct(r.pipe)}function Hs(r){var e="[object FormData]";return r&&(typeof FormData=="function"&&r instanceof FormData||Bt.call(r)===e||Ct(r.toString)&&r.toString()===e)}var Ns=Se("URLSearchParams");function Ms(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function Ws(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function At(r,e){if(!(r===null||typeof r>"u"))if(typeof r!="object"&&(r=[r]),_t(r))for(var t=0,s=r.length;t<s;t++)e.call(null,r[t],t,r);else for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.call(null,r[i],i,r)}function wt(){var r={};function e(i,n){ot(r[n])&&ot(i)?r[n]=wt(r[n],i):ot(i)?r[n]=wt({},i):_t(i)?r[n]=i.slice():r[n]=i}for(var t=0,s=arguments.length;t<s;t++)At(arguments[t],e);return r}function Ls(r,e,t){return At(e,function(i,n){t&&typeof i=="function"?r[n]=Ds(i,t):r[n]=i}),r}function qs(r){return r.charCodeAt(0)===65279&&(r=r.slice(1)),r}function zs(r,e,t,s){r.prototype=Object.create(e.prototype,s),r.prototype.constructor=r,t&&Object.assign(r.prototype,t)}function js(r,e,t){var s,i,n,m={};e=e||{};do{for(s=Object.getOwnPropertyNames(r),i=s.length;i-- >0;)n=s[i],m[n]||(e[n]=r[n],m[n]=!0);r=Object.getPrototypeOf(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e}function Ks(r,e,t){r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;var s=r.indexOf(e,t);return s!==-1&&s===t}function Gs(r){if(!r)return null;var e=r.length;if(nt(e))return null;for(var t=new Array(e);e-- >0;)t[e]=r[e];return t}var Xs=function(r){return function(e){return r&&e instanceof r}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array)),te={isArray:_t,isArrayBuffer:O0,isBuffer:$s,isFormData:Hs,isArrayBufferView:ks,isString:Ps,isNumber:Ss,isObject:U0,isPlainObject:ot,isUndefined:nt,isDate:Is,isFile:Ts,isBlob:Rs,isFunction:Ct,isStream:Us,isURLSearchParams:Ns,isStandardBrowserEnv:Ws,forEach:At,merge:wt,extend:Ls,trim:Ms,stripBOM:qs,inherits:zs,toFlatObject:js,kindOf:bt,kindOfTest:Se,endsWith:Ks,toArray:Gs,isTypedArray:Xs,isFileList:Os},Oe=te;function H0(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var N0=function(e,t,s){if(!t)return e;var i;if(s)i=s(t);else if(Oe.isURLSearchParams(t))i=t.toString();else{var n=[];Oe.forEach(t,function(p,a){p===null||typeof p>"u"||(Oe.isArray(p)?a=a+"[]":p=[p],Oe.forEach(p,function(g){Oe.isDate(g)?g=g.toISOString():Oe.isObject(g)&&(g=JSON.stringify(g)),n.push(H0(a)+"="+H0(g))}))}),i=n.join("&")}if(i){var m=e.indexOf("#");m!==-1&&(e=e.slice(0,m)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e},Vs=te;function at(){this.handlers=[]}at.prototype.use=function(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1},at.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},at.prototype.forEach=function(e){Vs.forEach(this.handlers,function(s){s!==null&&e(s)})};var Ys=at,Js=te,Zs=function(e,t){Js.forEach(e,function(i,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[n])})},M0=te;function Ue(r,e,t,s,i){Error.call(this),this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),s&&(this.request=s),i&&(this.response=i)}M0.inherits(Ue,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var W0=Ue.prototype,L0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(r){L0[r]={value:r}}),Object.defineProperties(Ue,L0),Object.defineProperty(W0,"isAxiosError",{value:!0}),Ue.from=function(r,e,t,s,i,n){var m=Object.create(W0);return M0.toFlatObject(r,m,function(p){return p!==Error.prototype}),Ue.call(m,r.message,e,t,s,i),m.name=r.name,n&&Object.assign(m,n),m};var He=Ue,q0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue=te;function Qs(r,e){e=e||new FormData;var t=[];function s(n){return n===null?"":ue.isDate(n)?n.toISOString():ue.isArrayBuffer(n)||ue.isTypedArray(n)?typeof Blob=="function"?new Blob([n]):Buffer.from(n):n}function i(n,m){if(ue.isPlainObject(n)||ue.isArray(n)){if(t.indexOf(n)!==-1)throw Error("Circular reference detected in "+m);t.push(n),ue.forEach(n,function(p,a){if(!ue.isUndefined(p)){var c=m?m+"."+a:a,g;if(p&&!m&&typeof p=="object"){if(ue.endsWith(a,"{}"))p=JSON.stringify(p);else if(ue.endsWith(a,"[]")&&(g=ue.toArray(p))){g.forEach(function(o){!ue.isUndefined(o)&&e.append(c,s(o))});return}}i(p,c)}}),t.pop()}else e.append(m,s(n))}return i(r),e}var z0=Qs,Ft,j0;function ei(){if(j0)return Ft;j0=1;var r=He;return Ft=function(t,s,i){var n=i.config.validateStatus;!i.status||!n||n(i.status)?t(i):s(new r("Request failed with status code "+i.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))},Ft}var Dt,K0;function ti(){if(K0)return Dt;K0=1;var r=te;return Dt=r.isStandardBrowserEnv()?function(){return{write:function(s,i,n,m,d,p){var a=[];a.push(s+"="+encodeURIComponent(i)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(m)&&a.push("path="+m),r.isString(d)&&a.push("domain="+d),p===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(s){var i=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(s){this.write(s,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Dt}var ri=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},si=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},ii=ri,ni=si,G0=function(e,t){return e&&!ii(t)?ni(e,t):t},$t,X0;function oi(){if(X0)return $t;X0=1;var r=te,e=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return $t=function(s){var i={},n,m,d;return s&&r.forEach(s.split(`
20
- `),function(a){if(d=a.indexOf(":"),n=r.trim(a.substr(0,d)).toLowerCase(),m=r.trim(a.substr(d+1)),n){if(i[n]&&e.indexOf(n)>=0)return;n==="set-cookie"?i[n]=(i[n]?i[n]:[]).concat([m]):i[n]=i[n]?i[n]+", "+m:m}}),i},$t}var kt,V0;function ai(){if(V0)return kt;V0=1;var r=te;return kt=r.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a"),i;function n(m){var d=m;return t&&(s.setAttribute("href",d),d=s.href),s.setAttribute("href",d),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:s.pathname.charAt(0)==="/"?s.pathname:"/"+s.pathname}}return i=n(window.location.href),function(d){var p=r.isString(d)?n(d):d;return p.protocol===i.protocol&&p.host===i.host}}():function(){return function(){return!0}}(),kt}var Pt,Y0;function ct(){if(Y0)return Pt;Y0=1;var r=He,e=te;function t(s){r.call(this,s??"canceled",r.ERR_CANCELED),this.name="CanceledError"}return e.inherits(t,r,{__CANCEL__:!0}),Pt=t,Pt}var St,J0;function ci(){return J0||(J0=1,St=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}),St}var It,Z0;function Q0(){if(Z0)return It;Z0=1;var r=te,e=ei(),t=ti(),s=N0,i=G0,n=oi(),m=ai(),d=q0,p=He,a=ct(),c=ci();return It=function(o){return new Promise(function(h,y){var f=o.data,b=o.headers,x=o.responseType,l;function v(){o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}r.isFormData(f)&&r.isStandardBrowserEnv()&&delete b["Content-Type"];var E=new XMLHttpRequest;if(o.auth){var _=o.auth.username||"",A=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";b.Authorization="Basic "+btoa(_+":"+A)}var w=i(o.baseURL,o.url);E.open(o.method.toUpperCase(),s(w,o.params,o.paramsSerializer),!0),E.timeout=o.timeout;function I(){if(E){var F="getAllResponseHeaders"in E?n(E.getAllResponseHeaders()):null,D=!x||x==="text"||x==="json"?E.responseText:E.response,T={data:D,status:E.status,statusText:E.statusText,headers:F,config:o,request:E};e(function(U){h(U),v()},function(U){y(U),v()},T),E=null}}if("onloadend"in E?E.onloadend=I:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(I)},E.onabort=function(){E&&(y(new p("Request aborted",p.ECONNABORTED,o,E)),E=null)},E.onerror=function(){y(new p("Network Error",p.ERR_NETWORK,o,E,E)),E=null},E.ontimeout=function(){var D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",T=o.transitional||d;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),y(new p(D,T.clarifyTimeoutError?p.ETIMEDOUT:p.ECONNABORTED,o,E)),E=null},r.isStandardBrowserEnv()){var B=(o.withCredentials||m(w))&&o.xsrfCookieName?t.read(o.xsrfCookieName):void 0;B&&(b[o.xsrfHeaderName]=B)}"setRequestHeader"in E&&r.forEach(b,function(D,T){typeof f>"u"&&T.toLowerCase()==="content-type"?delete b[T]:E.setRequestHeader(T,D)}),r.isUndefined(o.withCredentials)||(E.withCredentials=!!o.withCredentials),x&&x!=="json"&&(E.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&E.addEventListener("progress",o.onDownloadProgress),typeof o.onUploadProgress=="function"&&E.upload&&E.upload.addEventListener("progress",o.onUploadProgress),(o.cancelToken||o.signal)&&(l=function(F){E&&(y(!F||F&&F.type?new a:F),E.abort(),E=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l))),f||(f=null);var C=c(w);if(C&&["http","https","file"].indexOf(C)===-1){y(new p("Unsupported protocol "+C+":",p.ERR_BAD_REQUEST,o));return}E.send(f)})},It}var Tt,er;function di(){return er||(er=1,Tt=null),Tt}var Q=te,tr=Zs,rr=He,xi=q0,li=z0,ui={"Content-Type":"application/x-www-form-urlencoded"};function sr(r,e){!Q.isUndefined(r)&&Q.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e)}function pi(){var r;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(r=Q0()),r}function hi(r,e,t){if(Q.isString(r))try{return(e||JSON.parse)(r),Q.trim(r)}catch(s){if(s.name!=="SyntaxError")throw s}return(t||JSON.stringify)(r)}var dt={transitional:xi,adapter:pi(),transformRequest:[function(e,t){if(tr(t,"Accept"),tr(t,"Content-Type"),Q.isFormData(e)||Q.isArrayBuffer(e)||Q.isBuffer(e)||Q.isStream(e)||Q.isFile(e)||Q.isBlob(e))return e;if(Q.isArrayBufferView(e))return e.buffer;if(Q.isURLSearchParams(e))return sr(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var s=Q.isObject(e),i=t&&t["Content-Type"],n;if((n=Q.isFileList(e))||s&&i==="multipart/form-data"){var m=this.env&&this.env.FormData;return li(n?{"files[]":e}:e,m&&new m)}else if(s||i==="application/json")return sr(t,"application/json"),hi(e);return e}],transformResponse:[function(e){var t=this.transitional||dt.transitional,s=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,n=!s&&this.responseType==="json";if(n||i&&Q.isString(e)&&e.length)try{return JSON.parse(e)}catch(m){if(n)throw m.name==="SyntaxError"?rr.from(m,rr.ERR_BAD_RESPONSE,this,null,this.response):m}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:di()},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Q.forEach(["delete","get","head"],function(e){dt.headers[e]={}}),Q.forEach(["post","put","patch"],function(e){dt.headers[e]=Q.merge(ui)});var Rt=dt,fi=te,vi=Rt,yi=function(e,t,s){var i=this||vi;return fi.forEach(s,function(m){e=m.call(i,e,t)}),e},Ot,ir;function nr(){return ir||(ir=1,Ot=function(e){return!!(e&&e.__CANCEL__)}),Ot}var or=te,Ut=yi,mi=nr(),Ei=Rt,gi=ct();function Ht(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new gi}var Bi=function(e){Ht(e),e.headers=e.headers||{},e.data=Ut.call(e,e.data,e.headers,e.transformRequest),e.headers=or.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),or.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var t=e.adapter||Ei.adapter;return t(e).then(function(i){return Ht(e),i.data=Ut.call(e,i.data,i.headers,e.transformResponse),i},function(i){return mi(i)||(Ht(e),i&&i.response&&(i.response.data=Ut.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})},ce=te,ar=function(e,t){t=t||{};var s={};function i(c,g){return ce.isPlainObject(c)&&ce.isPlainObject(g)?ce.merge(c,g):ce.isPlainObject(g)?ce.merge({},g):ce.isArray(g)?g.slice():g}function n(c){if(ce.isUndefined(t[c])){if(!ce.isUndefined(e[c]))return i(void 0,e[c])}else return i(e[c],t[c])}function m(c){if(!ce.isUndefined(t[c]))return i(void 0,t[c])}function d(c){if(ce.isUndefined(t[c])){if(!ce.isUndefined(e[c]))return i(void 0,e[c])}else return i(void 0,t[c])}function p(c){if(c in t)return i(e[c],t[c]);if(c in e)return i(void 0,e[c])}var a={url:m,method:m,data:m,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:p};return ce.forEach(Object.keys(e).concat(Object.keys(t)),function(g){var o=a[g]||n,u=o(g);ce.isUndefined(u)&&o!==p||(s[g]=u)}),s},Nt,cr;function dr(){return cr||(cr=1,Nt={version:"0.27.2"}),Nt}var bi=dr().version,_e=He,Mt={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){Mt[r]=function(s){return typeof s===r||"a"+(e<1?"n ":" ")+r}});var xr={};Mt.transitional=function(e,t,s){function i(n,m){return"[Axios v"+bi+"] Transitional option '"+n+"'"+m+(s?". "+s:"")}return function(n,m,d){if(e===!1)throw new _e(i(m," has been removed"+(t?" in "+t:"")),_e.ERR_DEPRECATED);return t&&!xr[m]&&(xr[m]=!0,console.warn(i(m," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(n,m,d):!0}};function _i(r,e,t){if(typeof r!="object")throw new _e("options must be an object",_e.ERR_BAD_OPTION_VALUE);for(var s=Object.keys(r),i=s.length;i-- >0;){var n=s[i],m=e[n];if(m){var d=r[n],p=d===void 0||m(d,n,r);if(p!==!0)throw new _e("option "+n+" must be "+p,_e.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new _e("Unknown option "+n,_e.ERR_BAD_OPTION)}}var Ci={assertOptions:_i,validators:Mt},lr=te,Ai=N0,ur=Ys,pr=Bi,xt=ar,wi=G0,hr=Ci,Ne=hr.validators;function Me(r){this.defaults=r,this.interceptors={request:new ur,response:new ur}}Me.prototype.request=function(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=xt(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var s=t.transitional;s!==void 0&&hr.assertOptions(s,{silentJSONParsing:Ne.transitional(Ne.boolean),forcedJSONParsing:Ne.transitional(Ne.boolean),clarifyTimeoutError:Ne.transitional(Ne.boolean)},!1);var i=[],n=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(t)===!1||(n=n&&u.synchronous,i.unshift(u.fulfilled,u.rejected))});var m=[];this.interceptors.response.forEach(function(u){m.push(u.fulfilled,u.rejected)});var d;if(!n){var p=[pr,void 0];for(Array.prototype.unshift.apply(p,i),p=p.concat(m),d=Promise.resolve(t);p.length;)d=d.then(p.shift(),p.shift());return d}for(var a=t;i.length;){var c=i.shift(),g=i.shift();try{a=c(a)}catch(o){g(o);break}}try{d=pr(a)}catch(o){return Promise.reject(o)}for(;m.length;)d=d.then(m.shift(),m.shift());return d},Me.prototype.getUri=function(e){e=xt(this.defaults,e);var t=wi(e.baseURL,e.url);return Ai(t,e.params,e.paramsSerializer)},lr.forEach(["delete","get","head","options"],function(e){Me.prototype[e]=function(t,s){return this.request(xt(s||{},{method:e,url:t,data:(s||{}).data}))}}),lr.forEach(["post","put","patch"],function(e){function t(s){return function(n,m,d){return this.request(xt(d||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:n,data:m}))}}Me.prototype[e]=t(),Me.prototype[e+"Form"]=t(!0)});var Fi=Me,Wt,fr;function Di(){if(fr)return Wt;fr=1;var r=ct();function e(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var s;this.promise=new Promise(function(m){s=m});var i=this;this.promise.then(function(n){if(i._listeners){var m,d=i._listeners.length;for(m=0;m<d;m++)i._listeners[m](n);i._listeners=null}}),this.promise.then=function(n){var m,d=new Promise(function(p){i.subscribe(p),m=p}).then(n);return d.cancel=function(){i.unsubscribe(m)},d},t(function(m){i.reason||(i.reason=new r(m),s(i.reason))})}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.prototype.subscribe=function(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]},e.prototype.unsubscribe=function(s){if(this._listeners){var i=this._listeners.indexOf(s);i!==-1&&this._listeners.splice(i,1)}},e.source=function(){var s,i=new e(function(m){s=m});return{token:i,cancel:s}},Wt=e,Wt}var Lt,vr;function $i(){return vr||(vr=1,Lt=function(e){return function(s){return e.apply(null,s)}}),Lt}var qt,yr;function ki(){if(yr)return qt;yr=1;var r=te;return qt=function(t){return r.isObject(t)&&t.isAxiosError===!0},qt}var mr=te,Pi=R0,lt=Fi,Si=ar,Ii=Rt;function Er(r){var e=new lt(r),t=Pi(lt.prototype.request,e);return mr.extend(t,lt.prototype,e),mr.extend(t,e),t.create=function(i){return Er(Si(r,i))},t}var ie=Er(Ii);ie.Axios=lt,ie.CanceledError=ct(),ie.CancelToken=Di(),ie.isCancel=nr(),ie.VERSION=dr().version,ie.toFormData=z0,ie.AxiosError=He,ie.Cancel=ie.CanceledError,ie.all=function(e){return Promise.all(e)},ie.spread=$i(),ie.isAxiosError=ki(),gt.exports=ie,gt.exports.default=ie;var Ti=gt.exports,Ri=Ti;const Ve=Te(Ri);var gr={exports:{}},Br={exports:{}};(function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(s){var i=t,n=i.lib,m=n.WordArray,d=n.Hasher,p=i.algo,a=[];(function(){for(var y=0;y<64;y++)a[y]=s.abs(s.sin(y+1))*4294967296|0})();var c=p.MD5=d.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(y,f){for(var b=0;b<16;b++){var x=f+b,l=y[x];y[x]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var v=this._hash.words,E=y[f+0],_=y[f+1],A=y[f+2],w=y[f+3],I=y[f+4],B=y[f+5],C=y[f+6],F=y[f+7],D=y[f+8],T=y[f+9],O=y[f+10],U=y[f+11],Y=y[f+12],j=y[f+13],X=y[f+14],K=y[f+15],$=v[0],P=v[1],S=v[2],k=v[3];$=g($,P,S,k,E,7,a[0]),k=g(k,$,P,S,_,12,a[1]),S=g(S,k,$,P,A,17,a[2]),P=g(P,S,k,$,w,22,a[3]),$=g($,P,S,k,I,7,a[4]),k=g(k,$,P,S,B,12,a[5]),S=g(S,k,$,P,C,17,a[6]),P=g(P,S,k,$,F,22,a[7]),$=g($,P,S,k,D,7,a[8]),k=g(k,$,P,S,T,12,a[9]),S=g(S,k,$,P,O,17,a[10]),P=g(P,S,k,$,U,22,a[11]),$=g($,P,S,k,Y,7,a[12]),k=g(k,$,P,S,j,12,a[13]),S=g(S,k,$,P,X,17,a[14]),P=g(P,S,k,$,K,22,a[15]),$=o($,P,S,k,_,5,a[16]),k=o(k,$,P,S,C,9,a[17]),S=o(S,k,$,P,U,14,a[18]),P=o(P,S,k,$,E,20,a[19]),$=o($,P,S,k,B,5,a[20]),k=o(k,$,P,S,O,9,a[21]),S=o(S,k,$,P,K,14,a[22]),P=o(P,S,k,$,I,20,a[23]),$=o($,P,S,k,T,5,a[24]),k=o(k,$,P,S,X,9,a[25]),S=o(S,k,$,P,w,14,a[26]),P=o(P,S,k,$,D,20,a[27]),$=o($,P,S,k,j,5,a[28]),k=o(k,$,P,S,A,9,a[29]),S=o(S,k,$,P,F,14,a[30]),P=o(P,S,k,$,Y,20,a[31]),$=u($,P,S,k,B,4,a[32]),k=u(k,$,P,S,D,11,a[33]),S=u(S,k,$,P,U,16,a[34]),P=u(P,S,k,$,X,23,a[35]),$=u($,P,S,k,_,4,a[36]),k=u(k,$,P,S,I,11,a[37]),S=u(S,k,$,P,F,16,a[38]),P=u(P,S,k,$,O,23,a[39]),$=u($,P,S,k,j,4,a[40]),k=u(k,$,P,S,E,11,a[41]),S=u(S,k,$,P,w,16,a[42]),P=u(P,S,k,$,C,23,a[43]),$=u($,P,S,k,T,4,a[44]),k=u(k,$,P,S,Y,11,a[45]),S=u(S,k,$,P,K,16,a[46]),P=u(P,S,k,$,A,23,a[47]),$=h($,P,S,k,E,6,a[48]),k=h(k,$,P,S,F,10,a[49]),S=h(S,k,$,P,X,15,a[50]),P=h(P,S,k,$,B,21,a[51]),$=h($,P,S,k,Y,6,a[52]),k=h(k,$,P,S,w,10,a[53]),S=h(S,k,$,P,O,15,a[54]),P=h(P,S,k,$,_,21,a[55]),$=h($,P,S,k,D,6,a[56]),k=h(k,$,P,S,K,10,a[57]),S=h(S,k,$,P,C,15,a[58]),P=h(P,S,k,$,j,21,a[59]),$=h($,P,S,k,I,6,a[60]),k=h(k,$,P,S,U,10,a[61]),S=h(S,k,$,P,A,15,a[62]),P=h(P,S,k,$,T,21,a[63]),v[0]=v[0]+$|0,v[1]=v[1]+P|0,v[2]=v[2]+S|0,v[3]=v[3]+k|0},_doFinalize:function(){var y=this._data,f=y.words,b=this._nDataBytes*8,x=y.sigBytes*8;f[x>>>5]|=128<<24-x%32;var l=s.floor(b/4294967296),v=b;f[(x+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,f[(x+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,y.sigBytes=(f.length+1)*4,this._process();for(var E=this._hash,_=E.words,A=0;A<4;A++){var w=_[A];_[A]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return E},clone:function(){var y=d.clone.call(this);return y._hash=this._hash.clone(),y}});function g(y,f,b,x,l,v,E){var _=y+(f&b|~f&x)+l+E;return(_<<v|_>>>32-v)+f}function o(y,f,b,x,l,v,E){var _=y+(f&x|b&~x)+l+E;return(_<<v|_>>>32-v)+f}function u(y,f,b,x,l,v,E){var _=y+(f^b^x)+l+E;return(_<<v|_>>>32-v)+f}function h(y,f,b,x,l,v,E){var _=y+(b^(f|~x))+l+E;return(_<<v|_>>>32-v)+f}i.MD5=d._createHelper(c),i.HmacMD5=d._createHmacHelper(c)}(Math),t.MD5})})(Br);var Ce=Br.exports;const br=Te(Ce);var zt={exports:{}},jt={exports:{}},_r;function Cr(){return _r||(_r=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=i.Hasher,d=s.algo,p=[],a=d.SHA1=m.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,g){for(var o=this._hash.words,u=o[0],h=o[1],y=o[2],f=o[3],b=o[4],x=0;x<80;x++){if(x<16)p[x]=c[g+x]|0;else{var l=p[x-3]^p[x-8]^p[x-14]^p[x-16];p[x]=l<<1|l>>>31}var v=(u<<5|u>>>27)+b+p[x];x<20?v+=(h&y|~h&f)+1518500249:x<40?v+=(h^y^f)+1859775393:x<60?v+=(h&y|h&f|y&f)-1894007588:v+=(h^y^f)-899497514,b=f,f=y,y=h<<30|h>>>2,h=u,u=v}o[0]=o[0]+u|0,o[1]=o[1]+h|0,o[2]=o[2]+y|0,o[3]=o[3]+f|0,o[4]=o[4]+b|0},_doFinalize:function(){var c=this._data,g=c.words,o=this._nDataBytes*8,u=c.sigBytes*8;return g[u>>>5]|=128<<24-u%32,g[(u+64>>>9<<4)+14]=Math.floor(o/4294967296),g[(u+64>>>9<<4)+15]=o,c.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var c=m.clone.call(this);return c._hash=this._hash.clone(),c}});s.SHA1=m._createHelper(a),s.HmacSHA1=m._createHmacHelper(a)}(),t.SHA1})}(jt)),jt.exports}var Kt={exports:{}},Ar;function Gt(){return Ar||(Ar=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){(function(){var s=t,i=s.lib,n=i.Base,m=s.enc,d=m.Utf8,p=s.algo;p.HMAC=n.extend({init:function(a,c){a=this._hasher=new a.init,typeof c=="string"&&(c=d.parse(c));var g=a.blockSize,o=g*4;c.sigBytes>o&&(c=a.finalize(c)),c.clamp();for(var u=this._oKey=c.clone(),h=this._iKey=c.clone(),y=u.words,f=h.words,b=0;b<g;b++)y[b]^=1549556828,f[b]^=909522486;u.sigBytes=h.sigBytes=o,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var c=this._hasher,g=c.finalize(a);c.reset();var o=c.finalize(this._oKey.clone().concat(g));return o}})})()})}(Kt)),Kt.exports}var wr;function Ae(){return wr||(wr=1,function(r,e){(function(t,s,i){r.exports=s(L(),Cr(),Gt())})(N,function(t){return function(){var s=t,i=s.lib,n=i.Base,m=i.WordArray,d=s.algo,p=d.MD5,a=d.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:p,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,g){for(var o,u=this.cfg,h=u.hasher.create(),y=m.create(),f=y.words,b=u.keySize,x=u.iterations;f.length<b;){o&&h.update(o),o=h.update(c).finalize(g),h.reset();for(var l=1;l<x;l++)o=h.finalize(o),h.reset();y.concat(o)}return y.sigBytes=b*4,y}});s.EvpKDF=function(c,g,o){return a.create(o).compute(c,g)}}(),t.EvpKDF})}(zt)),zt.exports}var Xt={exports:{}},Fr;function ee(){return Fr||(Fr=1,function(r,e){(function(t,s,i){r.exports=s(L(),Ae())})(N,function(t){t.lib.Cipher||function(s){var i=t,n=i.lib,m=n.Base,d=n.WordArray,p=n.BufferedBlockAlgorithm,a=i.enc;a.Utf8;var c=a.Base64,g=i.algo,o=g.EvpKDF,u=n.Cipher=p.extend({cfg:m.extend(),createEncryptor:function(B,C){return this.create(this._ENC_XFORM_MODE,B,C)},createDecryptor:function(B,C){return this.create(this._DEC_XFORM_MODE,B,C)},init:function(B,C,F){this.cfg=this.cfg.extend(F),this._xformMode=B,this._key=C,this.reset()},reset:function(){p.reset.call(this),this._doReset()},process:function(B){return this._append(B),this._process()},finalize:function(B){B&&this._append(B);var C=this._doFinalize();return C},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function B(C){return typeof C=="string"?I:_}return function(C){return{encrypt:function(F,D,T){return B(D).encrypt(C,F,D,T)},decrypt:function(F,D,T){return B(D).decrypt(C,F,D,T)}}}}()});n.StreamCipher=u.extend({_doFinalize:function(){var B=this._process(!0);return B},blockSize:1});var h=i.mode={},y=n.BlockCipherMode=m.extend({createEncryptor:function(B,C){return this.Encryptor.create(B,C)},createDecryptor:function(B,C){return this.Decryptor.create(B,C)},init:function(B,C){this._cipher=B,this._iv=C}}),f=h.CBC=function(){var B=y.extend();B.Encryptor=B.extend({processBlock:function(F,D){var T=this._cipher,O=T.blockSize;C.call(this,F,D,O),T.encryptBlock(F,D),this._prevBlock=F.slice(D,D+O)}}),B.Decryptor=B.extend({processBlock:function(F,D){var T=this._cipher,O=T.blockSize,U=F.slice(D,D+O);T.decryptBlock(F,D),C.call(this,F,D,O),this._prevBlock=U}});function C(F,D,T){var O,U=this._iv;U?(O=U,this._iv=s):O=this._prevBlock;for(var Y=0;Y<T;Y++)F[D+Y]^=O[Y]}return B}(),b=i.pad={},x=b.Pkcs7={pad:function(B,C){for(var F=C*4,D=F-B.sigBytes%F,T=D<<24|D<<16|D<<8|D,O=[],U=0;U<D;U+=4)O.push(T);var Y=d.create(O,D);B.concat(Y)},unpad:function(B){var C=B.words[B.sigBytes-1>>>2]&255;B.sigBytes-=C}};n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:x}),reset:function(){var B;u.reset.call(this);var C=this.cfg,F=C.iv,D=C.mode;this._xformMode==this._ENC_XFORM_MODE?B=D.createEncryptor:(B=D.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==B?this._mode.init(this,F&&F.words):(this._mode=B.call(D,this,F&&F.words),this._mode.__creator=B)},_doProcessBlock:function(B,C){this._mode.processBlock(B,C)},_doFinalize:function(){var B,C=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(C.pad(this._data,this.blockSize),B=this._process(!0)):(B=this._process(!0),C.unpad(B)),B},blockSize:128/32});var l=n.CipherParams=m.extend({init:function(B){this.mixIn(B)},toString:function(B){return(B||this.formatter).stringify(this)}}),v=i.format={},E=v.OpenSSL={stringify:function(B){var C,F=B.ciphertext,D=B.salt;return D?C=d.create([1398893684,1701076831]).concat(D).concat(F):C=F,C.toString(c)},parse:function(B){var C,F=c.parse(B),D=F.words;return D[0]==1398893684&&D[1]==1701076831&&(C=d.create(D.slice(2,4)),D.splice(0,4),F.sigBytes-=16),l.create({ciphertext:F,salt:C})}},_=n.SerializableCipher=m.extend({cfg:m.extend({format:E}),encrypt:function(B,C,F,D){D=this.cfg.extend(D);var T=B.createEncryptor(F,D),O=T.finalize(C),U=T.cfg;return l.create({ciphertext:O,key:F,iv:U.iv,algorithm:B,mode:U.mode,padding:U.padding,blockSize:B.blockSize,formatter:D.format})},decrypt:function(B,C,F,D){D=this.cfg.extend(D),C=this._parse(C,D.format);var T=B.createDecryptor(F,D).finalize(C.ciphertext);return T},_parse:function(B,C){return typeof B=="string"?C.parse(B,this):B}}),A=i.kdf={},w=A.OpenSSL={execute:function(B,C,F,D,T){if(D||(D=d.random(64/8)),T)var O=o.create({keySize:C+F,hasher:T}).compute(B,D);else var O=o.create({keySize:C+F}).compute(B,D);var U=d.create(O.words.slice(C),F*4);return O.sigBytes=C*4,l.create({key:O,iv:U,salt:D})}},I=n.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:w}),encrypt:function(B,C,F,D){D=this.cfg.extend(D);var T=D.kdf.execute(F,B.keySize,B.ivSize,D.salt,D.hasher);D.iv=T.iv;var O=_.encrypt.call(this,B,C,T.key,D);return O.mixIn(T),O},decrypt:function(B,C,F,D){D=this.cfg.extend(D),C=this._parse(C,D.format);var T=D.kdf.execute(F,B.keySize,B.ivSize,C.salt,D.hasher);D.iv=T.iv;var O=_.decrypt.call(this,B,C,T.key,D);return O}})}()})}(Xt)),Xt.exports}(function(r,e){(function(t,s,i){r.exports=s(L(),Be,Ce,Ae(),ee())})(N,function(t){return function(){var s=t,i=s.lib,n=i.BlockCipher,m=s.algo,d=[],p=[],a=[],c=[],g=[],o=[],u=[],h=[],y=[],f=[];(function(){for(var l=[],v=0;v<256;v++)v<128?l[v]=v<<1:l[v]=v<<1^283;for(var E=0,_=0,v=0;v<256;v++){var A=_^_<<1^_<<2^_<<3^_<<4;A=A>>>8^A&255^99,d[E]=A,p[A]=E;var w=l[E],I=l[w],B=l[I],C=l[A]*257^A*16843008;a[E]=C<<24|C>>>8,c[E]=C<<16|C>>>16,g[E]=C<<8|C>>>24,o[E]=C;var C=B*16843009^I*65537^w*257^E*16843008;u[A]=C<<24|C>>>8,h[A]=C<<16|C>>>16,y[A]=C<<8|C>>>24,f[A]=C,E?(E=w^l[l[l[B^w]]],_^=l[l[_]]):E=_=1}})();var b=[0,1,2,4,8,16,32,64,128,27,54],x=m.AES=n.extend({_doReset:function(){var l;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var v=this._keyPriorReset=this._key,E=v.words,_=v.sigBytes/4,A=this._nRounds=_+6,w=(A+1)*4,I=this._keySchedule=[],B=0;B<w;B++)B<_?I[B]=E[B]:(l=I[B-1],B%_?_>6&&B%_==4&&(l=d[l>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[l&255]):(l=l<<8|l>>>24,l=d[l>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[l&255],l^=b[B/_|0]<<24),I[B]=I[B-_]^l);for(var C=this._invKeySchedule=[],F=0;F<w;F++){var B=w-F;if(F%4)var l=I[B];else var l=I[B-4];F<4||B<=4?C[F]=l:C[F]=u[d[l>>>24]]^h[d[l>>>16&255]]^y[d[l>>>8&255]]^f[d[l&255]]}}},encryptBlock:function(l,v){this._doCryptBlock(l,v,this._keySchedule,a,c,g,o,d)},decryptBlock:function(l,v){var E=l[v+1];l[v+1]=l[v+3],l[v+3]=E,this._doCryptBlock(l,v,this._invKeySchedule,u,h,y,f,p);var E=l[v+1];l[v+1]=l[v+3],l[v+3]=E},_doCryptBlock:function(l,v,E,_,A,w,I,B){for(var C=this._nRounds,F=l[v]^E[0],D=l[v+1]^E[1],T=l[v+2]^E[2],O=l[v+3]^E[3],U=4,Y=1;Y<C;Y++){var j=_[F>>>24]^A[D>>>16&255]^w[T>>>8&255]^I[O&255]^E[U++],X=_[D>>>24]^A[T>>>16&255]^w[O>>>8&255]^I[F&255]^E[U++],K=_[T>>>24]^A[O>>>16&255]^w[F>>>8&255]^I[D&255]^E[U++],$=_[O>>>24]^A[F>>>16&255]^w[D>>>8&255]^I[T&255]^E[U++];F=j,D=X,T=K,O=$}var j=(B[F>>>24]<<24|B[D>>>16&255]<<16|B[T>>>8&255]<<8|B[O&255])^E[U++],X=(B[D>>>24]<<24|B[T>>>16&255]<<16|B[O>>>8&255]<<8|B[F&255])^E[U++],K=(B[T>>>24]<<24|B[O>>>16&255]<<16|B[F>>>8&255]<<8|B[D&255])^E[U++],$=(B[O>>>24]<<24|B[F>>>16&255]<<16|B[D>>>8&255]<<8|B[T&255])^E[U++];l[v]=j,l[v+1]=X,l[v+2]=K,l[v+3]=$},keySize:256/32});s.AES=n._createHelper(x)}(),t.AES})})(gr);var Dr=gr.exports;const Vt=Te(Dr);class pe{constructor(){this.$http=Ve.create({timeout:6e4})}static encryptParams(e){ze(e,"object")&&(e=JSON.stringify(e));let t=Vt.encrypt(e,k0());return{payload:t.ciphertext.toString(Re),token:`${t.key.toString(Re)}##${t.iv.toString(Re)}`}}static toUnderscore(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}static toCamelcase(e){return e.replace(/(\_[a-z])/g,function(t){return t.toUpperCase().replace(/_/g,"")})}static objectKeyToUnderscore(e){let t;return q(e)&&(Array.isArray(e)?(t=[],e.forEach(s=>{let i={};Object.keys(s).forEach(n=>{i[this.toUnderscore(n)]=s[n]}),t.push(i)})):(t={},Object.keys(e).forEach(s=>{t[this.toUnderscore(s)]=e[s]}))),t}static objectKeyToCamel(e){let t;return q(e)&&(Array.isArray(e)?(t=[],e.forEach(s=>{let i={};Object.keys(s).forEach(n=>{i[this.toCamelcase(n)]=s[n]}),t.push(i)})):(t={},Object.keys(e).forEach(s=>{ze(e[s],"object")&&Object.keys(e[s]).length>0?t[this.toCamelcase(s)]=this.objectKeyToCamel(e[s]):t[this.toCamelcase(s)]=e[s]}))),t}static axiosMultipayConfigure(){Ve.defaults.headers.common["Content-Type"]="application/json",Ve.defaults.headers.common.Accept="application/json",Ve.interceptors.request.use(e=>(q(e.data),this.isHttpBodyUsedMethod(e.method)&&(e.data=pe.encryptParams(pe.objectKeyToUnderscore(e.data))),e.headers!==void 0&&q(e.headers.progress)&&delete e.headers.progress,e),e=>Promise.reject(e)),Ve.interceptors.response.use(e=>e,function(e){if(q(e.response)){let t=e.response.data;return t.status=e.response.status,Promise.reject(t)}else return Promise.reject(e)})}static isHttpBodyUsedMethod(e){return["post","put"].indexOf(e)>-1}}pe.axiosMultipayConfigure();class Oi extends pe{constructor(){super()}async pollingStatus(e,t,s,i){try{const n=await this.$http.get([e,"s",t].join("/"),{params:{application_id:s,tk:i}});return Promise.resolve(n)}catch(n){return Promise.reject(n)}}}const Ui=new Oi;class Hi extends Ge{constructor(){super(),this.$messageEventName="message.BootpayPaymentEvent",this.$eventPrefix="bootpay",this.$pollingInterval=void 0,this.resetPollingData(),this.$pollingEvent=Ui,this.pollingInterval=3e3,this.isDone=!1}bind(e,t){this.isDone=!1,this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,s=>{const i=this.parseEvent(s.data);if(H.debug("event received",JSON.stringify(i)),q(i))switch(H.debug("event",i),i.event){case"error":case"cancel":return this.handleErrorOrCancel(i);case"setConfirmParameters":const n=`${i.gateway_url}/confirm/${i.receipt_id}?application_id=${i.application_id}`;i.open_type==="redirect"?M.setConfirmRedirect(n):M.setConfirmFormUrl(n);break;case"confirm":return this.resolve({event:i.event,application_id:i.application_id,receipt_id:i.receipt_id,gateway_url:i.gateway_url,order_id:i.order_id});case"redirect":M.destroy(!1),location.href=i.url;return;case"moveRedirectUrl":M.closePopup(),M.hidePaymentiFrame(),M.showProgress("결제 진행 중입니다. 잠시만 기다려주세요."),location.replace(gs(i.url,i.parameters)),setTimeout(()=>{M.destroy(!1)},5e3);break;case"polling":return this.$pollingData!==void 0&&(this.$pollingData.receiptId=i.receipt_id,this.$pollingData.gatewayUrl=i.gateway_url),this.startPollingEvent();case"issued":case"done":if(!this.isDone)return this.isDone=!0,this.clearPollingEvent(),this.resolve(i);break;case"iFrameStyle":case"windowStyle":case"resize":this.handleStyleUpdate(i);break;case"hideProgress":case"showProgress":this.handleProgressUpdate(i);break;case"hidePayment":case"showPayment":this.handleVisibilityUpdate(i);break;case"popup":M.createPopupButton({gatewayUrl:i.url,receiptId:i.receipt_id,name:i.name,price:i.price});break;case"close":M.destroy();break;default:return}})}setDefaultPaymentData(e,t){this.$pollingData!==void 0&&(this.$pollingData.applicationId=e,this.$pollingData.transactionKey=t)}callBootpayDOMEvent(e,t=void 0){document.dispatchEvent(new CustomEvent([this.$eventPrefix,e].join(""),{detail:t}))}startPollingEvent(){this.$pollingInterval=setInterval(async()=>{if(this.$pollingData!==void 0)try{const e=await this.$pollingEvent.pollingStatus(this.$pollingData.gatewayUrl,this.$pollingData.receiptId,this.$pollingData.applicationId,this.$pollingData.transactionKey);this.handlePollingResponse(e)}catch{return this.reject({error_code:"RC_RECEIPT_POLLING_INVALID",message:"결제 상태 체크에 실패하였습니다."})}},this.pollingInterval)}clearPollingEvent(){this.$pollingInterval!==void 0&&clearInterval(this.$pollingInterval),this.$pollingInterval=void 0,this.resetPollingData()}allClearEvent(){this.clearPollingEvent(),window.removeBootpayEventListener(this.$messageEventName)}handleErrorOrCancel(e){return this.reject({event:e.event,pg_error_code:e.pg_error_code,error_code:e.error_code,message:e.message,payload:e.payload})}handleProgressUpdate(e){switch(e.event){case"hideProgress":me.hideProgress();break;case"showProgress":M.showProgress(e.message);break}}handleStyleUpdate(e){switch(e.event){case"iFrameStyle":M.iFrameSetStyle(e.styles);break;case"windowStyle":M.windowStyle(e.styles);break;case"resize":M.iFrameResize(e.resizeData);break}}handleVisibilityUpdate(e){switch(e.event){case"hidePayment":M.closePopup(),M.hidePaymentiFrame();break;case"showPayment":M.showPaymentiFrame(this.$present(e.showCloseButton)?e.showCloseButton:!1);break}}handlePollingResponse(e){let t={bootpay_event:!0,event:"",data:e.data};if(e.data!==void 0){if(H.debug("polling event",`receive data: ${JSON.stringify(t)}`),e.data.status===1)return t.event="done",window.postMessage(JSON.stringify(t),"*");if(e.data.status===5)return t.event="issued",window.postMessage(JSON.stringify(t),"*")}}resetPollingData(){this.$pollingData={applicationId:"",gatewayUrl:"",receiptId:"",transactionKey:""}}}const he=new Hi;class Ni extends pe{constructor(){super(),this.$session=$e,this.$applicationId=void 0,this.$tk=void 0,this.$platformType=1,this.$receiptId=void 0}setTokenKey(e){this.$tk=e}setReceiptId(e){this.$receiptId=e}clearInstance(){this.$applicationId=void 0,this.$receiptId=void 0}send(e){try{if(q(this.$applicationId))return e.application_id=this.$applicationId,e.status=q(e.status)?e.status:1,e.version=ke.version,e.tk=this.$tk,H.debug("send event",`${JSON.stringify(e)} 전송됨`),this.$http.post(R.toAnalytics("event"),e)}catch{return}}sendError(e){e.status=-1,this.send(e)}setApplicationId(e){this.$applicationId=e}sendCloseEvent(){if(q(this.$receiptId))try{return this.$http.put(R.toApi(`close/${this.$receiptId}`))}catch(e){return Promise.reject(e)}else return H.debug("receipt_id","undefined receipt_id"),Promise.resolve()}}const Ye=new Ni,Yt={startProgress:{PAYMENT:{ko:"결제를 시작합니다",en:"Start Payment..."},CARD_SUBSCRIPTION:{ko:"자동결제 정보를 불러오는 중입니다...",en:"Automatic payment will start..."},AUTH:{ko:"본인인증을 시작합니다",en:"Authentication will start..."}},popupLocaleMessage:{message:{ko:"구매 내역에 동의하면 결제를 진행해주세요",en:"If you agree with the purchase details, please proceed with the payment."},button:{ko:"결제계속하기",en:"Continue"}},popupMessage:{message:{PAYMENT:{ko:"구매 내역에 동의하면 결제를 진행해주세요",en:"If you agree with the purchase details, please proceed with the payment"},CARD_SUBSCRIPTION:{ko:'자동결제에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',en:'If you agree to automatic card payment, press the "Continue" button to proceed'},AUTH:{ko:'본인인증에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',en:'If you agree to authenticate yourself, press the "Continue" button to proceed'}},button:{PAYMENT:{ko:"결제계속하기",en:"Continue"},CARD_SUBSCRIPTION:{ko:"계속하기",en:"Continue"},AUTH:{ko:"계속하기",en:"Continue"}}},closeMessage:{PAYMENT:{ko:"결제창을 닫았습니다",en:"Payment window is closed"},CARD_SUBSCRIPTION:{ko:"자동 결제창을 닫았습니다",en:"Automatic Payment window is closed"},AUTH:{ko:"본인인증 창을 닫았습니다",en:"Authenticate window is closed"}},confirmNotYet:{PAYMENT:{ko:"결제 승인준비가 되지 않았습니다",en:"Payment approval not ready "},CARD_SUBSCRIPTION:{ko:"자동결제 승인준비가 되지 않았습니다",en:"Automatic Payment approval not ready"},AUTH:{ko:"본인인증 승인준비가 되지 않았습니다",en:"Authenticate approval not ready"}},notSelectPayment:{ko:"어떤 방법으로 결제할지 선택해주세요",en:"Please, do select payment."},termsNotAgree:{ko:"필수 약관을 모두 동의해주세요",en:"Please agree to all required terms and conditions"},notSelectBrandpay:{ko:"간편결제로 결제하려면, 등록된 카드 혹은 계좌를 선택해주세요",en:"Please select a registered card or account to pay with Easy Payment"},widgetTypeNotPayment:{ko:"결제 위젯 요청이 아닙니다. 결제 위젯이 아닌 경우 requestSubscription 함수를 이용해주세요.",en:"This is not a payment widget. If it is not a payment widget, use the requestSubscription function."},widgetTypeNotSubscription:{ko:"정기결제 위젯 요청이 아닙니다. 정기결제 위젯이 아닌 경우 requestPayment 함수를 이용해주세요.",en:"This is not a subscription widget. If it is not a subscription widget, use the requestPayment function."},getLocaleMessage:(r,e)=>{const s=r.split(".").reduce((i,n)=>i[n],Yt);return q(s)&&q(s[e])?s[e]:s.ko}};class Mi extends be{constructor(){super(),this.mode="PAYMENT",this.modeApiUrl={PAYMENT:"request/payment",CARD_SUBSCRIPTION:"request/subscribe",AUTH:"request/authentication"},this.$formId="bootpay-form",this.$iFrameId="bootpay-iframe-id",this.$windowId="bootpay-window-id",this.$paymentWindowId="bootpay-payment-window-id",this.$confirmFormId="bootpay-confirm-form-id",this.$confirmIFrame="bootpay-confirm-iframe-id",this.$popupWindow="bootpay-popup-window-id",this.$closeButton="bootpay-close-btn",this.$popupItemNameId="bootpay-item-name-id",this.$popupPriceId="bootpay-price-id",this.$popup=void 0,this.$popupWatcher=void 0,this.$popupUrl=void 0,this.$env=R,this.$template=this.template()}template(){return`
19
+ `}showProgress(e){this.$present(this.byId(this.$alfredId))?this.byId(this.$alfredTextId).innerText=e:document.body.insertAdjacentHTML("beforeend",this.template(e)),this.byId(this.$alfredId).style.setProperty("display","flex")}hideProgress(){try{this.byId(this.$alfredId).outerHTML=""}catch{}}}const X=new ft;var ze={exports:{}},je={exports:{}};(function(s,e){(function(t,r){s.exports=r(Z())})(K,function(t){return function(r){var o=t,i=o.lib,g=i.WordArray,$=i.Hasher,T=o.algo,a=[];(function(){for(var _=0;_<64;_++)a[_]=r.abs(r.sin(_+1))*4294967296|0})();var E=T.MD5=$.extend({_doReset:function(){this._hash=new g.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(_,P){for(var D=0;D<16;D++){var c=P+D,n=_[c];_[c]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var l=this._hash.words,b=_[P+0],I=_[P+1],C=_[P+2],W=_[P+3],F=_[P+4],d=_[P+5],h=_[P+6],k=_[P+7],y=_[P+8],O=_[P+9],U=_[P+10],H=_[P+11],J=_[P+12],oe=_[P+13],ie=_[P+14],ne=_[P+15],u=l[0],m=l[1],f=l[2],v=l[3];u=B(u,m,f,v,b,7,a[0]),v=B(v,u,m,f,I,12,a[1]),f=B(f,v,u,m,C,17,a[2]),m=B(m,f,v,u,W,22,a[3]),u=B(u,m,f,v,F,7,a[4]),v=B(v,u,m,f,d,12,a[5]),f=B(f,v,u,m,h,17,a[6]),m=B(m,f,v,u,k,22,a[7]),u=B(u,m,f,v,y,7,a[8]),v=B(v,u,m,f,O,12,a[9]),f=B(f,v,u,m,U,17,a[10]),m=B(m,f,v,u,H,22,a[11]),u=B(u,m,f,v,J,7,a[12]),v=B(v,u,m,f,oe,12,a[13]),f=B(f,v,u,m,ie,17,a[14]),m=B(m,f,v,u,ne,22,a[15]),u=p(u,m,f,v,I,5,a[16]),v=p(v,u,m,f,h,9,a[17]),f=p(f,v,u,m,H,14,a[18]),m=p(m,f,v,u,b,20,a[19]),u=p(u,m,f,v,d,5,a[20]),v=p(v,u,m,f,U,9,a[21]),f=p(f,v,u,m,ne,14,a[22]),m=p(m,f,v,u,F,20,a[23]),u=p(u,m,f,v,O,5,a[24]),v=p(v,u,m,f,ie,9,a[25]),f=p(f,v,u,m,W,14,a[26]),m=p(m,f,v,u,y,20,a[27]),u=p(u,m,f,v,oe,5,a[28]),v=p(v,u,m,f,C,9,a[29]),f=p(f,v,u,m,k,14,a[30]),m=p(m,f,v,u,J,20,a[31]),u=w(u,m,f,v,d,4,a[32]),v=w(v,u,m,f,y,11,a[33]),f=w(f,v,u,m,H,16,a[34]),m=w(m,f,v,u,ie,23,a[35]),u=w(u,m,f,v,I,4,a[36]),v=w(v,u,m,f,F,11,a[37]),f=w(f,v,u,m,k,16,a[38]),m=w(m,f,v,u,U,23,a[39]),u=w(u,m,f,v,oe,4,a[40]),v=w(v,u,m,f,b,11,a[41]),f=w(f,v,u,m,W,16,a[42]),m=w(m,f,v,u,h,23,a[43]),u=w(u,m,f,v,O,4,a[44]),v=w(v,u,m,f,J,11,a[45]),f=w(f,v,u,m,ne,16,a[46]),m=w(m,f,v,u,C,23,a[47]),u=S(u,m,f,v,b,6,a[48]),v=S(v,u,m,f,k,10,a[49]),f=S(f,v,u,m,ie,15,a[50]),m=S(m,f,v,u,d,21,a[51]),u=S(u,m,f,v,J,6,a[52]),v=S(v,u,m,f,W,10,a[53]),f=S(f,v,u,m,U,15,a[54]),m=S(m,f,v,u,I,21,a[55]),u=S(u,m,f,v,y,6,a[56]),v=S(v,u,m,f,ne,10,a[57]),f=S(f,v,u,m,h,15,a[58]),m=S(m,f,v,u,oe,21,a[59]),u=S(u,m,f,v,F,6,a[60]),v=S(v,u,m,f,H,10,a[61]),f=S(f,v,u,m,C,15,a[62]),m=S(m,f,v,u,O,21,a[63]),l[0]=l[0]+u|0,l[1]=l[1]+m|0,l[2]=l[2]+f|0,l[3]=l[3]+v|0},_doFinalize:function(){var _=this._data,P=_.words,D=this._nDataBytes*8,c=_.sigBytes*8;P[c>>>5]|=128<<24-c%32;var n=r.floor(D/4294967296),l=D;P[(c+64>>>9<<4)+15]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,P[(c+64>>>9<<4)+14]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,_.sigBytes=(P.length+1)*4,this._process();for(var b=this._hash,I=b.words,C=0;C<4;C++){var W=I[C];I[C]=(W<<8|W>>>24)&16711935|(W<<24|W>>>8)&4278255360}return b},clone:function(){var _=$.clone.call(this);return _._hash=this._hash.clone(),_}});function B(_,P,D,c,n,l,b){var I=_+(P&D|~P&c)+n+b;return(I<<l|I>>>32-l)+P}function p(_,P,D,c,n,l,b){var I=_+(P&c|D&~c)+n+b;return(I<<l|I>>>32-l)+P}function w(_,P,D,c,n,l,b){var I=_+(P^D^c)+n+b;return(I<<l|I>>>32-l)+P}function S(_,P,D,c,n,l,b){var I=_+(D^(P|~c))+n+b;return(I<<l|I>>>32-l)+P}o.MD5=$._createHelper(E),o.HmacMD5=$._createHmacHelper(E)}(Math),t.MD5})})(je);var Ke=je.exports;const Ge=pe(Ke);var Be={exports:{}},Se={exports:{}},Je;function vt(){return Je||(Je=1,function(s,e){(function(t,r){s.exports=r(Z())})(K,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,g=o.Hasher,$=r.algo,T=[],a=$.SHA1=g.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,B){for(var p=this._hash.words,w=p[0],S=p[1],_=p[2],P=p[3],D=p[4],c=0;c<80;c++){if(c<16)T[c]=E[B+c]|0;else{var n=T[c-3]^T[c-8]^T[c-14]^T[c-16];T[c]=n<<1|n>>>31}var l=(w<<5|w>>>27)+D+T[c];c<20?l+=(S&_|~S&P)+1518500249:c<40?l+=(S^_^P)+1859775393:c<60?l+=(S&_|S&P|_&P)-1894007588:l+=(S^_^P)-899497514,D=P,P=_,_=S<<30|S>>>2,S=w,w=l}p[0]=p[0]+w|0,p[1]=p[1]+S|0,p[2]=p[2]+_|0,p[3]=p[3]+P|0,p[4]=p[4]+D|0},_doFinalize:function(){var E=this._data,B=E.words,p=this._nDataBytes*8,w=E.sigBytes*8;return B[w>>>5]|=128<<24-w%32,B[(w+64>>>9<<4)+14]=Math.floor(p/4294967296),B[(w+64>>>9<<4)+15]=p,E.sigBytes=B.length*4,this._process(),this._hash},clone:function(){var E=g.clone.call(this);return E._hash=this._hash.clone(),E}});r.SHA1=g._createHelper(a),r.HmacSHA1=g._createHmacHelper(a)}(),t.SHA1})}(Se)),Se.exports}var Ce={exports:{}},Ve;function gt(){return Ve||(Ve=1,function(s,e){(function(t,r){s.exports=r(Z())})(K,function(t){(function(){var r=t,o=r.lib,i=o.Base,g=r.enc,$=g.Utf8,T=r.algo;T.HMAC=i.extend({init:function(a,E){a=this._hasher=new a.init,typeof E=="string"&&(E=$.parse(E));var B=a.blockSize,p=B*4;E.sigBytes>p&&(E=a.finalize(E)),E.clamp();for(var w=this._oKey=E.clone(),S=this._iKey=E.clone(),_=w.words,P=S.words,D=0;D<B;D++)_[D]^=1549556828,P[D]^=909522486;w.sigBytes=S.sigBytes=p,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var E=this._hasher,B=E.finalize(a);E.reset();var p=E.finalize(this._oKey.clone().concat(B));return p}})})()})}(Ce)),Ce.exports}var Ye;function Qe(){return Ye||(Ye=1,function(s,e){(function(t,r,o){s.exports=r(Z(),vt(),gt())})(K,function(t){return function(){var r=t,o=r.lib,i=o.Base,g=o.WordArray,$=r.algo,T=$.MD5,a=$.EvpKDF=i.extend({cfg:i.extend({keySize:128/32,hasher:T,iterations:1}),init:function(E){this.cfg=this.cfg.extend(E)},compute:function(E,B){for(var p,w=this.cfg,S=w.hasher.create(),_=g.create(),P=_.words,D=w.keySize,c=w.iterations;P.length<D;){p&&S.update(p),p=S.update(E).finalize(B),S.reset();for(var n=1;n<c;n++)p=S.finalize(p),S.reset();_.concat(p)}return _.sigBytes=D*4,_}});r.EvpKDF=function(E,B,p){return a.create(p).compute(E,B)}}(),t.EvpKDF})}(Be)),Be.exports}var Ae={exports:{}},Ze;function Oe(){return Ze||(Ze=1,function(s,e){(function(t,r,o){s.exports=r(Z(),Qe())})(K,function(t){t.lib.Cipher||function(r){var o=t,i=o.lib,g=i.Base,$=i.WordArray,T=i.BufferedBlockAlgorithm,a=o.enc;a.Utf8;var E=a.Base64,B=o.algo,p=B.EvpKDF,w=i.Cipher=T.extend({cfg:g.extend(),createEncryptor:function(d,h){return this.create(this._ENC_XFORM_MODE,d,h)},createDecryptor:function(d,h){return this.create(this._DEC_XFORM_MODE,d,h)},init:function(d,h,k){this.cfg=this.cfg.extend(k),this._xformMode=d,this._key=h,this.reset()},reset:function(){T.reset.call(this),this._doReset()},process:function(d){return this._append(d),this._process()},finalize:function(d){d&&this._append(d);var h=this._doFinalize();return h},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function d(h){return typeof h=="string"?F:I}return function(h){return{encrypt:function(k,y,O){return d(y).encrypt(h,k,y,O)},decrypt:function(k,y,O){return d(y).decrypt(h,k,y,O)}}}}()});i.StreamCipher=w.extend({_doFinalize:function(){var d=this._process(!0);return d},blockSize:1});var S=o.mode={},_=i.BlockCipherMode=g.extend({createEncryptor:function(d,h){return this.Encryptor.create(d,h)},createDecryptor:function(d,h){return this.Decryptor.create(d,h)},init:function(d,h){this._cipher=d,this._iv=h}}),P=S.CBC=function(){var d=_.extend();d.Encryptor=d.extend({processBlock:function(k,y){var O=this._cipher,U=O.blockSize;h.call(this,k,y,U),O.encryptBlock(k,y),this._prevBlock=k.slice(y,y+U)}}),d.Decryptor=d.extend({processBlock:function(k,y){var O=this._cipher,U=O.blockSize,H=k.slice(y,y+U);O.decryptBlock(k,y),h.call(this,k,y,U),this._prevBlock=H}});function h(k,y,O){var U,H=this._iv;H?(U=H,this._iv=r):U=this._prevBlock;for(var J=0;J<O;J++)k[y+J]^=U[J]}return d}(),D=o.pad={},c=D.Pkcs7={pad:function(d,h){for(var k=h*4,y=k-d.sigBytes%k,O=y<<24|y<<16|y<<8|y,U=[],H=0;H<y;H+=4)U.push(O);var J=$.create(U,y);d.concat(J)},unpad:function(d){var h=d.words[d.sigBytes-1>>>2]&255;d.sigBytes-=h}};i.BlockCipher=w.extend({cfg:w.cfg.extend({mode:P,padding:c}),reset:function(){var d;w.reset.call(this);var h=this.cfg,k=h.iv,y=h.mode;this._xformMode==this._ENC_XFORM_MODE?d=y.createEncryptor:(d=y.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==d?this._mode.init(this,k&&k.words):(this._mode=d.call(y,this,k&&k.words),this._mode.__creator=d)},_doProcessBlock:function(d,h){this._mode.processBlock(d,h)},_doFinalize:function(){var d,h=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(h.pad(this._data,this.blockSize),d=this._process(!0)):(d=this._process(!0),h.unpad(d)),d},blockSize:128/32});var n=i.CipherParams=g.extend({init:function(d){this.mixIn(d)},toString:function(d){return(d||this.formatter).stringify(this)}}),l=o.format={},b=l.OpenSSL={stringify:function(d){var h,k=d.ciphertext,y=d.salt;return y?h=$.create([1398893684,1701076831]).concat(y).concat(k):h=k,h.toString(E)},parse:function(d){var h,k=E.parse(d),y=k.words;return y[0]==1398893684&&y[1]==1701076831&&(h=$.create(y.slice(2,4)),y.splice(0,4),k.sigBytes-=16),n.create({ciphertext:k,salt:h})}},I=i.SerializableCipher=g.extend({cfg:g.extend({format:b}),encrypt:function(d,h,k,y){y=this.cfg.extend(y);var O=d.createEncryptor(k,y),U=O.finalize(h),H=O.cfg;return n.create({ciphertext:U,key:k,iv:H.iv,algorithm:d,mode:H.mode,padding:H.padding,blockSize:d.blockSize,formatter:y.format})},decrypt:function(d,h,k,y){y=this.cfg.extend(y),h=this._parse(h,y.format);var O=d.createDecryptor(k,y).finalize(h.ciphertext);return O},_parse:function(d,h){return typeof d=="string"?h.parse(d,this):d}}),C=o.kdf={},W=C.OpenSSL={execute:function(d,h,k,y,O){if(y||(y=$.random(64/8)),O)var U=p.create({keySize:h+k,hasher:O}).compute(d,y);else var U=p.create({keySize:h+k}).compute(d,y);var H=$.create(U.words.slice(h),k*4);return U.sigBytes=h*4,n.create({key:U,iv:H,salt:y})}},F=i.PasswordBasedCipher=I.extend({cfg:I.cfg.extend({kdf:W}),encrypt:function(d,h,k,y){y=this.cfg.extend(y);var O=y.kdf.execute(k,d.keySize,d.ivSize,y.salt,y.hasher);y.iv=O.iv;var U=I.encrypt.call(this,d,h,O.key,y);return U.mixIn(O),U},decrypt:function(d,h,k,y){y=this.cfg.extend(y),h=this._parse(h,y.format);var O=y.kdf.execute(k,d.keySize,d.ivSize,h.salt,y.hasher);y.iv=O.iv;var U=I.decrypt.call(this,d,h,O.key,y);return U}})}()})}(Ae)),Ae.exports}(function(s,e){(function(t,r,o){s.exports=r(Z(),qe(),Ke,Qe(),Oe())})(K,function(t){return function(){var r=t,o=r.lib,i=o.BlockCipher,g=r.algo,$=[],T=[],a=[],E=[],B=[],p=[],w=[],S=[],_=[],P=[];(function(){for(var n=[],l=0;l<256;l++)l<128?n[l]=l<<1:n[l]=l<<1^283;for(var b=0,I=0,l=0;l<256;l++){var C=I^I<<1^I<<2^I<<3^I<<4;C=C>>>8^C&255^99,$[b]=C,T[C]=b;var W=n[b],F=n[W],d=n[F],h=n[C]*257^C*16843008;a[b]=h<<24|h>>>8,E[b]=h<<16|h>>>16,B[b]=h<<8|h>>>24,p[b]=h;var h=d*16843009^F*65537^W*257^b*16843008;w[C]=h<<24|h>>>8,S[C]=h<<16|h>>>16,_[C]=h<<8|h>>>24,P[C]=h,b?(b=W^n[n[n[d^W]]],I^=n[n[I]]):b=I=1}})();var D=[0,1,2,4,8,16,32,64,128,27,54],c=g.AES=i.extend({_doReset:function(){var n;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var l=this._keyPriorReset=this._key,b=l.words,I=l.sigBytes/4,C=this._nRounds=I+6,W=(C+1)*4,F=this._keySchedule=[],d=0;d<W;d++)d<I?F[d]=b[d]:(n=F[d-1],d%I?I>6&&d%I==4&&(n=$[n>>>24]<<24|$[n>>>16&255]<<16|$[n>>>8&255]<<8|$[n&255]):(n=n<<8|n>>>24,n=$[n>>>24]<<24|$[n>>>16&255]<<16|$[n>>>8&255]<<8|$[n&255],n^=D[d/I|0]<<24),F[d]=F[d-I]^n);for(var h=this._invKeySchedule=[],k=0;k<W;k++){var d=W-k;if(k%4)var n=F[d];else var n=F[d-4];k<4||d<=4?h[k]=n:h[k]=w[$[n>>>24]]^S[$[n>>>16&255]]^_[$[n>>>8&255]]^P[$[n&255]]}}},encryptBlock:function(n,l){this._doCryptBlock(n,l,this._keySchedule,a,E,B,p,$)},decryptBlock:function(n,l){var b=n[l+1];n[l+1]=n[l+3],n[l+3]=b,this._doCryptBlock(n,l,this._invKeySchedule,w,S,_,P,T);var b=n[l+1];n[l+1]=n[l+3],n[l+3]=b},_doCryptBlock:function(n,l,b,I,C,W,F,d){for(var h=this._nRounds,k=n[l]^b[0],y=n[l+1]^b[1],O=n[l+2]^b[2],U=n[l+3]^b[3],H=4,J=1;J<h;J++){var oe=I[k>>>24]^C[y>>>16&255]^W[O>>>8&255]^F[U&255]^b[H++],ie=I[y>>>24]^C[O>>>16&255]^W[U>>>8&255]^F[k&255]^b[H++],ne=I[O>>>24]^C[U>>>16&255]^W[k>>>8&255]^F[y&255]^b[H++],u=I[U>>>24]^C[k>>>16&255]^W[y>>>8&255]^F[O&255]^b[H++];k=oe,y=ie,O=ne,U=u}var oe=(d[k>>>24]<<24|d[y>>>16&255]<<16|d[O>>>8&255]<<8|d[U&255])^b[H++],ie=(d[y>>>24]<<24|d[O>>>16&255]<<16|d[U>>>8&255]<<8|d[k&255])^b[H++],ne=(d[O>>>24]<<24|d[U>>>16&255]<<16|d[k>>>8&255]<<8|d[y&255])^b[H++],u=(d[U>>>24]<<24|d[k>>>16&255]<<16|d[y>>>8&255]<<8|d[O&255])^b[H++];n[l]=oe,n[l+1]=ie,n[l+2]=ne,n[l+3]=u},keySize:256/32});r.AES=i._createHelper(c)}(),t.AES})})(ze);var bt=ze.exports;const Re=pe(bt);class _e extends Error{constructor(e,t,r){super(e),this.name="HttpError",this.code=t,this.response=r}}class ke{constructor(e=6e4){this.timeout=e}get(e,t={}){return this.request("GET",e,void 0,t)}post(e,t,r={}){return this.request("POST",e,t,r)}put(e,t,r={}){return this.request("PUT",e,t,r)}async request(e,t,r,o={}){const i={Accept:"application/json"},g={method:e,headers:i};r!==void 0&&(i["Content-Type"]="application/json",g.body=typeof r=="string"?r:JSON.stringify(r));const $=typeof AbortController<"u"?new AbortController:void 0;$!==void 0&&(g.signal=$.signal);let T;const a=()=>new _e(`timeout of ${this.timeout}ms exceeded`,"ECONNABORTED"),E=new Promise((p,w)=>{T=setTimeout(()=>{w(a()),$==null||$.abort()},this.timeout)}),B=p=>p instanceof _e?p:(p==null?void 0:p.name)==="AbortError"?a():new _e("Network Error","ERR_NETWORK");try{let p,w;try{p=await Promise.race([fetch(ke.buildUrl(t,o.params),g),E]),w=await Promise.race([p.text(),E])}catch(_){throw B(_)}const S={data:ke.parseBody(w),status:p.status,headers:p.headers};if(p.status<200||p.status>=300){const _=p.status>=400&&p.status<500?"ERR_BAD_REQUEST":"ERR_BAD_RESPONSE";throw new _e(`Request failed with status code ${p.status}`,_,S)}return S}finally{clearTimeout(T)}}static parseBody(e){if(e==="")return e;try{return JSON.parse(e)}catch{return e}}static buildUrl(e,t){if(t==null)return e;const r=i=>encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]"),o=[];return Object.keys(t).forEach(i=>{const g=t[i];if(g==null)return;const $=Array.isArray(g)?g:[g],T=Array.isArray(g)?`${i}[]`:i;$.forEach(a=>{const E=a instanceof Date?a.toISOString():typeof a=="object"&&a!==null?JSON.stringify(a):String(a);o.push(`${r(T)}=${r(E)}`)})}),o.length===0?e:`${e}${e.indexOf("?")===-1?"?":"&"}${o.join("&")}`}}class le{constructor(){this.$http=new ke(6e4)}static encryptParams(e){fe(e,"object")&&(e=JSON.stringify(e));let t=Re.encrypt(e,Fe());return{payload:t.ciphertext.toString(he),token:`${t.key.toString(he)}##${t.iv.toString(he)}`}}static toUnderscore(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}static toCamelcase(e){return e.replace(/(\_[a-z])/g,function(t){return t.toUpperCase().replace(/_/g,"")})}static objectKeyToUnderscore(e){let t;return N(e)&&(Array.isArray(e)?(t=[],e.forEach(r=>{let o={};Object.keys(r).forEach(i=>{o[this.toUnderscore(i)]=r[i]}),t.push(o)})):(t={},Object.keys(e).forEach(r=>{t[this.toUnderscore(r)]=e[r]}))),t}static objectKeyToCamel(e){let t;return N(e)&&(Array.isArray(e)?(t=[],e.forEach(r=>{let o={};Object.keys(r).forEach(i=>{o[this.toCamelcase(i)]=r[i]}),t.push(o)})):(t={},Object.keys(e).forEach(r=>{fe(e[r],"object")&&Object.keys(e[r]).length>0?t[this.toCamelcase(r)]=this.objectKeyToCamel(e[r]):t[this.toCamelcase(r)]=e[r]}))),t}static isHttpBodyUsedMethod(e){return["post","put"].indexOf(e)>-1}}class $t extends le{constructor(){super()}async pollingStatus(e,t,r,o){try{const i=await this.$http.get([e,"s",t].join("/"),{params:{application_id:r,tk:o}});return Promise.resolve(i)}catch(i){return Promise.reject(i)}}}const wt=new $t;class _t extends ue{constructor(){super(),this.$messageEventName="message.BootpayPaymentEvent",this.$eventPrefix="bootpay",this.$pollingInterval=void 0,this.resetPollingData(),this.$pollingEvent=wt,this.pollingInterval=3e3,this.isDone=!1}bind(e,t){this.isDone=!1,this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,r=>{const o=this.parseEvent(r.data);if(A.debug("event received",JSON.stringify(o)),N(o))switch(A.debug("event",o),o.event){case"error":case"cancel":return this.handleErrorOrCancel(o);case"setConfirmParameters":const i=`${o.gateway_url}/confirm/${o.receipt_id}?application_id=${o.application_id}`;o.open_type==="redirect"?R.setConfirmRedirect(i):R.setConfirmFormUrl(i);break;case"confirm":return this.resolve({event:o.event,application_id:o.application_id,receipt_id:o.receipt_id,gateway_url:o.gateway_url,order_id:o.order_id});case"redirect":R.destroy(!1),location.href=o.url;return;case"moveRedirectUrl":R.closePopup(),R.hidePaymentiFrame(),R.showProgress("결제 진행 중입니다. 잠시만 기다려주세요."),location.replace(dt(o.url,o.parameters)),setTimeout(()=>{R.destroy(!1)},5e3);break;case"polling":return this.$pollingData!==void 0&&(this.$pollingData.receiptId=o.receipt_id,this.$pollingData.gatewayUrl=o.gateway_url),this.startPollingEvent();case"issued":case"done":if(!this.isDone)return this.isDone=!0,this.clearPollingEvent(),this.resolve(o);break;case"iFrameStyle":case"windowStyle":case"resize":this.handleStyleUpdate(o);break;case"hideProgress":case"showProgress":this.handleProgressUpdate(o);break;case"hidePayment":case"showPayment":this.handleVisibilityUpdate(o);break;case"popup":R.createPopupButton({gatewayUrl:o.url,receiptId:o.receipt_id,name:o.name,price:o.price});break;case"close":R.destroy();break;default:return}})}setDefaultPaymentData(e,t){this.$pollingData!==void 0&&(this.$pollingData.applicationId=e,this.$pollingData.transactionKey=t)}callBootpayDOMEvent(e,t=void 0){document.dispatchEvent(new CustomEvent([this.$eventPrefix,e].join(""),{detail:t}))}startPollingEvent(){this.$pollingInterval=setInterval(async()=>{if(this.$pollingData!==void 0)try{const e=await this.$pollingEvent.pollingStatus(this.$pollingData.gatewayUrl,this.$pollingData.receiptId,this.$pollingData.applicationId,this.$pollingData.transactionKey);this.handlePollingResponse(e)}catch{return this.reject({error_code:"RC_RECEIPT_POLLING_INVALID",message:"결제 상태 체크에 실패하였습니다."})}},this.pollingInterval)}clearPollingEvent(){this.$pollingInterval!==void 0&&clearInterval(this.$pollingInterval),this.$pollingInterval=void 0,this.resetPollingData()}allClearEvent(){this.clearPollingEvent(),window.removeBootpayEventListener(this.$messageEventName)}handleErrorOrCancel(e){return this.reject({event:e.event,pg_error_code:e.pg_error_code,error_code:e.error_code,message:e.message,payload:e.payload})}handleProgressUpdate(e){switch(e.event){case"hideProgress":X.hideProgress();break;case"showProgress":R.showProgress(e.message);break}}handleStyleUpdate(e){switch(e.event){case"iFrameStyle":R.iFrameSetStyle(e.styles);break;case"windowStyle":R.windowStyle(e.styles);break;case"resize":R.iFrameResize(e.resizeData);break}}handleVisibilityUpdate(e){switch(e.event){case"hidePayment":R.closePopup(),R.hidePaymentiFrame();break;case"showPayment":R.showPaymentiFrame(this.$present(e.showCloseButton)?e.showCloseButton:!1);break}}handlePollingResponse(e){let t={bootpay_event:!0,event:"",data:e.data};if(e.data!==void 0){if(A.debug("polling event",`receive data: ${JSON.stringify(t)}`),e.data.status===1)return t.event="done",window.postMessage(JSON.stringify(t),"*");if(e.data.status===5)return t.event="issued",window.postMessage(JSON.stringify(t),"*")}}resetPollingData(){this.$pollingData={applicationId:"",gatewayUrl:"",receiptId:"",transactionKey:""}}}const Y=new _t;class kt extends le{constructor(){super(),this.$session=ae,this.$applicationId=void 0,this.$tk=void 0,this.$platformType=1,this.$receiptId=void 0}setTokenKey(e){this.$tk=e}setReceiptId(e){this.$receiptId=e}clearInstance(){this.$applicationId=void 0,this.$receiptId=void 0}send(e){try{if(N(this.$applicationId))return e.application_id=this.$applicationId,e.status=N(e.status)?e.status:1,e.version=de.version,e.tk=this.$tk,A.debug("send event",`${JSON.stringify(e)} 전송됨`),this.$http.post(x.toAnalytics("event"),e)}catch{return}}sendError(e){e.status=-1,this.send(e)}setApplicationId(e){this.$applicationId=e}sendCloseEvent(){if(N(this.$receiptId))try{return this.$http.put(x.toApi(`close/${this.$receiptId}`))}catch(e){return Promise.reject(e)}else return A.debug("receipt_id","undefined receipt_id"),Promise.resolve()}}const me=new kt,Ue={startProgress:{PAYMENT:{ko:"결제를 시작합니다",en:"Start Payment..."},CARD_SUBSCRIPTION:{ko:"자동결제 정보를 불러오는 중입니다...",en:"Automatic payment will start..."},AUTH:{ko:"본인인증을 시작합니다",en:"Authentication will start..."}},popupLocaleMessage:{message:{ko:"구매 내역에 동의하면 결제를 진행해주세요",en:"If you agree with the purchase details, please proceed with the payment."},button:{ko:"결제계속하기",en:"Continue"}},popupMessage:{message:{PAYMENT:{ko:"구매 내역에 동의하면 결제를 진행해주세요",en:"If you agree with the purchase details, please proceed with the payment"},CARD_SUBSCRIPTION:{ko:'자동결제에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',en:'If you agree to automatic card payment, press the "Continue" button to proceed'},AUTH:{ko:'본인인증에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',en:'If you agree to authenticate yourself, press the "Continue" button to proceed'}},button:{PAYMENT:{ko:"결제계속하기",en:"Continue"},CARD_SUBSCRIPTION:{ko:"계속하기",en:"Continue"},AUTH:{ko:"계속하기",en:"Continue"}}},popupBlocked:{PAYMENT:{ko:'팝업이 차단되었습니다. 브라우저에서 팝업을 허용한 뒤 "결제계속하기"를 다시 눌러주세요',en:'The pop-up was blocked. Allow pop-ups in your browser, then press "Continue" again'},CARD_SUBSCRIPTION:{ko:'팝업이 차단되었습니다. 브라우저에서 팝업을 허용한 뒤 "계속하기"를 다시 눌러주세요',en:'The pop-up was blocked. Allow pop-ups in your browser, then press "Continue" again'},AUTH:{ko:'팝업이 차단되었습니다. 브라우저에서 팝업을 허용한 뒤 "계속하기"를 다시 눌러주세요',en:'The pop-up was blocked. Allow pop-ups in your browser, then press "Continue" again'}},popupBlockedError:{PAYMENT:{ko:"팝업이 차단되어 결제창을 열지 못했습니다",en:"The payment window could not be opened because the pop-up was blocked"},CARD_SUBSCRIPTION:{ko:"팝업이 차단되어 자동결제 창을 열지 못했습니다",en:"The automatic payment window could not be opened because the pop-up was blocked"},AUTH:{ko:"팝업이 차단되어 본인인증 창을 열지 못했습니다",en:"The authentication window could not be opened because the pop-up was blocked"}},closeMessage:{PAYMENT:{ko:"결제창을 닫았습니다",en:"Payment window is closed"},CARD_SUBSCRIPTION:{ko:"자동 결제창을 닫았습니다",en:"Automatic Payment window is closed"},AUTH:{ko:"본인인증 창을 닫았습니다",en:"Authenticate window is closed"}},confirmNotYet:{PAYMENT:{ko:"결제 승인준비가 되지 않았습니다",en:"Payment approval not ready "},CARD_SUBSCRIPTION:{ko:"자동결제 승인준비가 되지 않았습니다",en:"Automatic Payment approval not ready"},AUTH:{ko:"본인인증 승인준비가 되지 않았습니다",en:"Authenticate approval not ready"}},notSelectPayment:{ko:"어떤 방법으로 결제할지 선택해주세요",en:"Please, do select payment."},termsNotAgree:{ko:"필수 약관을 모두 동의해주세요",en:"Please agree to all required terms and conditions"},notSelectBrandpay:{ko:"간편결제로 결제하려면, 등록된 카드 혹은 계좌를 선택해주세요",en:"Please select a registered card or account to pay with Easy Payment"},widgetTypeNotPayment:{ko:"결제 위젯 요청이 아닙니다. 결제 위젯이 아닌 경우 requestSubscription 함수를 이용해주세요.",en:"This is not a payment widget. If it is not a payment widget, use the requestSubscription function."},widgetTypeNotSubscription:{ko:"정기결제 위젯 요청이 아닙니다. 정기결제 위젯이 아닌 경우 requestPayment 함수를 이용해주세요.",en:"This is not a subscription widget. If it is not a subscription widget, use the requestPayment function."},getLocaleMessage:(s,e)=>{const r=s.split(".").reduce((o,i)=>o[i],Ue);return N(r)&&N(r[e])?r[e]:r.ko}};class It extends ee{constructor(){super(),this.mode="PAYMENT",this.modeApiUrl={PAYMENT:"request/payment",CARD_SUBSCRIPTION:"request/subscribe",AUTH:"request/authentication"},this.$formId="bootpay-form",this.$iFrameId="bootpay-iframe-id",this.$windowId="bootpay-window-id",this.$paymentWindowId="bootpay-payment-window-id",this.$confirmFormId="bootpay-confirm-form-id",this.$confirmIFrame="bootpay-confirm-iframe-id",this.$popupWindow="bootpay-popup-window-id",this.$closeButton="bootpay-close-btn",this.$popupItemNameId="bootpay-item-name-id",this.$popupPriceId="bootpay-price-id",this.$popupMessageId="bootpay-popup-message-id",this.$popup=void 0,this.$popupWatcher=void 0,this.$popupBlocked=!1,this.$popupUrl=void 0,this.$env=x,this.$template=this.template()}template(){return`
21
20
  <div id="${this.$windowId}" class="bootpay-payment-background">
22
- <div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$paymentWindowId}">
21
+ <div class="bootpay-payment-window ${x.isMobile()?"__mobile":""}" id="${this.$paymentWindowId}">
23
22
  <button class="bootpay-close-btn" id="${this.$closeButton}" style="display: none;" onclick="Bootpay.dismiss()"></button>
24
23
  <form id="${this.$formId}" method="POST">
25
24
  </form>
26
- <iframe id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
25
+ <iframe id="${this.$iFrameId}" name="${this.$iFrameId}" allow="${we}"></iframe>
27
26
  <div class="bootpay-popup-window" id="${this.$popupWindow}">
28
27
  <div class="header">
29
- <button class="bootpay-close-btn" onclick="Bootpay.dismiss(true)"></button>
28
+ <button type="button" class="bootpay-close-btn" aria-label="close" onclick="Bootpay.dismiss(true)"></button>
30
29
  </div>
31
30
  <div class="body">
32
31
  <h5 id="${this.$popupItemNameId}"></h5>
33
32
  <p class="price" id="${this.$popupPriceId}"></p>
34
- <div class="agree-text">${this.message("popupMessage.message")}</div>
33
+ <div class="agree-text">
34
+ <svg viewBox="0 0 20 20" fill="none" aria-hidden="true"><circle cx="10" cy="10" r="8.25" stroke="currentColor" stroke-width="1.5"/><path d="M6.5 10.25l2.25 2.25 4.75-4.75" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
35
+ <span id="${this.$popupMessageId}">${this.message("popupMessage.message")}</span>
36
+ </div>
35
37
  </div>
36
38
  <div class="footer">
37
- <button class="bootpay-button" onclick="Bootpay.readyToPopup()">
39
+ <button type="button" class="bootpay-button" onclick="Bootpay.readyToPopup()">
38
40
  ${this.message("popupMessage.button")}
39
41
  </button>
40
42
  </div>
@@ -47,41 +49,35 @@
47
49
  <iframe id="${this.$confirmIFrame}" name="${this.$confirmIFrame}" style="height:0; width: 0; border: 0; outline: 0;" frameborder="0"></iframe>
48
50
  </div>
49
51
  </div>
50
- `}templateReload(){H.debug("template reload","template reload!"),this.$template=this.template()}async start(e,t="PAYMENT"){return new Promise((s,i)=>{var d,p;this.initializePayment(t,s,i,e.application_id,e.tk),this.$themeColor=((d=e.extra)==null?void 0:d.theme_color)??((p=e.extra)==null?void 0:p.themeColor),this.createTemplateHtml(),this.bodyOpen(),this.showProgress(this.message("startProgress"));const n=pe.encryptParams(pe.objectKeyToUnderscore(e));this.setupForm(n,this.$env.toApi(this.apiUrl()));const m=this.byId(this.$formId);this.$present(e.extra)&&e.extra.popup,m.target=this.$iFrameId,m.submit()})}setConfirmFormUrl(e){const t=this.byId(this.$confirmIFrame),s=this.byId(this.$confirmFormId);t.style.setProperty("display","block"),s.target=this.$confirmIFrame,s.action=e}setConfirmRedirect(e){const t=this.byId(this.$confirmFormId);t.target="_self",t.action=e}confirm(){return new Promise((e,t)=>{he.bind(e,t);const s=this.byId(this.$confirmFormId);if(this.$blank(s.action))throw new ae({event:"error",error_code:"RC_CONFIRM_READY_NOT_YET",message:this.message("confirmNotYet")});s.submit()})}async startPaymentUrl(e,t="PAYMENT"){return new Promise((s,i)=>{this.initializePayment(t,s,i),this.$themeColor=void 0,this.showProgress(this.message("startProgress")),this.createTemplateHtml(),this.bodyOpen(),this.setupFormForUrl(e),this.byId(this.$formId).submit()})}createPopupButton(e){me.hideProgress(),this.hidePaymentiFrame(),this.showPopupMessage(e),this.$present(e.gatewayUrl)&&(this.$popupUrl=`${e.gatewayUrl}?popup=1`,Ye.setReceiptId(e.receiptId))}readyToPopup(e=void 0){this.hidePopupMessage(),this.closePopup();const t="width=750,height=500,top=0,left=0,scrollbars=yes,directories=no, status=no, menubar=no, fullscreen=no";this.$popup=window.open(this.getPopupUrl(e),"BootPayPopupInstance",t),this.$popupWatcher=setInterval(async()=>{if(this.$popup===void 0||this.$popup.closed){try{clearInterval(this.$popupWatcher),await Ye.sendCloseEvent()}catch(s){H.debug("popup",Xe(s))}return this.$popupUrl=void 0,he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:this.message("closeMessage")})}},500),this.bindParentEventOnPopup()}closePopup(){if(this.$popupWatcher!==void 0)try{clearInterval(this.$popupWatcher),H.debug("close popup","clear popup interval")}catch(e){H.info("clear popup watcher",Xe(e))}if(this.$popup!==void 0&&!this.$popup.closed)try{this.$popup.close(),H.debug("close popup","close popup instance")}catch(e){H.info("popup destroy",Xe(e))}}getPopupUrl(e){return this.$present(e)?e:this.$present(this.$popupUrl)?this.$popupUrl:"about:blank"}bindParentEventOnPopup(){let e="beforeunload.BootpayReloadWatcher";R.isMobileSafari()&&(e="pagehide.BootpayReloadWatcher"),window.resetBootpayEventListener(e,()=>{if(this.$popup!==void 0&&!this.$popup.closed)try{this.$popup.close()}catch(t){H.info("popup destroy",Xe(t))}})}showPaymentiFrame(e=!1){const t=this.byId(this.$iFrameId),s=this.byId(this.$closeButton);t!==void 0&&t.style.setProperty("display","block"),s!==void 0&&e&&s.style.setProperty("display","inline-block")}showPopupMessage(e){const t=this.byId(this.$popupWindow),s=this.byId(this.$popupItemNameId),i=this.byId(this.$popupPriceId);t!==void 0&&t.style.setProperty("display","block"),s!==void 0&&(s.innerText=e.name),i!==void 0&&(parseFloat(e.price)>0?i.innerText=String(e.price).replace(/\B(?=(\d{3})+(?!\d))/g,","):i.remove())}hidePopupMessage(){this.byId(this.$popupWindow).style.setProperty("display","none")}destroy(e=!0){this.$present(document.querySelector("body").className)&&(document.querySelector("body").className=document.querySelector("body").className.replace(/bootpay-open/gi,"")),this.$present(this.byId(this.$windowId))&&(this.byId(this.$windowId).outerHTML=""),document.body.classList.remove("bootpay-open"),me.hideProgress(),this.closePopup(),he.allClearEvent(),Ye.clearInstance(),e&&setTimeout(()=>he.callBootpayDOMEvent("close"),300)}iFrameResize(e){const t=this.byId(this.$iFrameId);if(t!==void 0){for(let s in e)if(String(e[s]).match(/%/)&&!this.byId(this.$paymentWindowId).className.match(/w-100/)){this.byId(this.$paymentWindowId).className+=" w-100";break}this.applyStylesToElement(t,e)}}iFrameSetStyle(e){H.debug("change style",e);const t=this.byId(this.$iFrameId);this.safeApplyStyles(t,e,"iframe style")}windowStyle(e){H.debug("change style",e);const t=this.byId(this.$paymentWindowId);this.safeApplyStyles(t,e,"window style")}safeApplyStyles(e,t,s){for(let i in t)try{H.debug(i,t[i]),e.style.setProperty(i,t[i])}catch(n){H.warn(s,n==null?void 0:n.message)}}hidePaymentiFrame(){const e=this.byId(this.$iFrameId),t=this.byId(this.$closeButton);e!==void 0&&e.style.setProperty("display","none"),t!==void 0&&t.style.setProperty("display","none")}message(e){return Yt.getLocaleMessage(`${e}.${this.mode}`,R.locale)}moveToUrl(e){const t=this.byId(this.$iFrameId);this.hidePaymentiFrame(),t.removeAttribute("style"),this.iFrameResize({width:R.isMobile()?"100%":400,height:R.isMobile()?"100%":700}),t.style.setProperty("display","block"),t.src=e}apiUrl(){return this.modeApiUrl[this.mode]}showProgress(e){me.showProgress(e);const t=this.byId(me.$alfredId);if(!t)return;const s=this.$themeColor;if(typeof s=="string"&&CSS.supports("color",s)){const i=CSS.supports("color","color-mix(in srgb, red 50%, transparent)");t.style.setProperty("--bootpay-progress-accent",s),t.style.setProperty("--bootpay-progress-accent-light",i?`color-mix(in srgb, ${s} 50%, transparent)`:s),t.style.setProperty("--bootpay-progress-accent-glow",i?`color-mix(in srgb, ${s} 80%, transparent)`:s)}else t.style.removeProperty("--bootpay-progress-accent"),t.style.removeProperty("--bootpay-progress-accent-light"),t.style.removeProperty("--bootpay-progress-accent-glow")}setupForm(e,t){const s=this.byId(this.$formId);s.innerHTML=`
52
+ `}templateReload(){A.debug("template reload","template reload!"),this.$template=this.template()}async start(e,t="PAYMENT"){return new Promise((r,o)=>{var $,T;this.initializePayment(t,r,o,e.application_id,e.tk),this.$themeColor=(($=e.extra)==null?void 0:$.theme_color)??((T=e.extra)==null?void 0:T.themeColor),this.createTemplateHtml(),this.bodyOpen(),this.showProgress(this.message("startProgress"));const i=le.encryptParams(le.objectKeyToUnderscore(e));this.setupForm(i,this.$env.toApi(this.apiUrl()));const g=this.byId(this.$formId);this.$present(e.extra)&&e.extra.popup,g.target=this.$iFrameId,g.submit()})}setConfirmFormUrl(e){const t=this.byId(this.$confirmIFrame),r=this.byId(this.$confirmFormId);t.style.setProperty("display","block"),r.target=this.$confirmIFrame,r.action=e}setConfirmRedirect(e){const t=this.byId(this.$confirmFormId);t.target="_self",t.action=e}confirm(){return new Promise((e,t)=>{Y.bind(e,t);const r=this.byId(this.$confirmFormId);if(this.$blank(r.action))throw new V({event:"error",error_code:"RC_CONFIRM_READY_NOT_YET",message:this.message("confirmNotYet")});r.submit()})}async startPaymentUrl(e,t="PAYMENT"){return new Promise((r,o)=>{this.initializePayment(t,r,o),this.$themeColor=void 0,this.showProgress(this.message("startProgress")),this.createTemplateHtml(),this.bodyOpen(),this.setupFormForUrl(e),this.byId(this.$formId).submit()})}createPopupButton(e){X.hideProgress(),this.hidePaymentiFrame(),this.$popupBlocked=!1,this.showPopupMessage(e),this.$present(e.gatewayUrl)&&(this.$popupUrl=`${e.gatewayUrl}?popup=1`,me.setReceiptId(e.receiptId))}readyToPopup(e=void 0){this.hidePopupMessage(),this.closePopup();const t="width=750,height=500,top=0,left=0,scrollbars=yes,directories=no, status=no, menubar=no, fullscreen=no";if(this.$popup=window.open(this.getPopupUrl(e),"BootPayPopupInstance",t),this.$popup===null||this.$popup===void 0){this.$popup=void 0,this.handlePopupBlocked();return}this.$popupBlocked=!1,this.$popupWatcher=setInterval(async()=>{if(!this.isPopupOpened()){try{clearInterval(this.$popupWatcher),await me.sendCloseEvent()}catch(r){A.debug("popup",ye(r))}return this.$popupUrl=void 0,Y.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:this.message("closeMessage")})}},500),this.bindParentEventOnPopup()}handlePopupBlocked(){if(A.warn("popup","popup blocked"),!this.$popupBlocked){this.$popupBlocked=!0,this.showPopupBlockedMessage();return}this.$popupBlocked=!1,this.$popupUrl=void 0,me.sendCloseEvent().catch(e=>A.debug("popup",ye(e))).then(()=>Y.reject({event:"error",error_code:"RC_POPUP_BLOCKED",message:this.message("popupBlockedError")}))}showPopupBlockedMessage(){var r,o;const e=this.byId(this.$popupWindow),t=this.byId(this.$popupMessageId);t!==null&&(t.innerText=this.message("popupBlocked"),(o=(r=t.parentElement)==null?void 0:r.querySelector("svg"))==null||o.style.setProperty("display","none")),e==null||e.style.setProperty("display","block")}isPopupOpened(){return this.$popup!==null&&this.$popup!==void 0&&!this.$popup.closed}closePopup(){if(this.$popupWatcher!==void 0)try{clearInterval(this.$popupWatcher),A.debug("close popup","clear popup interval")}catch(e){A.info("clear popup watcher",ye(e))}if(this.isPopupOpened())try{this.$popup.close(),A.debug("close popup","close popup instance")}catch(e){A.info("popup destroy",ye(e))}}getPopupUrl(e){return this.$present(e)?e:this.$present(this.$popupUrl)?this.$popupUrl:"about:blank"}bindParentEventOnPopup(){let e="beforeunload.BootpayReloadWatcher";x.isMobileSafari()&&(e="pagehide.BootpayReloadWatcher"),window.resetBootpayEventListener(e,()=>{if(this.isPopupOpened())try{this.$popup.close()}catch(t){A.info("popup destroy",ye(t))}})}showPaymentiFrame(e=!1){const t=this.byId(this.$iFrameId),r=this.byId(this.$closeButton);t!==void 0&&t.style.setProperty("display","block"),r!==void 0&&e&&r.style.setProperty("display","inline-block")}showPopupMessage(e){const t=this.byId(this.$popupWindow),r=this.byId(this.$popupItemNameId),o=this.byId(this.$popupPriceId);if(t!==void 0&&(this.applyPopupThemeColor(t),t.style.setProperty("display","block")),r!==void 0&&(r.innerText=e.name),o!==void 0){const i=String(e.price??""),g=i.match(/\d[\d,]*(\.\d+)?/);if(g!==null&&parseFloat(g[0].replace(/,/g,""))>0){const[$,T]=g[0].replace(/,/g,"").split("."),a=$.replace(/\B(?=(\d{3})+(?!\d))/g,",")+(T!==void 0?`.${T}`:"");o.innerText=i.replace(g[0],a)}else o.remove()}}applyPopupThemeColor(e){const t=this.resolveRgb(this.$themeColor),r=["--bootpay-popup-accent","--bootpay-popup-accent-hover","--bootpay-popup-accent-soft","--bootpay-popup-accent-text","--bootpay-popup-on-accent"];if(t===void 0){r.forEach(a=>e.style.removeProperty(a));return}const[o,i,g]=t,$=this.relativeLuminance(o,i,g)>.4,T=a=>`rgb(${[o,i,g].map(E=>Math.round(E*a+26*(1-a))).join(", ")})`;e.style.setProperty("--bootpay-popup-accent",`rgb(${o}, ${i}, ${g})`),e.style.setProperty("--bootpay-popup-accent-hover",T(.88)),e.style.setProperty("--bootpay-popup-accent-soft",`rgba(${o}, ${i}, ${g}, 0.1)`),e.style.setProperty("--bootpay-popup-accent-text",T($?.45:.7)),e.style.setProperty("--bootpay-popup-on-accent",$?"#1a1a1a":"#ffffff")}resolveRgb(e){if(typeof e!="string"||!CSS.supports("color",e))return;const t=document.createElement("span");t.style.setProperty("color",e),t.style.setProperty("display","none"),document.body.appendChild(t);const r=(getComputedStyle(t).color.match(/[\d.]+/g)??[]).map(Number);return t.remove(),r.length>=3?r.slice(0,3):void 0}relativeLuminance(e,t,r){const[o,i,g]=[e,t,r].map($=>{const T=$/255;return T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4)});return .2126*o+.7152*i+.0722*g}hidePopupMessage(){this.byId(this.$popupWindow).style.setProperty("display","none")}destroy(e=!0){this.$present(document.querySelector("body").className)&&(document.querySelector("body").className=document.querySelector("body").className.replace(/bootpay-open/gi,"")),this.$present(this.byId(this.$windowId))&&(this.byId(this.$windowId).outerHTML=""),document.body.classList.remove("bootpay-open"),X.hideProgress(),this.closePopup(),this.$popupBlocked=!1,Y.allClearEvent(),me.clearInstance(),e&&setTimeout(()=>Y.callBootpayDOMEvent("close"),300)}iFrameResize(e){const t=this.byId(this.$iFrameId);if(t!==void 0){for(let r in e)if(String(e[r]).match(/%/)&&!this.byId(this.$paymentWindowId).className.match(/w-100/)){this.byId(this.$paymentWindowId).className+=" w-100";break}this.applyStylesToElement(t,e)}}iFrameSetStyle(e){A.debug("change style",e);const t=this.byId(this.$iFrameId);this.safeApplyStyles(t,e,"iframe style")}windowStyle(e){A.debug("change style",e);const t=this.byId(this.$paymentWindowId);this.safeApplyStyles(t,e,"window style")}safeApplyStyles(e,t,r){for(let o in t)try{A.debug(o,t[o]),e.style.setProperty(o,t[o])}catch(i){A.warn(r,i==null?void 0:i.message)}}hidePaymentiFrame(){const e=this.byId(this.$iFrameId),t=this.byId(this.$closeButton);e!==void 0&&e.style.setProperty("display","none"),t!==void 0&&t.style.setProperty("display","none")}message(e){return Ue.getLocaleMessage(`${e}.${this.mode}`,x.locale)}moveToUrl(e){const t=this.byId(this.$iFrameId);this.hidePaymentiFrame(),t.removeAttribute("style"),this.iFrameResize({width:x.isMobile()?"100%":400,height:x.isMobile()?"100%":700}),t.style.setProperty("display","block"),t.src=e}apiUrl(){return this.modeApiUrl[this.mode]}showProgress(e){X.showProgress(e);const t=this.byId(X.$alfredId);if(!t)return;const r=this.$themeColor;if(typeof r=="string"&&CSS.supports("color",r)){const o=CSS.supports("color","color-mix(in srgb, red 50%, transparent)");t.style.setProperty("--bootpay-progress-accent",r),t.style.setProperty("--bootpay-progress-accent-light",o?`color-mix(in srgb, ${r} 50%, transparent)`:r),t.style.setProperty("--bootpay-progress-accent-glow",o?`color-mix(in srgb, ${r} 80%, transparent)`:r)}else t.style.removeProperty("--bootpay-progress-accent"),t.style.removeProperty("--bootpay-progress-accent-light"),t.style.removeProperty("--bootpay-progress-accent-glow")}setupForm(e,t){const r=this.byId(this.$formId);r.innerHTML=`
51
53
  <input type="hidden" name="payload" value="${e.payload}" />
52
54
  <input type="hidden" name="token" value="${e.token}" />
53
- `,s.action=t,s.target=this.$iFrameId}setupFormForUrl(e){const t=this.byId(this.$formId);t.method="GET",t.action=e,t.target=this.$iFrameId}initializePayment(e,t,s,i,n){this.mode=e,this.templateReload(),he.clearPollingEvent(),he.bind(t,s),i&&n&&he.setDefaultPaymentData(i,n)}}const M=new Mi,we=class we extends je{constructor(){super(),this.$session=$e,this.$logger=H,this.$event=Ye,this.platformType=Z.PLATFORM.JS,this.$transactionKey="",this.extra={},this.browserBootpayFilter={instagram:/Instagram/i,kakaotalk:/KAKAOTALK/i,facebook:/FBAV/i,naver:/NAVER/i,mobile_safari:/(iPhone|iPad|iPod)/,mobile_chrome:[/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/,/Chrome/]}}async requestPayment(e){var t;((t=e.extra)==null?void 0:t.locale)!==void 0&&!R.isSetLocale&&R.setLocale(e.extra.locale),this.$event.clearInstance(),this.generateTransactionKey(),e.application_id=e.client_key===void 0?R.currentApplicationId(e.application_id):null,this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"결제 요청 시작",request:e}),e.sdk=!0,e.platform_type=this.platformType,e.ver=R.packageVersion,e.sdk_version=R.sdkVersion,e.sdk_type=R.sdkName,e.locale=R.locale,e.price=parseFloat(String(e.price)),e.tax_free=parseFloat(String(e.tax_free)),e.deposit_price=parseFloat(String(e.deposit_price)),we.invalidRequestParamsData(e),we.invalidClientIdOrApplicationId(e),we.invalidRequestItemsData(e.items,e.price),e.uuid=this.$session.currentUserUUID(),e.sk=this.$session.currentSessionKey(),e.ti=this.$session.currentTimeTerm(),e.tk=this.$transactionKey,e.env=this.getUserDeviceEnvironment(),e.extra=this.openTypeFilter(e.extra),this.extra=e.extra;try{const s=await M.start(e);return H.debug("confirm ready",s),M.hidePaymentiFrame(),M.closePopup(),["done","issued"].indexOf(s.event)===-1&&this.$event.send({step:s.event,msg:"",request:e,response:s}),M.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${s.application_id}`),Promise.resolve(s)}catch(s){return this.eventError(s),Promise.reject(s)}}async confirm(){try{const e=await M.confirm();return Promise.resolve(e)}catch(e){return this.eventError(e),Promise.reject(e)}}eventDone(e,t=!0){var s;this.$logger.debug(e.event,e),this.$event.send({step:e.event,msg:e.event==="done"?"결제완료":"가상계좌발급완료",request:{},response:e}),me.hideProgress(),this.$logger.debug("show result",this.isDisplaySuccessResult()),this.isDisplaySuccessResult()&&t&&((s=e.data)==null?void 0:s.receipt_id)!==void 0?this.displayResultView(e.data.receipt_id):M.destroy()}eventError(e){me.hideProgress(),M.closePopup(),this.isDisplayErrorResult()&&e.event==="error"?this.displayResultErrorView(e):M.destroy(),this.$logger.debug("done failed destroy and hide","payment"),this.$event.sendError({step:this.$present(e.event)?e.event:"error",msg:e.message,trace:function(){try{return e.stack}catch{return!1}}()})}generateTransactionKey(){return this.$transactionKey=`${this.$uuid()}-${new Date().getTime()*1e3}`,this.$transactionKey}async requestSubscription(e){this.$event.clearInstance(),this.generateTransactionKey(),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"정기결제 요청 시작",request:e}),e.extra=this.openTypeFilter(e.extra);const t={application_id:e.client_key===void 0?e.application_id:null,client_key:e.client_key,subscription_id:e.subscription_id,pg:e.pg,method:e.method,order_name:e.order_name,price:e.price,tax_free:e.tax_free,user_token:e.user_token,metadata:e.metadata,redirect_url:e.redirect_url,wallet_id:e.wallet_id,widget:e.widget,widget_key:e.widget_key,widget_sandbox:e.widget_sandbox,subscribe_brandpay_type:e.subscribe_brandpay_type,platform_type:this.platformType,ver:R.packageVersion,sdk_version:R.sdkVersion,sdk_type:R.sdkName,locale:R.locale,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const s=await M.start(t,"CARD_SUBSCRIPTION");switch(H.debug("subscription success",s),this.$event.send({step:"confirm",msg:"결제승인전",request:{},response:s}),M.hidePaymentiFrame(),M.closePopup(),s.event){case"done":case"issued":break;case"confirm":M.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${s.application_id}`)}return Promise.resolve(s)}catch(s){return this.eventError(s),Promise.reject(s)}}async requestAuthentication(e){this.$event.clearInstance(),this.generateTransactionKey(),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"본인인증 요청 시작",request:e}),e.extra=this.openTypeFilter(e.extra);const t={application_id:e.client_key===void 0?e.application_id:null,client_key:e.client_key,authentication_id:e.authentication_id,pg:e.pg,method:this.$present(e.method)?e.method:"auth",order_name:e.order_name,platform_type:this.platformType,ver:ke.version,sdk_version:R.sdkVersion,sdk_type:R.sdkName,locale:R.locale,metadata:e.metadata,redirect_url:e.redirect_url,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const s=await M.start(t,"AUTH");switch(H.debug("authentication success",s),this.$event.send({step:"confirm",msg:"본인인증 승인전",request:{},response:s}),M.hidePaymentiFrame(),M.closePopup(),s.event){case"done":case"issued":break;case"confirm":M.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${s.application_id}`)}return Promise.resolve(s)}catch(s){return this.eventError(s),Promise.reject(s)}}async requestPaymentUrl(e){try{const t=await M.startPaymentUrl(e.url);return["done","issued"].indexOf(t.event)===-1&&this.$event.send({step:t.event,msg:"",request:{url:e.url},response:t}),M.setConfirmFormUrl(`${t.gateway_url}/confirm/${t.receipt_id}?application_id=${t.application_id}`),Promise.resolve(t)}catch(t){return this.eventError(t),Promise.reject(t)}}getUserDeviceEnvironment(){return{width:window.innerWidth,height:window.innerHeight}}isDisplaySuccessResult(){return this.extra!==void 0&&this.extra.display_success_result!==void 0&&this.extra.display_success_result}isDisplayErrorResult(){return this.extra!==void 0&&this.extra.display_error_result!==void 0&&this.extra.display_error_result}displayResultView(e){M.moveToUrl(R.toDoor(`result/${e}`))}displayResultErrorView(e){M.moveToUrl(R.toDoor(`error?error_code=${e.error_code}&pg_error_code=${e.pg_error_code}&message=${e.message}`))}openTypeFilter(e){if(this.$present(e)&&e.browser_open_type!==void 0){const t=this.getUserAgent();for(let s in e.browser_open_type){const i=e.browser_open_type[s],n=this.$present(this.browserBootpayFilter[i.browser])?this.browserBootpayFilter[i.browser]:new RegExp(`${i.browser}`);if(t.match(n)){e.open_type=i.open_type;break}}}return e}static invalidRequestParamsData(e){if(se(e))throw new ae({event:"error",error_code:"NEED_MORE_PARAMS",message:"결제 요청을 위한 최소한의 결제 정보를 입력해주세요."});Object.keys(we.invalidRequestParams).forEach(t=>{const s=e[t];if(se(s))throw new ae({event:"error",error_code:"INVALID_REQUEST_PARAMS",message:we.invalidRequestParams[t]})})}static invalidClientIdOrApplicationId(e){if(e.client_key===void 0&&e.application_id===void 0)throw new ae({event:"error",error_code:"NEED_CLIENT_KEY",message:"Client Key가 필요합니다"})}static invalidRequestItemsData(e,t){if(e!==void 0&&q(e)){let s=0;if(e.forEach((i,n)=>{if(se(i.id))throw new ae({event:"error",error_code:"NEED_ITEM_ID",message:`${n+1}번째 상품 고유 ID를 입력해주세요. [ key: id ]`});if(se(i.name))throw new ae({event:"error",error_code:"NEED_ITEM_NAME",message:`${n+1}번째 상품명을 입력해주세요. [ key: name ]`});if(se(i.qty))throw new ae({event:"error",error_code:"NEED_ITEM_QTY",message:`${n+1}번째 상품수량을 입력해주세요. [ key: qty ]`});if(se(i.price))throw new ae({event:"error",error_code:"NEED_ITEM_PRICE",message:`${n+1}번째 상품금액을 입력해주세요. [ key: price ]`});e[n].price=parseFloat(String(e[n].price)),e[n].qty=parseFloat(String(e[n].qty)),s+=e[n].price*e[n].qty}),s!==t)throw new ae({event:"error",error_code:"NEED_ITEM_TOTAL_PRICE_NOT_MATCH",message:`결제 금액과 상품 수량 및 상품 금액의 총합과 일치하지 않습니다. [ 요청금액: ${t} ${typeof t}, 상품 총합계 금액: ${s} ${typeof s} ]`})}}};we.invalidRequestParams={order_name:"판매할 상품명을 입력해주세요. [ key: order_name ]",price:"판매할 상품의 금액을 입력해주세요. [ key: price ]",order_id:"가맹점에서 설정할 주문 ID를 입력해주세요. [ key: order_id ]"};let Je=we;const Wi=new Je;class Li extends pe{constructor(){super(),this.$session=$e}setAnalyticsData(e){this.$session.setTime(e.time),this.$session.setUUID(e.uuid)}async send(e){const t=document.URL;if(t!==void 0&&t.search(/bootapi.co.kr/)===-1){const s=this.$session.getUser();e.application_id=R.currentApplicationId(e.application_id),e.sk=this.$session.currentSessionKey(),e.uuid=this.$session.currentUserUUID(),e.time=this.$session.currentTime(),e.url=t,e.referer=document.referrer!==void 0&&q(document.referrer)&&document.referrer.search(new RegExp(window.location.hostname))==-1?document.referrer:"",e.user_id=s===void 0||se(s)?void 0:s.id,e.items=this.generateItemKeyToVersion1(e.items);try{const i=await this.$http.post(R.toAnalytics(`call?ver=${ke.version}`),e);return i.data.status===200?(H.info("Analytics Common Send","통계 데이터가 전송되었습니다."),Promise.resolve()):(H.warn("Analytics Common Send",`통계 데이터가 전송 실패. ${JSON.stringify(i.data)}`),Promise.reject())}catch(i){return H.error("Analytics Common Error",`데이터 전송 실패: ${i.message}`),Promise.reject()}}}async login(e){if(e.application_id=R.currentApplicationId(e.application_id),se(e.application_id))return H.error("Analytics Params","application_id 값을 입력해주세요.");if(se(e.id))return H.error("Analytics Params","id 값을 입력해주세요.");try{const t=await this.$http.post(R.toAnalytics(`login?ver=${ke.version}`),e),{user_id:s}=t.data.data;return this.$session.setUser({id:s,time:new Date().getTime()}),Promise.resolve()}catch(t){return H.error("Analytics Login Error",`데이터 전송 실패: ${t.message}`),Promise.reject()}}logout(){this.$session.setUser(void 0)}generateItemKeyToVersion1(e){if(e!==void 0)return e.map(t=>({cat1:t.cat1,cat2:t.cat2,cat3:t.cat3,item_img:t.img,item_name:t.name,unique:t.id,price:t.price}))}}const qi=new Li;(function(){if(typeof window>"u"||typeof window.CustomEvent=="function")return!1;function r(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};let s=document.createEvent("CustomEvent");return s.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),s}r.prototype=window.Event.prototype,window.CustomEvent=r})();const Ee={$payment:Wi,$analytics:qi,$environment:R,async requestPayment(r){return new Promise(async(e,t)=>{try{r.extra!==void 0&&r.extra.override_global_event===!0&&(H.debug("override global event","override global event!"),Ee.overrideGlobalInstance());const s=await this.$payment.requestPayment(r);setTimeout(()=>{e(s),["done","issued"].indexOf(s.event)>-1&&this.$payment.eventDone(s)},100)}catch(s){setTimeout(()=>{t(this.errorHandler(s))},100)}})},async confirm(){return new Promise(async(r,e)=>{try{const t=await this.$payment.confirm();setTimeout(()=>{r(t),this.$payment.eventDone(t)},100)}catch(t){setTimeout(()=>e(this.errorHandler(t)),100)}})},async requestSubscription(r){return new Promise(async(e,t)=>{try{const s=await this.$payment.requestSubscription(r);e(s),this.$payment.eventDone(s)}catch(s){return t(this.errorHandler(s))}})},async requestAuthentication(r){return new Promise(async(e,t)=>{try{const s=await this.$payment.requestAuthentication(r);e(s),this.$payment.eventDone(s)}catch(s){return t(this.errorHandler(s))}})},async requestPaymentUrl(r,e=!1){return new Promise(async(t,s)=>{try{const i=await this.$payment.requestPaymentUrl(r);setTimeout(()=>{t(i),["done","issued"].indexOf(i.event)>-1&&this.$payment.eventDone(i)},100)}catch(i){setTimeout(()=>{s(this.errorHandler(i))},100)}})},setEnvironmentMode(r,e=void 0){this.$environment.set(r),e!==void 0&&this.$environment.setDevelopmentHost(e)},setApplicationId(r){return this.$environment.setApplicationId(r)},setVersion(r,e,t){return this.$environment.setVersion(r,e,t)},setDevice(r){switch(r){case"IOS":this.$payment.platformType=Z.PLATFORM.IOS;break;case"ANDROID":this.$payment.platformType=Z.PLATFORM.ANDROID;break;default:this.$payment.platformType=Z.PLATFORM.JS}return this.$payment.platformType},errorHandler(r){let e;switch(me.hideProgress(),r.name){case"BootpayEventError":e=r.eventMessage;break;default:if(q(r.event))e=r;else throw r}return e},readyToPopup(){M.readyToPopup()},setLogLevel(r){H.setLogLevel(r)},setUUID(r){return $e.setUUID(r)},send(r=void 0){return this.$analytics.send(r!==void 0?r:{})},login(r){return this.$analytics.login(r)},logout(){return this.$analytics.logout()},setLocale(r){R.setLocale(r),M.templateReload()},async dismiss(r=!1){if(r)try{await Ye.sendCloseEvent()}catch(e){H.debug("error",e.message)}he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})},getCurrentUUID(){return $e.currentUserUUID()},destroy(){M.destroy()},overrideGlobalInstance(){window.Bootpay=Ee}};typeof window<"u"&&(window.Bootpay=Ee);class zi extends Ge{constructor(){super(),this.$messageEventName="message.BootpayUserTokenEvent"}bind(e,t){this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,s=>{const i=this.parseEvent(s.data);if(q(i))switch(H.debug("event",i),i.event){case"error":case"cancel":return this.handleErrorOrCancel(i);case"data":return this.resolve(i.data);case"confirmPasswordToken":return this.resolve(i.token);case"confirmAddCard":return this.resolve(i);case"resize":ht.iFrameResize(i.resizeData);break;default:return}})}handleErrorOrCancel(e){return this.reject({event:e.event,pg_error_code:e.pg_error_code,error_code:e.error_code,message:e.message,payload:e.payload})}}var $r={exports:{}},Jt={exports:{}},kr;function ut(){return kr||(kr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(s){var i=t,n=i.lib,m=n.Base,d=n.WordArray,p=i.x64={};p.Word=m.extend({init:function(a,c){this.high=a,this.low=c}}),p.WordArray=m.extend({init:function(a,c){a=this.words=a||[],c!=s?this.sigBytes=c:this.sigBytes=a.length*8},toX32:function(){for(var a=this.words,c=a.length,g=[],o=0;o<c;o++){var u=a[o];g.push(u.high),g.push(u.low)}return d.create(g,this.sigBytes)},clone:function(){for(var a=m.clone.call(this),c=a.words=this.words.slice(0),g=c.length,o=0;o<g;o++)c[o]=c[o].clone();return a}})}(),t})}(Jt)),Jt.exports}var Zt={exports:{}},Pr;function ji(){return Pr||(Pr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){if(typeof ArrayBuffer=="function"){var s=t,i=s.lib,n=i.WordArray,m=n.init,d=n.init=function(p){if(p instanceof ArrayBuffer&&(p=new Uint8Array(p)),(p instanceof Int8Array||typeof Uint8ClampedArray<"u"&&p instanceof Uint8ClampedArray||p instanceof Int16Array||p instanceof Uint16Array||p instanceof Int32Array||p instanceof Uint32Array||p instanceof Float32Array||p instanceof Float64Array)&&(p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength)),p instanceof Uint8Array){for(var a=p.byteLength,c=[],g=0;g<a;g++)c[g>>>2]|=p[g]<<24-g%4*8;m.call(this,c,a)}else m.apply(this,arguments)};d.prototype=n}}(),t.lib.WordArray})}(Zt)),Zt.exports}var Qt={exports:{}},Sr;function Ki(){return Sr||(Sr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.enc;m.Utf16=m.Utf16BE={stringify:function(p){for(var a=p.words,c=p.sigBytes,g=[],o=0;o<c;o+=2){var u=a[o>>>2]>>>16-o%4*8&65535;g.push(String.fromCharCode(u))}return g.join("")},parse:function(p){for(var a=p.length,c=[],g=0;g<a;g++)c[g>>>1]|=p.charCodeAt(g)<<16-g%2*16;return n.create(c,a*2)}},m.Utf16LE={stringify:function(p){for(var a=p.words,c=p.sigBytes,g=[],o=0;o<c;o+=2){var u=d(a[o>>>2]>>>16-o%4*8&65535);g.push(String.fromCharCode(u))}return g.join("")},parse:function(p){for(var a=p.length,c=[],g=0;g<a;g++)c[g>>>1]|=d(p.charCodeAt(g)<<16-g%2*16);return n.create(c,a*2)}};function d(p){return p<<8&4278255360|p>>>8&16711935}}(),t.enc.Utf16})}(Qt)),Qt.exports}var e0={exports:{}},Ir;function Gi(){return Ir||(Ir=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.enc;m.Base64url={stringify:function(p,a){a===void 0&&(a=!0);var c=p.words,g=p.sigBytes,o=a?this._safe_map:this._map;p.clamp();for(var u=[],h=0;h<g;h+=3)for(var y=c[h>>>2]>>>24-h%4*8&255,f=c[h+1>>>2]>>>24-(h+1)%4*8&255,b=c[h+2>>>2]>>>24-(h+2)%4*8&255,x=y<<16|f<<8|b,l=0;l<4&&h+l*.75<g;l++)u.push(o.charAt(x>>>6*(3-l)&63));var v=o.charAt(64);if(v)for(;u.length%4;)u.push(v);return u.join("")},parse:function(p,a){a===void 0&&(a=!0);var c=p.length,g=a?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var u=0;u<g.length;u++)o[g.charCodeAt(u)]=u}var h=g.charAt(64);if(h){var y=p.indexOf(h);y!==-1&&(c=y)}return d(p,c,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function d(p,a,c){for(var g=[],o=0,u=0;u<a;u++)if(u%4){var h=c[p.charCodeAt(u-1)]<<u%4*2,y=c[p.charCodeAt(u)]>>>6-u%4*2,f=h|y;g[o>>>2]|=f<<24-o%4*8,o++}return n.create(g,o)}}(),t.enc.Base64url})}(e0)),e0.exports}var t0={exports:{}},Tr;function r0(){return Tr||(Tr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(s){var i=t,n=i.lib,m=n.WordArray,d=n.Hasher,p=i.algo,a=[],c=[];(function(){function u(b){for(var x=s.sqrt(b),l=2;l<=x;l++)if(!(b%l))return!1;return!0}function h(b){return(b-(b|0))*4294967296|0}for(var y=2,f=0;f<64;)u(y)&&(f<8&&(a[f]=h(s.pow(y,1/2))),c[f]=h(s.pow(y,1/3)),f++),y++})();var g=[],o=p.SHA256=d.extend({_doReset:function(){this._hash=new m.init(a.slice(0))},_doProcessBlock:function(u,h){for(var y=this._hash.words,f=y[0],b=y[1],x=y[2],l=y[3],v=y[4],E=y[5],_=y[6],A=y[7],w=0;w<64;w++){if(w<16)g[w]=u[h+w]|0;else{var I=g[w-15],B=(I<<25|I>>>7)^(I<<14|I>>>18)^I>>>3,C=g[w-2],F=(C<<15|C>>>17)^(C<<13|C>>>19)^C>>>10;g[w]=B+g[w-7]+F+g[w-16]}var D=v&E^~v&_,T=f&b^f&x^b&x,O=(f<<30|f>>>2)^(f<<19|f>>>13)^(f<<10|f>>>22),U=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),Y=A+U+D+c[w]+g[w],j=O+T;A=_,_=E,E=v,v=l+Y|0,l=x,x=b,b=f,f=Y+j|0}y[0]=y[0]+f|0,y[1]=y[1]+b|0,y[2]=y[2]+x|0,y[3]=y[3]+l|0,y[4]=y[4]+v|0,y[5]=y[5]+E|0,y[6]=y[6]+_|0,y[7]=y[7]+A|0},_doFinalize:function(){var u=this._data,h=u.words,y=this._nDataBytes*8,f=u.sigBytes*8;return h[f>>>5]|=128<<24-f%32,h[(f+64>>>9<<4)+14]=s.floor(y/4294967296),h[(f+64>>>9<<4)+15]=y,u.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var u=d.clone.call(this);return u._hash=this._hash.clone(),u}});i.SHA256=d._createHelper(o),i.HmacSHA256=d._createHmacHelper(o)}(Math),t.SHA256})}(t0)),t0.exports}var s0={exports:{}},Rr;function Xi(){return Rr||(Rr=1,function(r,e){(function(t,s,i){r.exports=s(L(),r0())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.algo,d=m.SHA256,p=m.SHA224=d.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=d._doFinalize.call(this);return a.sigBytes-=4,a}});s.SHA224=d._createHelper(p),s.HmacSHA224=d._createHmacHelper(p)}(),t.SHA224})}(s0)),s0.exports}var i0={exports:{}},Or;function Ur(){return Or||(Or=1,function(r,e){(function(t,s,i){r.exports=s(L(),ut())})(N,function(t){return function(){var s=t,i=s.lib,n=i.Hasher,m=s.x64,d=m.Word,p=m.WordArray,a=s.algo;function c(){return d.create.apply(d,arguments)}var g=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],o=[];(function(){for(var h=0;h<80;h++)o[h]=c()})();var u=a.SHA512=n.extend({_doReset:function(){this._hash=new p.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(h,y){for(var f=this._hash.words,b=f[0],x=f[1],l=f[2],v=f[3],E=f[4],_=f[5],A=f[6],w=f[7],I=b.high,B=b.low,C=x.high,F=x.low,D=l.high,T=l.low,O=v.high,U=v.low,Y=E.high,j=E.low,X=_.high,K=_.low,$=A.high,P=A.low,S=w.high,k=w.low,J=I,V=B,oe=C,W=F,Ze=D,We=T,D0=O,Qe=U,fe=Y,de=j,ft=X,et=K,vt=$,tt=P,$0=S,rt=k,ve=0;ve<80;ve++){var le,Fe,yt=o[ve];if(ve<16)Fe=yt.high=h[y+ve*2]|0,le=yt.low=h[y+ve*2+1]|0;else{var cs=o[ve-15],Le=cs.high,st=cs.low,Tn=(Le>>>1|st<<31)^(Le>>>8|st<<24)^Le>>>7,ds=(st>>>1|Le<<31)^(st>>>8|Le<<24)^(st>>>7|Le<<25),xs=o[ve-2],qe=xs.high,it=xs.low,Rn=(qe>>>19|it<<13)^(qe<<3|it>>>29)^qe>>>6,ls=(it>>>19|qe<<13)^(it<<3|qe>>>29)^(it>>>6|qe<<26),us=o[ve-7],On=us.high,Un=us.low,ps=o[ve-16],Hn=ps.high,hs=ps.low;le=ds+Un,Fe=Tn+On+(le>>>0<ds>>>0?1:0),le=le+ls,Fe=Fe+Rn+(le>>>0<ls>>>0?1:0),le=le+hs,Fe=Fe+Hn+(le>>>0<hs>>>0?1:0),yt.high=Fe,yt.low=le}var Nn=fe&ft^~fe&vt,fs=de&et^~de&tt,Mn=J&oe^J&Ze^oe&Ze,Wn=V&W^V&We^W&We,Ln=(J>>>28|V<<4)^(J<<30|V>>>2)^(J<<25|V>>>7),vs=(V>>>28|J<<4)^(V<<30|J>>>2)^(V<<25|J>>>7),qn=(fe>>>14|de<<18)^(fe>>>18|de<<14)^(fe<<23|de>>>9),zn=(de>>>14|fe<<18)^(de>>>18|fe<<14)^(de<<23|fe>>>9),ys=g[ve],jn=ys.high,ms=ys.low,xe=rt+zn,De=$0+qn+(xe>>>0<rt>>>0?1:0),xe=xe+fs,De=De+Nn+(xe>>>0<fs>>>0?1:0),xe=xe+ms,De=De+jn+(xe>>>0<ms>>>0?1:0),xe=xe+le,De=De+Fe+(xe>>>0<le>>>0?1:0),Es=vs+Wn,Kn=Ln+Mn+(Es>>>0<vs>>>0?1:0);$0=vt,rt=tt,vt=ft,tt=et,ft=fe,et=de,de=Qe+xe|0,fe=D0+De+(de>>>0<Qe>>>0?1:0)|0,D0=Ze,Qe=We,Ze=oe,We=W,oe=J,W=V,V=xe+Es|0,J=De+Kn+(V>>>0<xe>>>0?1:0)|0}B=b.low=B+V,b.high=I+J+(B>>>0<V>>>0?1:0),F=x.low=F+W,x.high=C+oe+(F>>>0<W>>>0?1:0),T=l.low=T+We,l.high=D+Ze+(T>>>0<We>>>0?1:0),U=v.low=U+Qe,v.high=O+D0+(U>>>0<Qe>>>0?1:0),j=E.low=j+de,E.high=Y+fe+(j>>>0<de>>>0?1:0),K=_.low=K+et,_.high=X+ft+(K>>>0<et>>>0?1:0),P=A.low=P+tt,A.high=$+vt+(P>>>0<tt>>>0?1:0),k=w.low=k+rt,w.high=S+$0+(k>>>0<rt>>>0?1:0)},_doFinalize:function(){var h=this._data,y=h.words,f=this._nDataBytes*8,b=h.sigBytes*8;y[b>>>5]|=128<<24-b%32,y[(b+128>>>10<<5)+30]=Math.floor(f/4294967296),y[(b+128>>>10<<5)+31]=f,h.sigBytes=y.length*4,this._process();var x=this._hash.toX32();return x},clone:function(){var h=n.clone.call(this);return h._hash=this._hash.clone(),h},blockSize:1024/32});s.SHA512=n._createHelper(u),s.HmacSHA512=n._createHmacHelper(u)}(),t.SHA512})}(i0)),i0.exports}var n0={exports:{}},Hr;function Vi(){return Hr||(Hr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ut(),Ur())})(N,function(t){return function(){var s=t,i=s.x64,n=i.Word,m=i.WordArray,d=s.algo,p=d.SHA512,a=d.SHA384=p.extend({_doReset:function(){this._hash=new m.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var c=p._doFinalize.call(this);return c.sigBytes-=16,c}});s.SHA384=p._createHelper(a),s.HmacSHA384=p._createHmacHelper(a)}(),t.SHA384})}(n0)),n0.exports}var o0={exports:{}},Nr;function Yi(){return Nr||(Nr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ut())})(N,function(t){return function(s){var i=t,n=i.lib,m=n.WordArray,d=n.Hasher,p=i.x64,a=p.Word,c=i.algo,g=[],o=[],u=[];(function(){for(var f=1,b=0,x=0;x<24;x++){g[f+5*b]=(x+1)*(x+2)/2%64;var l=b%5,v=(2*f+3*b)%5;f=l,b=v}for(var f=0;f<5;f++)for(var b=0;b<5;b++)o[f+5*b]=b+(2*f+3*b)%5*5;for(var E=1,_=0;_<24;_++){for(var A=0,w=0,I=0;I<7;I++){if(E&1){var B=(1<<I)-1;B<32?w^=1<<B:A^=1<<B-32}E&128?E=E<<1^113:E<<=1}u[_]=a.create(A,w)}})();var h=[];(function(){for(var f=0;f<25;f++)h[f]=a.create()})();var y=c.SHA3=d.extend({cfg:d.cfg.extend({outputLength:512}),_doReset:function(){for(var f=this._state=[],b=0;b<25;b++)f[b]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(f,b){for(var x=this._state,l=this.blockSize/2,v=0;v<l;v++){var E=f[b+2*v],_=f[b+2*v+1];E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360;var A=x[v];A.high^=_,A.low^=E}for(var w=0;w<24;w++){for(var I=0;I<5;I++){for(var B=0,C=0,F=0;F<5;F++){var A=x[I+5*F];B^=A.high,C^=A.low}var D=h[I];D.high=B,D.low=C}for(var I=0;I<5;I++)for(var T=h[(I+4)%5],O=h[(I+1)%5],U=O.high,Y=O.low,B=T.high^(U<<1|Y>>>31),C=T.low^(Y<<1|U>>>31),F=0;F<5;F++){var A=x[I+5*F];A.high^=B,A.low^=C}for(var j=1;j<25;j++){var B,C,A=x[j],X=A.high,K=A.low,$=g[j];$<32?(B=X<<$|K>>>32-$,C=K<<$|X>>>32-$):(B=K<<$-32|X>>>64-$,C=X<<$-32|K>>>64-$);var P=h[o[j]];P.high=B,P.low=C}var S=h[0],k=x[0];S.high=k.high,S.low=k.low;for(var I=0;I<5;I++)for(var F=0;F<5;F++){var j=I+5*F,A=x[j],J=h[j],V=h[(I+1)%5+5*F],oe=h[(I+2)%5+5*F];A.high=J.high^~V.high&oe.high,A.low=J.low^~V.low&oe.low}var A=x[0],W=u[w];A.high^=W.high,A.low^=W.low}},_doFinalize:function(){var f=this._data,b=f.words;this._nDataBytes*8;var x=f.sigBytes*8,l=this.blockSize*32;b[x>>>5]|=1<<24-x%32,b[(s.ceil((x+1)/l)*l>>>5)-1]|=128,f.sigBytes=b.length*4,this._process();for(var v=this._state,E=this.cfg.outputLength/8,_=E/8,A=[],w=0;w<_;w++){var I=v[w],B=I.high,C=I.low;B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,A.push(C),A.push(B)}return new m.init(A,E)},clone:function(){for(var f=d.clone.call(this),b=f._state=this._state.slice(0),x=0;x<25;x++)b[x]=b[x].clone();return f}});i.SHA3=d._createHelper(y),i.HmacSHA3=d._createHmacHelper(y)}(Math),t.SHA3})}(o0)),o0.exports}var a0={exports:{}},Mr;function Ji(){return Mr||(Mr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){/** @preserve
54
- (c) 2012 by Cédric Mesnil. All rights reserved.
55
-
56
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
57
-
58
- - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
59
- - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
60
-
61
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
62
- */return function(s){var i=t,n=i.lib,m=n.WordArray,d=n.Hasher,p=i.algo,a=m.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=m.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),g=m.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),o=m.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=m.create([0,1518500249,1859775393,2400959708,2840853838]),h=m.create([1352829926,1548603684,1836072691,2053994217,0]),y=p.RIPEMD160=d.extend({_doReset:function(){this._hash=m.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(_,A){for(var w=0;w<16;w++){var I=A+w,B=_[I];_[I]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360}var C=this._hash.words,F=u.words,D=h.words,T=a.words,O=c.words,U=g.words,Y=o.words,j,X,K,$,P,S,k,J,V,oe;S=j=C[0],k=X=C[1],J=K=C[2],V=$=C[3],oe=P=C[4];for(var W,w=0;w<80;w+=1)W=j+_[A+T[w]]|0,w<16?W+=f(X,K,$)+F[0]:w<32?W+=b(X,K,$)+F[1]:w<48?W+=x(X,K,$)+F[2]:w<64?W+=l(X,K,$)+F[3]:W+=v(X,K,$)+F[4],W=W|0,W=E(W,U[w]),W=W+P|0,j=P,P=$,$=E(K,10),K=X,X=W,W=S+_[A+O[w]]|0,w<16?W+=v(k,J,V)+D[0]:w<32?W+=l(k,J,V)+D[1]:w<48?W+=x(k,J,V)+D[2]:w<64?W+=b(k,J,V)+D[3]:W+=f(k,J,V)+D[4],W=W|0,W=E(W,Y[w]),W=W+oe|0,S=oe,oe=V,V=E(J,10),J=k,k=W;W=C[1]+K+V|0,C[1]=C[2]+$+oe|0,C[2]=C[3]+P+S|0,C[3]=C[4]+j+k|0,C[4]=C[0]+X+J|0,C[0]=W},_doFinalize:function(){var _=this._data,A=_.words,w=this._nDataBytes*8,I=_.sigBytes*8;A[I>>>5]|=128<<24-I%32,A[(I+64>>>9<<4)+14]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,_.sigBytes=(A.length+1)*4,this._process();for(var B=this._hash,C=B.words,F=0;F<5;F++){var D=C[F];C[F]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return B},clone:function(){var _=d.clone.call(this);return _._hash=this._hash.clone(),_}});function f(_,A,w){return _^A^w}function b(_,A,w){return _&A|~_&w}function x(_,A,w){return(_|~A)^w}function l(_,A,w){return _&w|A&~w}function v(_,A,w){return _^(A|~w)}function E(_,A){return _<<A|_>>>32-A}i.RIPEMD160=d._createHelper(y),i.HmacRIPEMD160=d._createHmacHelper(y)}(),t.RIPEMD160})}(a0)),a0.exports}var c0={exports:{}},Wr;function Zi(){return Wr||(Wr=1,function(r,e){(function(t,s,i){r.exports=s(L(),r0(),Gt())})(N,function(t){return function(){var s=t,i=s.lib,n=i.Base,m=i.WordArray,d=s.algo,p=d.SHA256,a=d.HMAC,c=d.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:p,iterations:25e4}),init:function(g){this.cfg=this.cfg.extend(g)},compute:function(g,o){for(var u=this.cfg,h=a.create(u.hasher,g),y=m.create(),f=m.create([1]),b=y.words,x=f.words,l=u.keySize,v=u.iterations;b.length<l;){var E=h.update(o).finalize(f);h.reset();for(var _=E.words,A=_.length,w=E,I=1;I<v;I++){w=h.finalize(w),h.reset();for(var B=w.words,C=0;C<A;C++)_[C]^=B[C]}y.concat(E),x[0]++}return y.sigBytes=l*4,y}});s.PBKDF2=function(g,o,u){return c.create(u).compute(g,o)}}(),t.PBKDF2})}(c0)),c0.exports}var d0={exports:{}},Lr;function Qi(){return Lr||(Lr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){return t.mode.CFB=function(){var s=t.lib.BlockCipherMode.extend();s.Encryptor=s.extend({processBlock:function(n,m){var d=this._cipher,p=d.blockSize;i.call(this,n,m,p,d),this._prevBlock=n.slice(m,m+p)}}),s.Decryptor=s.extend({processBlock:function(n,m){var d=this._cipher,p=d.blockSize,a=n.slice(m,m+p);i.call(this,n,m,p,d),this._prevBlock=a}});function i(n,m,d,p){var a,c=this._iv;c?(a=c.slice(0),this._iv=void 0):a=this._prevBlock,p.encryptBlock(a,0);for(var g=0;g<d;g++)n[m+g]^=a[g]}return s}(),t.mode.CFB})}(d0)),d0.exports}var x0={exports:{}},qr;function en(){return qr||(qr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){return t.mode.CTR=function(){var s=t.lib.BlockCipherMode.extend(),i=s.Encryptor=s.extend({processBlock:function(n,m){var d=this._cipher,p=d.blockSize,a=this._iv,c=this._counter;a&&(c=this._counter=a.slice(0),this._iv=void 0);var g=c.slice(0);d.encryptBlock(g,0),c[p-1]=c[p-1]+1|0;for(var o=0;o<p;o++)n[m+o]^=g[o]}});return s.Decryptor=i,s}(),t.mode.CTR})}(x0)),x0.exports}var l0={exports:{}},zr;function tn(){return zr||(zr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){/** @preserve
63
- * Counter block mode compatible with Dr Brian Gladman fileenc.c
64
- * derived from CryptoJS.mode.CTR
65
- * Jan Hruby jhruby.web@gmail.com
66
- */return t.mode.CTRGladman=function(){var s=t.lib.BlockCipherMode.extend();function i(d){if((d>>24&255)===255){var p=d>>16&255,a=d>>8&255,c=d&255;p===255?(p=0,a===255?(a=0,c===255?c=0:++c):++a):++p,d=0,d+=p<<16,d+=a<<8,d+=c}else d+=1<<24;return d}function n(d){return(d[0]=i(d[0]))===0&&(d[1]=i(d[1])),d}var m=s.Encryptor=s.extend({processBlock:function(d,p){var a=this._cipher,c=a.blockSize,g=this._iv,o=this._counter;g&&(o=this._counter=g.slice(0),this._iv=void 0),n(o);var u=o.slice(0);a.encryptBlock(u,0);for(var h=0;h<c;h++)d[p+h]^=u[h]}});return s.Decryptor=m,s}(),t.mode.CTRGladman})}(l0)),l0.exports}var u0={exports:{}},jr;function rn(){return jr||(jr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){return t.mode.OFB=function(){var s=t.lib.BlockCipherMode.extend(),i=s.Encryptor=s.extend({processBlock:function(n,m){var d=this._cipher,p=d.blockSize,a=this._iv,c=this._keystream;a&&(c=this._keystream=a.slice(0),this._iv=void 0),d.encryptBlock(c,0);for(var g=0;g<p;g++)n[m+g]^=c[g]}});return s.Decryptor=i,s}(),t.mode.OFB})}(u0)),u0.exports}var p0={exports:{}},Kr;function sn(){return Kr||(Kr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){return t.mode.ECB=function(){var s=t.lib.BlockCipherMode.extend();return s.Encryptor=s.extend({processBlock:function(i,n){this._cipher.encryptBlock(i,n)}}),s.Decryptor=s.extend({processBlock:function(i,n){this._cipher.decryptBlock(i,n)}}),s}(),t.mode.ECB})}(p0)),p0.exports}var h0={exports:{}},Gr;function nn(){return Gr||(Gr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){return t.pad.AnsiX923={pad:function(s,i){var n=s.sigBytes,m=i*4,d=m-n%m,p=n+d-1;s.clamp(),s.words[p>>>2]|=d<<24-p%4*8,s.sigBytes+=d},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},t.pad.Ansix923})}(h0)),h0.exports}var f0={exports:{}},Xr;function on(){return Xr||(Xr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){return t.pad.Iso10126={pad:function(s,i){var n=i*4,m=n-s.sigBytes%n;s.concat(t.lib.WordArray.random(m-1)).concat(t.lib.WordArray.create([m<<24],1))},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},t.pad.Iso10126})}(f0)),f0.exports}var v0={exports:{}},Vr;function an(){return Vr||(Vr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){return t.pad.Iso97971={pad:function(s,i){s.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(s,i)},unpad:function(s){t.pad.ZeroPadding.unpad(s),s.sigBytes--}},t.pad.Iso97971})}(v0)),v0.exports}var y0={exports:{}},Yr;function cn(){return Yr||(Yr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){return t.pad.ZeroPadding={pad:function(s,i){var n=i*4;s.clamp(),s.sigBytes+=n-(s.sigBytes%n||n)},unpad:function(s){for(var i=s.words,n=s.sigBytes-1,n=s.sigBytes-1;n>=0;n--)if(i[n>>>2]>>>24-n%4*8&255){s.sigBytes=n+1;break}}},t.pad.ZeroPadding})}(y0)),y0.exports}var m0={exports:{}},Jr;function dn(){return Jr||(Jr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(m0)),m0.exports}var E0={exports:{}},Zr;function xn(){return Zr||(Zr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){return function(s){var i=t,n=i.lib,m=n.CipherParams,d=i.enc,p=d.Hex,a=i.format;a.Hex={stringify:function(c){return c.ciphertext.toString(p)},parse:function(c){var g=p.parse(c);return m.create({ciphertext:g})}}}(),t.format.Hex})}(E0)),E0.exports}var g0={exports:{}},Qr;function ln(){return Qr||(Qr=1,function(r,e){(function(t,s,i){r.exports=s(L(),Be,Ce,Ae(),ee())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=i.BlockCipher,d=s.algo,p=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],g=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],o=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=d.DES=m.extend({_doReset:function(){for(var b=this._key,x=b.words,l=[],v=0;v<56;v++){var E=p[v]-1;l[v]=x[E>>>5]>>>31-E%32&1}for(var _=this._subKeys=[],A=0;A<16;A++){for(var w=_[A]=[],I=c[A],v=0;v<24;v++)w[v/6|0]|=l[(a[v]-1+I)%28]<<31-v%6,w[4+(v/6|0)]|=l[28+(a[v+24]-1+I)%28]<<31-v%6;w[0]=w[0]<<1|w[0]>>>31;for(var v=1;v<7;v++)w[v]=w[v]>>>(v-1)*4+3;w[7]=w[7]<<5|w[7]>>>27}for(var B=this._invSubKeys=[],v=0;v<16;v++)B[v]=_[15-v]},encryptBlock:function(b,x){this._doCryptBlock(b,x,this._subKeys)},decryptBlock:function(b,x){this._doCryptBlock(b,x,this._invSubKeys)},_doCryptBlock:function(b,x,l){this._lBlock=b[x],this._rBlock=b[x+1],h.call(this,4,252645135),h.call(this,16,65535),y.call(this,2,858993459),y.call(this,8,16711935),h.call(this,1,1431655765);for(var v=0;v<16;v++){for(var E=l[v],_=this._lBlock,A=this._rBlock,w=0,I=0;I<8;I++)w|=g[I][((A^E[I])&o[I])>>>0];this._lBlock=A,this._rBlock=_^w}var B=this._lBlock;this._lBlock=this._rBlock,this._rBlock=B,h.call(this,1,1431655765),y.call(this,8,16711935),y.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),b[x]=this._lBlock,b[x+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function h(b,x){var l=(this._lBlock>>>b^this._rBlock)&x;this._rBlock^=l,this._lBlock^=l<<b}function y(b,x){var l=(this._rBlock>>>b^this._lBlock)&x;this._lBlock^=l,this._rBlock^=l<<b}s.DES=m._createHelper(u);var f=d.TripleDES=m.extend({_doReset:function(){var b=this._key,x=b.words;if(x.length!==2&&x.length!==4&&x.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var l=x.slice(0,2),v=x.length<4?x.slice(0,2):x.slice(2,4),E=x.length<6?x.slice(0,2):x.slice(4,6);this._des1=u.createEncryptor(n.create(l)),this._des2=u.createEncryptor(n.create(v)),this._des3=u.createEncryptor(n.create(E))},encryptBlock:function(b,x){this._des1.encryptBlock(b,x),this._des2.decryptBlock(b,x),this._des3.encryptBlock(b,x)},decryptBlock:function(b,x){this._des3.decryptBlock(b,x),this._des2.encryptBlock(b,x),this._des1.decryptBlock(b,x)},keySize:192/32,ivSize:64/32,blockSize:64/32});s.TripleDES=m._createHelper(f)}(),t.TripleDES})}(g0)),g0.exports}var B0={exports:{}},es;function un(){return es||(es=1,function(r,e){(function(t,s,i){r.exports=s(L(),Be,Ce,Ae(),ee())})(N,function(t){return function(){var s=t,i=s.lib,n=i.StreamCipher,m=s.algo,d=m.RC4=n.extend({_doReset:function(){for(var c=this._key,g=c.words,o=c.sigBytes,u=this._S=[],h=0;h<256;h++)u[h]=h;for(var h=0,y=0;h<256;h++){var f=h%o,b=g[f>>>2]>>>24-f%4*8&255;y=(y+u[h]+b)%256;var x=u[h];u[h]=u[y],u[y]=x}this._i=this._j=0},_doProcessBlock:function(c,g){c[g]^=p.call(this)},keySize:256/32,ivSize:0});function p(){for(var c=this._S,g=this._i,o=this._j,u=0,h=0;h<4;h++){g=(g+1)%256,o=(o+c[g])%256;var y=c[g];c[g]=c[o],c[o]=y,u|=c[(c[g]+c[o])%256]<<24-h*8}return this._i=g,this._j=o,u}s.RC4=n._createHelper(d);var a=m.RC4Drop=d.extend({cfg:d.cfg.extend({drop:192}),_doReset:function(){d._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)p.call(this)}});s.RC4Drop=n._createHelper(a)}(),t.RC4})}(B0)),B0.exports}var b0={exports:{}},ts;function pn(){return ts||(ts=1,function(r,e){(function(t,s,i){r.exports=s(L(),Be,Ce,Ae(),ee())})(N,function(t){return function(){var s=t,i=s.lib,n=i.StreamCipher,m=s.algo,d=[],p=[],a=[],c=m.Rabbit=n.extend({_doReset:function(){for(var o=this._key.words,u=this.cfg.iv,h=0;h<4;h++)o[h]=(o[h]<<8|o[h]>>>24)&16711935|(o[h]<<24|o[h]>>>8)&4278255360;var y=this._X=[o[0],o[3]<<16|o[2]>>>16,o[1],o[0]<<16|o[3]>>>16,o[2],o[1]<<16|o[0]>>>16,o[3],o[2]<<16|o[1]>>>16],f=this._C=[o[2]<<16|o[2]>>>16,o[0]&4294901760|o[1]&65535,o[3]<<16|o[3]>>>16,o[1]&4294901760|o[2]&65535,o[0]<<16|o[0]>>>16,o[2]&4294901760|o[3]&65535,o[1]<<16|o[1]>>>16,o[3]&4294901760|o[0]&65535];this._b=0;for(var h=0;h<4;h++)g.call(this);for(var h=0;h<8;h++)f[h]^=y[h+4&7];if(u){var b=u.words,x=b[0],l=b[1],v=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,E=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,_=v>>>16|E&4294901760,A=E<<16|v&65535;f[0]^=v,f[1]^=_,f[2]^=E,f[3]^=A,f[4]^=v,f[5]^=_,f[6]^=E,f[7]^=A;for(var h=0;h<4;h++)g.call(this)}},_doProcessBlock:function(o,u){var h=this._X;g.call(this),d[0]=h[0]^h[5]>>>16^h[3]<<16,d[1]=h[2]^h[7]>>>16^h[5]<<16,d[2]=h[4]^h[1]>>>16^h[7]<<16,d[3]=h[6]^h[3]>>>16^h[1]<<16;for(var y=0;y<4;y++)d[y]=(d[y]<<8|d[y]>>>24)&16711935|(d[y]<<24|d[y]>>>8)&4278255360,o[u+y]^=d[y]},blockSize:128/32,ivSize:64/32});function g(){for(var o=this._X,u=this._C,h=0;h<8;h++)p[h]=u[h];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<p[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<p[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<p[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<p[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<p[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<p[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<p[6]>>>0?1:0)|0,this._b=u[7]>>>0<p[7]>>>0?1:0;for(var h=0;h<8;h++){var y=o[h]+u[h],f=y&65535,b=y>>>16,x=((f*f>>>17)+f*b>>>15)+b*b,l=((y&4294901760)*y|0)+((y&65535)*y|0);a[h]=x^l}o[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,o[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,o[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,o[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,o[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,o[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,o[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,o[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}s.Rabbit=n._createHelper(c)}(),t.Rabbit})}(b0)),b0.exports}var _0={exports:{}},rs;function hn(){return rs||(rs=1,function(r,e){(function(t,s,i){r.exports=s(L(),Be,Ce,Ae(),ee())})(N,function(t){return function(){var s=t,i=s.lib,n=i.StreamCipher,m=s.algo,d=[],p=[],a=[],c=m.RabbitLegacy=n.extend({_doReset:function(){var o=this._key.words,u=this.cfg.iv,h=this._X=[o[0],o[3]<<16|o[2]>>>16,o[1],o[0]<<16|o[3]>>>16,o[2],o[1]<<16|o[0]>>>16,o[3],o[2]<<16|o[1]>>>16],y=this._C=[o[2]<<16|o[2]>>>16,o[0]&4294901760|o[1]&65535,o[3]<<16|o[3]>>>16,o[1]&4294901760|o[2]&65535,o[0]<<16|o[0]>>>16,o[2]&4294901760|o[3]&65535,o[1]<<16|o[1]>>>16,o[3]&4294901760|o[0]&65535];this._b=0;for(var f=0;f<4;f++)g.call(this);for(var f=0;f<8;f++)y[f]^=h[f+4&7];if(u){var b=u.words,x=b[0],l=b[1],v=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,E=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,_=v>>>16|E&4294901760,A=E<<16|v&65535;y[0]^=v,y[1]^=_,y[2]^=E,y[3]^=A,y[4]^=v,y[5]^=_,y[6]^=E,y[7]^=A;for(var f=0;f<4;f++)g.call(this)}},_doProcessBlock:function(o,u){var h=this._X;g.call(this),d[0]=h[0]^h[5]>>>16^h[3]<<16,d[1]=h[2]^h[7]>>>16^h[5]<<16,d[2]=h[4]^h[1]>>>16^h[7]<<16,d[3]=h[6]^h[3]>>>16^h[1]<<16;for(var y=0;y<4;y++)d[y]=(d[y]<<8|d[y]>>>24)&16711935|(d[y]<<24|d[y]>>>8)&4278255360,o[u+y]^=d[y]},blockSize:128/32,ivSize:64/32});function g(){for(var o=this._X,u=this._C,h=0;h<8;h++)p[h]=u[h];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<p[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<p[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<p[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<p[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<p[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<p[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<p[6]>>>0?1:0)|0,this._b=u[7]>>>0<p[7]>>>0?1:0;for(var h=0;h<8;h++){var y=o[h]+u[h],f=y&65535,b=y>>>16,x=((f*f>>>17)+f*b>>>15)+b*b,l=((y&4294901760)*y|0)+((y&65535)*y|0);a[h]=x^l}o[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,o[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,o[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,o[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,o[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,o[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,o[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,o[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}s.RabbitLegacy=n._createHelper(c)}(),t.RabbitLegacy})}(_0)),_0.exports}var C0={exports:{}},ss;function fn(){return ss||(ss=1,function(r,e){(function(t,s,i){r.exports=s(L(),Be,Ce,Ae(),ee())})(N,function(t){return function(){var s=t,i=s.lib,n=i.BlockCipher,m=s.algo;const d=16,p=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function g(f,b){let x=b>>24&255,l=b>>16&255,v=b>>8&255,E=b&255,_=f.sbox[0][x]+f.sbox[1][l];return _=_^f.sbox[2][v],_=_+f.sbox[3][E],_}function o(f,b,x){let l=b,v=x,E;for(let _=0;_<d;++_)l=l^f.pbox[_],v=g(f,l)^v,E=l,l=v,v=E;return E=l,l=v,v=E,v=v^f.pbox[d],l=l^f.pbox[d+1],{left:l,right:v}}function u(f,b,x){let l=b,v=x,E;for(let _=d+1;_>1;--_)l=l^f.pbox[_],v=g(f,l)^v,E=l,l=v,v=E;return E=l,l=v,v=E,v=v^f.pbox[1],l=l^f.pbox[0],{left:l,right:v}}function h(f,b,x){for(let A=0;A<4;A++){f.sbox[A]=[];for(let w=0;w<256;w++)f.sbox[A][w]=a[A][w]}let l=0;for(let A=0;A<d+2;A++)f.pbox[A]=p[A]^b[l],l++,l>=x&&(l=0);let v=0,E=0,_=0;for(let A=0;A<d+2;A+=2)_=o(f,v,E),v=_.left,E=_.right,f.pbox[A]=v,f.pbox[A+1]=E;for(let A=0;A<4;A++)for(let w=0;w<256;w+=2)_=o(f,v,E),v=_.left,E=_.right,f.sbox[A][w]=v,f.sbox[A][w+1]=E;return!0}var y=m.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var f=this._keyPriorReset=this._key,b=f.words,x=f.sigBytes/4;h(c,b,x)}},encryptBlock:function(f,b){var x=o(c,f[b],f[b+1]);f[b]=x.left,f[b+1]=x.right},decryptBlock:function(f,b){var x=u(c,f[b],f[b+1]);f[b]=x.left,f[b+1]=x.right},blockSize:64/32,keySize:128/32,ivSize:64/32});s.Blowfish=n._createHelper(y)}(),t.Blowfish})}(C0)),C0.exports}(function(r,e){(function(t,s,i){r.exports=s(L(),ut(),ji(),Ki(),Be,Gi(),Ce,Cr(),r0(),Xi(),Ur(),Vi(),Yi(),Ji(),Gt(),Zi(),Ae(),ee(),Qi(),en(),tn(),rn(),sn(),nn(),on(),an(),cn(),dn(),xn(),Dr,ln(),un(),pn(),hn(),fn())})(N,function(t){return t})})($r);var vn=$r.exports;const Ie=Te(vn);class yn{constructor(){this.data={client_key:""}}encryptKey(){return br(this.data.client_key).toString().substring(0,16)}encrypt(e){if(se(this.encryptKey()))throw new Error("privateKey is not set");const t=typeof e=="string"?e:JSON.stringify(e),s=Vt.encrypt(t,Ie.enc.Utf8.parse(this.encryptKey()),{mode:Ie.mode.ECB,padding:Ie.pad.Pkcs7});return Re.stringify(s.ciphertext)}decrypt(e){if(se(this.encryptKey()))throw new Error("privateKey is not set");const s=Vt.decrypt(e,Ie.enc.Utf8.parse(this.encryptKey()),{mode:Ie.mode.ECB,padding:Ie.pad.Pkcs7}).toString(Ie.enc.Utf8);try{return JSON.parse(s)}catch{return s}}callHook(e,...t){if(this.hooks&&this.hooks[e]&&typeof this.hooks[e]=="function")return this.hooks[e](...t);throw new Error(`Hook ${e} is not defined`)}}class mn{constructor(e={}){this.hooks={},Object.keys(e).forEach(t=>{this.hooks[t]=e[t]})}setHooks(e){Object.keys(e).forEach(t=>{this.hooks[t]=e[t]})}callHook(e,...t){if(this.hooks[e])try{this.hooks[e](...t)}catch(s){console.error(`Error in hook ${e}:`,s)}}}class En extends mn{constructor(e={}){super(e)}}const ge=new En;class A0 extends yn{setWidgetData(e,t){ge.setHooks(t.hooks??{}),this.el=String(e).replace(/#/gi,""),this.data=t,this.termsPassed=!1,this.data.terms=this.data.terms??[],this.widgetType=1,this.data.widget=1,this.data.use_terms=this.data.use_terms??!0,this.widgetExtra={}}setPayment(e,t,s,i=!1,n,m){this.data.pg=e,this.data.method=t,this.data.wallet_id=s,this.termsPassed=i,this.data.terms=n,this.widgetExtra=m}updateOnProcessing(e){this.updateNumberFields(e,["price","tax_free"]),this.updateStringFields(e,["currency","widget_key"]),this.updateUndefinedCheckFields(e,["user_token","external_terms","use_bootpay_inapp_sdk"]),q(e.use_terms)&&(this.data.use_terms=e.use_terms!==!1),q(e.sandbox)&&(this.data.sandbox=e.sandbox===!0),q(e.widget_type)&&(this.widgetType=e.widget_type)}encryptParameters(){return encodeURIComponent(this.encrypt({order_name:this.data.order_name,use_only_brandpay:this.data.use_only_brandpay,subscribe_brandpay_type:this.data.subscribe_brandpay_type,user_token:this.data.user_token,sandbox:this.data.sandbox,use_terms:this.data.use_terms,external_terms:this.data.external_terms,key:this.data.widget_key,use_bootpay_inapp_sdk:this.data.use_bootpay_inapp_sdk,use_popup:this.data.use_popup===!0,extra:this.data.extra,sdk_option:this.data.sdk_option,log_level:H.level}))}encryptKey(){return q(this.resolve_auth_credential)?br(this.resolve_auth_credential).toString().substring(0,16):""}getExtra(e=void 0){return mt(e??{},mt(this.data.extra??{},this.widgetExtra??{}))}getRequestPaymentData(e=void 0){return this.data.widget_sandbox=this.data.sandbox,this.data.extra=this.getExtra(e.extra),mt(e,this.data)}getManagerUrl(){return`brandpay/${this.resolve_auth_credential}/${this.encryptParameters()}/edit?__popup=${this.data.use_popup?"true":"false"}&__frame=${this.data.use_popup?"false":"true"}`}get resolve_auth_credential(){return this.data.client_key??this.data.application_id??""}updateNumberFields(e,t){t.forEach(s=>{q(e[s])&&(this.data[s]=e[s])})}updateStringFields(e,t){t.forEach(s=>{q(e[s])&&(this.data[s]=e[s])})}updateUndefinedCheckFields(e,t){t.forEach(s=>{e[s]!==void 0&&(this.data[s]=e[s])})}}const z=new A0;class gn extends be{constructor(){super(),this.$iFrameId="bootpay-widget-iframe",this.$widgetStore=z,this.$template=this.defaultIframeHtml()}render(){const e=document.getElementById(this.$widgetStore.el);if(this.$blank(this.$widgetStore.el)||e===null)throw new Error("부트페이 위젯을 설정할 Element ID를 입력하지 않았거나 해당 Element DOM이 존재하지 않습니다.");this.templateRender(R.toWidget(`p/${this.$widgetStore.resolve_auth_credential}/${this.$widgetStore.encryptParameters()}`))}templateRender(e){const t=document.getElementById(this.$widgetStore.el);t.style.setProperty("height","0px"),t.innerHTML=this.$template,this.byId(this.$iFrameId).setAttribute("src",e)}resize(e){this.templateResize(this.$widgetStore.el,e)}rerender(){this.postMessage("bootpayWidgetRerender")}destroy(){const e=document.getElementById(this.$widgetStore.el);e.innerHTML=""}}const G=new gn;class Bn extends je{constructor(){super(),this.message=Yt}initialize(){z.setWidgetData(void 0,{application_id:void 0,order_name:"",order_id:void 0,price:0,tax_free:0,currency:"KRW",user_token:void 0,pg:void 0,method:void 0,widget_key:void 0})}render(e,t){if(this.$blank(t==null?void 0:t.price)||t.price<0)throw new Error("결제금액은 1원 이상을 입력해주세요.");if(this.$blank(t==null?void 0:t.application_id)&&this.$blank(t==null?void 0:t.client_key))throw new Error("client_key가 입력되지 않았습니다.");this.initialize(),z.setWidgetData(e,t),G.render(),is.bind()}update(e){const{price:t,tax_free:s,currency:i,user_token:n,use_only_brandpay:m,use_terms:d,sandbox:p,widget_key:a,external_terms:c}=e;z.updateOnProcessing({price:t,tax_free:s,currency:i,user_token:n,use_only_brandpay:m,use_terms:d,external_terms:c,sandbox:p,widget_key:a}),(this.$present(n)||this.$present(m)||this.$present(d)||this.$present(p))&&G.postMessage("bootpayWidgetUpdateUserToken",{user_token:n,use_only_brandpay:m,use_terms:d,external_terms:c,sandbox:p,key:a})}rerender(){G.rerender()}destroy(){G.destroy()}selectPayment(e,t,s,i=!1,n,m){z.setPayment(e,t,s,i,n,m),H.debug("selectPayment",`pg: ${e}, method: ${t}, wallet_id: ${s}, terms: ${i}, select_terms: ${JSON.stringify(n)}, extra: ${JSON.stringify(m)}`)}currentTermsCondition(){return z.data.terms}async requestPayment(e){return this.widgetRequestPaymentValidate(1),Ee.requestPayment(z.getRequestPaymentData(e))}async requestSubscription(e){return this.widgetRequestPaymentValidate(2),Ee.requestSubscription(z.getRequestPaymentData(e))}isRendered(){return G.isRendered()}synchronizedRealTimeTransfer(e){G.postMessage("bootpayWidgetSynchronizedRealTimeTransfer",e)}sendSelectPayment(e){G.postMessage("bootpayWidgetSelectPayment",e)}sendMessage(e,t){G.postMessage(e,t)}currentPaymentParameters(){return{pg:z.data.pg,method:z.data.method,wallet_id:z.data.wallet_id,terms:z.data.terms,widget_key:z.data.widget_key,widget_sandbox:z.data.sandbox,extra:z.getExtra({})}}widgetRequestPaymentValidate(e=void 0){if(e!==void 0&&z.widgetType!==e)throw new ae({event:"error",error_code:"RC_WIDGET_TYPE_INVALID",message:e===1?this.message.getLocaleMessage("widgetTypeNotPayment","ko"):this.message.getLocaleMessage("widgetTypeNotSubscription","ko")});if(this.$blank(z.data.pg)||this.$blank(z.data.method))throw new ae({event:"error",error_code:"RC_PG_METHOD_NOT_SELECTED",message:this.message.getLocaleMessage("notSelectPayment","ko")});if(!z.termsPassed&&z.data.use_terms)throw new ae({event:"error",error_code:"RC_TERMS_NOT_AGREE",message:this.message.getLocaleMessage("termsNotAgree","ko")});if(["BRANDPAY_CARD","BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(z.data.method)>-1&&z.data.wallet_id===void 0)throw new ae({event:"error",error_code:"RC_BRANDPAY_NEED_SELECT_WALLET",message:this.message.getLocaleMessage("notSelectBrandpay","ko")})}}const re=new Bn;class bn extends be{constructor(e={isBackground:!0}){super(),this.$brandpayWindowId="__bootpay-brandpay-window",this.$iFrameId="__bootpay-brandpay-iframe",this.$windowId="__bootpay-brandpay-container-window",this.$additionalClass=R.isMobile()?"transparent":"rounded-iframe transparent",this.$template=this.template({isBackground:e.isBackground??!0}),this.$widgetStore=z}template({isBackground:e}){return e?`
55
+ `,r.action=t,r.target=this.$iFrameId}setupFormForUrl(e){const t=this.byId(this.$formId);t.method="GET",t.action=e,t.target=this.$iFrameId}initializePayment(e,t,r,o,i){this.mode=e,this.templateReload(),Y.clearPollingEvent(),Y.bind(t,r),o&&i&&Y.setDefaultPaymentData(o,i)}}const R=new It,se=class se extends ge{constructor(){super(),this.$session=ae,this.$logger=A,this.$event=me,this.platformType=q.PLATFORM.JS,this.$transactionKey="",this.extra={},this.browserBootpayFilter={instagram:/Instagram/i,kakaotalk:/KAKAOTALK/i,facebook:/FBAV/i,naver:/NAVER/i,mobile_safari:/(iPhone|iPad|iPod)/,mobile_chrome:[/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/,/Chrome/]}}async requestPayment(e){var t;((t=e.extra)==null?void 0:t.locale)!==void 0&&!x.isSetLocale&&x.setLocale(e.extra.locale),this.$event.clearInstance(),this.generateTransactionKey(),e.application_id=e.client_key===void 0?x.currentApplicationId(e.application_id):null,this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"결제 요청 시작",request:e}),e.sdk=!0,e.platform_type=this.platformType,e.ver=x.packageVersion,e.sdk_version=x.sdkVersion,e.sdk_type=x.sdkName,e.locale=x.locale,e.price=parseFloat(String(e.price)),e.tax_free=parseFloat(String(e.tax_free)),e.deposit_price=parseFloat(String(e.deposit_price)),se.invalidRequestParamsData(e),se.invalidClientIdOrApplicationId(e),se.invalidRequestItemsData(e.items,e.price),e.uuid=this.$session.currentUserUUID(),e.sk=this.$session.currentSessionKey(),e.ti=this.$session.currentTimeTerm(),e.tk=this.$transactionKey,e.env=this.getUserDeviceEnvironment(),e.extra=this.openTypeFilter(e.extra),this.extra=e.extra;try{const r=await R.start(e);return A.debug("confirm ready",r),R.hidePaymentiFrame(),R.closePopup(),["done","issued"].indexOf(r.event)===-1&&this.$event.send({step:r.event,msg:"",request:e,response:r}),R.setConfirmFormUrl(`${r.gateway_url}/confirm/${r.receipt_id}?application_id=${r.application_id}`),Promise.resolve(r)}catch(r){return this.eventError(r),Promise.reject(r)}}async confirm(){try{const e=await R.confirm();return Promise.resolve(e)}catch(e){return this.eventError(e),Promise.reject(e)}}eventDone(e,t=!0){var r;this.$logger.debug(e.event,e),this.$event.send({step:e.event,msg:e.event==="done"?"결제완료":"가상계좌발급완료",request:{},response:e}),X.hideProgress(),this.$logger.debug("show result",this.isDisplaySuccessResult()),this.isDisplaySuccessResult()&&t&&((r=e.data)==null?void 0:r.receipt_id)!==void 0?this.displayResultView(e.data.receipt_id):R.destroy()}eventError(e){X.hideProgress(),R.closePopup(),this.isDisplayErrorResult()&&e.event==="error"?this.displayResultErrorView(e):R.destroy(),this.$logger.debug("done failed destroy and hide","payment"),this.$event.sendError({step:this.$present(e.event)?e.event:"error",msg:e.message,trace:function(){try{return e.stack}catch{return!1}}()})}generateTransactionKey(){return this.$transactionKey=`${this.$uuid()}-${new Date().getTime()*1e3}`,this.$transactionKey}async requestSubscription(e){this.$event.clearInstance(),this.generateTransactionKey(),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"정기결제 요청 시작",request:e}),e.extra=this.openTypeFilter(e.extra);const t={application_id:e.client_key===void 0?e.application_id:null,client_key:e.client_key,subscription_id:e.subscription_id,pg:e.pg,method:e.method,order_name:e.order_name,price:e.price,tax_free:e.tax_free,user_token:e.user_token,metadata:e.metadata,redirect_url:e.redirect_url,wallet_id:e.wallet_id,widget:e.widget,widget_key:e.widget_key,widget_sandbox:e.widget_sandbox,subscribe_brandpay_type:e.subscribe_brandpay_type,platform_type:this.platformType,ver:x.packageVersion,sdk_version:x.sdkVersion,sdk_type:x.sdkName,locale:x.locale,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const r=await R.start(t,"CARD_SUBSCRIPTION");switch(A.debug("subscription success",r),this.$event.send({step:"confirm",msg:"결제승인전",request:{},response:r}),R.hidePaymentiFrame(),R.closePopup(),r.event){case"done":case"issued":break;case"confirm":R.setConfirmFormUrl(`${r.gateway_url}/confirm/${r.receipt_id}?application_id=${r.application_id}`)}return Promise.resolve(r)}catch(r){return this.eventError(r),Promise.reject(r)}}async requestAuthentication(e){this.$event.clearInstance(),this.generateTransactionKey(),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"본인인증 요청 시작",request:e}),e.extra=this.openTypeFilter(e.extra);const t={application_id:e.client_key===void 0?e.application_id:null,client_key:e.client_key,authentication_id:e.authentication_id,pg:e.pg,method:this.$present(e.method)?e.method:"auth",order_name:e.order_name,platform_type:this.platformType,ver:de.version,sdk_version:x.sdkVersion,sdk_type:x.sdkName,locale:x.locale,metadata:e.metadata,redirect_url:e.redirect_url,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const r=await R.start(t,"AUTH");switch(A.debug("authentication success",r),this.$event.send({step:"confirm",msg:"본인인증 승인전",request:{},response:r}),R.hidePaymentiFrame(),R.closePopup(),r.event){case"done":case"issued":break;case"confirm":R.setConfirmFormUrl(`${r.gateway_url}/confirm/${r.receipt_id}?application_id=${r.application_id}`)}return Promise.resolve(r)}catch(r){return this.eventError(r),Promise.reject(r)}}async requestPaymentUrl(e){try{const t=await R.startPaymentUrl(e.url);return["done","issued"].indexOf(t.event)===-1&&this.$event.send({step:t.event,msg:"",request:{url:e.url},response:t}),R.setConfirmFormUrl(`${t.gateway_url}/confirm/${t.receipt_id}?application_id=${t.application_id}`),Promise.resolve(t)}catch(t){return this.eventError(t),Promise.reject(t)}}getUserDeviceEnvironment(){return{width:window.innerWidth,height:window.innerHeight}}isDisplaySuccessResult(){return this.extra!==void 0&&this.extra.display_success_result!==void 0&&this.extra.display_success_result}isDisplayErrorResult(){return this.extra!==void 0&&this.extra.display_error_result!==void 0&&this.extra.display_error_result}displayResultView(e){R.moveToUrl(x.toWidget(`payment/result/${e}`))}displayResultErrorView(e){R.moveToUrl(x.toWidget(`payment/error?error_code=${e.error_code}&pg_error_code=${e.pg_error_code}&message=${e.message}`))}openTypeFilter(e){if(this.$present(e)&&e.browser_open_type!==void 0){const t=this.getUserAgent();for(let r in e.browser_open_type){const o=e.browser_open_type[r],i=this.$present(this.browserBootpayFilter[o.browser])?this.browserBootpayFilter[o.browser]:new RegExp(`${o.browser}`);if(t.match(i)){e.open_type=o.open_type;break}}}return e}static invalidRequestParamsData(e){if(j(e))throw new V({event:"error",error_code:"NEED_MORE_PARAMS",message:"결제 요청을 위한 최소한의 결제 정보를 입력해주세요."});Object.keys(se.invalidRequestParams).forEach(t=>{const r=e[t];if(j(r))throw new V({event:"error",error_code:"INVALID_REQUEST_PARAMS",message:se.invalidRequestParams[t]})})}static invalidClientIdOrApplicationId(e){if(e.client_key===void 0&&e.application_id===void 0)throw new V({event:"error",error_code:"NEED_CLIENT_KEY",message:"Client Key가 필요합니다"})}static invalidRequestItemsData(e,t){if(e!==void 0&&N(e)){let r=0;if(e.forEach((o,i)=>{if(j(o.id))throw new V({event:"error",error_code:"NEED_ITEM_ID",message:`${i+1}번째 상품 고유 ID를 입력해주세요. [ key: id ]`});if(j(o.name))throw new V({event:"error",error_code:"NEED_ITEM_NAME",message:`${i+1}번째 상품명을 입력해주세요. [ key: name ]`});if(j(o.qty))throw new V({event:"error",error_code:"NEED_ITEM_QTY",message:`${i+1}번째 상품수량을 입력해주세요. [ key: qty ]`});if(j(o.price))throw new V({event:"error",error_code:"NEED_ITEM_PRICE",message:`${i+1}번째 상품금액을 입력해주세요. [ key: price ]`});e[i].price=parseFloat(String(e[i].price)),e[i].qty=parseFloat(String(e[i].qty)),r+=e[i].price*e[i].qty}),r!==t)throw new V({event:"error",error_code:"NEED_ITEM_TOTAL_PRICE_NOT_MATCH",message:`결제 금액과 상품 수량 및 상품 금액의 총합과 일치하지 않습니다. [ 요청금액: ${t} ${typeof t}, 상품 총합계 금액: ${r} ${typeof r} ]`})}}};se.invalidRequestParams={order_name:"판매할 상품명을 입력해주세요. [ key: order_name ]",price:"판매할 상품의 금액을 입력해주세요. [ key: price ]",order_id:"가맹점에서 설정할 주문 ID를 입력해주세요. [ key: order_id ]"};let $e=se;const Et=new $e;class Pt extends le{constructor(){super(),this.$session=ae}setAnalyticsData(e){this.$session.setTime(e.time),this.$session.setUUID(e.uuid)}async send(e){const t=document.URL;if(t!==void 0&&t.search(/bootapi.co.kr/)===-1){const r=this.$session.getUser();e.application_id=x.currentApplicationId(e.application_id),e.sk=this.$session.currentSessionKey(),e.uuid=this.$session.currentUserUUID(),e.time=this.$session.currentTime(),e.url=t,e.referer=document.referrer!==void 0&&N(document.referrer)&&document.referrer.search(new RegExp(window.location.hostname))==-1?document.referrer:"",e.user_id=r===void 0||j(r)?void 0:r.id,e.items=this.generateItemKeyToVersion1(e.items);try{const o=await this.$http.post(x.toAnalytics(`call?ver=${de.version}`),e);return o.data.status===200?(A.info("Analytics Common Send","통계 데이터가 전송되었습니다."),Promise.resolve()):(A.warn("Analytics Common Send",`통계 데이터가 전송 실패. ${JSON.stringify(o.data)}`),Promise.reject())}catch(o){return A.error("Analytics Common Error",`데이터 전송 실패: ${o.message}`),Promise.reject()}}}async login(e){if(e.application_id=x.currentApplicationId(e.application_id),j(e.application_id))return A.error("Analytics Params","application_id 값을 입력해주세요.");if(j(e.id))return A.error("Analytics Params","id 값을 입력해주세요.");try{const t=await this.$http.post(x.toAnalytics(`login?ver=${de.version}`),e),{user_id:r}=t.data.data;return this.$session.setUser({id:r,time:new Date().getTime()}),Promise.resolve()}catch(t){return A.error("Analytics Login Error",`데이터 전송 실패: ${t.message}`),Promise.reject()}}logout(){this.$session.setUser(void 0)}generateItemKeyToVersion1(e){if(e!==void 0)return e.map(t=>({cat1:t.cat1,cat2:t.cat2,cat3:t.cat3,item_img:t.img,item_name:t.name,unique:t.id,price:t.price}))}}const xt=new Pt;class Tt extends ue{constructor(){super(),this.$messageEventName="message.BootpayOnboardingEvent"}bindOnboarding(e,t,r,o){window.resetBootpayEventListener(this.$messageEventName,i=>{if(i.origin!==e)return;const g=t();if(g!==null&&i.source!==g)return;const $=this.parseEvent(i.data);if(N($))switch($.event){case"done":return r({event:"done",id:$.id,kind:$.kind,pg_wait_id:$.pg_wait_id,status:$.status});case"cancel":return o();default:return}})}unbind(){window.removeBootpayEventListener(this.$messageEventName)}}const Bt=["popup","iframe","redirect"],Xe="rst_";class St extends ee{constructor(){super(),this.$popup=null,this.$popupWatcher=void 0,this.$abortPrevious=null,this.$windowId="bootpay-onboarding-background-id",this.$onboardingWindowId="bootpay-onboarding-window-id",this.$iFrameId="bootpay-onboarding-iframe-id",this.$template=this.template(),this.$event=new Tt}template(){return`
56
+ <div id="${this.$windowId}" class="bootpay-payment-background">
57
+ <div class="bootpay-payment-window" id="${this.$onboardingWindowId}">
58
+ <iframe id="${this.$iFrameId}" name="${this.$iFrameId}" title="PG 신청" frameborder="0"
59
+ style="display: block; width: min(960px, calc(100vw - 32px)); height: 90vh; border: 0; background: #ffffff;"></iframe>
60
+ </div>
61
+ </div>
62
+ `}onboardingUrl(e,t){const r=String((e==null?void 0:e.token)??"").trim();if(r.indexOf(Xe)!==0||r.length<=Xe.length)throw{event:"error",error_code:"ONBOARDING_TOKEN_REQUIRED",message:"등록 폼 토큰(rst_…)을 넣어 주세요."};let o;try{o=this.$present(e.url)?new URL(String(e.url)):new URL(x.toOnboarding(`onboarding/s/${encodeURIComponent(r)}`))}catch{o=null}const i=Object.keys(x.ONBOARDING_URL).map(g=>new URL(x.ONBOARDING_URL[g]).origin);if(o===null||i.indexOf(o.origin)<0)throw{event:"error",error_code:"ONBOARDING_URL_INVALID",message:"부트페이 신청 화면 주소가 아니에요. 등록 폼 세션 발급 응답의 url 을 그대로 넣어 주세요."};return o.searchParams.set("display",t),o.searchParams.set("origin",window.location.origin),o.toString()}open(e){return new Promise((t,r)=>{const o=Bt.indexOf(e==null?void 0:e.display)>-1?e.display:"iframe";let i;try{i=this.onboardingUrl(e,o)}catch(a){return r(a)}if(this.$abortPrevious!==null&&this.$abortPrevious(),this.destroy(),o==="redirect"){window.location.href=i;return}let g=!1;const $=a=>{g||(g=!0,this.$abortPrevious=null,this.destroy(),a())};if(this.$abortPrevious=()=>$(()=>r({event:"cancel"})),this.$event.bindOnboarding(new URL(i).origin,()=>this.currentWindow(o),a=>$(()=>t(a)),()=>$(()=>r({event:"cancel"}))),o==="popup"){if(this.$popup=window.open(i,"BootpayOnboarding","width=960,height=900,scrollbars=yes,resizable=yes"),this.$popup===null||this.$popup===void 0)return g=!0,this.$abortPrevious=null,this.$popup=null,this.$event.unbind(),r({event:"error",error_code:"POPUP_BLOCKED",message:"팝업이 차단되었어요. 버튼을 누른 직후에 다시 열거나 display 를 iframe 으로 바꿔 주세요."});this.$popupWatcher=setInterval(()=>{(this.$popup===null||this.$popup.closed)&&$(()=>r({event:"cancel"}))},500);return}this.createTemplateHtml(),this.bodyOpen(),this.byId(this.$iFrameId).setAttribute("src",i)})}currentWindow(e){if(e==="popup")return this.$popup;const t=this.byId(this.$iFrameId);return(t==null?void 0:t.contentWindow)??null}destroy(){if(this.$popupWatcher!==void 0&&(clearInterval(this.$popupWatcher),this.$popupWatcher=void 0),this.$popup!==null&&!this.$popup.closed)try{this.$popup.close()}catch{}this.$popup=null;const e=this.byId(this.$windowId);e!==null&&(e.remove(),this.bodyClose()),this.$event.unbind()}}const Ct=new St;(function(){if(typeof window>"u"||typeof window.CustomEvent=="function")return!1;function s(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};let r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r}s.prototype=window.Event.prototype,window.CustomEvent=s})();const te={$payment:Et,$analytics:xt,$environment:x,async requestPayment(s){return new Promise(async(e,t)=>{try{s.extra!==void 0&&s.extra.override_global_event===!0&&(A.debug("override global event","override global event!"),te.overrideGlobalInstance());const r=await this.$payment.requestPayment(s);setTimeout(()=>{e(r),["done","issued"].indexOf(r.event)>-1&&this.$payment.eventDone(r)},100)}catch(r){setTimeout(()=>{t(this.errorHandler(r))},100)}})},async confirm(){return new Promise(async(s,e)=>{try{const t=await this.$payment.confirm();setTimeout(()=>{s(t),this.$payment.eventDone(t)},100)}catch(t){setTimeout(()=>e(this.errorHandler(t)),100)}})},async requestSubscription(s){return new Promise(async(e,t)=>{try{const r=await this.$payment.requestSubscription(s);e(r),this.$payment.eventDone(r)}catch(r){return t(this.errorHandler(r))}})},async requestAuthentication(s){return new Promise(async(e,t)=>{try{const r=await this.$payment.requestAuthentication(s);e(r),this.$payment.eventDone(r)}catch(r){return t(this.errorHandler(r))}})},async requestPaymentUrl(s,e=!1){return new Promise(async(t,r)=>{try{const o=await this.$payment.requestPaymentUrl(s);setTimeout(()=>{t(o),["done","issued"].indexOf(o.event)>-1&&this.$payment.eventDone(o)},100)}catch(o){setTimeout(()=>{r(this.errorHandler(o))},100)}})},requestOnboarding(s){return new Promise((e,t)=>{if(typeof window>"u")return t({event:"error",error_code:"ONBOARDING_BROWSER_ONLY",message:"브라우저에서만 열 수 있어요."});Ct.open(s).then(e).catch(r=>{try{t(this.errorHandler(r))}catch(o){t(o)}})})},setEnvironmentMode(s,e=void 0){this.$environment.set(s),e!==void 0&&this.$environment.setDevelopmentHost(e)},setApplicationId(s){return this.$environment.setApplicationId(s)},setVersion(s,e,t){return this.$environment.setVersion(s,e,t)},setDevice(s){switch(s){case"IOS":this.$payment.platformType=q.PLATFORM.IOS;break;case"ANDROID":this.$payment.platformType=q.PLATFORM.ANDROID;break;default:this.$payment.platformType=q.PLATFORM.JS}return this.$payment.platformType},errorHandler(s){let e;switch(X.hideProgress(),s.name){case"BootpayEventError":e=s.eventMessage;break;default:if(N(s.event))e=s;else throw s}return e},readyToPopup(){R.readyToPopup()},setLogLevel(s){A.setLogLevel(s)},setUUID(s){return ae.setUUID(s)},send(s=void 0){return this.$analytics.send(s!==void 0?s:{})},login(s){return this.$analytics.login(s)},logout(){return this.$analytics.logout()},setLocale(s){x.setLocale(s),R.templateReload()},async dismiss(s=!1){if(s)try{await me.sendCloseEvent()}catch(e){A.debug("error",e.message)}Y.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})},getCurrentUUID(){return ae.currentUserUUID()},destroy(){R.destroy()},overrideGlobalInstance(){window.Bootpay=te}};typeof window<"u"&&(window.Bootpay=te);class At extends ue{constructor(){super(),this.$messageEventName="message.BootpayUserTokenEvent"}bind(e,t){this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,r=>{const o=this.parseEvent(r.data);if(N(o))switch(A.debug("event",o),o.event){case"error":case"cancel":return this.handleErrorOrCancel(o);case"data":return this.resolve(o.data);case"confirmPasswordToken":return this.resolve(o.token);case"confirmAddCard":return this.resolve(o);case"resize":Ee.iFrameResize(o.resizeData);break;default:return}})}handleErrorOrCancel(e){return this.reject({event:e.event,pg_error_code:e.pg_error_code,error_code:e.error_code,message:e.message,payload:e.payload})}}var et={exports:{}};(function(s,e){(function(t,r,o){s.exports=r(Z(),Oe())})(K,function(t){return t.mode.ECB=function(){var r=t.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(o,i){this._cipher.encryptBlock(o,i)}}),r.Decryptor=r.extend({processBlock:function(o,i){this._cipher.decryptBlock(o,i)}}),r}(),t.mode.ECB})})(et);var Ot=et.exports;const tt=pe(Ot);var rt={exports:{}};(function(s,e){(function(t,r,o){s.exports=r(Z(),Oe())})(K,function(t){return t.pad.Pkcs7})})(rt);var Rt=rt.exports;const st=pe(Rt);class Ut{constructor(){this.data={client_key:""}}encryptKey(){return Ge(this.data.client_key).toString().substring(0,16)}encrypt(e){if(j(this.encryptKey()))throw new Error("privateKey is not set");const t=typeof e=="string"?e:JSON.stringify(e),r=Re.encrypt(t,ve.parse(this.encryptKey()),{mode:tt,padding:st});return he.stringify(r.ciphertext)}decrypt(e){if(j(this.encryptKey()))throw new Error("privateKey is not set");const r=Re.decrypt(e,ve.parse(this.encryptKey()),{mode:tt,padding:st}).toString(ve);try{return JSON.parse(r)}catch{return r}}callHook(e,...t){if(this.hooks&&this.hooks[e]&&typeof this.hooks[e]=="function")return this.hooks[e](...t);throw new Error(`Hook ${e} is not defined`)}}class Mt{constructor(e={}){this.hooks={},Object.keys(e).forEach(t=>{this.hooks[t]=e[t]})}setHooks(e){Object.keys(e).forEach(t=>{this.hooks[t]=e[t]})}callHook(e,...t){if(this.hooks[e])try{this.hooks[e](...t)}catch(r){console.error(`Error in hook ${e}:`,r)}}}class Dt extends Mt{constructor(e={}){super(e)}}const re=new Dt;class Me extends Ut{setWidgetData(e,t){re.setHooks(t.hooks??{}),this.el=String(e).replace(/#/gi,""),this.data=t,this.termsPassed=!1,this.data.terms=this.data.terms??[],this.widgetType=1,this.data.widget=1,this.data.use_terms=this.data.use_terms??!0,this.widgetExtra={}}setPayment(e,t,r,o=!1,i,g){this.data.pg=e,this.data.method=t,this.data.wallet_id=r,this.termsPassed=o,this.data.terms=i,this.widgetExtra=g}updateOnProcessing(e){this.updateNumberFields(e,["price","tax_free"]),this.updateStringFields(e,["currency","widget_key"]),this.updateUndefinedCheckFields(e,["user_token","external_terms","use_bootpay_inapp_sdk"]),N(e.use_terms)&&(this.data.use_terms=e.use_terms!==!1),N(e.sandbox)&&(this.data.sandbox=e.sandbox===!0),N(e.widget_type)&&(this.widgetType=e.widget_type)}encryptParameters(){return encodeURIComponent(this.encrypt({order_name:this.data.order_name,use_only_brandpay:this.data.use_only_brandpay,subscribe_brandpay_type:this.data.subscribe_brandpay_type,user_token:this.data.user_token,sandbox:this.data.sandbox,use_terms:this.data.use_terms,external_terms:this.data.external_terms,key:this.data.widget_key,use_bootpay_inapp_sdk:this.data.use_bootpay_inapp_sdk,use_popup:this.data.use_popup===!0,extra:this.data.extra,sdk_option:this.data.sdk_option,log_level:A.level}))}encryptKey(){return N(this.resolve_auth_credential)?Ge(this.resolve_auth_credential).toString().substring(0,16):""}getExtra(e=void 0){return Pe(e??{},Pe(this.data.extra??{},this.widgetExtra??{}))}getRequestPaymentData(e=void 0){return this.data.widget_sandbox=this.data.sandbox,this.data.extra=this.getExtra(e.extra),Pe(e,this.data)}getManagerUrl(){return`brandpay/${this.resolve_auth_credential}/${this.encryptParameters()}/edit?__popup=${this.data.use_popup?"true":"false"}&__frame=${this.data.use_popup?"false":"true"}`}get resolve_auth_credential(){return this.data.client_key??this.data.application_id??""}updateNumberFields(e,t){t.forEach(r=>{N(e[r])&&(this.data[r]=e[r])})}updateStringFields(e,t){t.forEach(r=>{N(e[r])&&(this.data[r]=e[r])})}updateUndefinedCheckFields(e,t){t.forEach(r=>{e[r]!==void 0&&(this.data[r]=e[r])})}}const M=new Me;class Nt extends ee{constructor(){super(),this.$iFrameId="bootpay-widget-iframe",this.$widgetStore=M,this.$template=this.defaultIframeHtml()}render(){const e=document.getElementById(this.$widgetStore.el);if(this.$blank(this.$widgetStore.el)||e===null)throw new Error("부트페이 위젯을 설정할 Element ID를 입력하지 않았거나 해당 Element DOM이 존재하지 않습니다.");this.templateRender(x.toWidget(`p/${this.$widgetStore.resolve_auth_credential}/${this.$widgetStore.encryptParameters()}`))}templateRender(e){const t=document.getElementById(this.$widgetStore.el);t.style.setProperty("height","0px"),t.innerHTML=this.$template,this.byId(this.$iFrameId).setAttribute("src",e)}resize(e){this.templateResize(this.$widgetStore.el,e)}rerender(){this.postMessage("bootpayWidgetRerender")}destroy(){const e=document.getElementById(this.$widgetStore.el);e.innerHTML=""}}const L=new Nt;class Ft extends ge{constructor(){super(),this.message=Ue}initialize(){M.setWidgetData(void 0,{application_id:void 0,order_name:"",order_id:void 0,price:0,tax_free:0,currency:"KRW",user_token:void 0,pg:void 0,method:void 0,widget_key:void 0})}render(e,t){if(this.$blank(t==null?void 0:t.price)||t.price<0)throw new Error("결제금액은 1원 이상을 입력해주세요.");if(this.$blank(t==null?void 0:t.application_id)&&this.$blank(t==null?void 0:t.client_key))throw new Error("client_key가 입력되지 않았습니다.");this.initialize(),M.setWidgetData(e,t),L.render(),ot.bind()}update(e){const{price:t,tax_free:r,currency:o,user_token:i,use_only_brandpay:g,use_terms:$,sandbox:T,widget_key:a,external_terms:E}=e;M.updateOnProcessing({price:t,tax_free:r,currency:o,user_token:i,use_only_brandpay:g,use_terms:$,external_terms:E,sandbox:T,widget_key:a}),(this.$present(i)||this.$present(g)||this.$present($)||this.$present(T))&&L.postMessage("bootpayWidgetUpdateUserToken",{user_token:i,use_only_brandpay:g,use_terms:$,external_terms:E,sandbox:T,key:a})}rerender(){L.rerender()}destroy(){L.destroy()}selectPayment(e,t,r,o=!1,i,g){M.setPayment(e,t,r,o,i,g),A.debug("selectPayment",`pg: ${e}, method: ${t}, wallet_id: ${r}, terms: ${o}, select_terms: ${JSON.stringify(i)}, extra: ${JSON.stringify(g)}`)}currentTermsCondition(){return M.data.terms}async requestPayment(e){return this.widgetRequestPaymentValidate(1),te.requestPayment(M.getRequestPaymentData(e))}async requestSubscription(e){return this.widgetRequestPaymentValidate(2),te.requestSubscription(M.getRequestPaymentData(e))}isRendered(){return L.isRendered()}synchronizedRealTimeTransfer(e){L.postMessage("bootpayWidgetSynchronizedRealTimeTransfer",e)}sendSelectPayment(e){L.postMessage("bootpayWidgetSelectPayment",e)}sendMessage(e,t){L.postMessage(e,t)}currentPaymentParameters(){return{pg:M.data.pg,method:M.data.method,wallet_id:M.data.wallet_id,terms:M.data.terms,widget_key:M.data.widget_key,widget_sandbox:M.data.sandbox,extra:M.getExtra({})}}widgetRequestPaymentValidate(e=void 0){if(e!==void 0&&M.widgetType!==e)throw new V({event:"error",error_code:"RC_WIDGET_TYPE_INVALID",message:e===1?this.message.getLocaleMessage("widgetTypeNotPayment","ko"):this.message.getLocaleMessage("widgetTypeNotSubscription","ko")});if(this.$blank(M.data.pg)||this.$blank(M.data.method))throw new V({event:"error",error_code:"RC_PG_METHOD_NOT_SELECTED",message:this.message.getLocaleMessage("notSelectPayment","ko")});if(!M.termsPassed&&M.data.use_terms)throw new V({event:"error",error_code:"RC_TERMS_NOT_AGREE",message:this.message.getLocaleMessage("termsNotAgree","ko")});if(["BRANDPAY_CARD","BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(M.data.method)>-1&&M.data.wallet_id===void 0)throw new V({event:"error",error_code:"RC_BRANDPAY_NEED_SELECT_WALLET",message:this.message.getLocaleMessage("notSelectBrandpay","ko")})}}const z=new Ft;class Wt extends ee{constructor(e={isBackground:!0}){super(),this.$brandpayWindowId="__bootpay-brandpay-window",this.$iFrameId="__bootpay-brandpay-iframe",this.$windowId="__bootpay-brandpay-container-window",this.$additionalClass=x.isMobile()?"transparent":"rounded-iframe transparent",this.$template=this.template({isBackground:e.isBackground??!0}),this.$widgetStore=M}template({isBackground:e}){return e?`
67
63
  <div id="${this.$windowId}" class="bootpay-payment-background __overflow-y">
68
- <div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$brandpayWindowId}">
69
- <iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
64
+ <div class="bootpay-payment-window ${x.isMobile()?"__mobile":""}" id="${this.$brandpayWindowId}">
65
+ <iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}" allow="${we}"></iframe>
70
66
  </div>
71
67
  </div>
72
68
  `:`
73
69
  <div id="${this.$windowId}" class="bootpay-transparent-background">
74
- <div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$brandpayWindowId}">
75
- <iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}" frameborder="0"></iframe>
70
+ <div class="bootpay-payment-window ${x.isMobile()?"__mobile":""}" id="${this.$brandpayWindowId}">
71
+ <iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}" frameborder="0" allow="${we}"></iframe>
76
72
  </div>
77
73
  </div>
78
- `}createIFrame(e){this.createTemplateHtml();const t=document.getElementById(this.$iFrameId);t==null||t.setAttribute("src",R.toWidget(`${e}`)),t==null||t.style.setProperty("display","block"),this.bodyOpen("bootpay-mobile")}templateRender(e){this.$template=this.template({isBackground:!1});const t=document.getElementById(this.$widgetStore.el);t.innerHTML=this.$template;const s=this.byId(this.$iFrameId);s.setAttribute("src",R.toWidget(e)),s.setAttribute("style","border: 0; outline: 0; height: 400px;")}addWallet(e){this.createIFrame(e)}removeWallet(e){this.createIFrame(`brandpay/destroy/${this.$widgetStore.resolve_auth_credential}/${e}`)}showCardInterestInformation(e){this.createIFrame(`card/interest/${this.$widgetStore.resolve_auth_credential}`)}brandpayPreference(e){var i,n;const{popup:t}=e;this.$widgetStore.data.sdk_option={use_fixed_size:e.size!==void 0,size:{width:((i=e.size)==null?void 0:i.width)||500,height:((n=e.size)==null?void 0:n.height)||800}};const s=`brandpay/${this.$widgetStore.resolve_auth_credential}/${this.$widgetStore.encryptParameters()}/edit`;t||R.isMobile()?window.open(R.toWidget(`${s}?__popup=true`),"widget-brandpay-environment-popup",`width=${e.size.width},height=${e.size.height},scrollbars=yes`).focus():this.createIFrame(s)}externalPassword({popup:e,url:t}){e||R.isMobile()?window.open(R.toWidget(`${t}?__popup=true`),"widget-brandpay-external-password-popup","width=500,height=800,scrollbars=yes").focus():this.createIFrame(t)}destroy(){const e=document.getElementById(this.$windowId);e!==void 0&&(e.outerHTML="",e.remove()),this.bodyClose()}resize(e){this.templateResize(this.$iFrameId,e)}postMessage(e,t=void 0){var i;const s=this.byId(this.$iFrameId);(i=s==null?void 0:s.contentWindow)==null||i.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}}const ne=new bn;class _n extends be{constructor(){super(),this.$windowId="__bootpay-modal-window-container",this.$modalWindowId="__bootpay-modal-window",this.$iFrameId="__bootpay-modal-iframe",this.$additionalClass=R.isMobile()?"":"rounded-iframe",this.$template=this.template()}template(){return`
74
+ `}createIFrame(e){this.createTemplateHtml();const t=document.getElementById(this.$iFrameId);t==null||t.setAttribute("src",x.toWidget(`${e}`)),t==null||t.style.setProperty("display","block"),this.bodyOpen("bootpay-mobile")}templateRender(e){this.$template=this.template({isBackground:!1});const t=document.getElementById(this.$widgetStore.el);t.innerHTML=this.$template;const r=this.byId(this.$iFrameId);r.setAttribute("src",x.toWidget(e)),r.setAttribute("style","border: 0; outline: 0; height: 400px;")}addWallet(e){this.createIFrame(e)}removeWallet(e){this.createIFrame(`brandpay/destroy/${this.$widgetStore.resolve_auth_credential}/${e}`)}showCardInterestInformation(e){this.createIFrame(`card/interest/${this.$widgetStore.resolve_auth_credential}`)}brandpayPreference(e){var o,i;const{popup:t}=e;this.$widgetStore.data.sdk_option={use_fixed_size:e.size!==void 0,size:{width:((o=e.size)==null?void 0:o.width)||500,height:((i=e.size)==null?void 0:i.height)||800}};const r=`brandpay/${this.$widgetStore.resolve_auth_credential}/${this.$widgetStore.encryptParameters()}/edit`;if(t||x.isMobile()){const g=window.open(x.toWidget(`${r}?__popup=true`),"widget-brandpay-environment-popup",`width=${e.size.width},height=${e.size.height},scrollbars=yes`);if(g===null){A.warn("brandpay popup","popup blocked");return}g.focus()}else this.createIFrame(r)}externalPassword({popup:e,url:t}){if(e||x.isMobile()){const r=window.open(x.toWidget(`${t}?__popup=true`),"widget-brandpay-external-password-popup","width=500,height=800,scrollbars=yes");if(r===null){A.warn("brandpay popup","popup blocked");return}r.focus()}else this.createIFrame(t)}destroy(){const e=document.getElementById(this.$windowId);e!==void 0&&(e.outerHTML="",e.remove()),this.bodyClose()}resize(e){this.templateResize(this.$iFrameId,e)}postMessage(e,t=void 0){var o;const r=this.byId(this.$iFrameId);(o=r==null?void 0:r.contentWindow)==null||o.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}}const G=new Wt;class Lt extends ee{constructor(){super(),this.$windowId="__bootpay-modal-window-container",this.$modalWindowId="__bootpay-modal-window",this.$iFrameId="__bootpay-modal-iframe",this.$additionalClass=x.isMobile()?"":"rounded-iframe",this.$template=this.template()}template(){return`
79
75
  <div id="${this.$windowId}" class="bootpay-payment-background">
80
- <div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$modalWindowId}">
76
+ <div class="bootpay-payment-window ${x.isMobile()?"__mobile":""}" id="${this.$modalWindowId}">
81
77
  <iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
82
78
  </div>
83
79
  </div>
84
- `}createIFrame(e){this.createTemplateHtml();const t=document.getElementById(this.$iFrameId);t==null||t.setAttribute("src",e),t==null||t.classList.add("slide-static-up"),t==null||t.style.setProperty("display","block"),this.bodyOpen()}destroy(){const e=document.getElementById(this.$iFrameId);e==null||e.classList.remove("slide-static-up"),e==null||e.classList.add(".slide-static-down"),this.bodyClose(),setTimeout(()=>{const t=document.getElementById(this.$windowId);t!==void 0&&(t.outerHTML="",t.remove())},300)}resize(e){H.debug("resize",e),this.templateResize(this.$iFrameId,e)}postMessage(e,t=void 0){var i;const s=this.byId(this.$iFrameId);(i=s==null?void 0:s.contentWindow)==null||i.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}}const pt=new _n;class Cn extends be{constructor(){super(),this.$windowId="__bootpay-confirm-modal-window-container",this.$modalWindowId="__bootpay-confirm-modal-window",this.$additionalClass="rounded-iframe",this.$title="알림",this.$confirmButtonText="확인",this.$cancelButtonText="취소",this.$hookConfirmButtonId="__bootpay-confirm-modal-hook-button",this.$hookCancelButtonId="__bootpay-cancel-modal-hook-button",this.$hookCloseButtonId="__bootpay-close-modal-hook-button",this.$template=this.template(),this.$message=""}template(){return`
80
+ `}createIFrame(e){this.createTemplateHtml();const t=document.getElementById(this.$iFrameId);t==null||t.setAttribute("src",e),t==null||t.classList.add("slide-static-up"),t==null||t.style.setProperty("display","block"),this.bodyOpen()}destroy(){const e=document.getElementById(this.$iFrameId);e==null||e.classList.remove("slide-static-up"),e==null||e.classList.add(".slide-static-down"),this.bodyClose(),setTimeout(()=>{const t=document.getElementById(this.$windowId);t!==void 0&&(t.outerHTML="",t.remove())},300)}resize(e){A.debug("resize",e),this.templateResize(this.$iFrameId,e)}postMessage(e,t=void 0){var o;const r=this.byId(this.$iFrameId);(o=r==null?void 0:r.contentWindow)==null||o.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}}const Ie=new Lt;class Ht extends ee{constructor(){super(),this.$windowId="__bootpay-confirm-modal-window-container",this.$modalWindowId="__bootpay-confirm-modal-window",this.$additionalClass="rounded-iframe",this.$title="알림",this.$confirmButtonText="확인",this.$cancelButtonText="취소",this.$hookConfirmButtonId="__bootpay-confirm-modal-hook-button",this.$hookCancelButtonId="__bootpay-cancel-modal-hook-button",this.$hookCloseButtonId="__bootpay-close-modal-hook-button",this.$template=this.template(),this.$message=""}template(){return`
85
81
  <div id="${this.$windowId}" class="bootpay-payment-background __alert">
86
82
  <div class="bootpay-confirm-window fade-in" id="${this.$modalWindowId}">
87
83
  <div class="bootpay__alert-header">
@@ -104,7 +100,7 @@
104
100
  </div>
105
101
  </div>
106
102
  </div>
107
- `}show(e,t="알림",s="확인",i="취소",n,m,d=!0){this.$title=t,this.$message=e,this.$confirmButtonText=s,this.$cancelButtonText=i,this.$template=this.template(),this.createTemplateHtml(),document.getElementById(this.$hookConfirmButtonId).addEventListener("click",()=>{this.destroy(),n!==void 0&&n()}),document.getElementById(this.$hookCancelButtonId).addEventListener("click",()=>{this.destroy(),m!==void 0&&m()}),document.getElementById(this.$hookCloseButtonId).addEventListener("click",()=>{this.destroy(),m!==void 0&&m()}),d?(document.getElementById(this.$hookCancelButtonId).removeAttribute("style"),document.getElementById(this.$hookConfirmButtonId).removeAttribute("style")):(document.getElementById(this.$hookCancelButtonId).style.display="none",document.getElementById(this.$hookConfirmButtonId).style.flex="0 1 100%"),this.bodyOpen()}destroy(){const e=document.getElementById(this.$modalWindowId);e.classList.remove("fade-in"),e.classList.add("fade-out"),setTimeout(()=>{const t=document.getElementById(this.$windowId);t!==void 0&&(t.outerHTML="",t.remove()),this.bodyClose()},100)}}const w0=new Cn,An={$eventPrefix:"bootpay",bootpayWidgetSelectMethod(r){return this.triggerGlobalChangeEvent(r),re.selectPayment(r.pg,r.method,r.wallet_id,r.term_passed===!0,r.select_terms,r.extra)},bootpayWidgetResponseGetEnvironmentWidget(r){return ne.postMessage("bootpayResponseGetEnvironmentWidget",{use_only_brandpay:G.$widgetStore.data.use_only_brandpay,user_token:G.$widgetStore.data.user_token,sandbox:G.$widgetStore.data.sandbox,use_terms:G.$widgetStore.data.use_terms,platform:r.platform})},bootpayWidgetResponseCurrentStores(r){return ne.postMessage("bootpayResponseCurrentStores",r)},bootpayWidgetError(r,e){return e.reject(r)},bootpayWidgetBrandpayReload(r){return G.postMessage("bootpayWidgetBrandpayReload",r)},bootpayWidgetResize(r){return this.callBootpayDOMEvent("widget-resize",r),ge.callHook("resize",r),G.resize(r)},bootpayWidgetShowInterestInformation(r){return ne.showCardInterestInformation(r)},bootpayWidgetAddWallet(r){return ne.addWallet(r.url)},bootpayWidgetRemoveWallet(r){return ne.removeWallet(r.wallet_id)},bootpayWidgetPaymentWindowResize(r){return ne.resize(r)},bootpayWidgetBrandpayWindowClose(){return ne.destroy()},bootpayWidgetModalOpen(r){return pt.createIFrame(r.url)},bootpayWidgetModalClose(){return pt.destroy()},bootpayRequestModalCurrentStores(r){return G.postMessage("bootpayWidgetRequestModalCurrentStores",r)},bootpayRequestGetEnvironmentModalWidget(r){return G.postMessage("bootpayWidgetGetEnvironmentModalWidget",r)},bootpayWidgetResponseGetEnvironmentModalWidget(r){return pt.postMessage("bootpayResponseGetEnvironmentModalWidget",{application_id:G.$widgetStore.data.application_id,use_only_brandpay:G.$widgetStore.data.use_only_brandpay,user_token:G.$widgetStore.data.user_token,sandbox:G.$widgetStore.data.sandbox,use_terms:G.$widgetStore.data.use_terms,external_terms:G.$widgetStore.data.external_terms,key:G.$widgetStore.data.widget_key,platform:r.platform,log_level:H.level})},bootpayWidgetModalResize(r){return pt.resize(r)},bootpayWidgetPaymentGetStoreData(){const{application_id:r,price:e,tax_free:t,user_token:s}=G.$widgetStore.data;return G.postMessage("bootpayWidgetResponseStoreData",{applicationId:r,price:e,widgetExtra:G.$widgetStore.widgetExtra,taxFree:t,userToken:s})},bootpayWidgetTermAllAgree(r){this.callBootpayDOMEvent("all-agree-terms",r),ge.callHook("allTermsAccepted",r)},bootpayWidgetSelectPayment(r){const{method_alias:e,payment_type:t,wallet_id:s}=r;return G.postMessage("bootpayWidgetSelectPayment",{method_alias:e,payment_type:t,wallet_id:s})},bootpayWidgetReady(r){this.callBootpayDOMEvent("widget-ready",r),ge.callHook("ready",r)},bootpayWidgetUpdateStore(r){z.updateOnProcessing({...r})},bootpayWidgetToUrl(r){location.href=r.url},bootpayWidgetShowModal(r){return w0.show(r.message,r.title,r.confirmButtonText,r.cancelButtonText,()=>{window.BootpayWidget.alertConfirm()},()=>{window.BootpayWidget.alertCancel()})},brandpayWalletUpdated(r){ge.callHook("brandpayWalletUpdated",r)},triggerGlobalChangeEvent(r){var e;r.completed=q(r.pg)&&q(r.method)&&(r.term_passed===!0||!z.data.use_terms)&&(["BRANDPAY_CARD","BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(r.method)===-1||r.wallet_id!==void 0),(z.data.pg!==r.pg||z.data.method!==r.method||z.data.wallet_id!==r.wallet_id||JSON.stringify(z.widgetExtra)!==JSON.stringify(r.extra))&&(this.callBootpayDOMEvent("widget-change-payment",r),ge.callHook("paymentMethodUpdated",r)),JSON.stringify((e=r.select_terms)==null?void 0:e.filter(t=>t.agree===!0))!==JSON.stringify(z.data.terms.filter(t=>t.agree===!0))&&(this.callBootpayDOMEvent("widget-change-terms",r),ge.callHook("termsConsentUpdated",r))},callBootpayDOMEvent(r,e=void 0){document.dispatchEvent(new CustomEvent([this.$eventPrefix,r].join("-"),{detail:e}))},bootpayWidgetPreferenceWindow(r){return ne.brandpayPreference(r)},brandpayManagerWindowReady:r=>{ge.callHook("brandpayManagerWindowReady",r)},brandpayManagerResize:r=>ne.resize(r),brandpayExternalPassword:r=>ne.externalPassword(r),externalPasswordResponse:r=>ne.postMessage("externalPasswordResponse",r)};class wn extends Ge{constructor(){super({messageEventName:"message.BootpayWidgetEvent",messageEventHooks:{WidgetWindowMessage:An}})}}const is=new wn;class Fn extends be{constructor(){super(),this.$windowId="__bootpay-slider-window-container",this.$modalWindowId="__bootpay-slider-window",this.$additionalClass="rounded-iframe",this.$title="알림",this.$options=void 0}template(e){return`
103
+ `}show(e,t="알림",r="확인",o="취소",i,g,$=!0){this.$title=t,this.$message=e,this.$confirmButtonText=r,this.$cancelButtonText=o,this.$template=this.template(),this.createTemplateHtml(),document.getElementById(this.$hookConfirmButtonId).addEventListener("click",()=>{this.destroy(),i!==void 0&&i()}),document.getElementById(this.$hookCancelButtonId).addEventListener("click",()=>{this.destroy(),g!==void 0&&g()}),document.getElementById(this.$hookCloseButtonId).addEventListener("click",()=>{this.destroy(),g!==void 0&&g()}),$?(document.getElementById(this.$hookCancelButtonId).removeAttribute("style"),document.getElementById(this.$hookConfirmButtonId).removeAttribute("style")):(document.getElementById(this.$hookCancelButtonId).style.display="none",document.getElementById(this.$hookConfirmButtonId).style.flex="0 1 100%"),this.bodyOpen()}destroy(){const e=document.getElementById(this.$modalWindowId);e.classList.remove("fade-in"),e.classList.add("fade-out"),setTimeout(()=>{const t=document.getElementById(this.$windowId);t!==void 0&&(t.outerHTML="",t.remove()),this.bodyClose()},100)}}const De=new Ht,qt={$eventPrefix:"bootpay",bootpayWidgetSelectMethod(s){return this.triggerGlobalChangeEvent(s),z.selectPayment(s.pg,s.method,s.wallet_id,s.term_passed===!0,s.select_terms,s.extra)},bootpayWidgetResponseGetEnvironmentWidget(s){return G.postMessage("bootpayResponseGetEnvironmentWidget",{use_only_brandpay:L.$widgetStore.data.use_only_brandpay,user_token:L.$widgetStore.data.user_token,sandbox:L.$widgetStore.data.sandbox,use_terms:L.$widgetStore.data.use_terms,platform:s.platform})},bootpayWidgetResponseCurrentStores(s){return G.postMessage("bootpayResponseCurrentStores",s)},bootpayWidgetError(s,e){return e.reject(s)},bootpayWidgetBrandpayReload(s){return L.postMessage("bootpayWidgetBrandpayReload",s)},bootpayWidgetResize(s){return this.callBootpayDOMEvent("widget-resize",s),re.callHook("resize",s),L.resize(s)},bootpayWidgetShowInterestInformation(s){return G.showCardInterestInformation(s)},bootpayWidgetAddWallet(s){return G.addWallet(s.url)},bootpayWidgetRemoveWallet(s){return G.removeWallet(s.wallet_id)},bootpayWidgetPaymentWindowResize(s){return G.resize(s)},bootpayWidgetBrandpayWindowClose(){return G.destroy()},bootpayWidgetModalOpen(s){return Ie.createIFrame(s.url)},bootpayWidgetModalClose(){return Ie.destroy()},bootpayRequestModalCurrentStores(s){return L.postMessage("bootpayWidgetRequestModalCurrentStores",s)},bootpayRequestGetEnvironmentModalWidget(s){return L.postMessage("bootpayWidgetGetEnvironmentModalWidget",s)},bootpayWidgetResponseGetEnvironmentModalWidget(s){return Ie.postMessage("bootpayResponseGetEnvironmentModalWidget",{application_id:L.$widgetStore.data.application_id,use_only_brandpay:L.$widgetStore.data.use_only_brandpay,user_token:L.$widgetStore.data.user_token,sandbox:L.$widgetStore.data.sandbox,use_terms:L.$widgetStore.data.use_terms,external_terms:L.$widgetStore.data.external_terms,key:L.$widgetStore.data.widget_key,platform:s.platform,log_level:A.level})},bootpayWidgetModalResize(s){return Ie.resize(s)},bootpayWidgetPaymentGetStoreData(){const{application_id:s,price:e,tax_free:t,user_token:r}=L.$widgetStore.data;return L.postMessage("bootpayWidgetResponseStoreData",{applicationId:s,price:e,widgetExtra:L.$widgetStore.widgetExtra,taxFree:t,userToken:r})},bootpayWidgetTermAllAgree(s){this.callBootpayDOMEvent("all-agree-terms",s),re.callHook("allTermsAccepted",s)},bootpayWidgetSelectPayment(s){const{method_alias:e,payment_type:t,wallet_id:r}=s;return L.postMessage("bootpayWidgetSelectPayment",{method_alias:e,payment_type:t,wallet_id:r})},bootpayWidgetReady(s){this.callBootpayDOMEvent("widget-ready",s),re.callHook("ready",s)},bootpayWidgetUpdateStore(s){M.updateOnProcessing({...s})},bootpayWidgetToUrl(s){location.href=s.url},bootpayWidgetShowModal(s){return De.show(s.message,s.title,s.confirmButtonText,s.cancelButtonText,()=>{window.BootpayWidget.alertConfirm()},()=>{window.BootpayWidget.alertCancel()})},brandpayWalletUpdated(s){re.callHook("brandpayWalletUpdated",s)},triggerGlobalChangeEvent(s){var e;s.completed=N(s.pg)&&N(s.method)&&(s.term_passed===!0||!M.data.use_terms)&&(["BRANDPAY_CARD","BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(s.method)===-1||s.wallet_id!==void 0),(M.data.pg!==s.pg||M.data.method!==s.method||M.data.wallet_id!==s.wallet_id||JSON.stringify(M.widgetExtra)!==JSON.stringify(s.extra))&&(this.callBootpayDOMEvent("widget-change-payment",s),re.callHook("paymentMethodUpdated",s)),JSON.stringify((e=s.select_terms)==null?void 0:e.filter(t=>t.agree===!0))!==JSON.stringify(M.data.terms.filter(t=>t.agree===!0))&&(this.callBootpayDOMEvent("widget-change-terms",s),re.callHook("termsConsentUpdated",s))},callBootpayDOMEvent(s,e=void 0){document.dispatchEvent(new CustomEvent([this.$eventPrefix,s].join("-"),{detail:e}))},bootpayWidgetPreferenceWindow(s){return G.brandpayPreference(s)},brandpayManagerWindowReady:s=>{re.callHook("brandpayManagerWindowReady",s)},brandpayManagerResize:s=>G.resize(s),brandpayExternalPassword:s=>G.externalPassword(s),externalPasswordResponse:s=>G.postMessage("externalPasswordResponse",s)};class zt extends ue{constructor(){super({messageEventName:"message.BootpayWidgetEvent",messageEventHooks:{WidgetWindowMessage:qt}})}}const ot=new zt;class jt extends ee{constructor(){super(),this.$windowId="__bootpay-slider-window-container",this.$modalWindowId="__bootpay-slider-window",this.$additionalClass="rounded-iframe",this.$title="알림",this.$options=void 0}template(e){return`
108
104
  <div id="${this.$windowId}" class="bootpay-payment-background __alert">
109
105
  <div class="slider-window slider-initial" id="${this.$modalWindowId}" style="display: none;">
110
106
  <div class="bootpay__slider-icon">
@@ -122,17 +118,17 @@
122
118
  </div>
123
119
  </div>
124
120
  </div>
125
- `}sliderButtonTemplate(e){let t="";return e.forEach(s=>{const i=s.class?` ${s.class}`:"";t+=`
126
- <button class="bootpay__slider-button${i}" id="${this.sliderButtonId(s.key)}">${s.name}</button>
127
- `}),t}sliderButtonId(e){return`__bootpay-slider-${e}`}show(e,t){this.$title=t.title??"",this.$options=t,this.$template=this.template(t.sliders??[]),this.bodyOpen(),this.createTemplateHtml(),this.sliderButtonClickHook(e),setTimeout(()=>{var s,i;(s=document.getElementById(this.$modalWindowId))==null||s.classList.add("slide-up"),(i=document.getElementById(this.$modalWindowId))==null||i.style.setProperty("display","block")},100)}sliderButtonClickHook(e){this.$options.sliders.forEach(t=>{var i;const s=this.sliderButtonId(t.key);(i=document.getElementById(s))==null||i.addEventListener("click",()=>{e.selectSliderSelect(t.key,this.$options.responseEvent),this.destroy()})})}sliderButtonClickHookDestroy(){this.$options.sliders.forEach(e=>{const t=this.sliderButtonId(e.key),s=document.getElementById(t);s&&s.removeEventListener("click",()=>{})})}destroy(){const e=document.getElementById(this.$modalWindowId);e.classList.remove("slide-up"),e.classList.add("slide-down"),this.sliderButtonClickHookDestroy(),setTimeout(()=>{const t=document.getElementById(this.$windowId);t!==void 0&&(t.outerHTML="",t.remove()),this.bodyClose()},100)}}const Dn=new Fn,$n={showSliderSelect(r){Dn.show(this,r)},selectSliderSelect(r,e="sliderSelectResponse"){F0.$childInstance.postMessage(e,{key:r})}};class kn extends Ge{constructor(){super({messageEventName:"message.BootpaySliderEvent",messageEventHooks:{StoreSliderEvent:$n}})}}const F0=new kn,Pn={externalPasswordResponse:r=>ns.resolve(r),resize:r=>ht.iFrameResize(r)};class Sn extends Ge{constructor(){super({messageEventName:"message.BootpaySdkEvent",messageEventHooks:{WidgetWindowMessage:Pn}})}}const ns=new Sn;class In extends be{constructor(){super(),this.$popupInstance=null,this.$popupInstanceWatcher=null,this.$windowId="bootpay-user-token-background-id",this.$userWindowId="bootpay-user-token-window-id",this.$iFrameId="bootpay-user-token-iframe-id",this.$bootpaySdkFormId="bootpay-user-token-sdk-form",this.$template=this.template(),this.$event=new zi,this.$session=$e,this.deviceType=Z.PLATFORM.JS}initializeTemplate(e,t){this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(e,t)}setDevice(e){return this.deviceType=e,this.deviceType}template(){return`
121
+ `}sliderButtonTemplate(e){let t="";return e.forEach(r=>{const o=r.class?` ${r.class}`:"";t+=`
122
+ <button class="bootpay__slider-button${o}" id="${this.sliderButtonId(r.key)}">${r.name}</button>
123
+ `}),t}sliderButtonId(e){return`__bootpay-slider-${e}`}show(e,t){this.$title=t.title??"",this.$options=t,this.$template=this.template(t.sliders??[]),this.bodyOpen(),this.createTemplateHtml(),this.sliderButtonClickHook(e),setTimeout(()=>{var r,o;(r=document.getElementById(this.$modalWindowId))==null||r.classList.add("slide-up"),(o=document.getElementById(this.$modalWindowId))==null||o.style.setProperty("display","block")},100)}sliderButtonClickHook(e){this.$options.sliders.forEach(t=>{var o;const r=this.sliderButtonId(t.key);(o=document.getElementById(r))==null||o.addEventListener("click",()=>{e.selectSliderSelect(t.key,this.$options.responseEvent),this.destroy()})})}sliderButtonClickHookDestroy(){this.$options.sliders.forEach(e=>{const t=this.sliderButtonId(e.key),r=document.getElementById(t);r&&r.removeEventListener("click",()=>{})})}destroy(){const e=document.getElementById(this.$modalWindowId);e.classList.remove("slide-up"),e.classList.add("slide-down"),this.sliderButtonClickHookDestroy(),setTimeout(()=>{const t=document.getElementById(this.$windowId);t!==void 0&&(t.outerHTML="",t.remove()),this.bodyClose()},100)}}const Kt=new jt,Gt={showSliderSelect(s){Kt.show(this,s)},selectSliderSelect(s,e="sliderSelectResponse"){Ne.$childInstance.postMessage(e,{key:s})}};class Jt extends ue{constructor(){super({messageEventName:"message.BootpaySliderEvent",messageEventHooks:{StoreSliderEvent:Gt}})}}const Ne=new Jt,Vt={externalPasswordResponse:s=>it.resolve(s),resize:s=>Ee.iFrameResize(s)};class Yt extends ue{constructor(){super({messageEventName:"message.BootpaySdkEvent",messageEventHooks:{WidgetWindowMessage:Vt}})}}const it=new Yt;class Qt extends ee{constructor(){super(),this.$popupInstance=null,this.$popupInstanceWatcher=null,this.$windowId="bootpay-user-token-background-id",this.$userWindowId="bootpay-user-token-window-id",this.$iFrameId="bootpay-user-token-iframe-id",this.$bootpaySdkFormId="bootpay-user-token-sdk-form",this.$template=this.template(),this.$event=new At,this.$session=ae,this.deviceType=q.PLATFORM.JS}initializeTemplate(e,t){this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(e,t)}setDevice(e){return this.deviceType=e,this.deviceType}template(){return`
128
124
  <div id="${this.$windowId}" class="bootpay-payment-background">
129
125
  <div class="bootpay-payment-window" id="${this.$userWindowId}">
130
- <iframe id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
126
+ <iframe id="${this.$iFrameId}" name="${this.$iFrameId}" allow="${we}"></iframe>
131
127
  <form name="${this.$bootpaySdkFormId}" id="${this.$bootpaySdkFormId}" method="GET">
132
128
  </form>
133
129
  </div>
134
130
  </div>
135
- `}setParams(e,t){if(t!==void 0){const s=this.byId(this.$bootpaySdkFormId);if(["POST","PUT"].indexOf(e.toUpperCase())>-1){const i=pe.encryptParams(pe.objectKeyToUnderscore(t));s.innerHTML=`
136
- <input type="hidden" name="payload" value="${i.payload}" />
137
- <input type="hidden" name="token" value="${i.token}" />
138
- `}else{let i="";e.toUpperCase()==="DELETE"&&(i+='<input type="hidden" name="_method" value="patch"/>'),Object.keys(t).forEach(n=>{i+=`<input type="hidden" name="${n}" value="${t[n]}"/>`}),s.innerHTML=i}}}request(e,t){return new Promise((s,i)=>{this.initializeTemplate(s,i),this.goiFrameUrl("GET",R.toDoor(`sdk/password/${t}`),{type:e,uuid:this.$session.currentUserUUID()})})}requestTokenFromSDK({application_id:e,user_token:t}){return new Promise((s,i)=>{z.setWidgetData("",{application_id:e,user_token:t}),ns.bind(s,i),this.initializeTemplate(s,i),this.goiFrameUrl("GET",R.toWidget(`password/${e}/${z.encryptParameters()}`),{uuid:this.$session.currentUserUUID()})})}addCard(e){return new Promise((t,s)=>{this.initializeTemplate(t,s),this.goiFrameUrl("GET",R.toDoor(`sdk/card/${e}`),{uuid:this.$session.currentUserUUID()})})}wallets(e){return new Promise((t,s)=>{this.initializeTemplate(t,s),this.goiFrameUrl("GET",R.toApi("sdk/easy/wallet"),{user_token:e,sdk:!0,uuid:this.$session.currentUserUUID()})})}destroyWallet(e){return new Promise((t,s)=>{this.initializeTemplate(t,s),this.goiFrameUrl("POST",R.toApi("sdk/easy/wallet"),{method:"DELETE",sdk:!0,user_token:e.user_token,wallet_id:e.wallet_id,token:e.token,uuid:this.$session.currentUserUUID()})})}createBiometricAuthenticate(e){return new Promise((t,s)=>{this.initializeTemplate(t,s),this.goiFrameUrl("POST",R.toApi("sdk/easy/biometric"),{user_token:e.userToken,sdk:!0,uuid:this.$session.currentUserUUID(),os:e.os,token:e.token})})}destroyBiometricAuthenticate(e){return new Promise((t,s)=>{this.initializeTemplate(t,s),this.goiFrameUrl("POST",R.toApi("sdk/easy/biometric"),{method:"DELETE",uuid:this.$session.currentUserUUID(),user_token:e.userToken,token:e.token})})}requestWalletPayment(e){return new Promise((t,s)=>{this.initializeTemplate(t,s),this.goiFrameUrl("POST",R.toApi("sdk/easy/card"),this.regenerateRequestPayment(e))})}launchBrandpayManager(e){clearInterval(this.$popupInstanceWatcher);const t=new A0;t.setWidgetData(e.el,e);const s=t.getManagerUrl();if(e.use_popup===!0)this.$popupInstance=window.open(R.toWidget(s),"bootpay-brandpay-manager","width=600,height=800,scrollbars=yes,resizable=yes"),this.$popupInstanceWatcher=setInterval(()=>{if(this.$popupInstance===null||this.$popupInstance.closed){try{ge.callHook("brandpayManagerWindowClosed")}catch(i){console.error(i)}clearInterval(this.$popupInstanceWatcher)}},500);else{if(this.$blank(e.el))throw new Error("부트페이 브랜드페이 매니저를 설정할 Element ID를 입력하지 않았거나 해당 Element DOM이 존재하지 않습니다.");ne.$widgetStore=t,ne.templateRender(s),this.bodyOpen("bootpay-inherit",!0)}is.bind(),F0.bind(),F0.setChildInstance(ne)}goiFrameUrl(e,t,s=void 0){this.setParams(e,s);const i=this.byId(this.$bootpaySdkFormId);i.method=this.toMethod(e),i.action=t,i.target=this.$iFrameId,i.submit(),this.show()}toMethod(e){switch(e.toUpperCase()){case"PUT":return"POST";case"DELETE":return"POST";default:return e}}iFrameResize(e){const t=this.byId(this.$iFrameId);if(t!==void 0){for(let s in e)if(String(e[s]).match(/%/)&&!this.byId(this.$userWindowId).className.match(/w-100/)){this.byId(this.$userWindowId).className+=" w-100";break}this.applyStylesToElement(t,e)}}regenerateRequestPayment(e){return e.ver=ke.version,e.platform_type=this.deviceType,e.sdk=!0,e.price=parseFloat(String(e.price)),e.tax_free=parseFloat(String(e.tax_free)),Je.invalidRequestParamsData(e),Je.invalidRequestItemsData(e.items,e.price),e.uuid=this.$session.currentUserUUID(),e.sk=this.$session.currentSessionKey(),e.ti=this.$session.currentTimeTerm(),e.tk=`${this.$uuid()}-${new Date().getTime()*1e3}`,e}show(){const e=this.byId(this.$iFrameId);e!==void 0&&e.style.setProperty("display","block")}destroy(){this.$present(document.querySelector("body").className)&&(document.querySelector("body").className=document.querySelector("body").className.replace(/bootpay-open/gi,"")),this.$present(this.byId(this.$windowId))&&(this.byId(this.$windowId).outerHTML=""),document.body.classList.remove("bootpay-open"),he.clearPollingEvent(),setTimeout(()=>he.callBootpayDOMEvent("close"),300)}}const ht=new In,os={$templateUserToken:ht,async requestPasswordTokenLegacy(r){try{const e=await this.$templateUserToken.request("passwordToken",r);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async requestPasswordToken(r){try{const e=await this.$templateUserToken.requestTokenFromSDK(r);return this.$templateUserToken.destroy(),e.confirm?Promise.resolve(e.token):Promise.reject(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async requestChangePassword(r){try{const e=await this.$templateUserToken.request("changePasswordToken",r);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async requestAddCard(r){try{const e=await this.$templateUserToken.addCard(r);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async wallets(r){try{const e=await this.$templateUserToken.wallets(r);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async destroyWallet(r){try{const e=await this.$templateUserToken.destroyWallet(r);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async createBiometricAuthenticate(r){try{const e=await this.$templateUserToken.createBiometricAuthenticate(r);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async destroyBiometricAuthenticate(r){try{const e=await this.$templateUserToken.destroyBiometricAuthenticate(r);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async requestWalletPayment(r){try{const e=await this.$templateUserToken.requestWalletPayment(r);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},setEnvironmentMode(r,e=void 0){R.set(r),e!==void 0&&R.setDevelopmentHost(e)},setDevice(r){let e=Z.PLATFORM.JS;switch(r.toUpperCase()){case"IOS":e=Z.PLATFORM.IOS;break;case"ANDROID":e=Z.PLATFORM.ANDROID;break}return this.$templateUserToken.setDevice(e)},errorHandler(r){let e;switch(me.hideProgress(),r.name){case"BootpayEventError":e=r.eventMessage;break;default:if(q(r.event))e=r;else throw r}return e},setLogLevel(r){H.setLogLevel(r)},setUUID(r){return $e.setUUID(r)},dismiss(){he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})}};typeof window<"u"&&(window.BootpaySDK=os);const as={render(r,e){re.render(r,e)},rerender(){re.rerender()},setEnvironmentMode(r,e){Ee.setEnvironmentMode(r,e),R.set(r)},async requestPayment(r){return new Promise(async(e,t)=>{try{const s=await re.requestPayment(r);return e(s)}catch(s){return t(this.errorHandler(s))}})},async requestSubscription(r){return new Promise(async(e,t)=>{try{const s=await re.requestSubscription(r);return e(s)}catch(s){return t(this.errorHandler(s))}})},launchBrandpayManager(r){ht.launchBrandpayManager(r)},errorHandler(r){let e;switch(me.hideProgress(),r.name){case"BootpayEventError":e=r.eventMessage;break;default:if(q(r.event))e=r;else throw r}return e},update(r,e=!0){re.update(r),e&&this.rerender()},currentTermsCondition(){return re.currentTermsCondition()},destroy(){re.destroy()},isRendered(){return re.isRendered()},synchronizedRealTimeTransfer(r){re.synchronizedRealTimeTransfer(r)},selectPayment(r){re.sendSelectPayment(r)},setLogLevel(r){H.setLogLevel(r)},sendMessage(r,e=void 0){re.sendMessage(r,e)},setDevice(r){return Ee.setDevice(r)},alertConfirm(){w0.destroy(),re.sendMessage("BootpayWidgetAlertConfirm",{confirm:!0})},alertCancel(){w0.destroy(),re.sendMessage("BootpayWidgetAlertConfirm",{confirm:!1})},currentPaymentParameters(){return re.currentPaymentParameters()},isWidgetTypeSubscription(){return z.widgetType===2},isWidgetTypePayment(){return z.widgetType===1},getBrandpayLaunchManagerUrl(r){const e=new A0;return e.setWidgetData("",r),R.toWidget(e.getManagerUrl())}};typeof window<"u"&&(window.BootpayWidget=as),ye.Bootpay=Ee,ye.BootpayEnvironment=R,ye.BootpaySDK=os,ye.BootpayWidget=as,ye.default=Ee,Object.defineProperties(ye,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
131
+ `}setParams(e,t){if(t!==void 0){const r=this.byId(this.$bootpaySdkFormId);if(["POST","PUT"].indexOf(e.toUpperCase())>-1){const o=le.encryptParams(le.objectKeyToUnderscore(t));r.innerHTML=`
132
+ <input type="hidden" name="payload" value="${o.payload}" />
133
+ <input type="hidden" name="token" value="${o.token}" />
134
+ `}else{let o="";e.toUpperCase()==="DELETE"&&(o+='<input type="hidden" name="_method" value="patch"/>'),Object.keys(t).forEach(i=>{o+=`<input type="hidden" name="${i}" value="${t[i]}"/>`}),r.innerHTML=o}}}request(e,t){return new Promise((r,o)=>{this.initializeTemplate(r,o),this.goiFrameUrl("GET",x.toDoor(`sdk/password/${t}`),{type:e,uuid:this.$session.currentUserUUID()})})}requestTokenFromSDK({application_id:e,user_token:t}){return new Promise((r,o)=>{M.setWidgetData("",{application_id:e,user_token:t}),it.bind(r,o),this.initializeTemplate(r,o),this.goiFrameUrl("GET",x.toWidget(`password/${e}/${M.encryptParameters()}`),{uuid:this.$session.currentUserUUID()})})}addCard(e){return new Promise((t,r)=>{this.initializeTemplate(t,r),this.goiFrameUrl("GET",x.toDoor(`sdk/card/${e}`),{uuid:this.$session.currentUserUUID()})})}wallets(e){return new Promise((t,r)=>{this.initializeTemplate(t,r),this.goiFrameUrl("GET",x.toApi("sdk/easy/wallet"),{user_token:e,sdk:!0,uuid:this.$session.currentUserUUID()})})}destroyWallet(e){return new Promise((t,r)=>{this.initializeTemplate(t,r),this.goiFrameUrl("POST",x.toApi("sdk/easy/wallet"),{method:"DELETE",sdk:!0,user_token:e.user_token,wallet_id:e.wallet_id,token:e.token,uuid:this.$session.currentUserUUID()})})}createBiometricAuthenticate(e){return new Promise((t,r)=>{this.initializeTemplate(t,r),this.goiFrameUrl("POST",x.toApi("sdk/easy/biometric"),{user_token:e.userToken,sdk:!0,uuid:this.$session.currentUserUUID(),os:e.os,token:e.token})})}destroyBiometricAuthenticate(e){return new Promise((t,r)=>{this.initializeTemplate(t,r),this.goiFrameUrl("POST",x.toApi("sdk/easy/biometric"),{method:"DELETE",uuid:this.$session.currentUserUUID(),user_token:e.userToken,token:e.token})})}requestWalletPayment(e){return new Promise((t,r)=>{this.initializeTemplate(t,r),this.goiFrameUrl("POST",x.toApi("sdk/easy/card"),this.regenerateRequestPayment(e))})}launchBrandpayManager(e){clearInterval(this.$popupInstanceWatcher);const t=new Me;t.setWidgetData(e.el,e);const r=t.getManagerUrl();if(e.use_popup===!0)this.$popupInstance=window.open(x.toWidget(r),"bootpay-brandpay-manager","width=600,height=800,scrollbars=yes,resizable=yes"),this.$popupInstanceWatcher=setInterval(()=>{if(this.$popupInstance===null||this.$popupInstance.closed){try{re.callHook("brandpayManagerWindowClosed")}catch(o){console.error(o)}clearInterval(this.$popupInstanceWatcher)}},500);else{if(this.$blank(e.el))throw new Error("부트페이 브랜드페이 매니저를 설정할 Element ID를 입력하지 않았거나 해당 Element DOM이 존재하지 않습니다.");G.$widgetStore=t,G.templateRender(r),this.bodyOpen("bootpay-inherit",!0)}ot.bind(),Ne.bind(),Ne.setChildInstance(G)}goiFrameUrl(e,t,r=void 0){this.setParams(e,r);const o=this.byId(this.$bootpaySdkFormId);o.method=this.toMethod(e),o.action=t,o.target=this.$iFrameId,o.submit(),this.show()}toMethod(e){switch(e.toUpperCase()){case"PUT":return"POST";case"DELETE":return"POST";default:return e}}iFrameResize(e){const t=this.byId(this.$iFrameId);if(t!==void 0){for(let r in e)if(String(e[r]).match(/%/)&&!this.byId(this.$userWindowId).className.match(/w-100/)){this.byId(this.$userWindowId).className+=" w-100";break}this.applyStylesToElement(t,e)}}regenerateRequestPayment(e){return e.ver=de.version,e.platform_type=this.deviceType,e.sdk=!0,e.price=parseFloat(String(e.price)),e.tax_free=parseFloat(String(e.tax_free)),$e.invalidRequestParamsData(e),$e.invalidRequestItemsData(e.items,e.price),e.uuid=this.$session.currentUserUUID(),e.sk=this.$session.currentSessionKey(),e.ti=this.$session.currentTimeTerm(),e.tk=`${this.$uuid()}-${new Date().getTime()*1e3}`,e}show(){const e=this.byId(this.$iFrameId);e!==void 0&&e.style.setProperty("display","block")}destroy(){this.$present(document.querySelector("body").className)&&(document.querySelector("body").className=document.querySelector("body").className.replace(/bootpay-open/gi,"")),this.$present(this.byId(this.$windowId))&&(this.byId(this.$windowId).outerHTML=""),document.body.classList.remove("bootpay-open"),Y.clearPollingEvent(),setTimeout(()=>Y.callBootpayDOMEvent("close"),300)}}const Ee=new Qt,nt={$templateUserToken:Ee,async requestPasswordTokenLegacy(s){try{const e=await this.$templateUserToken.request("passwordToken",s);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async requestPasswordToken(s){try{const e=await this.$templateUserToken.requestTokenFromSDK(s);return this.$templateUserToken.destroy(),e.confirm?Promise.resolve(e.token):Promise.reject(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async requestChangePassword(s){try{const e=await this.$templateUserToken.request("changePasswordToken",s);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async requestAddCard(s){try{const e=await this.$templateUserToken.addCard(s);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async wallets(s){try{const e=await this.$templateUserToken.wallets(s);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async destroyWallet(s){try{const e=await this.$templateUserToken.destroyWallet(s);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async createBiometricAuthenticate(s){try{const e=await this.$templateUserToken.createBiometricAuthenticate(s);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async destroyBiometricAuthenticate(s){try{const e=await this.$templateUserToken.destroyBiometricAuthenticate(s);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},async requestWalletPayment(s){try{const e=await this.$templateUserToken.requestWalletPayment(s);return this.$templateUserToken.destroy(),Promise.resolve(e)}catch(e){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(e))}},setEnvironmentMode(s,e=void 0){x.set(s),e!==void 0&&x.setDevelopmentHost(e)},setDevice(s){let e=q.PLATFORM.JS;switch(s.toUpperCase()){case"IOS":e=q.PLATFORM.IOS;break;case"ANDROID":e=q.PLATFORM.ANDROID;break}return this.$templateUserToken.setDevice(e)},errorHandler(s){let e;switch(X.hideProgress(),s.name){case"BootpayEventError":e=s.eventMessage;break;default:if(N(s.event))e=s;else throw s}return e},setLogLevel(s){A.setLogLevel(s)},setUUID(s){return ae.setUUID(s)},dismiss(){Y.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})}};typeof window<"u"&&(window.BootpaySDK=nt);const at={render(s,e){z.render(s,e)},rerender(){z.rerender()},setEnvironmentMode(s,e){te.setEnvironmentMode(s,e),x.set(s)},async requestPayment(s){return new Promise(async(e,t)=>{try{const r=await z.requestPayment(s);return e(r)}catch(r){return t(this.errorHandler(r))}})},async requestSubscription(s){return new Promise(async(e,t)=>{try{const r=await z.requestSubscription(s);return e(r)}catch(r){return t(this.errorHandler(r))}})},launchBrandpayManager(s){Ee.launchBrandpayManager(s)},errorHandler(s){let e;switch(X.hideProgress(),s.name){case"BootpayEventError":e=s.eventMessage;break;default:if(N(s.event))e=s;else throw s}return e},update(s,e=!0){z.update(s),e&&this.rerender()},currentTermsCondition(){return z.currentTermsCondition()},destroy(){z.destroy()},isRendered(){return z.isRendered()},synchronizedRealTimeTransfer(s){z.synchronizedRealTimeTransfer(s)},selectPayment(s){z.sendSelectPayment(s)},setLogLevel(s){A.setLogLevel(s)},sendMessage(s,e=void 0){z.sendMessage(s,e)},setDevice(s){return te.setDevice(s)},alertConfirm(){De.destroy(),z.sendMessage("BootpayWidgetAlertConfirm",{confirm:!0})},alertCancel(){De.destroy(),z.sendMessage("BootpayWidgetAlertConfirm",{confirm:!1})},currentPaymentParameters(){return z.currentPaymentParameters()},isWidgetTypeSubscription(){return M.widgetType===2},isWidgetTypePayment(){return M.widgetType===1},getBrandpayLaunchManagerUrl(s){const e=new Me;return e.setWidgetData("",s),x.toWidget(e.getManagerUrl())}};typeof window<"u"&&(window.BootpayWidget=at),Q.Bootpay=te,Q.BootpayEnvironment=x,Q.BootpaySDK=nt,Q.BootpayWidget=at,Q.default=te,Object.defineProperties(Q,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});