@bootpay/client-js 5.3.1 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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);left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;box-shadow:var(--bootpay-shadow)}@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-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header{padding:1.5rem 2rem 1rem;text-align:left;font-size:20px;font-weight:700;position:relative;background-color:var(--bootpay-white);border-bottom:1px solid #f1f5f9}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header.__text-center,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header.__text-center,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-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 .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn{top:40%;transform:translateY(-50%);padding:0;right:1rem}@media (min-width: 600px){body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn{right:8px;top:50%;transform:translateY(-55%)}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-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-inherit .bootpay-payment-background.__alert .slider-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,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn:after{background-color:var(--bootpay-gray-dark);width:1px}}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-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 .bootpay-confirm-window>.bootpay__alert-body.slider-body,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body.slider-body,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body.slider-body,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body.slider-body{padding:1.5rem 2rem 2rem;background:transparent}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-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:inline-block;width:100%;padding:1rem 1.5rem;color:#64748b;font-size:16px;font-weight:500;border-radius:16px;outline:none;border:2px solid transparent;cursor:pointer;margin-top:1rem;background-color:#f8fafc;transition:all .3s cubic-bezier(.4,0,.2,1);position:relative}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button:first-child,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 .bootpay-confirm-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 .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button:hover,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:hover,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-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{border-color:var(--bootpay-primary);background-color:#f0f4ff;color:var(--bootpay-primary);transform:translateY(-2px);box-shadow:0 8px 25px #507cf326}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button.active,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-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{background-color:var(--bootpay-primary);color:var(--bootpay-white);font-weight:600;border-color:var(--bootpay-primary);transform:translateY(-1px);box-shadow:0 12px 30px #507cf340,0 0 0 3px #507cf31a}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer{display:flex;justify-content:flex-end;border-top:1px solid var(--bootpay-gray-bg)}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close,body.bootpay-inherit .bootpay-payment-background.__alert .slider-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,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close{flex:0 1 50%;padding:1rem;background-color:var(--bootpay-white);color:var(--bootpay-gray-dark);font-size:16px;cursor:pointer;border:0;outline:none}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right{border-right:1px solid var(--bootpay-gray-bg)}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover,body.bootpay-inherit .bootpay-payment-background.__alert .slider-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,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close:hover{background-color:#e0e0e0}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary,body.bootpay-inherit .bootpay-payment-background.__alert .slider-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,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary{color:var(--bootpay-primary);font-weight:600}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover,body.bootpay-inherit .bootpay-payment-background.__alert .slider-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,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover{color:var(--bootpay-primary-hover)}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(me,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(me=typeof globalThis<"u"?globalThis:me||self,Z(me.Bootpay={}))})(this,function(me){"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.")},x=Object.create||function(){function d(){}return function(l){var v;return d.prototype=l,v=new d,d.prototype=null,v}}(),p={},a=p.lib={},c=a.Base=function(){return{extend:function(d){var l=x(this);return d&&l.mixIn(d),(!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 d=this.extend();return d.init.apply(d,arguments),d},init:function(){},mixIn:function(d){for(var l in d)d.hasOwnProperty(l)&&(this[l]=d[l]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=a.WordArray=c.extend({init:function(d,l){d=this.words=d||[],l!=i?this.sigBytes=l:this.sigBytes=d.length*4},toString:function(d){return(d||u).stringify(this)},concat:function(d){var l=this.words,v=d.words,E=this.sigBytes,_=d.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 d=this.words,l=this.sigBytes;d[l>>>2]&=4294967295<<32-l%4*8,d.length=s.ceil(l/4)},clone:function(){var d=c.clone.call(this);return d.words=this.words.slice(0),d},random:function(d){for(var l=[],v=0;v<d;v+=4)l.push(m());return new g.init(l,d)}}),o=p.enc={},u=o.Hex={stringify:function(d){for(var l=d.words,v=d.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(d){for(var l=d.length,v=[],E=0;E<l;E+=2)v[E>>>3]|=parseInt(d.substr(E,2),16)<<24-E%8*4;return new g.init(v,l/2)}},h=o.Latin1={stringify:function(d){for(var l=d.words,v=d.sigBytes,E=[],_=0;_<v;_++){var A=l[_>>>2]>>>24-_%4*8&255;E.push(String.fromCharCode(A))}return E.join("")},parse:function(d){for(var l=d.length,v=[],E=0;E<l;E++)v[E>>>2]|=(d.charCodeAt(E)&255)<<24-E%4*8;return new g.init(v,l)}},y=o.Utf8={stringify:function(d){try{return decodeURIComponent(escape(h.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(d){return h.parse(unescape(encodeURIComponent(d)))}},f=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(d){typeof d=="string"&&(d=y.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},_process:function(d){var l,v=this._data,E=v.words,_=v.sigBytes,A=this.blockSize,w=A*4,I=_/w;d?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 d=c.clone.call(this);return d._data=this._data.clone(),d},_minBufferSize:0});a.Hasher=f.extend({cfg:c.extend(),init:function(d){this.cfg=this.cfg.extend(d),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(d){return this._append(d),this._process(),this},finalize:function(d){d&&this._append(d);var l=this._doFinalize();return l},blockSize:16,_createHelper:function(d){return function(l,v){return new d.init(v).finalize(l)}},_createHmacHelper:function(d){return function(l,v){return new b.HMAC.init(d,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,d=0;d<4&&u+d*.75<c;d++)o.push(g.charAt(b>>>6*(3-d)&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 x(p,a,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function x(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.3.1",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(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(s){return`__bootpay_track_${s}__`}},k0=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{let e=Math.random()*16|0;return(s=="x"?e:e&3|8).toString(16)}),se=s=>{let e=!1;return typeof s=="string"||Array.isArray(s)?e=s.length===0:e=s==null||je(s,"object")&&s.constructor===Object&&Object.keys(s).length===0,e},q=s=>!se(s),je=(s,e)=>typeof s===e,bs=(s,e=void 0)=>{if(q(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},mt=(s,e)=>{for(let t in e)e.hasOwnProperty(t)&&(s[t]=e[t]);return s};var H=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Re(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Bs(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 i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var P0={exports:{}};function _s(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 gt={exports:{}};const Cs=Bs(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var I0;function M(){return I0||(I0=1,function(s,e){(function(t,r){s.exports=r()})(H,function(){var t=t||function(r,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 H<"u"&&H.crypto&&(n=H.crypto),!n&&typeof _s=="function")try{n=Cs}catch{}var p=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 y;return x.prototype=l,y=new x,x.prototype=null,y}}(),u={},o=u.lib={},c=o.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)}}}(),E=o.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||h).stringify(this)},concat:function(x){var l=this.words,y=x.words,g=this.sigBytes,_=x.sigBytes;if(this.clamp(),g%4)for(var A=0;A<_;A++){var w=y[A>>>2]>>>24-A%4*8&255;l[g+A>>>2]|=w<<24-(g+A)%4*8}else for(var S=0;S<_;S+=4)l[g+S>>>2]=y[S>>>2];return this.sigBytes+=_,this},clamp:function(){var x=this.words,l=this.sigBytes;x[l>>>2]&=4294967295<<32-l%4*8,x.length=r.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=[],y=0;y<x;y+=4)l.push(p());return new E.init(l,x)}}),a=u.enc={},h=a.Hex={stringify:function(x){for(var l=x.words,y=x.sigBytes,g=[],_=0;_<y;_++){var A=l[_>>>2]>>>24-_%4*8&255;g.push((A>>>4).toString(16)),g.push((A&15).toString(16))}return g.join("")},parse:function(x){for(var l=x.length,y=[],g=0;g<l;g+=2)y[g>>>3]|=parseInt(x.substr(g,2),16)<<24-g%8*4;return new E.init(y,l/2)}},f=a.Latin1={stringify:function(x){for(var l=x.words,y=x.sigBytes,g=[],_=0;_<y;_++){var A=l[_>>>2]>>>24-_%4*8&255;g.push(String.fromCharCode(A))}return g.join("")},parse:function(x){for(var l=x.length,y=[],g=0;g<l;g++)y[g>>>2]|=(x.charCodeAt(g)&255)<<24-g%4*8;return new E.init(y,l)}},m=a.Utf8={stringify:function(x){try{return decodeURIComponent(escape(f.stringify(x)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(x){return f.parse(unescape(encodeURIComponent(x)))}},v=o.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new E.init,this._nDataBytes=0},_append:function(x){typeof x=="string"&&(x=m.parse(x)),this._data.concat(x),this._nDataBytes+=x.sigBytes},_process:function(x){var l,y=this._data,g=y.words,_=y.sigBytes,A=this.blockSize,w=A*4,S=_/w;x?S=r.ceil(S):S=r.max((S|0)-this._minBufferSize,0);var b=S*A,C=r.min(b*4,_);if(b){for(var F=0;F<b;F+=A)this._doProcessBlock(g,F);l=g.splice(0,b),y.sigBytes-=C}return new E.init(l,C)},clone:function(){var x=c.clone.call(this);return x._data=this._data.clone(),x},_minBufferSize:0});o.Hasher=v.extend({cfg:c.extend(),init:function(x){this.cfg=this.cfg.extend(x),this.reset()},reset:function(){v.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,y){return new x.init(y).finalize(l)}},_createHmacHelper:function(x){return function(l,y){return new B.HMAC.init(x,y).finalize(l)}}});var B=u.algo={};return u}(Math);return t})}(gt)),gt.exports}(function(s,e){(function(t,r){s.exports=r(M())})(H,function(t){return t.enc.Utf8})})(P0);var As=P0.exports;const S0=Re(As);var R0={exports:{}};(function(s,e){(function(t,r){s.exports=r(M())})(H,function(t){return function(){var r=t,i=r.lib,n=i.WordArray,p=r.enc;p.Base64={stringify:function(u){var o=u.words,c=u.sigBytes,E=this._map;u.clamp();for(var a=[],h=0;h<c;h+=3)for(var f=o[h>>>2]>>>24-h%4*8&255,m=o[h+1>>>2]>>>24-(h+1)%4*8&255,v=o[h+2>>>2]>>>24-(h+2)%4*8&255,B=f<<16|m<<8|v,x=0;x<4&&h+x*.75<c;x++)a.push(E.charAt(B>>>6*(3-x)&63));var l=E.charAt(64);if(l)for(;a.length%4;)a.push(l);return a.join("")},parse:function(u){var o=u.length,c=this._map,E=this._reverseMap;if(!E){E=this._reverseMap=[];for(var a=0;a<c.length;a++)E[c.charCodeAt(a)]=a}var h=c.charAt(64);if(h){var f=u.indexOf(h);f!==-1&&(o=f)}return d(u,o,E)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function d(u,o,c){for(var E=[],a=0,h=0;h<o;h++)if(h%4){var f=c[u.charCodeAt(h-1)]<<h%4*2,m=c[u.charCodeAt(h)]>>>6-h%4*2,v=f|m;E[a>>>2]|=v<<24-a%4*8,a++}return n.create(E,a)}}(),t.enc.Base64})})(R0);var Be=R0.exports;const Te=Re(Be);class Ke{$blank(e){return se(e)}$present(e){return!this.$blank(e)}$type(e,t){return je(e,t)}$uuid(){return k0()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),Te.stringify(S0.parse(e))}$decrypt(e){return S0.stringify(Te.parse(e))}getUserAgent(){return window.navigator.userAgent}}const Ge={debug:1,info:2,warning:3,error:4},N={level:Ge.warning,setLogLevel(s){this.level=s},messageStringify(s,e){try{return e=`${s}: ${je(e,"object")?JSON.stringify(e):e}`}catch(t){console.error(`log parse error: ${t}`)}},debug(s,e){this.level<=Ge.debug&&console.log(this.messageStringify(s,e))},info(s,e){this.level<=Ge.info&&console.info(this.messageStringify(s,e))},warn(s,e){this.level<=Ge.warning&&console.warn(this.messageStringify(s,e))},error(s,e){this.level<=Ge.error&&console.error(this.messageStringify(s,e))}};class ws extends Ke{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 Fs extends ws{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round(new Date().getTime()/1e3),t=Z.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=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),r=Z.STORAGE_PREFIX("session"),i=this.getToJSON(r),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(r,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){N.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`);return}}}const $e=new Fs,ke={name:"@bootpay/client-js",version:"5.5.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:""},T={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"},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===""?ke.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 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(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 se(Pe.__BOOTPAY_NAMESPACE)&&(Pe.__BOOTPAY_NAMESPACE={}),this.addEventListener(s.split(".")[0],e,t||!1),Pe.__BOOTPAY_NAMESPACE[s]=e,this},off(s){return q(Pe.__BOOTPAY_NAMESPACE)&&q(Pe.__BOOTPAY_NAMESPACE[s])&&this.removeEventListener(s.split(".")[0],Pe.__BOOTPAY_NAMESPACE[s]),this}};class Oe extends Ke{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,r=>{const i=this.parseEvent(r.data);if(N.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);N.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(r){N.info("json parsing failed",`data: ${e}, message: ${Xe(r)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}else return null}}const Xe=s=>typeof s=="string"?s.toUpperCase():s instanceof Error?s.message:s;class ge extends Ke{constructor(e={}){super();const{iframeId:t="bootpay-iframe",template:r=this.defaultIframeHtml(),el:i=void 0}=e;this.el=i,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 i=Object.keys(t)[r],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 N.debug("isRendered",`iFrameElement: ${e}`),e!==null&&e.src!==null&&e.src!==""}postMessage(e,t=void 0){var i;const r=this.byId(this.$iFrameId);(i=r==null?void 0:r.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 Ds extends ge{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,41 +16,51 @@
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 le=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 Ws(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function Ms(){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:Ms,forEach:At,merge:wt,extend:Ls,trim:Ws,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])})},W0=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)}W0.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 M0=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(M0,"isAxiosError",{value:!0}),Ue.from=function(r,e,t,s,i,n){var m=Object.create(M0);return W0.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},pe=te;function Qs(r,e){e=e||new FormData;var t=[];function s(n){return n===null?"":pe.isDate(n)?n.toISOString():pe.isArrayBuffer(n)||pe.isTypedArray(n)?typeof Blob=="function"?new Blob([n]):Buffer.from(n):n}function i(n,m){if(pe.isPlainObject(n)||pe.isArray(n)){if(t.indexOf(n)!==-1)throw Error("Circular reference detected in "+m);t.push(n),pe.forEach(n,function(p,a){if(!pe.isUndefined(p)){var c=m?m+"."+a:a,g;if(p&&!m&&typeof p=="object"){if(pe.endsWith(a,"{}"))p=JSON.stringify(p);else if(pe.endsWith(a,"[]")&&(g=pe.toArray(p))){g.forEach(function(o){!pe.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,x,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(x)&&a.push("domain="+x),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,x;return s&&r.forEach(s.split(`
20
- `),function(a){if(x=a.indexOf(":"),n=r.trim(a.substr(0,x)).toLowerCase(),m=r.trim(a.substr(x+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 x=m;return t&&(s.setAttribute("href",x),x=s.href),s.setAttribute("href",x),{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(x){var p=r.isString(x)?n(x):x;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(),x=q0,p=He,a=ct(),c=ci();return It=function(o){return new Promise(function(h,y){var f=o.data,b=o.headers,d=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=!d||d==="text"||d==="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||x;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),d&&d!=="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 x(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:x,transformRequest:x,transformResponse:x,paramsSerializer:x,timeout:x,timeoutMessage:x,withCredentials:x,adapter:x,responseType:x,xsrfCookieName:x,xsrfHeaderName:x,onUploadProgress:x,onDownloadProgress:x,decompress:x,maxContentLength:x,maxBodyLength:x,beforeRedirect:x,transport:x,httpAgent:x,httpsAgent:x,cancelToken:x,socketPath:x,responseEncoding:x,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,Wt={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){Wt[r]=function(s){return typeof s===r||"a"+(e<1?"n ":" ")+r}});var xr={};Wt.transitional=function(e,t,s){function i(n,m){return"[Axios v"+bi+"] Transitional option '"+n+"'"+m+(s?". "+s:"")}return function(n,m,x){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,x):!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 x=r[n],p=x===void 0||m(x,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:Wt},lr=te,Ai=N0,ur=Ys,pr=Bi,xt=ar,wi=G0,hr=Ci,Ne=hr.validators;function We(r){this.defaults=r,this.interceptors={request:new ur,response:new ur}}We.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 x;if(!n){var p=[pr,void 0];for(Array.prototype.unshift.apply(p,i),p=p.concat(m),x=Promise.resolve(t);p.length;)x=x.then(p.shift(),p.shift());return x}for(var a=t;i.length;){var c=i.shift(),g=i.shift();try{a=c(a)}catch(o){g(o);break}}try{x=pr(a)}catch(o){return Promise.reject(o)}for(;m.length;)x=x.then(m.shift(),m.shift());return x},We.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){We.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,x){return this.request(xt(x||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:n,data:m}))}}We.prototype[e]=t(),We.prototype[e+"Form"]=t(!0)});var Fi=We,Mt,fr;function Di(){if(fr)return Mt;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,x=i._listeners.length;for(m=0;m<x;m++)i._listeners[m](n);i._listeners=null}}),this.promise.then=function(n){var m,x=new Promise(function(p){i.subscribe(p),m=p}).then(n);return x.cancel=function(){i.unsubscribe(m)},x},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}},Mt=e,Mt}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,x=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=x.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(y,f){for(var b=0;b<16;b++){var d=f+b,l=y[d];y[d]=(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,d=y.sigBytes*8;f[d>>>5]|=128<<24-d%32;var l=s.floor(b/4294967296),v=b;f[(d+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,f[(d+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=x.clone.call(this);return y._hash=this._hash.clone(),y}});function g(y,f,b,d,l,v,E){var _=y+(f&b|~f&d)+l+E;return(_<<v|_>>>32-v)+f}function o(y,f,b,d,l,v,E){var _=y+(f&d|b&~d)+l+E;return(_<<v|_>>>32-v)+f}function u(y,f,b,d,l,v,E){var _=y+(f^b^d)+l+E;return(_<<v|_>>>32-v)+f}function h(y,f,b,d,l,v,E){var _=y+(b^(f|~d))+l+E;return(_<<v|_>>>32-v)+f}i.MD5=x._createHelper(c),i.HmacMD5=x._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,x=s.algo,p=[],a=x.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],d=0;d<80;d++){if(d<16)p[d]=c[g+d]|0;else{var l=p[d-3]^p[d-8]^p[d-14]^p[d-16];p[d]=l<<1|l>>>31}var v=(u<<5|u>>>27)+b+p[d];d<20?v+=(h&y|~h&f)+1518500249:d<40?v+=(h^y^f)+1859775393:d<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,x=m.Utf8,p=s.algo;p.HMAC=n.extend({init:function(a,c){a=this._hasher=new a.init,typeof c=="string"&&(c=x.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,x=s.algo,p=x.MD5,a=x.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,d=u.iterations;f.length<b;){o&&h.update(o),o=h.update(c).finalize(g),h.reset();for(var l=1;l<d;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,x=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={},d=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=x.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:d}),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=x.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=x.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=x.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=x.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,x=[],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,x[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],d=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=x[l>>>24]<<24|x[l>>>16&255]<<16|x[l>>>8&255]<<8|x[l&255]):(l=l<<8|l>>>24,l=x[l>>>24]<<24|x[l>>>16&255]<<16|x[l>>>8&255]<<8|x[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[x[l>>>24]]^h[x[l>>>16&255]]^y[x[l>>>8&255]]^f[x[l&255]]}}},encryptBlock:function(l,v){this._doCryptBlock(l,v,this._keySchedule,a,c,g,o,x)},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(d)}(),t.AES})})(gr);var Dr=gr.exports;const Vt=Te(Dr);class he{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=he.encryptParams(he.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}}he.axiosMultipayConfigure();class Oi extends he{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(),le.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":le.hideProgress();break;case"showProgress":le.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 fe=new Hi;class Ni extends he{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 Wi 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 me=new Ds;var Et={exports:{}},T0=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)}},$s=T0,bt=Object.prototype.toString,Bt=function(s){return function(e){var t=bt.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())}}(Object.create(null));function Ie(s){return s=s.toLowerCase(),function(t){return Bt(t)===s}}function _t(s){return Array.isArray(s)}function nt(s){return typeof s>"u"}function ks(s){return s!==null&&!nt(s)&&s.constructor!==null&&!nt(s.constructor)&&typeof s.constructor.isBuffer=="function"&&s.constructor.isBuffer(s)}var O0=Ie("ArrayBuffer");function Ps(s){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&O0(s.buffer),e}function Is(s){return typeof s=="string"}function Ss(s){return typeof s=="number"}function U0(s){return s!==null&&typeof s=="object"}function ot(s){if(Bt(s)!=="object")return!1;var e=Object.getPrototypeOf(s);return e===null||e===Object.prototype}var Rs=Ie("Date"),Ts=Ie("File"),Os=Ie("Blob"),Us=Ie("FileList");function Ct(s){return bt.call(s)==="[object Function]"}function Ns(s){return U0(s)&&Ct(s.pipe)}function Hs(s){var e="[object FormData]";return s&&(typeof FormData=="function"&&s instanceof FormData||bt.call(s)===e||Ct(s.toString)&&s.toString()===e)}var Ls=Ie("URLSearchParams");function Ws(s){return s.trim?s.trim():s.replace(/^\s+|\s+$/g,"")}function Ms(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function At(s,e){if(!(s===null||typeof s>"u"))if(typeof s!="object"&&(s=[s]),_t(s))for(var t=0,r=s.length;t<r;t++)e.call(null,s[t],t,s);else for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&e.call(null,s[i],i,s)}function wt(){var s={};function e(i,n){ot(s[n])&&ot(i)?s[n]=wt(s[n],i):ot(i)?s[n]=wt({},i):_t(i)?s[n]=i.slice():s[n]=i}for(var t=0,r=arguments.length;t<r;t++)At(arguments[t],e);return s}function qs(s,e,t){return At(e,function(i,n){t&&typeof i=="function"?s[n]=$s(i,t):s[n]=i}),s}function zs(s){return s.charCodeAt(0)===65279&&(s=s.slice(1)),s}function js(s,e,t,r){s.prototype=Object.create(e.prototype,r),s.prototype.constructor=s,t&&Object.assign(s.prototype,t)}function Ks(s,e,t){var r,i,n,p={};e=e||{};do{for(r=Object.getOwnPropertyNames(s),i=r.length;i-- >0;)n=r[i],p[n]||(e[n]=s[n],p[n]=!0);s=Object.getPrototypeOf(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e}function Gs(s,e,t){s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;var r=s.indexOf(e,t);return r!==-1&&r===t}function Xs(s){if(!s)return null;var e=s.length;if(nt(e))return null;for(var t=new Array(e);e-- >0;)t[e]=s[e];return t}var Vs=function(s){return function(e){return s&&e instanceof s}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array)),te={isArray:_t,isArrayBuffer:O0,isBuffer:ks,isFormData:Hs,isArrayBufferView:Ps,isString:Is,isNumber:Ss,isObject:U0,isPlainObject:ot,isUndefined:nt,isDate:Rs,isFile:Ts,isBlob:Os,isFunction:Ct,isStream:Ns,isURLSearchParams:Ls,isStandardBrowserEnv:Ms,forEach:At,merge:wt,extend:qs,trim:Ws,stripBOM:zs,inherits:js,toFlatObject:Ks,kindOf:Bt,kindOfTest:Ie,endsWith:Gs,toArray:Xs,isTypedArray:Vs,isFileList:Us},Ue=te;function N0(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var H0=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(Ue.isURLSearchParams(t))i=t.toString();else{var n=[];Ue.forEach(t,function(u,o){u===null||typeof u>"u"||(Ue.isArray(u)?o=o+"[]":u=[u],Ue.forEach(u,function(E){Ue.isDate(E)?E=E.toISOString():Ue.isObject(E)&&(E=JSON.stringify(E)),n.push(N0(o)+"="+N0(E))}))}),i=n.join("&")}if(i){var p=e.indexOf("#");p!==-1&&(e=e.slice(0,p)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e},Ys=te;function at(){this.handlers=[]}at.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1},at.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},at.prototype.forEach=function(e){Ys.forEach(this.handlers,function(r){r!==null&&e(r)})};var Js=at,Zs=te,Qs=function(e,t){Zs.forEach(e,function(i,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[n])})},L0=te;function Ne(s,e,t,r,i){Error.call(this),this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),i&&(this.response=i)}L0.inherits(Ne,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=Ne.prototype,M0={};["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(s){M0[s]={value:s}}),Object.defineProperties(Ne,M0),Object.defineProperty(W0,"isAxiosError",{value:!0}),Ne.from=function(s,e,t,r,i,n){var p=Object.create(W0);return L0.toFlatObject(s,p,function(u){return u!==Error.prototype}),Ne.call(p,s.message,e,t,r,i),p.name=s.name,n&&Object.assign(p,n),p};var He=Ne,q0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue=te;function ei(s,e){e=e||new FormData;var t=[];function r(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,p){if(ue.isPlainObject(n)||ue.isArray(n)){if(t.indexOf(n)!==-1)throw Error("Circular reference detected in "+p);t.push(n),ue.forEach(n,function(u,o){if(!ue.isUndefined(u)){var c=p?p+"."+o:o,E;if(u&&!p&&typeof u=="object"){if(ue.endsWith(o,"{}"))u=JSON.stringify(u);else if(ue.endsWith(o,"[]")&&(E=ue.toArray(u))){E.forEach(function(a){!ue.isUndefined(a)&&e.append(c,r(a))});return}}i(u,c)}}),t.pop()}else e.append(p,r(n))}return i(s),e}var z0=ei,Ft,j0;function ti(){if(j0)return Ft;j0=1;var s=He;return Ft=function(t,r,i){var n=i.config.validateStatus;!i.status||!n||n(i.status)?t(i):r(new s("Request failed with status code "+i.status,[s.ERR_BAD_REQUEST,s.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))},Ft}var Dt,K0;function ri(){if(K0)return Dt;K0=1;var s=te;return Dt=s.isStandardBrowserEnv()?function(){return{write:function(r,i,n,p,d,u){var o=[];o.push(r+"="+encodeURIComponent(i)),s.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),s.isString(p)&&o.push("path="+p),s.isString(d)&&o.push("domain="+d),u===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(r){var i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Dt}var si=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},ii=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},ni=si,oi=ii,G0=function(e,t){return e&&!ni(t)?oi(e,t):t},$t,X0;function ai(){if(X0)return $t;X0=1;var s=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(r){var i={},n,p,d;return r&&s.forEach(r.split(`
20
+ `),function(o){if(d=o.indexOf(":"),n=s.trim(o.substr(0,d)).toLowerCase(),p=s.trim(o.substr(d+1)),n){if(i[n]&&e.indexOf(n)>=0)return;n==="set-cookie"?i[n]=(i[n]?i[n]:[]).concat([p]):i[n]=i[n]?i[n]+", "+p:p}}),i},$t}var kt,V0;function ci(){if(V0)return kt;V0=1;var s=te;return kt=s.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function n(p){var d=p;return t&&(r.setAttribute("href",d),d=r.href),r.setAttribute("href",d),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=n(window.location.href),function(d){var u=s.isString(d)?n(d):d;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),kt}var Pt,Y0;function ct(){if(Y0)return Pt;Y0=1;var s=He,e=te;function t(r){s.call(this,r??"canceled",s.ERR_CANCELED),this.name="CanceledError"}return e.inherits(t,s,{__CANCEL__:!0}),Pt=t,Pt}var It,J0;function di(){return J0||(J0=1,It=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}),It}var St,Z0;function Q0(){if(Z0)return St;Z0=1;var s=te,e=ti(),t=ri(),r=H0,i=G0,n=ai(),p=ci(),d=q0,u=He,o=ct(),c=di();return St=function(a){return new Promise(function(f,m){var v=a.data,B=a.headers,x=a.responseType,l;function y(){a.cancelToken&&a.cancelToken.unsubscribe(l),a.signal&&a.signal.removeEventListener("abort",l)}s.isFormData(v)&&s.isStandardBrowserEnv()&&delete B["Content-Type"];var g=new XMLHttpRequest;if(a.auth){var _=a.auth.username||"",A=a.auth.password?unescape(encodeURIComponent(a.auth.password)):"";B.Authorization="Basic "+btoa(_+":"+A)}var w=i(a.baseURL,a.url);g.open(a.method.toUpperCase(),r(w,a.params,a.paramsSerializer),!0),g.timeout=a.timeout;function S(){if(g){var F="getAllResponseHeaders"in g?n(g.getAllResponseHeaders()):null,D=!x||x==="text"||x==="json"?g.responseText:g.response,R={data:D,status:g.status,statusText:g.statusText,headers:F,config:a,request:g};e(function(U){f(U),y()},function(U){m(U),y()},R),g=null}}if("onloadend"in g?g.onloadend=S:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(S)},g.onabort=function(){g&&(m(new u("Request aborted",u.ECONNABORTED,a,g)),g=null)},g.onerror=function(){m(new u("Network Error",u.ERR_NETWORK,a,g,g)),g=null},g.ontimeout=function(){var D=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",R=a.transitional||d;a.timeoutErrorMessage&&(D=a.timeoutErrorMessage),m(new u(D,R.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,a,g)),g=null},s.isStandardBrowserEnv()){var b=(a.withCredentials||p(w))&&a.xsrfCookieName?t.read(a.xsrfCookieName):void 0;b&&(B[a.xsrfHeaderName]=b)}"setRequestHeader"in g&&s.forEach(B,function(D,R){typeof v>"u"&&R.toLowerCase()==="content-type"?delete B[R]:g.setRequestHeader(R,D)}),s.isUndefined(a.withCredentials)||(g.withCredentials=!!a.withCredentials),x&&x!=="json"&&(g.responseType=a.responseType),typeof a.onDownloadProgress=="function"&&g.addEventListener("progress",a.onDownloadProgress),typeof a.onUploadProgress=="function"&&g.upload&&g.upload.addEventListener("progress",a.onUploadProgress),(a.cancelToken||a.signal)&&(l=function(F){g&&(m(!F||F&&F.type?new o:F),g.abort(),g=null)},a.cancelToken&&a.cancelToken.subscribe(l),a.signal&&(a.signal.aborted?l():a.signal.addEventListener("abort",l))),v||(v=null);var C=c(w);if(C&&["http","https","file"].indexOf(C)===-1){m(new u("Unsupported protocol "+C+":",u.ERR_BAD_REQUEST,a));return}g.send(v)})},St}var Rt,er;function xi(){return er||(er=1,Rt=null),Rt}var Q=te,tr=Qs,rr=He,li=q0,ui=z0,pi={"Content-Type":"application/x-www-form-urlencoded"};function sr(s,e){!Q.isUndefined(s)&&Q.isUndefined(s["Content-Type"])&&(s["Content-Type"]=e)}function hi(){var s;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(s=Q0()),s}function fi(s,e,t){if(Q.isString(s))try{return(e||JSON.parse)(s),Q.trim(s)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(s)}var dt={transitional:li,adapter:hi(),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 r=Q.isObject(e),i=t&&t["Content-Type"],n;if((n=Q.isFileList(e))||r&&i==="multipart/form-data"){var p=this.env&&this.env.FormData;return ui(n?{"files[]":e}:e,p&&new p)}else if(r||i==="application/json")return sr(t,"application/json"),fi(e);return e}],transformResponse:[function(e){var t=this.transitional||dt.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,n=!r&&this.responseType==="json";if(n||i&&Q.isString(e)&&e.length)try{return JSON.parse(e)}catch(p){if(n)throw p.name==="SyntaxError"?rr.from(p,rr.ERR_BAD_RESPONSE,this,null,this.response):p}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xi()},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(pi)});var Tt=dt,vi=te,yi=Tt,mi=function(e,t,r){var i=this||yi;return vi.forEach(r,function(p){e=p.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=mi,gi=nr(),Ei=Tt,bi=ct();function Nt(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new bi}var Bi=function(e){Nt(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 Nt(e),i.data=Ut.call(e,i.data,i.headers,e.transformResponse),i},function(i){return gi(i)||(Nt(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 r={};function i(c,E){return ce.isPlainObject(c)&&ce.isPlainObject(E)?ce.merge(c,E):ce.isPlainObject(E)?ce.merge({},E):ce.isArray(E)?E.slice():E}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 p(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 u(c){if(c in t)return i(e[c],t[c]);if(c in e)return i(void 0,e[c])}var o={url:p,method:p,data:p,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:u};return ce.forEach(Object.keys(e).concat(Object.keys(t)),function(E){var a=o[E]||n,h=a(E);ce.isUndefined(h)&&a!==u||(r[E]=h)}),r},Ht,cr;function dr(){return cr||(cr=1,Ht={version:"0.27.2"}),Ht}var _i=dr().version,_e=He,Lt={};["object","boolean","number","function","string","symbol"].forEach(function(s,e){Lt[s]=function(r){return typeof r===s||"a"+(e<1?"n ":" ")+s}});var xr={};Lt.transitional=function(e,t,r){function i(n,p){return"[Axios v"+_i+"] Transitional option '"+n+"'"+p+(r?". "+r:"")}return function(n,p,d){if(e===!1)throw new _e(i(p," has been removed"+(t?" in "+t:"")),_e.ERR_DEPRECATED);return t&&!xr[p]&&(xr[p]=!0,console.warn(i(p," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(n,p,d):!0}};function Ci(s,e,t){if(typeof s!="object")throw new _e("options must be an object",_e.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(s),i=r.length;i-- >0;){var n=r[i],p=e[n];if(p){var d=s[n],u=d===void 0||p(d,n,s);if(u!==!0)throw new _e("option "+n+" must be "+u,_e.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new _e("Unknown option "+n,_e.ERR_BAD_OPTION)}}var Ai={assertOptions:Ci,validators:Lt},lr=te,wi=H0,ur=Js,pr=Bi,xt=ar,Fi=G0,hr=Ai,Le=hr.validators;function We(s){this.defaults=s,this.interceptors={request:new ur,response:new ur}}We.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 r=t.transitional;r!==void 0&&hr.assertOptions(r,{silentJSONParsing:Le.transitional(Le.boolean),forcedJSONParsing:Le.transitional(Le.boolean),clarifyTimeoutError:Le.transitional(Le.boolean)},!1);var i=[],n=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(t)===!1||(n=n&&h.synchronous,i.unshift(h.fulfilled,h.rejected))});var p=[];this.interceptors.response.forEach(function(h){p.push(h.fulfilled,h.rejected)});var d;if(!n){var u=[pr,void 0];for(Array.prototype.unshift.apply(u,i),u=u.concat(p),d=Promise.resolve(t);u.length;)d=d.then(u.shift(),u.shift());return d}for(var o=t;i.length;){var c=i.shift(),E=i.shift();try{o=c(o)}catch(a){E(a);break}}try{d=pr(o)}catch(a){return Promise.reject(a)}for(;p.length;)d=d.then(p.shift(),p.shift());return d},We.prototype.getUri=function(e){e=xt(this.defaults,e);var t=Fi(e.baseURL,e.url);return wi(t,e.params,e.paramsSerializer)},lr.forEach(["delete","get","head","options"],function(e){We.prototype[e]=function(t,r){return this.request(xt(r||{},{method:e,url:t,data:(r||{}).data}))}}),lr.forEach(["post","put","patch"],function(e){function t(r){return function(n,p,d){return this.request(xt(d||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:n,data:p}))}}We.prototype[e]=t(),We.prototype[e+"Form"]=t(!0)});var Di=We,Wt,fr;function $i(){if(fr)return Wt;fr=1;var s=ct();function e(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(p){r=p});var i=this;this.promise.then(function(n){if(i._listeners){var p,d=i._listeners.length;for(p=0;p<d;p++)i._listeners[p](n);i._listeners=null}}),this.promise.then=function(n){var p,d=new Promise(function(u){i.subscribe(u),p=u}).then(n);return d.cancel=function(){i.unsubscribe(p)},d},t(function(p){i.reason||(i.reason=new s(p),r(i.reason))})}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.prototype.subscribe=function(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]},e.prototype.unsubscribe=function(r){if(this._listeners){var i=this._listeners.indexOf(r);i!==-1&&this._listeners.splice(i,1)}},e.source=function(){var r,i=new e(function(p){r=p});return{token:i,cancel:r}},Wt=e,Wt}var Mt,vr;function ki(){return vr||(vr=1,Mt=function(e){return function(r){return e.apply(null,r)}}),Mt}var qt,yr;function Pi(){if(yr)return qt;yr=1;var s=te;return qt=function(t){return s.isObject(t)&&t.isAxiosError===!0},qt}var mr=te,Ii=T0,lt=Di,Si=ar,Ri=Tt;function gr(s){var e=new lt(s),t=Ii(lt.prototype.request,e);return mr.extend(t,lt.prototype,e),mr.extend(t,e),t.create=function(i){return gr(Si(s,i))},t}var ie=gr(Ri);ie.Axios=lt,ie.CanceledError=ct(),ie.CancelToken=$i(),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=ki(),ie.isAxiosError=Pi(),Et.exports=ie,Et.exports.default=ie;var Ti=Et.exports,Oi=Ti;const Ve=Re(Oi);var Er={exports:{}},br={exports:{}};(function(s,e){(function(t,r){s.exports=r(M())})(H,function(t){return function(r){var i=t,n=i.lib,p=n.WordArray,d=n.Hasher,u=i.algo,o=[];(function(){for(var m=0;m<64;m++)o[m]=r.abs(r.sin(m+1))*4294967296|0})();var c=u.MD5=d.extend({_doReset:function(){this._hash=new p.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,v){for(var B=0;B<16;B++){var x=v+B,l=m[x];m[x]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var y=this._hash.words,g=m[v+0],_=m[v+1],A=m[v+2],w=m[v+3],S=m[v+4],b=m[v+5],C=m[v+6],F=m[v+7],D=m[v+8],R=m[v+9],O=m[v+10],U=m[v+11],Y=m[v+12],j=m[v+13],X=m[v+14],K=m[v+15],$=y[0],P=y[1],I=y[2],k=y[3];$=E($,P,I,k,g,7,o[0]),k=E(k,$,P,I,_,12,o[1]),I=E(I,k,$,P,A,17,o[2]),P=E(P,I,k,$,w,22,o[3]),$=E($,P,I,k,S,7,o[4]),k=E(k,$,P,I,b,12,o[5]),I=E(I,k,$,P,C,17,o[6]),P=E(P,I,k,$,F,22,o[7]),$=E($,P,I,k,D,7,o[8]),k=E(k,$,P,I,R,12,o[9]),I=E(I,k,$,P,O,17,o[10]),P=E(P,I,k,$,U,22,o[11]),$=E($,P,I,k,Y,7,o[12]),k=E(k,$,P,I,j,12,o[13]),I=E(I,k,$,P,X,17,o[14]),P=E(P,I,k,$,K,22,o[15]),$=a($,P,I,k,_,5,o[16]),k=a(k,$,P,I,C,9,o[17]),I=a(I,k,$,P,U,14,o[18]),P=a(P,I,k,$,g,20,o[19]),$=a($,P,I,k,b,5,o[20]),k=a(k,$,P,I,O,9,o[21]),I=a(I,k,$,P,K,14,o[22]),P=a(P,I,k,$,S,20,o[23]),$=a($,P,I,k,R,5,o[24]),k=a(k,$,P,I,X,9,o[25]),I=a(I,k,$,P,w,14,o[26]),P=a(P,I,k,$,D,20,o[27]),$=a($,P,I,k,j,5,o[28]),k=a(k,$,P,I,A,9,o[29]),I=a(I,k,$,P,F,14,o[30]),P=a(P,I,k,$,Y,20,o[31]),$=h($,P,I,k,b,4,o[32]),k=h(k,$,P,I,D,11,o[33]),I=h(I,k,$,P,U,16,o[34]),P=h(P,I,k,$,X,23,o[35]),$=h($,P,I,k,_,4,o[36]),k=h(k,$,P,I,S,11,o[37]),I=h(I,k,$,P,F,16,o[38]),P=h(P,I,k,$,O,23,o[39]),$=h($,P,I,k,j,4,o[40]),k=h(k,$,P,I,g,11,o[41]),I=h(I,k,$,P,w,16,o[42]),P=h(P,I,k,$,C,23,o[43]),$=h($,P,I,k,R,4,o[44]),k=h(k,$,P,I,Y,11,o[45]),I=h(I,k,$,P,K,16,o[46]),P=h(P,I,k,$,A,23,o[47]),$=f($,P,I,k,g,6,o[48]),k=f(k,$,P,I,F,10,o[49]),I=f(I,k,$,P,X,15,o[50]),P=f(P,I,k,$,b,21,o[51]),$=f($,P,I,k,Y,6,o[52]),k=f(k,$,P,I,w,10,o[53]),I=f(I,k,$,P,O,15,o[54]),P=f(P,I,k,$,_,21,o[55]),$=f($,P,I,k,D,6,o[56]),k=f(k,$,P,I,K,10,o[57]),I=f(I,k,$,P,C,15,o[58]),P=f(P,I,k,$,j,21,o[59]),$=f($,P,I,k,S,6,o[60]),k=f(k,$,P,I,U,10,o[61]),I=f(I,k,$,P,A,15,o[62]),P=f(P,I,k,$,R,21,o[63]),y[0]=y[0]+$|0,y[1]=y[1]+P|0,y[2]=y[2]+I|0,y[3]=y[3]+k|0},_doFinalize:function(){var m=this._data,v=m.words,B=this._nDataBytes*8,x=m.sigBytes*8;v[x>>>5]|=128<<24-x%32;var l=r.floor(B/4294967296),y=B;v[(x+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,v[(x+64>>>9<<4)+14]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,m.sigBytes=(v.length+1)*4,this._process();for(var g=this._hash,_=g.words,A=0;A<4;A++){var w=_[A];_[A]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return g},clone:function(){var m=d.clone.call(this);return m._hash=this._hash.clone(),m}});function E(m,v,B,x,l,y,g){var _=m+(v&B|~v&x)+l+g;return(_<<y|_>>>32-y)+v}function a(m,v,B,x,l,y,g){var _=m+(v&x|B&~x)+l+g;return(_<<y|_>>>32-y)+v}function h(m,v,B,x,l,y,g){var _=m+(v^B^x)+l+g;return(_<<y|_>>>32-y)+v}function f(m,v,B,x,l,y,g){var _=m+(B^(v|~x))+l+g;return(_<<y|_>>>32-y)+v}i.MD5=d._createHelper(c),i.HmacMD5=d._createHmacHelper(c)}(Math),t.MD5})})(br);var Ce=br.exports;const Br=Re(Ce);var zt={exports:{}},jt={exports:{}},_r;function Cr(){return _r||(_r=1,function(s,e){(function(t,r){s.exports=r(M())})(H,function(t){return function(){var r=t,i=r.lib,n=i.WordArray,p=i.Hasher,d=r.algo,u=[],o=d.SHA1=p.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,E){for(var a=this._hash.words,h=a[0],f=a[1],m=a[2],v=a[3],B=a[4],x=0;x<80;x++){if(x<16)u[x]=c[E+x]|0;else{var l=u[x-3]^u[x-8]^u[x-14]^u[x-16];u[x]=l<<1|l>>>31}var y=(h<<5|h>>>27)+B+u[x];x<20?y+=(f&m|~f&v)+1518500249:x<40?y+=(f^m^v)+1859775393:x<60?y+=(f&m|f&v|m&v)-1894007588:y+=(f^m^v)-899497514,B=v,v=m,m=f<<30|f>>>2,f=h,h=y}a[0]=a[0]+h|0,a[1]=a[1]+f|0,a[2]=a[2]+m|0,a[3]=a[3]+v|0,a[4]=a[4]+B|0},_doFinalize:function(){var c=this._data,E=c.words,a=this._nDataBytes*8,h=c.sigBytes*8;return E[h>>>5]|=128<<24-h%32,E[(h+64>>>9<<4)+14]=Math.floor(a/4294967296),E[(h+64>>>9<<4)+15]=a,c.sigBytes=E.length*4,this._process(),this._hash},clone:function(){var c=p.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=p._createHelper(o),r.HmacSHA1=p._createHmacHelper(o)}(),t.SHA1})}(jt)),jt.exports}var Kt={exports:{}},Ar;function Gt(){return Ar||(Ar=1,function(s,e){(function(t,r){s.exports=r(M())})(H,function(t){(function(){var r=t,i=r.lib,n=i.Base,p=r.enc,d=p.Utf8,u=r.algo;u.HMAC=n.extend({init:function(o,c){o=this._hasher=new o.init,typeof c=="string"&&(c=d.parse(c));var E=o.blockSize,a=E*4;c.sigBytes>a&&(c=o.finalize(c)),c.clamp();for(var h=this._oKey=c.clone(),f=this._iKey=c.clone(),m=h.words,v=f.words,B=0;B<E;B++)m[B]^=1549556828,v[B]^=909522486;h.sigBytes=f.sigBytes=a,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var c=this._hasher,E=c.finalize(o);c.reset();var a=c.finalize(this._oKey.clone().concat(E));return a}})})()})}(Kt)),Kt.exports}var wr;function Ae(){return wr||(wr=1,function(s,e){(function(t,r,i){s.exports=r(M(),Cr(),Gt())})(H,function(t){return function(){var r=t,i=r.lib,n=i.Base,p=i.WordArray,d=r.algo,u=d.MD5,o=d.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:u,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,E){for(var a,h=this.cfg,f=h.hasher.create(),m=p.create(),v=m.words,B=h.keySize,x=h.iterations;v.length<B;){a&&f.update(a),a=f.update(c).finalize(E),f.reset();for(var l=1;l<x;l++)a=f.finalize(a),f.reset();m.concat(a)}return m.sigBytes=B*4,m}});r.EvpKDF=function(c,E,a){return o.create(a).compute(c,E)}}(),t.EvpKDF})}(zt)),zt.exports}var Xt={exports:{}},Fr;function ee(){return Fr||(Fr=1,function(s,e){(function(t,r,i){s.exports=r(M(),Ae())})(H,function(t){t.lib.Cipher||function(r){var i=t,n=i.lib,p=n.Base,d=n.WordArray,u=n.BufferedBlockAlgorithm,o=i.enc;o.Utf8;var c=o.Base64,E=i.algo,a=E.EvpKDF,h=n.Cipher=u.extend({cfg:p.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(){u.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"?S:_}return function(C){return{encrypt:function(F,D,R){return b(D).encrypt(C,F,D,R)},decrypt:function(F,D,R){return b(D).decrypt(C,F,D,R)}}}}()});n.StreamCipher=h.extend({_doFinalize:function(){var b=this._process(!0);return b},blockSize:1});var f=i.mode={},m=n.BlockCipherMode=p.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}}),v=f.CBC=function(){var b=m.extend();b.Encryptor=b.extend({processBlock:function(F,D){var R=this._cipher,O=R.blockSize;C.call(this,F,D,O),R.encryptBlock(F,D),this._prevBlock=F.slice(D,D+O)}}),b.Decryptor=b.extend({processBlock:function(F,D){var R=this._cipher,O=R.blockSize,U=F.slice(D,D+O);R.decryptBlock(F,D),C.call(this,F,D,O),this._prevBlock=U}});function C(F,D,R){var O,U=this._iv;U?(O=U,this._iv=r):O=this._prevBlock;for(var Y=0;Y<R;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,R=D<<24|D<<16|D<<8|D,O=[],U=0;U<D;U+=4)O.push(R);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=h.extend({cfg:h.cfg.extend({mode:v,padding:x}),reset:function(){var b;h.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=p.extend({init:function(b){this.mixIn(b)},toString:function(b){return(b||this.formatter).stringify(this)}}),y=i.format={},g=y.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=p.extend({cfg:p.extend({format:g}),encrypt:function(b,C,F,D){D=this.cfg.extend(D);var R=b.createEncryptor(F,D),O=R.finalize(C),U=R.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 R=b.createDecryptor(F,D).finalize(C.ciphertext);return R},_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,R){if(D||(D=d.random(64/8)),R)var O=a.create({keySize:C+F,hasher:R}).compute(b,D);else var O=a.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})}},S=n.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:w}),encrypt:function(b,C,F,D){D=this.cfg.extend(D);var R=D.kdf.execute(F,b.keySize,b.ivSize,D.salt,D.hasher);D.iv=R.iv;var O=_.encrypt.call(this,b,C,R.key,D);return O.mixIn(R),O},decrypt:function(b,C,F,D){D=this.cfg.extend(D),C=this._parse(C,D.format);var R=D.kdf.execute(F,b.keySize,b.ivSize,C.salt,D.hasher);D.iv=R.iv;var O=_.decrypt.call(this,b,C,R.key,D);return O}})}()})}(Xt)),Xt.exports}(function(s,e){(function(t,r,i){s.exports=r(M(),Be,Ce,Ae(),ee())})(H,function(t){return function(){var r=t,i=r.lib,n=i.BlockCipher,p=r.algo,d=[],u=[],o=[],c=[],E=[],a=[],h=[],f=[],m=[],v=[];(function(){for(var l=[],y=0;y<256;y++)y<128?l[y]=y<<1:l[y]=y<<1^283;for(var g=0,_=0,y=0;y<256;y++){var A=_^_<<1^_<<2^_<<3^_<<4;A=A>>>8^A&255^99,d[g]=A,u[A]=g;var w=l[g],S=l[w],b=l[S],C=l[A]*257^A*16843008;o[g]=C<<24|C>>>8,c[g]=C<<16|C>>>16,E[g]=C<<8|C>>>24,a[g]=C;var C=b*16843009^S*65537^w*257^g*16843008;h[A]=C<<24|C>>>8,f[A]=C<<16|C>>>16,m[A]=C<<8|C>>>24,v[A]=C,g?(g=w^l[l[l[b^w]]],_^=l[l[_]]):g=_=1}})();var B=[0,1,2,4,8,16,32,64,128,27,54],x=p.AES=n.extend({_doReset:function(){var l;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var y=this._keyPriorReset=this._key,g=y.words,_=y.sigBytes/4,A=this._nRounds=_+6,w=(A+1)*4,S=this._keySchedule=[],b=0;b<w;b++)b<_?S[b]=g[b]:(l=S[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),S[b]=S[b-_]^l);for(var C=this._invKeySchedule=[],F=0;F<w;F++){var b=w-F;if(F%4)var l=S[b];else var l=S[b-4];F<4||b<=4?C[F]=l:C[F]=h[d[l>>>24]]^f[d[l>>>16&255]]^m[d[l>>>8&255]]^v[d[l&255]]}}},encryptBlock:function(l,y){this._doCryptBlock(l,y,this._keySchedule,o,c,E,a,d)},decryptBlock:function(l,y){var g=l[y+1];l[y+1]=l[y+3],l[y+3]=g,this._doCryptBlock(l,y,this._invKeySchedule,h,f,m,v,u);var g=l[y+1];l[y+1]=l[y+3],l[y+3]=g},_doCryptBlock:function(l,y,g,_,A,w,S,b){for(var C=this._nRounds,F=l[y]^g[0],D=l[y+1]^g[1],R=l[y+2]^g[2],O=l[y+3]^g[3],U=4,Y=1;Y<C;Y++){var j=_[F>>>24]^A[D>>>16&255]^w[R>>>8&255]^S[O&255]^g[U++],X=_[D>>>24]^A[R>>>16&255]^w[O>>>8&255]^S[F&255]^g[U++],K=_[R>>>24]^A[O>>>16&255]^w[F>>>8&255]^S[D&255]^g[U++],$=_[O>>>24]^A[F>>>16&255]^w[D>>>8&255]^S[R&255]^g[U++];F=j,D=X,R=K,O=$}var j=(b[F>>>24]<<24|b[D>>>16&255]<<16|b[R>>>8&255]<<8|b[O&255])^g[U++],X=(b[D>>>24]<<24|b[R>>>16&255]<<16|b[O>>>8&255]<<8|b[F&255])^g[U++],K=(b[R>>>24]<<24|b[O>>>16&255]<<16|b[F>>>8&255]<<8|b[D&255])^g[U++],$=(b[O>>>24]<<24|b[F>>>16&255]<<16|b[D>>>8&255]<<8|b[R&255])^g[U++];l[y]=j,l[y+1]=X,l[y+2]=K,l[y+3]=$},keySize:256/32});r.AES=n._createHelper(x)}(),t.AES})})(Er);var Dr=Er.exports;const Vt=Re(Dr);class pe{constructor(){this.$http=Ve.create({timeout:6e4})}static encryptParams(e){je(e,"object")&&(e=JSON.stringify(e));let t=Vt.encrypt(e,k0());return{payload:t.ciphertext.toString(Te),token:`${t.key.toString(Te)}##${t.iv.toString(Te)}`}}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(r=>{let i={};Object.keys(r).forEach(n=>{i[this.toUnderscore(n)]=r[n]}),t.push(i)})):(t={},Object.keys(e).forEach(r=>{t[this.toUnderscore(r)]=e[r]}))),t}static objectKeyToCamel(e){let t;return q(e)&&(Array.isArray(e)?(t=[],e.forEach(r=>{let i={};Object.keys(r).forEach(n=>{i[this.toCamelcase(n)]=r[n]}),t.push(i)})):(t={},Object.keys(e).forEach(r=>{je(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 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 Ui extends pe{constructor(){super()}async pollingStatus(e,t,r,i){try{const n=await this.$http.get([e,"s",t].join("/"),{params:{application_id:r,tk:i}});return Promise.resolve(n)}catch(n){return Promise.reject(n)}}}const Ni=new Ui;class Hi extends Oe{constructor(){super(),this.$messageEventName="message.BootpayPaymentEvent",this.$eventPrefix="bootpay",this.$pollingInterval=void 0,this.resetPollingData(),this.$pollingEvent=Ni,this.pollingInterval=3e3,this.isDone=!1}bind(e,t){this.isDone=!1,this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,r=>{const i=this.parseEvent(r.data);if(N.debug("event received",JSON.stringify(i)),q(i))switch(N.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"?L.setConfirmRedirect(n):L.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":L.destroy(!1),location.href=i.url;return;case"moveRedirectUrl":L.closePopup(),L.hidePaymentiFrame(),L.showProgress("결제 진행 중입니다. 잠시만 기다려주세요."),location.replace(bs(i.url,i.parameters)),setTimeout(()=>{L.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":L.createPopupButton({gatewayUrl:i.url,receiptId:i.receipt_id,name:i.name,price:i.price});break;case"close":L.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":L.showProgress(e.message);break}}handleStyleUpdate(e){switch(e.event){case"iFrameStyle":L.iFrameSetStyle(e.styles);break;case"windowStyle":L.windowStyle(e.styles);break;case"resize":L.iFrameResize(e.resizeData);break}}handleVisibilityUpdate(e){switch(e.event){case"hidePayment":L.closePopup(),L.hidePaymentiFrame();break;case"showPayment":L.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(N.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 Li 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,N.debug("send event",`${JSON.stringify(e)} 전송됨`),this.$http.post(T.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(T.toApi(`close/${this.$receiptId}`))}catch(e){return Promise.reject(e)}else return N.debug("receipt_id","undefined receipt_id"),Promise.resolve()}}const Ye=new Li,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:(s,e)=>{const r=s.split(".").reduce((i,n)=>i[n],Yt);return q(r)&&q(r[e])?r[e]:r.ko}};class Wi extends ge{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=T,this.$template=this.template()}template(){return`
21
21
  <div id="${this.$windowId}" class="bootpay-payment-background">
22
- <div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$paymentWindowId}">
22
+ <div class="bootpay-payment-window ${T.isMobile()?"__mobile":""}" id="${this.$paymentWindowId}">
23
23
  <button class="bootpay-close-btn" id="${this.$closeButton}" style="display: none;" onclick="Bootpay.dismiss()"></button>
24
24
  <form id="${this.$formId}" method="POST">
25
25
  </form>
26
26
  <iframe id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
27
27
  <div class="bootpay-popup-window" id="${this.$popupWindow}">
28
28
  <div class="header">
29
- <button class="bootpay-close-btn" onclick="Bootpay.dismiss(true)"></button>
29
+ <button type="button" class="bootpay-close-btn" aria-label="close" onclick="Bootpay.dismiss(true)"></button>
30
30
  </div>
31
31
  <div class="body">
32
32
  <h5 id="${this.$popupItemNameId}"></h5>
33
33
  <p class="price" id="${this.$popupPriceId}"></p>
34
- <div class="agree-text">${this.message("popupMessage.message")}</div>
34
+ <div class="agree-text">
35
+ <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>
36
+ <span>${this.message("popupMessage.message")}</span>
37
+ </div>
35
38
  </div>
36
39
  <div class="footer">
37
- <button class="bootpay-button" onclick="Bootpay.readyToPopup()">
40
+ <button type="button" class="bootpay-button" onclick="Bootpay.readyToPopup()">
38
41
  ${this.message("popupMessage.button")}
39
42
  </button>
40
43
  </div>
41
44
  </div>
42
45
  </div>
43
- <div class="bootpay-confirm-window">
46
+ <div class="bootpay-confirm-form">
44
47
  <form id="${this.$confirmFormId}" method="POST">
45
48
  <input type="hidden" name="_method" value="put" />
46
49
  </form>
47
50
  <iframe id="${this.$confirmIFrame}" name="${this.$confirmIFrame}" style="height:0; width: 0; border: 0; outline: 0;" frameborder="0"></iframe>
48
51
  </div>
49
52
  </div>
50
- `}templateReload(){H.debug("template reload","template reload!"),this.$template=this.template()}async start(e,t="PAYMENT"){return new Promise((s,i)=>{this.initializePayment(t,s,i,e.application_id,e.tk),this.createTemplateHtml(),this.bodyOpen(),le.showProgress(this.message("startProgress"));const n=he.encryptParams(he.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)=>{fe.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),le.showProgress(this.message("startProgress")),this.createTemplateHtml(),this.bodyOpen(),this.setupFormForUrl(e),this.byId(this.$formId).submit()})}createPopupButton(e){le.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,fe.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"),le.hideProgress(),this.closePopup(),fe.allClearEvent(),Ye.clearInstance(),e&&setTimeout(()=>fe.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]}setupForm(e,t){const s=this.byId(this.$formId);s.innerHTML=`
53
+ `}templateReload(){N.debug("template reload","template reload!"),this.$template=this.template()}async start(e,t="PAYMENT"){return new Promise((r,i)=>{var d,u;this.initializePayment(t,r,i,e.application_id,e.tk),this.$themeColor=((d=e.extra)==null?void 0:d.theme_color)??((u=e.extra)==null?void 0:u.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 p=this.byId(this.$formId);this.$present(e.extra)&&e.extra.popup,p.target=this.$iFrameId,p.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)=>{he.bind(e,t);const r=this.byId(this.$confirmFormId);if(this.$blank(r.action))throw new ae({event:"error",error_code:"RC_CONFIRM_READY_NOT_YET",message:this.message("confirmNotYet")});r.submit()})}async startPaymentUrl(e,t="PAYMENT"){return new Promise((r,i)=>{this.initializePayment(t,r,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(r){N.debug("popup",Xe(r))}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),N.debug("close popup","clear popup interval")}catch(e){N.info("clear popup watcher",Xe(e))}if(this.$popup!==void 0&&!this.$popup.closed)try{this.$popup.close(),N.debug("close popup","close popup instance")}catch(e){N.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";T.isMobileSafari()&&(e="pagehide.BootpayReloadWatcher"),window.resetBootpayEventListener(e,()=>{if(this.$popup!==void 0&&!this.$popup.closed)try{this.$popup.close()}catch(t){N.info("popup destroy",Xe(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),i=this.byId(this.$popupPriceId);if(t!==void 0&&(this.applyPopupThemeColor(t),t.style.setProperty("display","block")),r!==void 0&&(r.innerText=e.name),i!==void 0){const n=String(e.price??""),p=n.match(/\d[\d,]*(\.\d+)?/);if(p!==null&&parseFloat(p[0].replace(/,/g,""))>0){const[d,u]=p[0].replace(/,/g,"").split("."),o=d.replace(/\B(?=(\d{3})+(?!\d))/g,",")+(u!==void 0?`.${u}`:"");i.innerText=n.replace(p[0],o)}else i.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(o=>e.style.removeProperty(o));return}const[i,n,p]=t,d=this.relativeLuminance(i,n,p)>.4,u=o=>`rgb(${[i,n,p].map(c=>Math.round(c*o+26*(1-o))).join(", ")})`;e.style.setProperty("--bootpay-popup-accent",`rgb(${i}, ${n}, ${p})`),e.style.setProperty("--bootpay-popup-accent-hover",u(.88)),e.style.setProperty("--bootpay-popup-accent-soft",`rgba(${i}, ${n}, ${p}, 0.1)`),e.style.setProperty("--bootpay-popup-accent-text",u(d?.45:.7)),e.style.setProperty("--bootpay-popup-on-accent",d?"#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[i,n,p]=[e,t,r].map(d=>{const u=d/255;return u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4)});return .2126*i+.7152*n+.0722*p}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 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){N.debug("change style",e);const t=this.byId(this.$iFrameId);this.safeApplyStyles(t,e,"iframe style")}windowStyle(e){N.debug("change style",e);const t=this.byId(this.$paymentWindowId);this.safeApplyStyles(t,e,"window style")}safeApplyStyles(e,t,r){for(let i in t)try{N.debug(i,t[i]),e.style.setProperty(i,t[i])}catch(n){N.warn(r,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}`,T.locale)}moveToUrl(e){const t=this.byId(this.$iFrameId);this.hidePaymentiFrame(),t.removeAttribute("style"),this.iFrameResize({width:T.isMobile()?"100%":400,height:T.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 r=this.$themeColor;if(typeof r=="string"&&CSS.supports("color",r)){const i=CSS.supports("color","color-mix(in srgb, red 50%, transparent)");t.style.setProperty("--bootpay-progress-accent",r),t.style.setProperty("--bootpay-progress-accent-light",i?`color-mix(in srgb, ${r} 50%, transparent)`:r),t.style.setProperty("--bootpay-progress-accent-glow",i?`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
54
  <input type="hidden" name="payload" value="${e.payload}" />
52
55
  <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(),fe.clearPollingEvent(),fe.bind(t,s),i&&n&&fe.setDefaultPaymentData(i,n)}}const M=new Wi,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}),le.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){le.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 Mi=new Je;class Li extends he{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:Mi,$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(le.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)}fe.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,x=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 x.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,x=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)};x.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=x(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]|=x(p.charCodeAt(g)<<16-g%2*16);return n.create(c,a*2)}};function x(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,d=y<<16|f<<8|b,l=0;l<4&&h+l*.75<g;l++)u.push(o.charAt(d>>>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 x(p,c,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function x(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,x=n.Hasher,p=i.algo,a=[],c=[];(function(){function u(b){for(var d=s.sqrt(b),l=2;l<=d;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=x.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],d=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&d^b&d,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=d,d=b,b=f,f=Y+j|0}y[0]=y[0]+f|0,y[1]=y[1]+b|0,y[2]=y[2]+d|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=x.clone.call(this);return u._hash=this._hash.clone(),u}});i.SHA256=x._createHelper(o),i.HmacSHA256=x._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,x=m.SHA256,p=m.SHA224=x.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=x._doFinalize.call(this);return a.sigBytes-=4,a}});s.SHA224=x._createHelper(p),s.HmacSHA224=x._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,x=m.Word,p=m.WordArray,a=s.algo;function c(){return x.create.apply(x,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 x.init(1779033703,4089235720),new x.init(3144134277,2227873595),new x.init(1013904242,4271175723),new x.init(2773480762,1595750129),new x.init(1359893119,2917565137),new x.init(2600822924,725511199),new x.init(528734635,4215389547),new x.init(1541459225,327033209)])},_doProcessBlock:function(h,y){for(var f=this._hash.words,b=f[0],d=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=d.high,F=d.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,Me=T,D0=O,Qe=U,ve=Y,de=j,ft=X,et=K,vt=$,tt=P,$0=S,rt=k,ye=0;ye<80;ye++){var ue,Fe,yt=o[ye];if(ye<16)Fe=yt.high=h[y+ye*2]|0,ue=yt.low=h[y+ye*2+1]|0;else{var cs=o[ye-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[ye-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[ye-7],On=us.high,Un=us.low,ps=o[ye-16],Hn=ps.high,hs=ps.low;ue=ds+Un,Fe=Tn+On+(ue>>>0<ds>>>0?1:0),ue=ue+ls,Fe=Fe+Rn+(ue>>>0<ls>>>0?1:0),ue=ue+hs,Fe=Fe+Hn+(ue>>>0<hs>>>0?1:0),yt.high=Fe,yt.low=ue}var Nn=ve&ft^~ve&vt,fs=de&et^~de&tt,Wn=J&oe^J&Ze^oe&Ze,Mn=V&W^V&Me^W&Me,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=(ve>>>14|de<<18)^(ve>>>18|de<<14)^(ve<<23|de>>>9),zn=(de>>>14|ve<<18)^(de>>>18|ve<<14)^(de<<23|ve>>>9),ys=g[ye],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+ue,De=De+Fe+(xe>>>0<ue>>>0?1:0),Es=vs+Mn,Kn=Ln+Wn+(Es>>>0<vs>>>0?1:0);$0=vt,rt=tt,vt=ft,tt=et,ft=ve,et=de,de=Qe+xe|0,ve=D0+De+(de>>>0<Qe>>>0?1:0)|0,D0=Ze,Qe=Me,Ze=oe,Me=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=d.low=F+W,d.high=C+oe+(F>>>0<W>>>0?1:0),T=l.low=T+Me,l.high=D+Ze+(T>>>0<Me>>>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+ve+(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 d=this._hash.toX32();return d},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,x=s.algo,p=x.SHA512,a=x.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,x=n.Hasher,p=i.x64,a=p.Word,c=i.algo,g=[],o=[],u=[];(function(){for(var f=1,b=0,d=0;d<24;d++){g[f+5*b]=(d+1)*(d+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=x.extend({cfg:x.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 d=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=d[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=d[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=d[I+5*F];A.high^=B,A.low^=C}for(var j=1;j<25;j++){var B,C,A=d[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=d[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=d[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=d[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 d=f.sigBytes*8,l=this.blockSize*32;b[d>>>5]|=1<<24-d%32,b[(s.ceil((d+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=x.clone.call(this),b=f._state=this._state.slice(0),d=0;d<25;d++)b[d]=b[d].clone();return f}});i.SHA3=x._createHelper(y),i.HmacSHA3=x._createHmacHelper(y)}(Math),t.SHA3})}(o0)),o0.exports}var a0={exports:{}},Wr;function Ji(){return Wr||(Wr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){/** @preserve
56
+ `,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,i,n){this.mode=e,this.templateReload(),he.clearPollingEvent(),he.bind(t,r),i&&n&&he.setDefaultPaymentData(i,n)}}const L=new Wi,we=class we extends Ke{constructor(){super(),this.$session=$e,this.$logger=N,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&&!T.isSetLocale&&T.setLocale(e.extra.locale),this.$event.clearInstance(),this.generateTransactionKey(),e.application_id=e.client_key===void 0?T.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=T.packageVersion,e.sdk_version=T.sdkVersion,e.sdk_type=T.sdkName,e.locale=T.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 r=await L.start(e);return N.debug("confirm ready",r),L.hidePaymentiFrame(),L.closePopup(),["done","issued"].indexOf(r.event)===-1&&this.$event.send({step:r.event,msg:"",request:e,response:r}),L.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 L.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}),me.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):L.destroy()}eventError(e){me.hideProgress(),L.closePopup(),this.isDisplayErrorResult()&&e.event==="error"?this.displayResultErrorView(e):L.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:T.packageVersion,sdk_version:T.sdkVersion,sdk_type:T.sdkName,locale:T.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 L.start(t,"CARD_SUBSCRIPTION");switch(N.debug("subscription success",r),this.$event.send({step:"confirm",msg:"결제승인전",request:{},response:r}),L.hidePaymentiFrame(),L.closePopup(),r.event){case"done":case"issued":break;case"confirm":L.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:ke.version,sdk_version:T.sdkVersion,sdk_type:T.sdkName,locale:T.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 L.start(t,"AUTH");switch(N.debug("authentication success",r),this.$event.send({step:"confirm",msg:"본인인증 승인전",request:{},response:r}),L.hidePaymentiFrame(),L.closePopup(),r.event){case"done":case"issued":break;case"confirm":L.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 L.startPaymentUrl(e.url);return["done","issued"].indexOf(t.event)===-1&&this.$event.send({step:t.event,msg:"",request:{url:e.url},response:t}),L.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){L.moveToUrl(T.toWidget(`payment/result/${e}`))}displayResultErrorView(e){L.moveToUrl(T.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 i=e.browser_open_type[r],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 r=e[t];if(se(r))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 r=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)),r+=e[n].price*e[n].qty}),r!==t)throw new ae({event:"error",error_code:"NEED_ITEM_TOTAL_PRICE_NOT_MATCH",message:`결제 금액과 상품 수량 및 상품 금액의 총합과 일치하지 않습니다. [ 요청금액: ${t} ${typeof t}, 상품 총합계 금액: ${r} ${typeof r} ]`})}}};we.invalidRequestParams={order_name:"판매할 상품명을 입력해주세요. [ key: order_name ]",price:"판매할 상품의 금액을 입력해주세요. [ key: price ]",order_id:"가맹점에서 설정할 주문 ID를 입력해주세요. [ key: order_id ]"};let Je=we;const Mi=new Je;class qi 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 r=this.$session.getUser();e.application_id=T.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=r===void 0||se(r)?void 0:r.id,e.items=this.generateItemKeyToVersion1(e.items);try{const i=await this.$http.post(T.toAnalytics(`call?ver=${ke.version}`),e);return i.data.status===200?(N.info("Analytics Common Send","통계 데이터가 전송되었습니다."),Promise.resolve()):(N.warn("Analytics Common Send",`통계 데이터가 전송 실패. ${JSON.stringify(i.data)}`),Promise.reject())}catch(i){return N.error("Analytics Common Error",`데이터 전송 실패: ${i.message}`),Promise.reject()}}}async login(e){if(e.application_id=T.currentApplicationId(e.application_id),se(e.application_id))return N.error("Analytics Params","application_id 값을 입력해주세요.");if(se(e.id))return N.error("Analytics Params","id 값을 입력해주세요.");try{const t=await this.$http.post(T.toAnalytics(`login?ver=${ke.version}`),e),{user_id:r}=t.data.data;return this.$session.setUser({id:r,time:new Date().getTime()}),Promise.resolve()}catch(t){return N.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 zi=new qi;class ji extends Oe{constructor(){super(),this.$messageEventName="message.BootpayOnboardingEvent"}bindOnboarding(e,t,r,i){window.resetBootpayEventListener(this.$messageEventName,n=>{if(n.origin!==e)return;const p=t();if(p!==null&&n.source!==p)return;const d=this.parseEvent(n.data);if(q(d))switch(d.event){case"done":return r({event:"done",id:d.id,kind:d.kind,pg_wait_id:d.pg_wait_id,status:d.status});case"cancel":return i();default:return}})}unbind(){window.removeBootpayEventListener(this.$messageEventName)}}const Ki=["popup","iframe","redirect"],$r="rst_";class Gi extends ge{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 ji}template(){return`
57
+ <div id="${this.$windowId}" class="bootpay-payment-background">
58
+ <div class="bootpay-payment-window" id="${this.$onboardingWindowId}">
59
+ <iframe id="${this.$iFrameId}" name="${this.$iFrameId}" title="PG 신청" frameborder="0"
60
+ style="display: block; width: min(960px, calc(100vw - 32px)); height: 90vh; border: 0; background: #ffffff;"></iframe>
61
+ </div>
62
+ </div>
63
+ `}onboardingUrl(e,t){const r=String((e==null?void 0:e.token)??"").trim();if(r.indexOf($r)!==0||r.length<=$r.length)throw{event:"error",error_code:"ONBOARDING_TOKEN_REQUIRED",message:"등록 폼 토큰(rst_…)을 넣어 주세요."};let i;try{i=this.$present(e.url)?new URL(String(e.url)):new URL(T.toOnboarding(`onboarding/s/${encodeURIComponent(r)}`))}catch{i=null}const n=Object.keys(T.ONBOARDING_URL).map(p=>new URL(T.ONBOARDING_URL[p]).origin);if(i===null||n.indexOf(i.origin)<0)throw{event:"error",error_code:"ONBOARDING_URL_INVALID",message:"부트페이 신청 화면 주소가 아니에요. 등록 폼 세션 발급 응답의 url 을 그대로 넣어 주세요."};return i.searchParams.set("display",t),i.searchParams.set("origin",window.location.origin),i.toString()}open(e){return new Promise((t,r)=>{const i=Ki.indexOf(e==null?void 0:e.display)>-1?e.display:"iframe";let n;try{n=this.onboardingUrl(e,i)}catch(o){return r(o)}if(this.$abortPrevious!==null&&this.$abortPrevious(),this.destroy(),i==="redirect"){window.location.href=n;return}let p=!1;const d=o=>{p||(p=!0,this.$abortPrevious=null,this.destroy(),o())};if(this.$abortPrevious=()=>d(()=>r({event:"cancel"})),this.$event.bindOnboarding(new URL(n).origin,()=>this.currentWindow(i),o=>d(()=>t(o)),()=>d(()=>r({event:"cancel"}))),i==="popup"){if(this.$popup=window.open(n,"BootpayOnboarding","width=960,height=900,scrollbars=yes,resizable=yes"),this.$popup===null||this.$popup===void 0)return p=!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)&&d(()=>r({event:"cancel"}))},500);return}this.createTemplateHtml(),this.bodyOpen(),this.byId(this.$iFrameId).setAttribute("src",n)})}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 Xi=new Gi;(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 Ee={$payment:Mi,$analytics:zi,$environment:T,async requestPayment(s){return new Promise(async(e,t)=>{try{s.extra!==void 0&&s.extra.override_global_event===!0&&(N.debug("override global event","override global event!"),Ee.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 i=await this.$payment.requestPaymentUrl(s);setTimeout(()=>{t(i),["done","issued"].indexOf(i.event)>-1&&this.$payment.eventDone(i)},100)}catch(i){setTimeout(()=>{r(this.errorHandler(i))},100)}})},requestOnboarding(s){return new Promise((e,t)=>{if(typeof window>"u")return t({event:"error",error_code:"ONBOARDING_BROWSER_ONLY",message:"브라우저에서만 열 수 있어요."});Xi.open(s).then(e).catch(r=>{try{t(this.errorHandler(r))}catch(i){t(i)}})})},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=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(s){let e;switch(me.hideProgress(),s.name){case"BootpayEventError":e=s.eventMessage;break;default:if(q(s.event))e=s;else throw s}return e},readyToPopup(){L.readyToPopup()},setLogLevel(s){N.setLogLevel(s)},setUUID(s){return $e.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){T.setLocale(s),L.templateReload()},async dismiss(s=!1){if(s)try{await Ye.sendCloseEvent()}catch(e){N.debug("error",e.message)}he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})},getCurrentUUID(){return $e.currentUserUUID()},destroy(){L.destroy()},overrideGlobalInstance(){window.Bootpay=Ee}};typeof window<"u"&&(window.Bootpay=Ee);class Vi extends Oe{constructor(){super(),this.$messageEventName="message.BootpayUserTokenEvent"}bind(e,t){this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,r=>{const i=this.parseEvent(r.data);if(q(i))switch(N.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 kr={exports:{}},Jt={exports:{}},Pr;function ut(){return Pr||(Pr=1,function(s,e){(function(t,r){s.exports=r(M())})(H,function(t){return function(r){var i=t,n=i.lib,p=n.Base,d=n.WordArray,u=i.x64={};u.Word=p.extend({init:function(o,c){this.high=o,this.low=c}}),u.WordArray=p.extend({init:function(o,c){o=this.words=o||[],c!=r?this.sigBytes=c:this.sigBytes=o.length*8},toX32:function(){for(var o=this.words,c=o.length,E=[],a=0;a<c;a++){var h=o[a];E.push(h.high),E.push(h.low)}return d.create(E,this.sigBytes)},clone:function(){for(var o=p.clone.call(this),c=o.words=this.words.slice(0),E=c.length,a=0;a<E;a++)c[a]=c[a].clone();return o}})}(),t})}(Jt)),Jt.exports}var Zt={exports:{}},Ir;function Yi(){return Ir||(Ir=1,function(s,e){(function(t,r){s.exports=r(M())})(H,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,i=r.lib,n=i.WordArray,p=n.init,d=n.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray<"u"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var o=u.byteLength,c=[],E=0;E<o;E++)c[E>>>2]|=u[E]<<24-E%4*8;p.call(this,c,o)}else p.apply(this,arguments)};d.prototype=n}}(),t.lib.WordArray})}(Zt)),Zt.exports}var Qt={exports:{}},Sr;function Ji(){return Sr||(Sr=1,function(s,e){(function(t,r){s.exports=r(M())})(H,function(t){return function(){var r=t,i=r.lib,n=i.WordArray,p=r.enc;p.Utf16=p.Utf16BE={stringify:function(u){for(var o=u.words,c=u.sigBytes,E=[],a=0;a<c;a+=2){var h=o[a>>>2]>>>16-a%4*8&65535;E.push(String.fromCharCode(h))}return E.join("")},parse:function(u){for(var o=u.length,c=[],E=0;E<o;E++)c[E>>>1]|=u.charCodeAt(E)<<16-E%2*16;return n.create(c,o*2)}},p.Utf16LE={stringify:function(u){for(var o=u.words,c=u.sigBytes,E=[],a=0;a<c;a+=2){var h=d(o[a>>>2]>>>16-a%4*8&65535);E.push(String.fromCharCode(h))}return E.join("")},parse:function(u){for(var o=u.length,c=[],E=0;E<o;E++)c[E>>>1]|=d(u.charCodeAt(E)<<16-E%2*16);return n.create(c,o*2)}};function d(u){return u<<8&4278255360|u>>>8&16711935}}(),t.enc.Utf16})}(Qt)),Qt.exports}var e0={exports:{}},Rr;function Zi(){return Rr||(Rr=1,function(s,e){(function(t,r){s.exports=r(M())})(H,function(t){return function(){var r=t,i=r.lib,n=i.WordArray,p=r.enc;p.Base64url={stringify:function(u,o){o===void 0&&(o=!0);var c=u.words,E=u.sigBytes,a=o?this._safe_map:this._map;u.clamp();for(var h=[],f=0;f<E;f+=3)for(var m=c[f>>>2]>>>24-f%4*8&255,v=c[f+1>>>2]>>>24-(f+1)%4*8&255,B=c[f+2>>>2]>>>24-(f+2)%4*8&255,x=m<<16|v<<8|B,l=0;l<4&&f+l*.75<E;l++)h.push(a.charAt(x>>>6*(3-l)&63));var y=a.charAt(64);if(y)for(;h.length%4;)h.push(y);return h.join("")},parse:function(u,o){o===void 0&&(o=!0);var c=u.length,E=o?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var h=0;h<E.length;h++)a[E.charCodeAt(h)]=h}var f=E.charAt(64);if(f){var m=u.indexOf(f);m!==-1&&(c=m)}return d(u,c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function d(u,o,c){for(var E=[],a=0,h=0;h<o;h++)if(h%4){var f=c[u.charCodeAt(h-1)]<<h%4*2,m=c[u.charCodeAt(h)]>>>6-h%4*2,v=f|m;E[a>>>2]|=v<<24-a%4*8,a++}return n.create(E,a)}}(),t.enc.Base64url})}(e0)),e0.exports}var t0={exports:{}},Tr;function r0(){return Tr||(Tr=1,function(s,e){(function(t,r){s.exports=r(M())})(H,function(t){return function(r){var i=t,n=i.lib,p=n.WordArray,d=n.Hasher,u=i.algo,o=[],c=[];(function(){function h(B){for(var x=r.sqrt(B),l=2;l<=x;l++)if(!(B%l))return!1;return!0}function f(B){return(B-(B|0))*4294967296|0}for(var m=2,v=0;v<64;)h(m)&&(v<8&&(o[v]=f(r.pow(m,1/2))),c[v]=f(r.pow(m,1/3)),v++),m++})();var E=[],a=u.SHA256=d.extend({_doReset:function(){this._hash=new p.init(o.slice(0))},_doProcessBlock:function(h,f){for(var m=this._hash.words,v=m[0],B=m[1],x=m[2],l=m[3],y=m[4],g=m[5],_=m[6],A=m[7],w=0;w<64;w++){if(w<16)E[w]=h[f+w]|0;else{var S=E[w-15],b=(S<<25|S>>>7)^(S<<14|S>>>18)^S>>>3,C=E[w-2],F=(C<<15|C>>>17)^(C<<13|C>>>19)^C>>>10;E[w]=b+E[w-7]+F+E[w-16]}var D=y&g^~y&_,R=v&B^v&x^B&x,O=(v<<30|v>>>2)^(v<<19|v>>>13)^(v<<10|v>>>22),U=(y<<26|y>>>6)^(y<<21|y>>>11)^(y<<7|y>>>25),Y=A+U+D+c[w]+E[w],j=O+R;A=_,_=g,g=y,y=l+Y|0,l=x,x=B,B=v,v=Y+j|0}m[0]=m[0]+v|0,m[1]=m[1]+B|0,m[2]=m[2]+x|0,m[3]=m[3]+l|0,m[4]=m[4]+y|0,m[5]=m[5]+g|0,m[6]=m[6]+_|0,m[7]=m[7]+A|0},_doFinalize:function(){var h=this._data,f=h.words,m=this._nDataBytes*8,v=h.sigBytes*8;return f[v>>>5]|=128<<24-v%32,f[(v+64>>>9<<4)+14]=r.floor(m/4294967296),f[(v+64>>>9<<4)+15]=m,h.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var h=d.clone.call(this);return h._hash=this._hash.clone(),h}});i.SHA256=d._createHelper(a),i.HmacSHA256=d._createHmacHelper(a)}(Math),t.SHA256})}(t0)),t0.exports}var s0={exports:{}},Or;function Qi(){return Or||(Or=1,function(s,e){(function(t,r,i){s.exports=r(M(),r0())})(H,function(t){return function(){var r=t,i=r.lib,n=i.WordArray,p=r.algo,d=p.SHA256,u=p.SHA224=d.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var o=d._doFinalize.call(this);return o.sigBytes-=4,o}});r.SHA224=d._createHelper(u),r.HmacSHA224=d._createHmacHelper(u)}(),t.SHA224})}(s0)),s0.exports}var i0={exports:{}},Ur;function Nr(){return Ur||(Ur=1,function(s,e){(function(t,r,i){s.exports=r(M(),ut())})(H,function(t){return function(){var r=t,i=r.lib,n=i.Hasher,p=r.x64,d=p.Word,u=p.WordArray,o=r.algo;function c(){return d.create.apply(d,arguments)}var E=[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)],a=[];(function(){for(var f=0;f<80;f++)a[f]=c()})();var h=o.SHA512=n.extend({_doReset:function(){this._hash=new u.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(f,m){for(var v=this._hash.words,B=v[0],x=v[1],l=v[2],y=v[3],g=v[4],_=v[5],A=v[6],w=v[7],S=B.high,b=B.low,C=x.high,F=x.low,D=l.high,R=l.low,O=y.high,U=y.low,Y=g.high,j=g.low,X=_.high,K=_.low,$=A.high,P=A.low,I=w.high,k=w.low,J=S,V=b,oe=C,W=F,Ze=D,Me=R,D0=O,Qe=U,fe=Y,de=j,ft=X,et=K,vt=$,tt=P,$0=I,rt=k,ve=0;ve<80;ve++){var le,Fe,yt=a[ve];if(ve<16)Fe=yt.high=f[m+ve*2]|0,le=yt.low=f[m+ve*2+1]|0;else{var ds=a[ve-15],qe=ds.high,st=ds.low,Hn=(qe>>>1|st<<31)^(qe>>>8|st<<24)^qe>>>7,xs=(st>>>1|qe<<31)^(st>>>8|qe<<24)^(st>>>7|qe<<25),ls=a[ve-2],ze=ls.high,it=ls.low,Ln=(ze>>>19|it<<13)^(ze<<3|it>>>29)^ze>>>6,us=(it>>>19|ze<<13)^(it<<3|ze>>>29)^(it>>>6|ze<<26),ps=a[ve-7],Wn=ps.high,Mn=ps.low,hs=a[ve-16],qn=hs.high,fs=hs.low;le=xs+Mn,Fe=Hn+Wn+(le>>>0<xs>>>0?1:0),le=le+us,Fe=Fe+Ln+(le>>>0<us>>>0?1:0),le=le+fs,Fe=Fe+qn+(le>>>0<fs>>>0?1:0),yt.high=Fe,yt.low=le}var zn=fe&ft^~fe&vt,vs=de&et^~de&tt,jn=J&oe^J&Ze^oe&Ze,Kn=V&W^V&Me^W&Me,Gn=(J>>>28|V<<4)^(J<<30|V>>>2)^(J<<25|V>>>7),ys=(V>>>28|J<<4)^(V<<30|J>>>2)^(V<<25|J>>>7),Xn=(fe>>>14|de<<18)^(fe>>>18|de<<14)^(fe<<23|de>>>9),Vn=(de>>>14|fe<<18)^(de>>>18|fe<<14)^(de<<23|fe>>>9),ms=E[ve],Yn=ms.high,gs=ms.low,xe=rt+Vn,De=$0+Xn+(xe>>>0<rt>>>0?1:0),xe=xe+vs,De=De+zn+(xe>>>0<vs>>>0?1:0),xe=xe+gs,De=De+Yn+(xe>>>0<gs>>>0?1:0),xe=xe+le,De=De+Fe+(xe>>>0<le>>>0?1:0),Es=ys+Kn,Jn=Gn+jn+(Es>>>0<ys>>>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=Me,Ze=oe,Me=W,oe=J,W=V,V=xe+Es|0,J=De+Jn+(V>>>0<xe>>>0?1:0)|0}b=B.low=b+V,B.high=S+J+(b>>>0<V>>>0?1:0),F=x.low=F+W,x.high=C+oe+(F>>>0<W>>>0?1:0),R=l.low=R+Me,l.high=D+Ze+(R>>>0<Me>>>0?1:0),U=y.low=U+Qe,y.high=O+D0+(U>>>0<Qe>>>0?1:0),j=g.low=j+de,g.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=I+$0+(k>>>0<rt>>>0?1:0)},_doFinalize:function(){var f=this._data,m=f.words,v=this._nDataBytes*8,B=f.sigBytes*8;m[B>>>5]|=128<<24-B%32,m[(B+128>>>10<<5)+30]=Math.floor(v/4294967296),m[(B+128>>>10<<5)+31]=v,f.sigBytes=m.length*4,this._process();var x=this._hash.toX32();return x},clone:function(){var f=n.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});r.SHA512=n._createHelper(h),r.HmacSHA512=n._createHmacHelper(h)}(),t.SHA512})}(i0)),i0.exports}var n0={exports:{}},Hr;function en(){return Hr||(Hr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ut(),Nr())})(H,function(t){return function(){var r=t,i=r.x64,n=i.Word,p=i.WordArray,d=r.algo,u=d.SHA512,o=d.SHA384=u.extend({_doReset:function(){this._hash=new p.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=u._doFinalize.call(this);return c.sigBytes-=16,c}});r.SHA384=u._createHelper(o),r.HmacSHA384=u._createHmacHelper(o)}(),t.SHA384})}(n0)),n0.exports}var o0={exports:{}},Lr;function tn(){return Lr||(Lr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ut())})(H,function(t){return function(r){var i=t,n=i.lib,p=n.WordArray,d=n.Hasher,u=i.x64,o=u.Word,c=i.algo,E=[],a=[],h=[];(function(){for(var v=1,B=0,x=0;x<24;x++){E[v+5*B]=(x+1)*(x+2)/2%64;var l=B%5,y=(2*v+3*B)%5;v=l,B=y}for(var v=0;v<5;v++)for(var B=0;B<5;B++)a[v+5*B]=B+(2*v+3*B)%5*5;for(var g=1,_=0;_<24;_++){for(var A=0,w=0,S=0;S<7;S++){if(g&1){var b=(1<<S)-1;b<32?w^=1<<b:A^=1<<b-32}g&128?g=g<<1^113:g<<=1}h[_]=o.create(A,w)}})();var f=[];(function(){for(var v=0;v<25;v++)f[v]=o.create()})();var m=c.SHA3=d.extend({cfg:d.cfg.extend({outputLength:512}),_doReset:function(){for(var v=this._state=[],B=0;B<25;B++)v[B]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(v,B){for(var x=this._state,l=this.blockSize/2,y=0;y<l;y++){var g=v[B+2*y],_=v[B+2*y+1];g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360;var A=x[y];A.high^=_,A.low^=g}for(var w=0;w<24;w++){for(var S=0;S<5;S++){for(var b=0,C=0,F=0;F<5;F++){var A=x[S+5*F];b^=A.high,C^=A.low}var D=f[S];D.high=b,D.low=C}for(var S=0;S<5;S++)for(var R=f[(S+4)%5],O=f[(S+1)%5],U=O.high,Y=O.low,b=R.high^(U<<1|Y>>>31),C=R.low^(Y<<1|U>>>31),F=0;F<5;F++){var A=x[S+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,$=E[j];$<32?(b=X<<$|K>>>32-$,C=K<<$|X>>>32-$):(b=K<<$-32|X>>>64-$,C=X<<$-32|K>>>64-$);var P=f[a[j]];P.high=b,P.low=C}var I=f[0],k=x[0];I.high=k.high,I.low=k.low;for(var S=0;S<5;S++)for(var F=0;F<5;F++){var j=S+5*F,A=x[j],J=f[j],V=f[(S+1)%5+5*F],oe=f[(S+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=h[w];A.high^=W.high,A.low^=W.low}},_doFinalize:function(){var v=this._data,B=v.words;this._nDataBytes*8;var x=v.sigBytes*8,l=this.blockSize*32;B[x>>>5]|=1<<24-x%32,B[(r.ceil((x+1)/l)*l>>>5)-1]|=128,v.sigBytes=B.length*4,this._process();for(var y=this._state,g=this.cfg.outputLength/8,_=g/8,A=[],w=0;w<_;w++){var S=y[w],b=S.high,C=S.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 p.init(A,g)},clone:function(){for(var v=d.clone.call(this),B=v._state=this._state.slice(0),x=0;x<25;x++)B[x]=B[x].clone();return v}});i.SHA3=d._createHelper(m),i.HmacSHA3=d._createHmacHelper(m)}(Math),t.SHA3})}(o0)),o0.exports}var a0={exports:{}},Wr;function rn(){return Wr||(Wr=1,function(s,e){(function(t,r){s.exports=r(M())})(H,function(t){/** @preserve
54
64
  (c) 2012 by Cédric Mesnil. All rights reserved.
55
65
 
56
66
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -59,47 +69,61 @@
59
69
  - 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
70
 
61
71
  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,x=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=x.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+=d(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+=d(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 _=x.clone.call(this);return _._hash=this._hash.clone(),_}});function f(_,A,w){return _^A^w}function b(_,A,w){return _&A|~_&w}function d(_,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=x._createHelper(y),i.HmacRIPEMD160=x._createHmacHelper(y)}(),t.RIPEMD160})}(a0)),a0.exports}var c0={exports:{}},Mr;function Zi(){return Mr||(Mr=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,x=s.algo,p=x.SHA256,a=x.HMAC,c=x.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,d=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),d[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 x=this._cipher,p=x.blockSize;i.call(this,n,m,p,x),this._prevBlock=n.slice(m,m+p)}}),s.Decryptor=s.extend({processBlock:function(n,m){var x=this._cipher,p=x.blockSize,a=n.slice(m,m+p);i.call(this,n,m,p,x),this._prevBlock=a}});function i(n,m,x,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<x;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 x=this._cipher,p=x.blockSize,a=this._iv,c=this._counter;a&&(c=this._counter=a.slice(0),this._iv=void 0);var g=c.slice(0);x.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
72
+ */return function(r){var i=t,n=i.lib,p=n.WordArray,d=n.Hasher,u=i.algo,o=p.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=p.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]),E=p.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]),a=p.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]),h=p.create([0,1518500249,1859775393,2400959708,2840853838]),f=p.create([1352829926,1548603684,1836072691,2053994217,0]),m=u.RIPEMD160=d.extend({_doReset:function(){this._hash=p.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(_,A){for(var w=0;w<16;w++){var S=A+w,b=_[S];_[S]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}var C=this._hash.words,F=h.words,D=f.words,R=o.words,O=c.words,U=E.words,Y=a.words,j,X,K,$,P,I,k,J,V,oe;I=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+R[w]]|0,w<16?W+=v(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+=y(X,K,$)+F[4],W=W|0,W=g(W,U[w]),W=W+P|0,j=P,P=$,$=g(K,10),K=X,X=W,W=I+_[A+O[w]]|0,w<16?W+=y(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+=v(k,J,V)+D[4],W=W|0,W=g(W,Y[w]),W=W+oe|0,I=oe,oe=V,V=g(J,10),J=k,k=W;W=C[1]+K+V|0,C[1]=C[2]+$+oe|0,C[2]=C[3]+P+I|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,S=_.sigBytes*8;A[S>>>5]|=128<<24-S%32,A[(S+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 v(_,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 y(_,A,w){return _^(A|~w)}function g(_,A){return _<<A|_>>>32-A}i.RIPEMD160=d._createHelper(m),i.HmacRIPEMD160=d._createHmacHelper(m)}(),t.RIPEMD160})}(a0)),a0.exports}var c0={exports:{}},Mr;function sn(){return Mr||(Mr=1,function(s,e){(function(t,r,i){s.exports=r(M(),r0(),Gt())})(H,function(t){return function(){var r=t,i=r.lib,n=i.Base,p=i.WordArray,d=r.algo,u=d.SHA256,o=d.HMAC,c=d.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:u,iterations:25e4}),init:function(E){this.cfg=this.cfg.extend(E)},compute:function(E,a){for(var h=this.cfg,f=o.create(h.hasher,E),m=p.create(),v=p.create([1]),B=m.words,x=v.words,l=h.keySize,y=h.iterations;B.length<l;){var g=f.update(a).finalize(v);f.reset();for(var _=g.words,A=_.length,w=g,S=1;S<y;S++){w=f.finalize(w),f.reset();for(var b=w.words,C=0;C<A;C++)_[C]^=b[C]}m.concat(g),x[0]++}return m.sigBytes=l*4,m}});r.PBKDF2=function(E,a,h){return c.create(h).compute(E,a)}}(),t.PBKDF2})}(c0)),c0.exports}var d0={exports:{}},qr;function nn(){return qr||(qr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ee())})(H,function(t){return t.mode.CFB=function(){var r=t.lib.BlockCipherMode.extend();r.Encryptor=r.extend({processBlock:function(n,p){var d=this._cipher,u=d.blockSize;i.call(this,n,p,u,d),this._prevBlock=n.slice(p,p+u)}}),r.Decryptor=r.extend({processBlock:function(n,p){var d=this._cipher,u=d.blockSize,o=n.slice(p,p+u);i.call(this,n,p,u,d),this._prevBlock=o}});function i(n,p,d,u){var o,c=this._iv;c?(o=c.slice(0),this._iv=void 0):o=this._prevBlock,u.encryptBlock(o,0);for(var E=0;E<d;E++)n[p+E]^=o[E]}return r}(),t.mode.CFB})}(d0)),d0.exports}var x0={exports:{}},zr;function on(){return zr||(zr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ee())})(H,function(t){return t.mode.CTR=function(){var r=t.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(n,p){var d=this._cipher,u=d.blockSize,o=this._iv,c=this._counter;o&&(c=this._counter=o.slice(0),this._iv=void 0);var E=c.slice(0);d.encryptBlock(E,0),c[u-1]=c[u-1]+1|0;for(var a=0;a<u;a++)n[p+a]^=E[a]}});return r.Decryptor=i,r}(),t.mode.CTR})}(x0)),x0.exports}var l0={exports:{}},jr;function an(){return jr||(jr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ee())})(H,function(t){/** @preserve
63
73
  * Counter block mode compatible with Dr Brian Gladman fileenc.c
64
74
  * derived from CryptoJS.mode.CTR
65
75
  * Jan Hruby jhruby.web@gmail.com
66
- */return t.mode.CTRGladman=function(){var s=t.lib.BlockCipherMode.extend();function i(x){if((x>>24&255)===255){var p=x>>16&255,a=x>>8&255,c=x&255;p===255?(p=0,a===255?(a=0,c===255?c=0:++c):++a):++p,x=0,x+=p<<16,x+=a<<8,x+=c}else x+=1<<24;return x}function n(x){return(x[0]=i(x[0]))===0&&(x[1]=i(x[1])),x}var m=s.Encryptor=s.extend({processBlock:function(x,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++)x[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 x=this._cipher,p=x.blockSize,a=this._iv,c=this._keystream;a&&(c=this._keystream=a.slice(0),this._iv=void 0),x.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,x=m-n%m,p=n+x-1;s.clamp(),s.words[p>>>2]|=x<<24-p%4*8,s.sigBytes+=x},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,x=i.enc,p=x.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,x=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=x.DES=m.extend({_doReset:function(){for(var b=this._key,d=b.words,l=[],v=0;v<56;v++){var E=p[v]-1;l[v]=d[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,d){this._doCryptBlock(b,d,this._subKeys)},decryptBlock:function(b,d){this._doCryptBlock(b,d,this._invSubKeys)},_doCryptBlock:function(b,d,l){this._lBlock=b[d],this._rBlock=b[d+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[d]=this._lBlock,b[d+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function h(b,d){var l=(this._lBlock>>>b^this._rBlock)&d;this._rBlock^=l,this._lBlock^=l<<b}function y(b,d){var l=(this._rBlock>>>b^this._lBlock)&d;this._lBlock^=l,this._rBlock^=l<<b}s.DES=m._createHelper(u);var f=x.TripleDES=m.extend({_doReset:function(){var b=this._key,d=b.words;if(d.length!==2&&d.length!==4&&d.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var l=d.slice(0,2),v=d.length<4?d.slice(0,2):d.slice(2,4),E=d.length<6?d.slice(0,2):d.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,d){this._des1.encryptBlock(b,d),this._des2.decryptBlock(b,d),this._des3.encryptBlock(b,d)},decryptBlock:function(b,d){this._des3.decryptBlock(b,d),this._des2.encryptBlock(b,d),this._des1.decryptBlock(b,d)},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,x=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 d=u[h];u[h]=u[y],u[y]=d}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(x);var a=m.RC4Drop=x.extend({cfg:x.cfg.extend({drop:192}),_doReset:function(){x._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,x=[],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,d=b[0],l=b[1],v=(d<<8|d>>>24)&16711935|(d<<24|d>>>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),x[0]=h[0]^h[5]>>>16^h[3]<<16,x[1]=h[2]^h[7]>>>16^h[5]<<16,x[2]=h[4]^h[1]>>>16^h[7]<<16,x[3]=h[6]^h[3]>>>16^h[1]<<16;for(var y=0;y<4;y++)x[y]=(x[y]<<8|x[y]>>>24)&16711935|(x[y]<<24|x[y]>>>8)&4278255360,o[u+y]^=x[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,d=((f*f>>>17)+f*b>>>15)+b*b,l=((y&4294901760)*y|0)+((y&65535)*y|0);a[h]=d^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,x=[],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,d=b[0],l=b[1],v=(d<<8|d>>>24)&16711935|(d<<24|d>>>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),x[0]=h[0]^h[5]>>>16^h[3]<<16,x[1]=h[2]^h[7]>>>16^h[5]<<16,x[2]=h[4]^h[1]>>>16^h[7]<<16,x[3]=h[6]^h[3]>>>16^h[1]<<16;for(var y=0;y<4;y++)x[y]=(x[y]<<8|x[y]>>>24)&16711935|(x[y]<<24|x[y]>>>8)&4278255360,o[u+y]^=x[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,d=((f*f>>>17)+f*b>>>15)+b*b,l=((y&4294901760)*y|0)+((y&65535)*y|0);a[h]=d^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 x=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 d=b>>24&255,l=b>>16&255,v=b>>8&255,E=b&255,_=f.sbox[0][d]+f.sbox[1][l];return _=_^f.sbox[2][v],_=_+f.sbox[3][E],_}function o(f,b,d){let l=b,v=d,E;for(let _=0;_<x;++_)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[x],l=l^f.pbox[x+1],{left:l,right:v}}function u(f,b,d){let l=b,v=d,E;for(let _=x+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,d){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<x+2;A++)f.pbox[A]=p[A]^b[l],l++,l>=d&&(l=0);let v=0,E=0,_=0;for(let A=0;A<x+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,d=f.sigBytes/4;h(c,b,d)}},encryptBlock:function(f,b){var d=o(c,f[b],f[b+1]);f[b]=d.left,f[b+1]=d.right},decryptBlock:function(f,b){var d=u(c,f[b],f[b+1]);f[b]=d.left,f[b+1]=d.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:x,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:x,external_terms:c,sandbox:p,widget_key:a}),(this.$present(n)||this.$present(m)||this.$present(x)||this.$present(p))&&G.postMessage("bootpayWidgetUpdateUserToken",{user_token:n,use_only_brandpay:m,use_terms:x,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?`
76
+ */return t.mode.CTRGladman=function(){var r=t.lib.BlockCipherMode.extend();function i(d){if((d>>24&255)===255){var u=d>>16&255,o=d>>8&255,c=d&255;u===255?(u=0,o===255?(o=0,c===255?c=0:++c):++o):++u,d=0,d+=u<<16,d+=o<<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 p=r.Encryptor=r.extend({processBlock:function(d,u){var o=this._cipher,c=o.blockSize,E=this._iv,a=this._counter;E&&(a=this._counter=E.slice(0),this._iv=void 0),n(a);var h=a.slice(0);o.encryptBlock(h,0);for(var f=0;f<c;f++)d[u+f]^=h[f]}});return r.Decryptor=p,r}(),t.mode.CTRGladman})}(l0)),l0.exports}var u0={exports:{}},Kr;function cn(){return Kr||(Kr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ee())})(H,function(t){return t.mode.OFB=function(){var r=t.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(n,p){var d=this._cipher,u=d.blockSize,o=this._iv,c=this._keystream;o&&(c=this._keystream=o.slice(0),this._iv=void 0),d.encryptBlock(c,0);for(var E=0;E<u;E++)n[p+E]^=c[E]}});return r.Decryptor=i,r}(),t.mode.OFB})}(u0)),u0.exports}var p0={exports:{}},Gr;function dn(){return Gr||(Gr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ee())})(H,function(t){return t.mode.ECB=function(){var r=t.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(i,n){this._cipher.encryptBlock(i,n)}}),r.Decryptor=r.extend({processBlock:function(i,n){this._cipher.decryptBlock(i,n)}}),r}(),t.mode.ECB})}(p0)),p0.exports}var h0={exports:{}},Xr;function xn(){return Xr||(Xr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ee())})(H,function(t){return t.pad.AnsiX923={pad:function(r,i){var n=r.sigBytes,p=i*4,d=p-n%p,u=n+d-1;r.clamp(),r.words[u>>>2]|=d<<24-u%4*8,r.sigBytes+=d},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},t.pad.Ansix923})}(h0)),h0.exports}var f0={exports:{}},Vr;function ln(){return Vr||(Vr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ee())})(H,function(t){return t.pad.Iso10126={pad:function(r,i){var n=i*4,p=n-r.sigBytes%n;r.concat(t.lib.WordArray.random(p-1)).concat(t.lib.WordArray.create([p<<24],1))},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},t.pad.Iso10126})}(f0)),f0.exports}var v0={exports:{}},Yr;function un(){return Yr||(Yr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ee())})(H,function(t){return t.pad.Iso97971={pad:function(r,i){r.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(r,i)},unpad:function(r){t.pad.ZeroPadding.unpad(r),r.sigBytes--}},t.pad.Iso97971})}(v0)),v0.exports}var y0={exports:{}},Jr;function pn(){return Jr||(Jr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ee())})(H,function(t){return t.pad.ZeroPadding={pad:function(r,i){var n=i*4;r.clamp(),r.sigBytes+=n-(r.sigBytes%n||n)},unpad:function(r){for(var i=r.words,n=r.sigBytes-1,n=r.sigBytes-1;n>=0;n--)if(i[n>>>2]>>>24-n%4*8&255){r.sigBytes=n+1;break}}},t.pad.ZeroPadding})}(y0)),y0.exports}var m0={exports:{}},Zr;function hn(){return Zr||(Zr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ee())})(H,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(m0)),m0.exports}var g0={exports:{}},Qr;function fn(){return Qr||(Qr=1,function(s,e){(function(t,r,i){s.exports=r(M(),ee())})(H,function(t){return function(r){var i=t,n=i.lib,p=n.CipherParams,d=i.enc,u=d.Hex,o=i.format;o.Hex={stringify:function(c){return c.ciphertext.toString(u)},parse:function(c){var E=u.parse(c);return p.create({ciphertext:E})}}}(),t.format.Hex})}(g0)),g0.exports}var E0={exports:{}},es;function vn(){return es||(es=1,function(s,e){(function(t,r,i){s.exports=r(M(),Be,Ce,Ae(),ee())})(H,function(t){return function(){var r=t,i=r.lib,n=i.WordArray,p=i.BlockCipher,d=r.algo,u=[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],o=[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],E=[{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}],a=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=d.DES=p.extend({_doReset:function(){for(var B=this._key,x=B.words,l=[],y=0;y<56;y++){var g=u[y]-1;l[y]=x[g>>>5]>>>31-g%32&1}for(var _=this._subKeys=[],A=0;A<16;A++){for(var w=_[A]=[],S=c[A],y=0;y<24;y++)w[y/6|0]|=l[(o[y]-1+S)%28]<<31-y%6,w[4+(y/6|0)]|=l[28+(o[y+24]-1+S)%28]<<31-y%6;w[0]=w[0]<<1|w[0]>>>31;for(var y=1;y<7;y++)w[y]=w[y]>>>(y-1)*4+3;w[7]=w[7]<<5|w[7]>>>27}for(var b=this._invSubKeys=[],y=0;y<16;y++)b[y]=_[15-y]},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],f.call(this,4,252645135),f.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),f.call(this,1,1431655765);for(var y=0;y<16;y++){for(var g=l[y],_=this._lBlock,A=this._rBlock,w=0,S=0;S<8;S++)w|=E[S][((A^g[S])&a[S])>>>0];this._lBlock=A,this._rBlock=_^w}var b=this._lBlock;this._lBlock=this._rBlock,this._rBlock=b,f.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),B[x]=this._lBlock,B[x+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function f(B,x){var l=(this._lBlock>>>B^this._rBlock)&x;this._rBlock^=l,this._lBlock^=l<<B}function m(B,x){var l=(this._rBlock>>>B^this._lBlock)&x;this._lBlock^=l,this._rBlock^=l<<B}r.DES=p._createHelper(h);var v=d.TripleDES=p.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),y=x.length<4?x.slice(0,2):x.slice(2,4),g=x.length<6?x.slice(0,2):x.slice(4,6);this._des1=h.createEncryptor(n.create(l)),this._des2=h.createEncryptor(n.create(y)),this._des3=h.createEncryptor(n.create(g))},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});r.TripleDES=p._createHelper(v)}(),t.TripleDES})}(E0)),E0.exports}var b0={exports:{}},ts;function yn(){return ts||(ts=1,function(s,e){(function(t,r,i){s.exports=r(M(),Be,Ce,Ae(),ee())})(H,function(t){return function(){var r=t,i=r.lib,n=i.StreamCipher,p=r.algo,d=p.RC4=n.extend({_doReset:function(){for(var c=this._key,E=c.words,a=c.sigBytes,h=this._S=[],f=0;f<256;f++)h[f]=f;for(var f=0,m=0;f<256;f++){var v=f%a,B=E[v>>>2]>>>24-v%4*8&255;m=(m+h[f]+B)%256;var x=h[f];h[f]=h[m],h[m]=x}this._i=this._j=0},_doProcessBlock:function(c,E){c[E]^=u.call(this)},keySize:256/32,ivSize:0});function u(){for(var c=this._S,E=this._i,a=this._j,h=0,f=0;f<4;f++){E=(E+1)%256,a=(a+c[E])%256;var m=c[E];c[E]=c[a],c[a]=m,h|=c[(c[E]+c[a])%256]<<24-f*8}return this._i=E,this._j=a,h}r.RC4=n._createHelper(d);var o=p.RC4Drop=d.extend({cfg:d.cfg.extend({drop:192}),_doReset:function(){d._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)u.call(this)}});r.RC4Drop=n._createHelper(o)}(),t.RC4})}(b0)),b0.exports}var B0={exports:{}},rs;function mn(){return rs||(rs=1,function(s,e){(function(t,r,i){s.exports=r(M(),Be,Ce,Ae(),ee())})(H,function(t){return function(){var r=t,i=r.lib,n=i.StreamCipher,p=r.algo,d=[],u=[],o=[],c=p.Rabbit=n.extend({_doReset:function(){for(var a=this._key.words,h=this.cfg.iv,f=0;f<4;f++)a[f]=(a[f]<<8|a[f]>>>24)&16711935|(a[f]<<24|a[f]>>>8)&4278255360;var m=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],v=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535];this._b=0;for(var f=0;f<4;f++)E.call(this);for(var f=0;f<8;f++)v[f]^=m[f+4&7];if(h){var B=h.words,x=B[0],l=B[1],y=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,g=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,_=y>>>16|g&4294901760,A=g<<16|y&65535;v[0]^=y,v[1]^=_,v[2]^=g,v[3]^=A,v[4]^=y,v[5]^=_,v[6]^=g,v[7]^=A;for(var f=0;f<4;f++)E.call(this)}},_doProcessBlock:function(a,h){var f=this._X;E.call(this),d[0]=f[0]^f[5]>>>16^f[3]<<16,d[1]=f[2]^f[7]>>>16^f[5]<<16,d[2]=f[4]^f[1]>>>16^f[7]<<16,d[3]=f[6]^f[3]>>>16^f[1]<<16;for(var m=0;m<4;m++)d[m]=(d[m]<<8|d[m]>>>24)&16711935|(d[m]<<24|d[m]>>>8)&4278255360,a[h+m]^=d[m]},blockSize:128/32,ivSize:64/32});function E(){for(var a=this._X,h=this._C,f=0;f<8;f++)u[f]=h[f];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<u[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<u[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<u[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<u[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<u[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<u[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<u[6]>>>0?1:0)|0,this._b=h[7]>>>0<u[7]>>>0?1:0;for(var f=0;f<8;f++){var m=a[f]+h[f],v=m&65535,B=m>>>16,x=((v*v>>>17)+v*B>>>15)+B*B,l=((m&4294901760)*m|0)+((m&65535)*m|0);o[f]=x^l}a[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,a[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,a[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,a[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,a[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,a[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,a[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,a[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}r.Rabbit=n._createHelper(c)}(),t.Rabbit})}(B0)),B0.exports}var _0={exports:{}},ss;function gn(){return ss||(ss=1,function(s,e){(function(t,r,i){s.exports=r(M(),Be,Ce,Ae(),ee())})(H,function(t){return function(){var r=t,i=r.lib,n=i.StreamCipher,p=r.algo,d=[],u=[],o=[],c=p.RabbitLegacy=n.extend({_doReset:function(){var a=this._key.words,h=this.cfg.iv,f=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],m=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535];this._b=0;for(var v=0;v<4;v++)E.call(this);for(var v=0;v<8;v++)m[v]^=f[v+4&7];if(h){var B=h.words,x=B[0],l=B[1],y=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,g=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,_=y>>>16|g&4294901760,A=g<<16|y&65535;m[0]^=y,m[1]^=_,m[2]^=g,m[3]^=A,m[4]^=y,m[5]^=_,m[6]^=g,m[7]^=A;for(var v=0;v<4;v++)E.call(this)}},_doProcessBlock:function(a,h){var f=this._X;E.call(this),d[0]=f[0]^f[5]>>>16^f[3]<<16,d[1]=f[2]^f[7]>>>16^f[5]<<16,d[2]=f[4]^f[1]>>>16^f[7]<<16,d[3]=f[6]^f[3]>>>16^f[1]<<16;for(var m=0;m<4;m++)d[m]=(d[m]<<8|d[m]>>>24)&16711935|(d[m]<<24|d[m]>>>8)&4278255360,a[h+m]^=d[m]},blockSize:128/32,ivSize:64/32});function E(){for(var a=this._X,h=this._C,f=0;f<8;f++)u[f]=h[f];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<u[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<u[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<u[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<u[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<u[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<u[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<u[6]>>>0?1:0)|0,this._b=h[7]>>>0<u[7]>>>0?1:0;for(var f=0;f<8;f++){var m=a[f]+h[f],v=m&65535,B=m>>>16,x=((v*v>>>17)+v*B>>>15)+B*B,l=((m&4294901760)*m|0)+((m&65535)*m|0);o[f]=x^l}a[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,a[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,a[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,a[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,a[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,a[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,a[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,a[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}r.RabbitLegacy=n._createHelper(c)}(),t.RabbitLegacy})}(_0)),_0.exports}var C0={exports:{}},is;function En(){return is||(is=1,function(s,e){(function(t,r,i){s.exports=r(M(),Be,Ce,Ae(),ee())})(H,function(t){return function(){var r=t,i=r.lib,n=i.BlockCipher,p=r.algo;const d=16,u=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],o=[[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 E(v,B){let x=B>>24&255,l=B>>16&255,y=B>>8&255,g=B&255,_=v.sbox[0][x]+v.sbox[1][l];return _=_^v.sbox[2][y],_=_+v.sbox[3][g],_}function a(v,B,x){let l=B,y=x,g;for(let _=0;_<d;++_)l=l^v.pbox[_],y=E(v,l)^y,g=l,l=y,y=g;return g=l,l=y,y=g,y=y^v.pbox[d],l=l^v.pbox[d+1],{left:l,right:y}}function h(v,B,x){let l=B,y=x,g;for(let _=d+1;_>1;--_)l=l^v.pbox[_],y=E(v,l)^y,g=l,l=y,y=g;return g=l,l=y,y=g,y=y^v.pbox[1],l=l^v.pbox[0],{left:l,right:y}}function f(v,B,x){for(let A=0;A<4;A++){v.sbox[A]=[];for(let w=0;w<256;w++)v.sbox[A][w]=o[A][w]}let l=0;for(let A=0;A<d+2;A++)v.pbox[A]=u[A]^B[l],l++,l>=x&&(l=0);let y=0,g=0,_=0;for(let A=0;A<d+2;A+=2)_=a(v,y,g),y=_.left,g=_.right,v.pbox[A]=y,v.pbox[A+1]=g;for(let A=0;A<4;A++)for(let w=0;w<256;w+=2)_=a(v,y,g),y=_.left,g=_.right,v.sbox[A][w]=y,v.sbox[A][w+1]=g;return!0}var m=p.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var v=this._keyPriorReset=this._key,B=v.words,x=v.sigBytes/4;f(c,B,x)}},encryptBlock:function(v,B){var x=a(c,v[B],v[B+1]);v[B]=x.left,v[B+1]=x.right},decryptBlock:function(v,B){var x=h(c,v[B],v[B+1]);v[B]=x.left,v[B+1]=x.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=n._createHelper(m)}(),t.Blowfish})}(C0)),C0.exports}(function(s,e){(function(t,r,i){s.exports=r(M(),ut(),Yi(),Ji(),Be,Zi(),Ce,Cr(),r0(),Qi(),Nr(),en(),tn(),rn(),Gt(),sn(),Ae(),ee(),nn(),on(),an(),cn(),dn(),xn(),ln(),un(),pn(),hn(),fn(),Dr,vn(),yn(),mn(),gn(),En())})(H,function(t){return t})})(kr);var bn=kr.exports;const Se=Re(bn);class Bn{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),r=Vt.encrypt(t,Se.enc.Utf8.parse(this.encryptKey()),{mode:Se.mode.ECB,padding:Se.pad.Pkcs7});return Te.stringify(r.ciphertext)}decrypt(e){if(se(this.encryptKey()))throw new Error("privateKey is not set");const r=Vt.decrypt(e,Se.enc.Utf8.parse(this.encryptKey()),{mode:Se.mode.ECB,padding:Se.pad.Pkcs7}).toString(Se.enc.Utf8);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 _n{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 Cn extends _n{constructor(e={}){super(e)}}const be=new Cn;class A0 extends Bn{setWidgetData(e,t){be.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,i=!1,n,p){this.data.pg=e,this.data.method=t,this.data.wallet_id=r,this.termsPassed=i,this.data.terms=n,this.widgetExtra=p}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:N.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(r=>{q(e[r])&&(this.data[r]=e[r])})}updateStringFields(e,t){t.forEach(r=>{q(e[r])&&(this.data[r]=e[r])})}updateUndefinedCheckFields(e,t){t.forEach(r=>{e[r]!==void 0&&(this.data[r]=e[r])})}}const z=new A0;class An extends ge{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(T.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 An;class wn extends Ke{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(),ns.bind()}update(e){const{price:t,tax_free:r,currency:i,user_token:n,use_only_brandpay:p,use_terms:d,sandbox:u,widget_key:o,external_terms:c}=e;z.updateOnProcessing({price:t,tax_free:r,currency:i,user_token:n,use_only_brandpay:p,use_terms:d,external_terms:c,sandbox:u,widget_key:o}),(this.$present(n)||this.$present(p)||this.$present(d)||this.$present(u))&&G.postMessage("bootpayWidgetUpdateUserToken",{user_token:n,use_only_brandpay:p,use_terms:d,external_terms:c,sandbox:u,key:o})}rerender(){G.rerender()}destroy(){G.destroy()}selectPayment(e,t,r,i=!1,n,p){z.setPayment(e,t,r,i,n,p),N.debug("selectPayment",`pg: ${e}, method: ${t}, wallet_id: ${r}, terms: ${i}, select_terms: ${JSON.stringify(n)}, extra: ${JSON.stringify(p)}`)}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 wn;class Fn extends ge{constructor(e={isBackground:!0}){super(),this.$brandpayWindowId="__bootpay-brandpay-window",this.$iFrameId="__bootpay-brandpay-iframe",this.$windowId="__bootpay-brandpay-container-window",this.$additionalClass=T.isMobile()?"transparent":"rounded-iframe transparent",this.$template=this.template({isBackground:e.isBackground??!0}),this.$widgetStore=z}template({isBackground:e}){return e?`
67
77
  <div id="${this.$windowId}" class="bootpay-payment-background __overflow-y">
68
- <div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$brandpayWindowId}">
78
+ <div class="bootpay-payment-window ${T.isMobile()?"__mobile":""}" id="${this.$brandpayWindowId}">
69
79
  <iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
70
80
  </div>
71
81
  </div>
72
82
  `:`
73
83
  <div id="${this.$windowId}" class="bootpay-transparent-background">
74
- <div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$brandpayWindowId}">
84
+ <div class="bootpay-payment-window ${T.isMobile()?"__mobile":""}" id="${this.$brandpayWindowId}">
75
85
  <iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}" frameborder="0"></iframe>
76
86
  </div>
77
87
  </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`
88
+ `}createIFrame(e){this.createTemplateHtml();const t=document.getElementById(this.$iFrameId);t==null||t.setAttribute("src",T.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",T.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 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 r=`brandpay/${this.$widgetStore.resolve_auth_credential}/${this.$widgetStore.encryptParameters()}/edit`;t||T.isMobile()?window.open(T.toWidget(`${r}?__popup=true`),"widget-brandpay-environment-popup",`width=${e.size.width},height=${e.size.height},scrollbars=yes`).focus():this.createIFrame(r)}externalPassword({popup:e,url:t}){e||T.isMobile()?window.open(T.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 r=this.byId(this.$iFrameId);(i=r==null?void 0:r.contentWindow)==null||i.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}}const ne=new Fn;class Dn extends ge{constructor(){super(),this.$windowId="__bootpay-modal-window-container",this.$modalWindowId="__bootpay-modal-window",this.$iFrameId="__bootpay-modal-iframe",this.$additionalClass=T.isMobile()?"":"rounded-iframe",this.$template=this.template()}template(){return`
79
89
  <div id="${this.$windowId}" class="bootpay-payment-background">
80
- <div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$modalWindowId}">
90
+ <div class="bootpay-payment-window ${T.isMobile()?"__mobile":""}" id="${this.$modalWindowId}">
81
91
  <iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
82
92
  </div>
83
93
  </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`
94
+ `}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){N.debug("resize",e),this.templateResize(this.$iFrameId,e)}postMessage(e,t=void 0){var i;const r=this.byId(this.$iFrameId);(i=r==null?void 0:r.contentWindow)==null||i.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}}const pt=new Dn;class $n extends ge{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
95
  <div id="${this.$windowId}" class="bootpay-payment-background __alert">
86
96
  <div class="bootpay-confirm-window fade-in" id="${this.$modalWindowId}">
87
97
  <div class="bootpay__alert-header">
88
- ${this.$title}
98
+ <div class="bootpay__alert-icon">
99
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
100
+ <circle cx="12" cy="12" r="10"></circle>
101
+ <line x1="12" y1="16" x2="12" y2="12"></line>
102
+ <line x1="12" y1="8" x2="12.01" y2="8"></line>
103
+ </svg>
104
+ </div>
105
+ <div class="bootpay__alert-title">${this.$title}</div>
89
106
  <button class="bootpay-close-btn" id="${this.$hookCloseButtonId}"></button>
90
107
  </div>
91
108
  <div class="bootpay__alert-body">
92
109
  ${this.$message}
93
110
  </div>
94
111
  <div class="bootpay__alert-footer">
95
- <button class="bootpay__alert-close border-right" id="${this.$hookCancelButtonId}">${this.$cancelButtonText}</button>
112
+ <button class="bootpay__alert-close" id="${this.$hookCancelButtonId}">${this.$cancelButtonText}</button>
96
113
  <button class="bootpay__alert-close bootpay-primary" id="${this.$hookConfirmButtonId}">${this.$confirmButtonText}</button>
97
114
  </div>
98
115
  </div>
99
116
  </div>
100
- `}show(e,t="알림",s="확인",i="취소",n,m,x=!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()}),x?(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`
117
+ `}show(e,t="알림",r="확인",i="취소",n,p,d=!0){this.$title=t,this.$message=e,this.$confirmButtonText=r,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(),p!==void 0&&p()}),document.getElementById(this.$hookCloseButtonId).addEventListener("click",()=>{this.destroy(),p!==void 0&&p()}),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 $n,kn={$eventPrefix:"bootpay",bootpayWidgetSelectMethod(s){return this.triggerGlobalChangeEvent(s),re.selectPayment(s.pg,s.method,s.wallet_id,s.term_passed===!0,s.select_terms,s.extra)},bootpayWidgetResponseGetEnvironmentWidget(s){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:s.platform})},bootpayWidgetResponseCurrentStores(s){return ne.postMessage("bootpayResponseCurrentStores",s)},bootpayWidgetError(s,e){return e.reject(s)},bootpayWidgetBrandpayReload(s){return G.postMessage("bootpayWidgetBrandpayReload",s)},bootpayWidgetResize(s){return this.callBootpayDOMEvent("widget-resize",s),be.callHook("resize",s),G.resize(s)},bootpayWidgetShowInterestInformation(s){return ne.showCardInterestInformation(s)},bootpayWidgetAddWallet(s){return ne.addWallet(s.url)},bootpayWidgetRemoveWallet(s){return ne.removeWallet(s.wallet_id)},bootpayWidgetPaymentWindowResize(s){return ne.resize(s)},bootpayWidgetBrandpayWindowClose(){return ne.destroy()},bootpayWidgetModalOpen(s){return pt.createIFrame(s.url)},bootpayWidgetModalClose(){return pt.destroy()},bootpayRequestModalCurrentStores(s){return G.postMessage("bootpayWidgetRequestModalCurrentStores",s)},bootpayRequestGetEnvironmentModalWidget(s){return G.postMessage("bootpayWidgetGetEnvironmentModalWidget",s)},bootpayWidgetResponseGetEnvironmentModalWidget(s){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:s.platform,log_level:N.level})},bootpayWidgetModalResize(s){return pt.resize(s)},bootpayWidgetPaymentGetStoreData(){const{application_id:s,price:e,tax_free:t,user_token:r}=G.$widgetStore.data;return G.postMessage("bootpayWidgetResponseStoreData",{applicationId:s,price:e,widgetExtra:G.$widgetStore.widgetExtra,taxFree:t,userToken:r})},bootpayWidgetTermAllAgree(s){this.callBootpayDOMEvent("all-agree-terms",s),be.callHook("allTermsAccepted",s)},bootpayWidgetSelectPayment(s){const{method_alias:e,payment_type:t,wallet_id:r}=s;return G.postMessage("bootpayWidgetSelectPayment",{method_alias:e,payment_type:t,wallet_id:r})},bootpayWidgetReady(s){this.callBootpayDOMEvent("widget-ready",s),be.callHook("ready",s)},bootpayWidgetUpdateStore(s){z.updateOnProcessing({...s})},bootpayWidgetToUrl(s){location.href=s.url},bootpayWidgetShowModal(s){return w0.show(s.message,s.title,s.confirmButtonText,s.cancelButtonText,()=>{window.BootpayWidget.alertConfirm()},()=>{window.BootpayWidget.alertCancel()})},brandpayWalletUpdated(s){be.callHook("brandpayWalletUpdated",s)},triggerGlobalChangeEvent(s){var e;s.completed=q(s.pg)&&q(s.method)&&(s.term_passed===!0||!z.data.use_terms)&&(["BRANDPAY_CARD","BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(s.method)===-1||s.wallet_id!==void 0),(z.data.pg!==s.pg||z.data.method!==s.method||z.data.wallet_id!==s.wallet_id||JSON.stringify(z.widgetExtra)!==JSON.stringify(s.extra))&&(this.callBootpayDOMEvent("widget-change-payment",s),be.callHook("paymentMethodUpdated",s)),JSON.stringify((e=s.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",s),be.callHook("termsConsentUpdated",s))},callBootpayDOMEvent(s,e=void 0){document.dispatchEvent(new CustomEvent([this.$eventPrefix,s].join("-"),{detail:e}))},bootpayWidgetPreferenceWindow(s){return ne.brandpayPreference(s)},brandpayManagerWindowReady:s=>{be.callHook("brandpayManagerWindowReady",s)},brandpayManagerResize:s=>ne.resize(s),brandpayExternalPassword:s=>ne.externalPassword(s),externalPasswordResponse:s=>ne.postMessage("externalPasswordResponse",s)};class Pn extends Oe{constructor(){super({messageEventName:"message.BootpayWidgetEvent",messageEventHooks:{WidgetWindowMessage:kn}})}}const ns=new Pn;class In extends ge{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`
101
118
  <div id="${this.$windowId}" class="bootpay-payment-background __alert">
102
119
  <div class="slider-window slider-initial" id="${this.$modalWindowId}" style="display: none;">
120
+ <div class="bootpay__slider-icon">
121
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
122
+ <circle cx="12" cy="12" r="10"></circle>
123
+ <line x1="12" y1="16" x2="12" y2="12"></line>
124
+ <line x1="12" y1="8" x2="12.01" y2="8"></line>
125
+ </svg>
126
+ </div>
103
127
  <div class="bootpay__alert-header __text-center">
104
128
  ${this.$title}
105
129
  </div>
@@ -108,9 +132,9 @@
108
132
  </div>
109
133
  </div>
110
134
  </div>
111
- `}sliderButtonTemplate(e){let t="";return e.forEach(s=>{t+=`
112
- <button class="bootpay__slider-button ${s.class}" id="${this.sliderButtonId(s.key)}">${s.name}</button>
113
- `}),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`
135
+ `}sliderButtonTemplate(e){let t="";return e.forEach(r=>{const i=r.class?` ${r.class}`:"";t+=`
136
+ <button class="bootpay__slider-button${i}" id="${this.sliderButtonId(r.key)}">${r.name}</button>
137
+ `}),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,i;(r=document.getElementById(this.$modalWindowId))==null||r.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 r=this.sliderButtonId(t.key);(i=document.getElementById(r))==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),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 Sn=new In,Rn={showSliderSelect(s){Sn.show(this,s)},selectSliderSelect(s,e="sliderSelectResponse"){F0.$childInstance.postMessage(e,{key:s})}};class Tn extends Oe{constructor(){super({messageEventName:"message.BootpaySliderEvent",messageEventHooks:{StoreSliderEvent:Rn}})}}const F0=new Tn,On={externalPasswordResponse:s=>os.resolve(s),resize:s=>ht.iFrameResize(s)};class Un extends Oe{constructor(){super({messageEventName:"message.BootpaySdkEvent",messageEventHooks:{WidgetWindowMessage:On}})}}const os=new Un;class Nn extends ge{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 Vi,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`
114
138
  <div id="${this.$windowId}" class="bootpay-payment-background">
115
139
  <div class="bootpay-payment-window" id="${this.$userWindowId}">
116
140
  <iframe id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
@@ -118,7 +142,7 @@
118
142
  </form>
119
143
  </div>
120
144
  </div>
121
- `}setParams(e,t){if(t!==void 0){const s=this.byId(this.$bootpaySdkFormId);if(["POST","PUT"].indexOf(e.toUpperCase())>-1){const i=he.encryptParams(he.objectKeyToUnderscore(t));s.innerHTML=`
145
+ `}setParams(e,t){if(t!==void 0){const r=this.byId(this.$bootpaySdkFormId);if(["POST","PUT"].indexOf(e.toUpperCase())>-1){const i=pe.encryptParams(pe.objectKeyToUnderscore(t));r.innerHTML=`
122
146
  <input type="hidden" name="payload" value="${i.payload}" />
123
147
  <input type="hidden" name="token" value="${i.token}" />
124
- `}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"),fe.clearPollingEvent(),setTimeout(()=>fe.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(le.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(){fe.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(le.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),me.Bootpay=Ee,me.BootpayEnvironment=R,me.BootpaySDK=os,me.BootpayWidget=as,me.default=Ee,Object.defineProperties(me,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
148
+ `}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]}"/>`}),r.innerHTML=i}}}request(e,t){return new Promise((r,i)=>{this.initializeTemplate(r,i),this.goiFrameUrl("GET",T.toDoor(`sdk/password/${t}`),{type:e,uuid:this.$session.currentUserUUID()})})}requestTokenFromSDK({application_id:e,user_token:t}){return new Promise((r,i)=>{z.setWidgetData("",{application_id:e,user_token:t}),os.bind(r,i),this.initializeTemplate(r,i),this.goiFrameUrl("GET",T.toWidget(`password/${e}/${z.encryptParameters()}`),{uuid:this.$session.currentUserUUID()})})}addCard(e){return new Promise((t,r)=>{this.initializeTemplate(t,r),this.goiFrameUrl("GET",T.toDoor(`sdk/card/${e}`),{uuid:this.$session.currentUserUUID()})})}wallets(e){return new Promise((t,r)=>{this.initializeTemplate(t,r),this.goiFrameUrl("GET",T.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",T.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",T.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",T.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",T.toApi("sdk/easy/card"),this.regenerateRequestPayment(e))})}launchBrandpayManager(e){clearInterval(this.$popupInstanceWatcher);const t=new A0;t.setWidgetData(e.el,e);const r=t.getManagerUrl();if(e.use_popup===!0)this.$popupInstance=window.open(T.toWidget(r),"bootpay-brandpay-manager","width=600,height=800,scrollbars=yes,resizable=yes"),this.$popupInstanceWatcher=setInterval(()=>{if(this.$popupInstance===null||this.$popupInstance.closed){try{be.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(r),this.bodyOpen("bootpay-inherit",!0)}ns.bind(),F0.bind(),F0.setChildInstance(ne)}goiFrameUrl(e,t,r=void 0){this.setParams(e,r);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 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=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 Nn,as={$templateUserToken:ht,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){T.set(s),e!==void 0&&T.setDevelopmentHost(e)},setDevice(s){let e=Z.PLATFORM.JS;switch(s.toUpperCase()){case"IOS":e=Z.PLATFORM.IOS;break;case"ANDROID":e=Z.PLATFORM.ANDROID;break}return this.$templateUserToken.setDevice(e)},errorHandler(s){let e;switch(me.hideProgress(),s.name){case"BootpayEventError":e=s.eventMessage;break;default:if(q(s.event))e=s;else throw s}return e},setLogLevel(s){N.setLogLevel(s)},setUUID(s){return $e.setUUID(s)},dismiss(){he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})}};typeof window<"u"&&(window.BootpaySDK=as);const cs={render(s,e){re.render(s,e)},rerender(){re.rerender()},setEnvironmentMode(s,e){Ee.setEnvironmentMode(s,e),T.set(s)},async requestPayment(s){return new Promise(async(e,t)=>{try{const r=await re.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 re.requestSubscription(s);return e(r)}catch(r){return t(this.errorHandler(r))}})},launchBrandpayManager(s){ht.launchBrandpayManager(s)},errorHandler(s){let e;switch(me.hideProgress(),s.name){case"BootpayEventError":e=s.eventMessage;break;default:if(q(s.event))e=s;else throw s}return e},update(s,e=!0){re.update(s),e&&this.rerender()},currentTermsCondition(){return re.currentTermsCondition()},destroy(){re.destroy()},isRendered(){return re.isRendered()},synchronizedRealTimeTransfer(s){re.synchronizedRealTimeTransfer(s)},selectPayment(s){re.sendSelectPayment(s)},setLogLevel(s){N.setLogLevel(s)},sendMessage(s,e=void 0){re.sendMessage(s,e)},setDevice(s){return Ee.setDevice(s)},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(s){const e=new A0;return e.setWidgetData("",s),T.toWidget(e.getManagerUrl())}};typeof window<"u"&&(window.BootpayWidget=cs),ye.Bootpay=Ee,ye.BootpayEnvironment=T,ye.BootpaySDK=as,ye.BootpayWidget=cs,ye.default=Ee,Object.defineProperties(ye,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});