@bootpay/client-js 5.2.1 → 5.2.3-beta.1
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/README.md +5 -1
- package/dist/index.mjs +555 -550
- package/dist/index.umd.js +14 -14
- package/dist/src/bootpay-widget.d.ts +1 -0
- package/dist/src/bootpay.d.ts +1 -1
- package/dist/src/support/stores/widget-store.d.ts +1 -0
- package/dist/src/types/bootpay-interface.d.ts +2 -2
- package/package.json +1 -1
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('.bootpay-progress-background{position:fixed;display:block;background-color:transparent;left:0;right:0;top:0;bottom:0;text-align:center;z-index:200000;white-space:nowrap}.bootpay-progress-background.blur-off{background-color:transparent}.bootpay-progress-background:before{display:inline-block;height:100%;content:" ";vertical-align:middle}.bootpay-progress-background .progress-message-window{display:inline-block;text-align:center;max-width:600px;border-radius:3px;width:100%;background-color:transparent;padding:0;vertical-align:middle}@media (min-width: 600px){.bootpay-progress-background .progress-message-window{padding:1rem}}.bootpay-progress-background .progress-message-window .bootpay-spinner{display:inline-block;width:50px;height:50px;border-radius:50%;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2);border-left:2px solid #ffffff;animation:spin 1s infinite linear}.bootpay-progress-background .progress-message-window .alfred-text{margin-top:1rem}.bootpay-progress-background .progress-message-window .alfred-text span.alfred-inner-text{font-weight:400;color:#eee}@keyframes spin{0%{transform:rotate(0);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}50%{transform:rotate(180deg);border-left:3px solid #ffffff;border-top:2px solid rgba(255,255,255,.4);border-right:2px solid rgba(255,255,255,.4);border-bottom:2px solid rgba(255,255,255,.4)}to{transform:rotate(360deg);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}}: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-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.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>.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)}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,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}__`}},P0=()=>"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,Bs=(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(/&/g,"&")}&${t}`:`${r.replace(/&/g,"&")}?${t}`}else return r},yt=(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 S0={exports:{}};function _s(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 mt={exports:{}};const Cs=bs(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var I0;function L(){return I0||(I0=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 _s=="function")try{n=Cs}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)}},f=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(f.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(d){return f.parse(unescape(encodeURIComponent(d)))}},h=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=h.extend({cfg:c.extend(),init:function(d){this.cfg=this.cfg.extend(d),this.reset()},reset:function(){h.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})}(mt)),mt.exports}(function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return t.enc.Utf8})})(S0);var As=S0.exports;const T0=Te(As);var Et={exports:{}},R0;function Be(){return R0||(R0=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.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 f=a[u>>>2]>>>24-u%4*8&255,y=a[u+1>>>2]>>>24-(u+1)%4*8&255,h=a[u+2>>>2]>>>24-(u+2)%4*8&255,b=f<<16|y<<8|h,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 f=p.indexOf(u);f!==-1&&(a=f)}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 f=c[p.charCodeAt(u-1)]<<u%4*2,y=c[p.charCodeAt(u)]>>>6-u%4*2,h=f|y;g[o>>>2]|=h<<24-o%4*8,o++}return n.create(g,o)}}(),t.enc.Base64})}(Et)),Et.exports}var ws=Be();const Re=Te(ws);class je{$blank(e){return se(e)}$present(e){return!this.$blank(e)}$type(e,t){return ze(e,t)}$uuid(){return P0()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),Re.stringify(T0.parse(e))}$decrypt(e){return T0.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 Fs 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 Ds extends Fs{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 De=new Ds,$e={name:"@bootpay/client-js",version:"5.2.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:$e.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===""?$e.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 xe extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const ke={__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(ke.__BOOTPAY_NAMESPACE)&&(ke.__BOOTPAY_NAMESPACE={}),this.addEventListener(r.split(".")[0],e,t||!1),ke.__BOOTPAY_NAMESPACE[r]=e,this},off(r){return q(ke.__BOOTPAY_NAMESPACE)&&q(ke.__BOOTPAY_NAMESPACE[r])&&this.removeEventListener(r.split(".")[0],ke.__BOOTPAY_NAMESPACE[r]),this}};class it 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,ke.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: ${Ge(s)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}else return null}}const Ge=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('.bootpay-progress-background{position:fixed;display:block;background-color:transparent;left:0;right:0;top:0;bottom:0;text-align:center;z-index:200000;white-space:nowrap}.bootpay-progress-background.blur-off{background-color:transparent}.bootpay-progress-background:before{display:inline-block;height:100%;content:" ";vertical-align:middle}.bootpay-progress-background .progress-message-window{display:inline-block;text-align:center;max-width:600px;border-radius:3px;width:100%;background-color:transparent;padding:0;vertical-align:middle}@media (min-width: 600px){.bootpay-progress-background .progress-message-window{padding:1rem}}.bootpay-progress-background .progress-message-window .bootpay-spinner{display:inline-block;width:50px;height:50px;border-radius:50%;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2);border-left:2px solid #ffffff;animation:spin 1s infinite linear}.bootpay-progress-background .progress-message-window .alfred-text{margin-top:1rem}.bootpay-progress-background .progress-message-window .alfred-text span.alfred-inner-text{font-weight:400;color:#eee}@keyframes spin{0%{transform:rotate(0);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}50%{transform:rotate(180deg);border-left:3px solid #ffffff;border-top:2px solid rgba(255,255,255,.4);border-right:2px solid rgba(255,255,255,.4);border-bottom:2px solid rgba(255,255,255,.4)}to{transform:rotate(360deg);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}}: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>.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)}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,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}__`}},P0=()=>"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(/&/g,"&")}&${t}`:`${r.replace(/&/g,"&")}?${t}`}else return r},yt=(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 S0={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 mt={exports:{}};const _s=Bs(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var I0;function L(){return I0||(I0=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)}},f=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(f.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(d){return f.parse(unescape(encodeURIComponent(d)))}},h=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=h.extend({cfg:c.extend(),init:function(d){this.cfg=this.cfg.extend(d),this.reset()},reset:function(){h.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})}(mt)),mt.exports}(function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return t.enc.Utf8})})(S0);var Cs=S0.exports;const T0=Te(Cs);var R0={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 f=a[u>>>2]>>>24-u%4*8&255,y=a[u+1>>>2]>>>24-(u+1)%4*8&255,h=a[u+2>>>2]>>>24-(u+2)%4*8&255,b=f<<16|y<<8|h,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 f=p.indexOf(u);f!==-1&&(a=f)}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 f=c[p.charCodeAt(u-1)]<<u%4*2,y=c[p.charCodeAt(u)]>>>6-u%4*2,h=f|y;g[o>>>2]|=h<<24-o%4*8,o++}return n.create(g,o)}}(),t.enc.Base64})})(R0);var Be=R0.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 P0()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),Re.stringify(T0.parse(e))}$decrypt(e){return T0.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 De=new ws,$e={name:"@bootpay/client-js",version:"5.2.3-beta.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:$e.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===""?$e.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 xe extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const ke={__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(ke.__BOOTPAY_NAMESPACE)&&(ke.__BOOTPAY_NAMESPACE={}),this.addEventListener(r.split(".")[0],e,t||!1),ke.__BOOTPAY_NAMESPACE[r]=e,this},off(r){return q(ke.__BOOTPAY_NAMESPACE)&&q(ke.__BOOTPAY_NAMESPACE[r])&&this.removeEventListener(r.split(".")[0],ke.__BOOTPAY_NAMESPACE[r]),this}};class it 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,ke.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: ${Ge(s)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}else return null}}const Ge=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`
|
|
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){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
|
|
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){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`
|
|
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">
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
|
-
`}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","block")}hideProgress(){try{this.byId(this.$alfredId).outerHTML=""}catch{}}}const le=new
|
|
16
|
-
`),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,Y0;function di(){if(Y0)return kt;Y0=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,J0;function ct(){if(J0)return Pt;J0=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,Z0;function xi(){return Z0||(Z0=1,St=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}),St}var It,Q0;function er(){if(Q0)return It;Q0=1;var r=te,e=ri(),t=si(),s=W0,i=X0,n=ci(),m=di(),x=z0,p=He,a=ct(),c=xi();return It=function(o){return new Promise(function(f,y){var h=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(h)&&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){f(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 h>"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))),h||(h=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(h)})},It}var Tt,tr;function li(){return tr||(tr=1,Tt=null),Tt}var Q=te,rr=ei,sr=He,ui=z0,pi=j0,fi={"Content-Type":"application/x-www-form-urlencoded"};function ir(r,e){!Q.isUndefined(r)&&Q.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e)}function hi(){var r;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(r=er()),r}function vi(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:ui,adapter:hi(),transformRequest:[function(e,t){if(rr(t,"Accept"),rr(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 ir(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 pi(n?{"files[]":e}:e,m&&new m)}else if(s||i==="application/json")return ir(t,"application/json"),vi(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"?sr.from(m,sr.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:li()},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(fi)});var Rt=dt,yi=te,mi=Rt,Ei=function(e,t,s){var i=this||mi;return yi.forEach(s,function(m){e=m.call(i,e,t)}),e},Ot,nr;function or(){return nr||(nr=1,Ot=function(e){return!!(e&&e.__CANCEL__)}),Ot}var ar=te,Ut=Ei,gi=or(),Bi=Rt,bi=ct();function Ht(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new bi}var _i=function(e){Ht(e),e.headers=e.headers||{},e.data=Ut.call(e,e.data,e.headers,e.transformRequest),e.headers=ar.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ar.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var t=e.adapter||Bi.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 gi(i)||(Ht(e),i&&i.response&&(i.response.data=Ut.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})},ae=te,cr=function(e,t){t=t||{};var s={};function i(c,g){return ae.isPlainObject(c)&&ae.isPlainObject(g)?ae.merge(c,g):ae.isPlainObject(g)?ae.merge({},g):ae.isArray(g)?g.slice():g}function n(c){if(ae.isUndefined(t[c])){if(!ae.isUndefined(e[c]))return i(void 0,e[c])}else return i(e[c],t[c])}function m(c){if(!ae.isUndefined(t[c]))return i(void 0,t[c])}function x(c){if(ae.isUndefined(t[c])){if(!ae.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 ae.forEach(Object.keys(e).concat(Object.keys(t)),function(g){var o=a[g]||n,u=o(g);ae.isUndefined(u)&&o!==p||(s[g]=u)}),s},Nt,dr;function xr(){return dr||(dr=1,Nt={version:"0.27.2"}),Nt}var Ci=xr().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 lr={};Wt.transitional=function(e,t,s){function i(n,m){return"[Axios v"+Ci+"] 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&&!lr[m]&&(lr[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 Ai(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 wi={assertOptions:Ai,validators:Wt},ur=te,Fi=W0,pr=Zs,fr=_i,xt=cr,Di=X0,hr=wi,Ne=hr.validators;function We(r){this.defaults=r,this.interceptors={request:new pr,response:new pr}}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=[fr,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=fr(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=Di(e.baseURL,e.url);return Fi(t,e.params,e.paramsSerializer)},ur.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}))}}),ur.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 $i=We,Mt,vr;function ki(){if(vr)return Mt;vr=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,yr;function Pi(){return yr||(yr=1,Lt=function(e){return function(s){return e.apply(null,s)}}),Lt}var qt,mr;function Si(){if(mr)return qt;mr=1;var r=te;return qt=function(t){return r.isObject(t)&&t.isAxiosError===!0},qt}var Er=te,Ii=O0,lt=$i,Ti=cr,Ri=Rt;function gr(r){var e=new lt(r),t=Ii(lt.prototype.request,e);return Er.extend(t,lt.prototype,e),Er.extend(t,e),t.create=function(i){return gr(Ti(r,i))},t}var ie=gr(Ri);ie.Axios=lt,ie.CanceledError=ct(),ie.CancelToken=ki(),ie.isCancel=or(),ie.VERSION=xr().version,ie.toFormData=j0,ie.AxiosError=He,ie.Cancel=ie.CanceledError,ie.all=function(e){return Promise.all(e)},ie.spread=Pi(),ie.isAxiosError=Si(),gt.exports=ie,gt.exports.default=ie;var Oi=gt.exports,Ui=Oi;const Xe=Te(Ui);var zt={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,h){for(var b=0;b<16;b++){var d=h+b,l=y[d];y[d]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var v=this._hash.words,E=y[h+0],_=y[h+1],A=y[h+2],w=y[h+3],I=y[h+4],B=y[h+5],C=y[h+6],F=y[h+7],D=y[h+8],T=y[h+9],O=y[h+10],U=y[h+11],Y=y[h+12],j=y[h+13],X=y[h+14],K=y[h+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]),$=f($,P,S,k,E,6,a[48]),k=f(k,$,P,S,F,10,a[49]),S=f(S,k,$,P,X,15,a[50]),P=f(P,S,k,$,B,21,a[51]),$=f($,P,S,k,Y,6,a[52]),k=f(k,$,P,S,w,10,a[53]),S=f(S,k,$,P,O,15,a[54]),P=f(P,S,k,$,_,21,a[55]),$=f($,P,S,k,D,6,a[56]),k=f(k,$,P,S,K,10,a[57]),S=f(S,k,$,P,C,15,a[58]),P=f(P,S,k,$,j,21,a[59]),$=f($,P,S,k,I,6,a[60]),k=f(k,$,P,S,U,10,a[61]),S=f(S,k,$,P,A,15,a[62]),P=f(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,h=y.words,b=this._nDataBytes*8,d=y.sigBytes*8;h[d>>>5]|=128<<24-d%32;var l=s.floor(b/4294967296),v=b;h[(d+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,h[(d+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,y.sigBytes=(h.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,h,b,d,l,v,E){var _=y+(h&b|~h&d)+l+E;return(_<<v|_>>>32-v)+h}function o(y,h,b,d,l,v,E){var _=y+(h&d|b&~d)+l+E;return(_<<v|_>>>32-v)+h}function u(y,h,b,d,l,v,E){var _=y+(h^b^d)+l+E;return(_<<v|_>>>32-v)+h}function f(y,h,b,d,l,v,E){var _=y+(b^(h|~d))+l+E;return(_<<v|_>>>32-v)+h}i.MD5=x._createHelper(c),i.HmacMD5=x._createHmacHelper(c)}(Math),t.MD5})})(Br);var Ce=Br.exports;const br=Te(Ce);var jt={exports:{}},Kt={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],f=o[1],y=o[2],h=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+=(f&y|~f&h)+1518500249:d<40?v+=(f^y^h)+1859775393:d<60?v+=(f&y|f&h|y&h)-1894007588:v+=(f^y^h)-899497514,b=h,h=y,y=f<<30|f>>>2,f=u,u=v}o[0]=o[0]+u|0,o[1]=o[1]+f|0,o[2]=o[2]+y|0,o[3]=o[3]+h|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})}(Kt)),Kt.exports}var Gt={exports:{}},Ar;function Xt(){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(),f=this._iKey=c.clone(),y=u.words,h=f.words,b=0;b<g;b++)y[b]^=1549556828,h[b]^=909522486;u.sigBytes=f.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}})})()})}(Gt)),Gt.exports}var wr;function Ae(){return wr||(wr=1,function(r,e){(function(t,s,i){r.exports=s(L(),Cr(),Xt())})(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,f=u.hasher.create(),y=m.create(),h=y.words,b=u.keySize,d=u.iterations;h.length<b;){o&&f.update(o),o=f.update(c).finalize(g),f.reset();for(var l=1;l<d;l++)o=f.finalize(o),f.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})}(jt)),jt.exports}var Vt={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 f=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}}),h=f.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:h,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}})}()})}(Vt)),Vt.exports}var Dr;function $r(){return Dr||(Dr=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,x=[],p=[],a=[],c=[],g=[],o=[],u=[],f=[],y=[],h=[];(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,f[A]=C<<16|C>>>16,y[A]=C<<8|C>>>24,h[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]]^f[x[l>>>16&255]]^y[x[l>>>8&255]]^h[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,f,y,h,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})}(zt)),zt.exports}var Hi=$r();const Yt=Te(Hi);class fe{constructor(){this.$http=Xe.create({timeout:6e4})}static encryptParams(e){ze(e,"object")&&(e=JSON.stringify(e));let t=Yt.encrypt(e,P0());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(){Xe.defaults.headers.common["Content-Type"]="application/json",Xe.defaults.headers.common.Accept="application/json",Xe.interceptors.request.use(e=>(q(e.data),this.isHttpBodyUsedMethod(e.method)&&(e.data=fe.encryptParams(fe.objectKeyToUnderscore(e.data))),e.headers!==void 0&&q(e.headers.progress)&&delete e.headers.progress,e),e=>Promise.reject(e)),Xe.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}}fe.axiosMultipayConfigure();class Ni extends fe{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 Wi=new Ni;class Mi extends it{constructor(){super(),this.$messageEventName="message.BootpayPaymentEvent",this.$eventPrefix="bootpay",this.$pollingInterval=void 0,this.resetPollingData(),this.$pollingEvent=Wi,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,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(Bs(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 he=new Mi;class Li extends fe{constructor(){super(),this.$session=De,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=$e.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 Ve=new Li,Jt={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],Jt);return q(s)&&q(s[e])?s[e]:s.ko}};class qi 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`
|
|
15
|
+
`}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","block")}hideProgress(){try{this.byId(this.$alfredId).outerHTML=""}catch{}}}const le=new Fs;var Et={exports:{}},O0=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=O0,gt=Object.prototype.toString,Bt=function(r){return function(e){var t=gt.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())}}(Object.create(null));function Pe(r){return r=r.toLowerCase(),function(t){return Bt(t)===r}}function bt(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 U0=Pe("ArrayBuffer");function ks(r){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&U0(r.buffer),e}function Ps(r){return typeof r=="string"}function Ss(r){return typeof r=="number"}function H0(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=Pe("Date"),Ts=Pe("File"),Rs=Pe("Blob"),Os=Pe("FileList");function _t(r){return gt.call(r)==="[object Function]"}function Us(r){return H0(r)&&_t(r.pipe)}function Hs(r){var e="[object FormData]";return r&&(typeof FormData=="function"&&r instanceof FormData||gt.call(r)===e||_t(r.toString)&&r.toString()===e)}var Ns=Pe("URLSearchParams");function Ms(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function Ws(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Ct(r,e){if(!(r===null||typeof r>"u"))if(typeof r!="object"&&(r=[r]),bt(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 At(){var r={};function e(i,n){ot(r[n])&&ot(i)?r[n]=At(r[n],i):ot(i)?r[n]=At({},i):bt(i)?r[n]=i.slice():r[n]=i}for(var t=0,s=arguments.length;t<s;t++)Ct(arguments[t],e);return r}function Ls(r,e,t){return Ct(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:bt,isArrayBuffer:U0,isBuffer:$s,isFormData:Hs,isArrayBufferView:ks,isString:Ps,isNumber:Ss,isObject:H0,isPlainObject:ot,isUndefined:nt,isDate:Is,isFile:Ts,isBlob:Rs,isFunction:_t,isStream:Us,isURLSearchParams:Ns,isStandardBrowserEnv:Ws,forEach:Ct,merge:At,extend:Ls,trim:Ms,stripBOM:qs,inherits:zs,toFlatObject:js,kindOf:Bt,kindOfTest:Pe,endsWith:Ks,toArray:Gs,isTypedArray:Xs,isFileList:Os},Oe=te;function N0(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var M0=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(N0(a)+"="+N0(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 L0=Ue.prototype,q0={};["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){q0[r]={value:r}}),Object.defineProperties(Ue,q0),Object.defineProperty(L0,"isAxiosError",{value:!0}),Ue.from=function(r,e,t,s,i,n){var m=Object.create(L0);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,z0={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 j0=Qs,wt,K0;function ei(){if(K0)return wt;K0=1;var r=He;return wt=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))},wt}var Ft,G0;function ti(){if(G0)return Ft;G0=1;var r=te;return Ft=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(){}}}(),Ft}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,X0=function(e,t){return e&&!ii(t)?ni(e,t):t},Dt,V0;function oi(){if(V0)return Dt;V0=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 Dt=function(s){var i={},n,m,x;return s&&r.forEach(s.split(`
|
|
16
|
+
`),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},Dt}var $t,Y0;function ai(){if(Y0)return $t;Y0=1;var r=te;return $t=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}}(),$t}var kt,J0;function ct(){if(J0)return kt;J0=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}),kt=t,kt}var Pt,Z0;function ci(){return Z0||(Z0=1,Pt=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}),Pt}var St,Q0;function er(){if(Q0)return St;Q0=1;var r=te,e=ei(),t=ti(),s=M0,i=X0,n=oi(),m=ai(),x=z0,p=He,a=ct(),c=ci();return St=function(o){return new Promise(function(f,y){var h=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(h)&&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){f(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 h>"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))),h||(h=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(h)})},St}var It,tr;function di(){return tr||(tr=1,It=null),It}var Q=te,rr=Zs,sr=He,xi=z0,li=j0,ui={"Content-Type":"application/x-www-form-urlencoded"};function ir(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=er()),r}function fi(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(rr(t,"Accept"),rr(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 ir(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 ir(t,"application/json"),fi(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"?sr.from(m,sr.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 Tt=dt,hi=te,vi=Tt,yi=function(e,t,s){var i=this||vi;return hi.forEach(s,function(m){e=m.call(i,e,t)}),e},Rt,nr;function or(){return nr||(nr=1,Rt=function(e){return!!(e&&e.__CANCEL__)}),Rt}var ar=te,Ot=yi,mi=or(),Ei=Tt,gi=ct();function Ut(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new gi}var Bi=function(e){Ut(e),e.headers=e.headers||{},e.data=Ot.call(e,e.data,e.headers,e.transformRequest),e.headers=ar.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ar.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 Ut(e),i.data=Ot.call(e,i.data,i.headers,e.transformResponse),i},function(i){return mi(i)||(Ut(e),i&&i.response&&(i.response.data=Ot.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})},ae=te,cr=function(e,t){t=t||{};var s={};function i(c,g){return ae.isPlainObject(c)&&ae.isPlainObject(g)?ae.merge(c,g):ae.isPlainObject(g)?ae.merge({},g):ae.isArray(g)?g.slice():g}function n(c){if(ae.isUndefined(t[c])){if(!ae.isUndefined(e[c]))return i(void 0,e[c])}else return i(e[c],t[c])}function m(c){if(!ae.isUndefined(t[c]))return i(void 0,t[c])}function x(c){if(ae.isUndefined(t[c])){if(!ae.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 ae.forEach(Object.keys(e).concat(Object.keys(t)),function(g){var o=a[g]||n,u=o(g);ae.isUndefined(u)&&o!==p||(s[g]=u)}),s},Ht,dr;function xr(){return dr||(dr=1,Ht={version:"0.27.2"}),Ht}var bi=xr().version,_e=He,Nt={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){Nt[r]=function(s){return typeof s===r||"a"+(e<1?"n ":" ")+r}});var lr={};Nt.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&&!lr[m]&&(lr[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:Nt},ur=te,Ai=M0,pr=Ys,fr=Bi,xt=cr,wi=X0,hr=Ci,Ne=hr.validators;function Me(r){this.defaults=r,this.interceptors={request:new pr,response:new pr}}Me.prototype.request=function(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=xt(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var s=t.transitional;s!==void 0&&hr.assertOptions(s,{silentJSONParsing:Ne.transitional(Ne.boolean),forcedJSONParsing:Ne.transitional(Ne.boolean),clarifyTimeoutError:Ne.transitional(Ne.boolean)},!1);var i=[],n=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(t)===!1||(n=n&&u.synchronous,i.unshift(u.fulfilled,u.rejected))});var m=[];this.interceptors.response.forEach(function(u){m.push(u.fulfilled,u.rejected)});var x;if(!n){var p=[fr,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=fr(a)}catch(o){return Promise.reject(o)}for(;m.length;)x=x.then(m.shift(),m.shift());return x},Me.prototype.getUri=function(e){e=xt(this.defaults,e);var t=wi(e.baseURL,e.url);return Ai(t,e.params,e.paramsSerializer)},ur.forEach(["delete","get","head","options"],function(e){Me.prototype[e]=function(t,s){return this.request(xt(s||{},{method:e,url:t,data:(s||{}).data}))}}),ur.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}))}}Me.prototype[e]=t(),Me.prototype[e+"Form"]=t(!0)});var Fi=Me,Mt,vr;function Di(){if(vr)return Mt;vr=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 Wt,yr;function $i(){return yr||(yr=1,Wt=function(e){return function(s){return e.apply(null,s)}}),Wt}var Lt,mr;function ki(){if(mr)return Lt;mr=1;var r=te;return Lt=function(t){return r.isObject(t)&&t.isAxiosError===!0},Lt}var Er=te,Pi=O0,lt=Fi,Si=cr,Ii=Tt;function gr(r){var e=new lt(r),t=Pi(lt.prototype.request,e);return Er.extend(t,lt.prototype,e),Er.extend(t,e),t.create=function(i){return gr(Si(r,i))},t}var ie=gr(Ii);ie.Axios=lt,ie.CanceledError=ct(),ie.CancelToken=Di(),ie.isCancel=or(),ie.VERSION=xr().version,ie.toFormData=j0,ie.AxiosError=He,ie.Cancel=ie.CanceledError,ie.all=function(e){return Promise.all(e)},ie.spread=$i(),ie.isAxiosError=ki(),Et.exports=ie,Et.exports.default=ie;var Ti=Et.exports,Ri=Ti;const Xe=Te(Ri);var qt={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,h){for(var b=0;b<16;b++){var d=h+b,l=y[d];y[d]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var v=this._hash.words,E=y[h+0],_=y[h+1],A=y[h+2],w=y[h+3],I=y[h+4],B=y[h+5],C=y[h+6],F=y[h+7],D=y[h+8],T=y[h+9],O=y[h+10],U=y[h+11],Y=y[h+12],j=y[h+13],X=y[h+14],K=y[h+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]),$=f($,P,S,k,E,6,a[48]),k=f(k,$,P,S,F,10,a[49]),S=f(S,k,$,P,X,15,a[50]),P=f(P,S,k,$,B,21,a[51]),$=f($,P,S,k,Y,6,a[52]),k=f(k,$,P,S,w,10,a[53]),S=f(S,k,$,P,O,15,a[54]),P=f(P,S,k,$,_,21,a[55]),$=f($,P,S,k,D,6,a[56]),k=f(k,$,P,S,K,10,a[57]),S=f(S,k,$,P,C,15,a[58]),P=f(P,S,k,$,j,21,a[59]),$=f($,P,S,k,I,6,a[60]),k=f(k,$,P,S,U,10,a[61]),S=f(S,k,$,P,A,15,a[62]),P=f(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,h=y.words,b=this._nDataBytes*8,d=y.sigBytes*8;h[d>>>5]|=128<<24-d%32;var l=s.floor(b/4294967296),v=b;h[(d+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,h[(d+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,y.sigBytes=(h.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,h,b,d,l,v,E){var _=y+(h&b|~h&d)+l+E;return(_<<v|_>>>32-v)+h}function o(y,h,b,d,l,v,E){var _=y+(h&d|b&~d)+l+E;return(_<<v|_>>>32-v)+h}function u(y,h,b,d,l,v,E){var _=y+(h^b^d)+l+E;return(_<<v|_>>>32-v)+h}function f(y,h,b,d,l,v,E){var _=y+(b^(h|~d))+l+E;return(_<<v|_>>>32-v)+h}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],f=o[1],y=o[2],h=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+=(f&y|~f&h)+1518500249:d<40?v+=(f^y^h)+1859775393:d<60?v+=(f&y|f&h|y&h)-1894007588:v+=(f^y^h)-899497514,b=h,h=y,y=f<<30|f>>>2,f=u,u=v}o[0]=o[0]+u|0,o[1]=o[1]+f|0,o[2]=o[2]+y|0,o[3]=o[3]+h|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(),f=this._iKey=c.clone(),y=u.words,h=f.words,b=0;b<g;b++)y[b]^=1549556828,h[b]^=909522486;u.sigBytes=f.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,f=u.hasher.create(),y=m.create(),h=y.words,b=u.keySize,d=u.iterations;h.length<b;){o&&f.update(o),o=f.update(c).finalize(g),f.reset();for(var l=1;l<d;l++)o=f.finalize(o),f.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 f=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}}),h=f.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:h,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}var Dr;function $r(){return Dr||(Dr=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,x=[],p=[],a=[],c=[],g=[],o=[],u=[],f=[],y=[],h=[];(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,f[A]=C<<16|C>>>16,y[A]=C<<8|C>>>24,h[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]]^f[x[l>>>16&255]]^y[x[l>>>8&255]]^h[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,f,y,h,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})}(qt)),qt.exports}var Oi=$r();const Vt=Te(Oi);class fe{constructor(){this.$http=Xe.create({timeout:6e4})}static encryptParams(e){ze(e,"object")&&(e=JSON.stringify(e));let t=Vt.encrypt(e,P0());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(){Xe.defaults.headers.common["Content-Type"]="application/json",Xe.defaults.headers.common.Accept="application/json",Xe.interceptors.request.use(e=>(q(e.data),this.isHttpBodyUsedMethod(e.method)&&(e.data=fe.encryptParams(fe.objectKeyToUnderscore(e.data))),e.headers!==void 0&&q(e.headers.progress)&&delete e.headers.progress,e),e=>Promise.reject(e)),Xe.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}}fe.axiosMultipayConfigure();class Ui extends fe{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 Hi=new Ui;class Ni extends it{constructor(){super(),this.$messageEventName="message.BootpayPaymentEvent",this.$eventPrefix="bootpay",this.$pollingInterval=void 0,this.resetPollingData(),this.$pollingEvent=Hi,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"?W.setConfirmRedirect(n):W.setConfirmFormUrl(n);break;case"confirm":return this.resolve({event:i.event,receipt_id:i.receipt_id,gateway_url:i.gateway_url,order_id:i.order_id});case"redirect":W.destroy(!1),location.href=i.url;return;case"moveRedirectUrl":W.closePopup(),W.hidePaymentiFrame(),le.showProgress("결제 진행 중입니다. 잠시만 기다려주세요."),location.replace(gs(i.url,i.parameters)),setTimeout(()=>{W.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":W.createPopupButton({gatewayUrl:i.url,receiptId:i.receipt_id,name:i.name,price:i.price});break;case"close":W.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":W.iFrameSetStyle(e.styles);break;case"windowStyle":W.windowStyle(e.styles);break;case"resize":W.iFrameResize(e.resizeData);break}}handleVisibilityUpdate(e){switch(e.event){case"hidePayment":W.closePopup(),W.hidePaymentiFrame();break;case"showPayment":W.showPaymentiFrame(this.$present(e.showCloseButton)?e.showCloseButton:!1);break}}handlePollingResponse(e){let t={bootpay_event:!0,event:"",data:e.data};if(e.data!==void 0){if(H.debug("polling event",`receive data: ${JSON.stringify(t)}`),e.data.status===1)return t.event="done",window.postMessage(JSON.stringify(t),"*");if(e.data.status===5)return t.event="issued",window.postMessage(JSON.stringify(t),"*")}}resetPollingData(){this.$pollingData={applicationId:"",gatewayUrl:"",receiptId:"",transactionKey:""}}}const he=new Ni;class Mi extends fe{constructor(){super(),this.$session=De,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=$e.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 Ve=new Mi,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`
|
|
17
17
|
<div id="${this.$windowId}" class="bootpay-payment-background">
|
|
18
18
|
<div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$paymentWindowId}">
|
|
19
19
|
<button class="bootpay-close-btn" id="${this.$closeButton}" style="display: none;" onclick="Bootpay.dismiss()"></button>
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
<iframe id="${this.$confirmIFrame}" name="${this.$confirmIFrame}"></iframe>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
-
`}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=fe.encryptParams(fe.objectKeyToUnderscore(e));this.setupForm(n,this.$env.toApi(this.apiUrl()));const m=this.byId(this.$formId);this.$present(e.extra)&&e.extra.popup,m.target=this.$iFrameId,m.submit()})}setConfirmFormUrl(e){const t=this.byId(this.$confirmIFrame),s=this.byId(this.$confirmFormId);t.style.setProperty("display","block"),s.target=this.$confirmIFrame,s.action=e}setConfirmRedirect(e){const t=this.byId(this.$confirmFormId);t.target="_self",t.action=e}confirm(){return new Promise((e,t)=>{he.bind(e,t);const s=this.byId(this.$confirmFormId);if(this.$blank(s.action))throw new xe({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`,Ve.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 Ve.sendCloseEvent()}catch(s){H.debug("popup",Ge(s))}return this.$popupUrl=void 0,he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:this.message("closeMessage")})}},500),this.bindParentEventOnPopup()}closePopup(){if(this.$popupWatcher!==void 0)try{clearInterval(this.$popupWatcher),H.debug("close popup","clear popup interval")}catch(e){H.info("clear popup watcher",Ge(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",Ge(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",Ge(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(),he.allClearEvent(),Ve.clearInstance(),e&&setTimeout(()=>he.callBootpayDOMEvent("close"),300)}iFrameResize(e){const t=this.byId(this.$iFrameId);if(t!==void 0){for(let s in e)if(String(e[s]).match(/%/)&&!this.byId(this.$paymentWindowId).className.match(/w-100/)){this.byId(this.$paymentWindowId).className+=" w-100";break}this.applyStylesToElement(t,e)}}iFrameSetStyle(e){H.debug("change style",e);const t=this.byId(this.$iFrameId);this.safeApplyStyles(t,e,"iframe style")}windowStyle(e){H.debug("change style",e);const t=this.byId(this.$paymentWindowId);this.safeApplyStyles(t,e,"window style")}safeApplyStyles(e,t,s){for(let i in t)try{H.debug(i,t[i]),e.style.setProperty(i,t[i])}catch(n){H.warn(s,n==null?void 0:n.message)}}hidePaymentiFrame(){const e=this.byId(this.$iFrameId),t=this.byId(this.$closeButton);e!==void 0&&e.style.setProperty("display","none"),t!==void 0&&t.style.setProperty("display","none")}message(e){return
|
|
46
|
+
`}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=fe.encryptParams(fe.objectKeyToUnderscore(e));this.setupForm(n,this.$env.toApi(this.apiUrl()));const m=this.byId(this.$formId);this.$present(e.extra)&&e.extra.popup,m.target=this.$iFrameId,m.submit()})}setConfirmFormUrl(e){const t=this.byId(this.$confirmIFrame),s=this.byId(this.$confirmFormId);t.style.setProperty("display","block"),s.target=this.$confirmIFrame,s.action=e}setConfirmRedirect(e){const t=this.byId(this.$confirmFormId);t.target="_self",t.action=e}confirm(){return new Promise((e,t)=>{he.bind(e,t);const s=this.byId(this.$confirmFormId);if(this.$blank(s.action))throw new xe({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`,Ve.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 Ve.sendCloseEvent()}catch(s){H.debug("popup",Ge(s))}return this.$popupUrl=void 0,he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:this.message("closeMessage")})}},500),this.bindParentEventOnPopup()}closePopup(){if(this.$popupWatcher!==void 0)try{clearInterval(this.$popupWatcher),H.debug("close popup","clear popup interval")}catch(e){H.info("clear popup watcher",Ge(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",Ge(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",Ge(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(),he.allClearEvent(),Ve.clearInstance(),e&&setTimeout(()=>he.callBootpayDOMEvent("close"),300)}iFrameResize(e){const t=this.byId(this.$iFrameId);if(t!==void 0){for(let s in e)if(String(e[s]).match(/%/)&&!this.byId(this.$paymentWindowId).className.match(/w-100/)){this.byId(this.$paymentWindowId).className+=" w-100";break}this.applyStylesToElement(t,e)}}iFrameSetStyle(e){H.debug("change style",e);const t=this.byId(this.$iFrameId);this.safeApplyStyles(t,e,"iframe style")}windowStyle(e){H.debug("change style",e);const t=this.byId(this.$paymentWindowId);this.safeApplyStyles(t,e,"window style")}safeApplyStyles(e,t,s){for(let i in t)try{H.debug(i,t[i]),e.style.setProperty(i,t[i])}catch(n){H.warn(s,n==null?void 0:n.message)}}hidePaymentiFrame(){const e=this.byId(this.$iFrameId),t=this.byId(this.$closeButton);e!==void 0&&e.style.setProperty("display","none"),t!==void 0&&t.style.setProperty("display","none")}message(e){return Yt.getLocaleMessage(`${e}.${this.mode}`,R.locale)}moveToUrl(e){const t=this.byId(this.$iFrameId);this.hidePaymentiFrame(),t.removeAttribute("style"),this.iFrameResize({width:R.isMobile()?"100%":400,height:R.isMobile()?"100%":700}),t.style.setProperty("display","block"),t.src=e}apiUrl(){return this.modeApiUrl[this.mode]}setupForm(e,t){const s=this.byId(this.$formId);s.innerHTML=`
|
|
47
47
|
<input type="hidden" name="payload" value="${e.payload}" />
|
|
48
48
|
<input type="hidden" name="token" value="${e.token}" />
|
|
49
|
-
`,s.action=t,s.target=this.$iFrameId}setupFormForUrl(e){const t=this.byId(this.$formId);t.method="GET",t.action=e,t.target=this.$iFrameId}initializePayment(e,t,s,i,n){this.mode=e,this.templateReload(),he.clearPollingEvent(),he.bind(t,s),i&&n&&he.setDefaultPaymentData(i,n)}}const M=new qi,Ie=class Ie extends je{constructor(){super(),this.$session=De,this.$logger=H,this.$event=Ve,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=R.currentApplicationId(e.application_id),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)),Ie.invalidRequestParamsData(e),Ie.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=${e.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.application_id,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=${e.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.application_id,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:$e.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=${e.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=${e.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 xe({event:"error",error_code:"NEED_MORE_PARAMS",message:"결제 요청을 위한 최소한의 결제 정보를 입력해주세요."});Object.keys(Ie.invalidRequestParams).forEach(t=>{const s=e[t];if(se(s))throw new xe({event:"error",error_code:"INVALID_REQUEST_PARAMS",message:Ie.invalidRequestParams[t]})})}static invalidRequestItemsData(e,t){if(e!==void 0&&q(e)){let s=0;if(e.forEach((i,n)=>{if(se(i.id))throw new xe({event:"error",error_code:"NEED_ITEM_ID",message:`${n+1}번째 상품 고유 ID를 입력해주세요. [ key: id ]`});if(se(i.name))throw new xe({event:"error",error_code:"NEED_ITEM_NAME",message:`${n+1}번째 상품명을 입력해주세요. [ key: name ]`});if(se(i.qty))throw new xe({event:"error",error_code:"NEED_ITEM_QTY",message:`${n+1}번째 상품수량을 입력해주세요. [ key: qty ]`});if(se(i.price))throw new xe({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 xe({event:"error",error_code:"NEED_ITEM_TOTAL_PRICE_NOT_MATCH",message:`결제 금액과 상품 수량 및 상품 금액의 총합과 일치하지 않습니다. [ 요청금액: ${t} ${typeof t}, 상품 총합계 금액: ${s} ${typeof s} ]`})}}};Ie.invalidRequestParams={application_id:"application_id를 입력해주세요. [ key: application_id ]",order_name:"판매할 상품명을 입력해주세요. [ key: order_name ]",price:"판매할 상품의 금액을 입력해주세요. [ key: price ]",order_id:"가맹점에서 설정할 주문 ID를 입력해주세요. [ key: order_id ]"};let Ye=Ie;const zi=new Ye;class ji extends fe{constructor(){super(),this.$session=De}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=${$e.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=${$e.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 Ki=new ji;(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:zi,$analytics:Ki,$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 De.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 Ve.sendCloseEvent()}catch(e){H.debug("error",e.message)}he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})},getCurrentUUID(){return De.currentUserUUID()},destroy(){M.destroy()},overrideGlobalInstance(){window.Bootpay=Ee}};typeof window<"u"&&(window.Bootpay=Ee);class Gi extends it{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":D0.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:{}},Zt={exports:{}},Pr;function ut(){return Pr||(Pr=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})}(Zt)),Zt.exports}var Qt={exports:{}},Sr;function Xi(){return Sr||(Sr=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})}(Qt)),Qt.exports}var e0={exports:{}},Ir;function Vi(){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.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})}(e0)),e0.exports}var t0={exports:{}},Tr;function Yi(){return Tr||(Tr=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=[],f=0;f<g;f+=3)for(var y=c[f>>>2]>>>24-f%4*8&255,h=c[f+1>>>2]>>>24-(f+1)%4*8&255,b=c[f+2>>>2]>>>24-(f+2)%4*8&255,d=y<<16|h<<8|b,l=0;l<4&&f+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 f=g.charAt(64);if(f){var y=p.indexOf(f);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 f=c[p.charCodeAt(u-1)]<<u%4*2,y=c[p.charCodeAt(u)]>>>6-u%4*2,h=f|y;g[o>>>2]|=h<<24-o%4*8,o++}return n.create(g,o)}}(),t.enc.Base64url})}(t0)),t0.exports}var r0={exports:{}},Rr;function s0(){return Rr||(Rr=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 f(b){return(b-(b|0))*4294967296|0}for(var y=2,h=0;h<64;)u(y)&&(h<8&&(a[h]=f(s.pow(y,1/2))),c[h]=f(s.pow(y,1/3)),h++),y++})();var g=[],o=p.SHA256=x.extend({_doReset:function(){this._hash=new m.init(a.slice(0))},_doProcessBlock:function(u,f){for(var y=this._hash.words,h=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[f+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=h&b^h&d^b&d,O=(h<<30|h>>>2)^(h<<19|h>>>13)^(h<<10|h>>>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=h,h=Y+j|0}y[0]=y[0]+h|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,f=u.words,y=this._nDataBytes*8,h=u.sigBytes*8;return f[h>>>5]|=128<<24-h%32,f[(h+64>>>9<<4)+14]=s.floor(y/4294967296),f[(h+64>>>9<<4)+15]=y,u.sigBytes=f.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})}(r0)),r0.exports}var i0={exports:{}},Or;function Ji(){return Or||(Or=1,function(r,e){(function(t,s,i){r.exports=s(L(),s0())})(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})}(i0)),i0.exports}var n0={exports:{}},Ur;function Hr(){return Ur||(Ur=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 f=0;f<80;f++)o[f]=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(f,y){for(var h=this._hash.words,b=h[0],d=h[1],l=h[2],v=h[3],E=h[4],_=h[5],A=h[6],w=h[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,Je=D,Me=T,$0=O,Ze=U,ve=Y,ce=j,ft=X,Qe=K,ht=$,et=P,k0=S,tt=k,ye=0;ye<80;ye++){var ue,we,vt=o[ye];if(ye<16)we=vt.high=f[y+ye*2]|0,ue=vt.low=f[y+ye*2+1]|0;else{var ds=o[ye-15],Le=ds.high,rt=ds.low,Rn=(Le>>>1|rt<<31)^(Le>>>8|rt<<24)^Le>>>7,xs=(rt>>>1|Le<<31)^(rt>>>8|Le<<24)^(rt>>>7|Le<<25),ls=o[ye-2],qe=ls.high,st=ls.low,On=(qe>>>19|st<<13)^(qe<<3|st>>>29)^qe>>>6,us=(st>>>19|qe<<13)^(st<<3|qe>>>29)^(st>>>6|qe<<26),ps=o[ye-7],Un=ps.high,Hn=ps.low,fs=o[ye-16],Nn=fs.high,hs=fs.low;ue=xs+Hn,we=Rn+Un+(ue>>>0<xs>>>0?1:0),ue=ue+us,we=we+On+(ue>>>0<us>>>0?1:0),ue=ue+hs,we=we+Nn+(ue>>>0<hs>>>0?1:0),vt.high=we,vt.low=ue}var Wn=ve&ft^~ve&ht,vs=ce&Qe^~ce&et,Mn=J&oe^J&Je^oe&Je,Ln=V&W^V&Me^W&Me,qn=(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),zn=(ve>>>14|ce<<18)^(ve>>>18|ce<<14)^(ve<<23|ce>>>9),jn=(ce>>>14|ve<<18)^(ce>>>18|ve<<14)^(ce<<23|ve>>>9),ms=g[ye],Kn=ms.high,Es=ms.low,de=tt+jn,Fe=k0+zn+(de>>>0<tt>>>0?1:0),de=de+vs,Fe=Fe+Wn+(de>>>0<vs>>>0?1:0),de=de+Es,Fe=Fe+Kn+(de>>>0<Es>>>0?1:0),de=de+ue,Fe=Fe+we+(de>>>0<ue>>>0?1:0),gs=ys+Ln,Gn=qn+Mn+(gs>>>0<ys>>>0?1:0);k0=ht,tt=et,ht=ft,et=Qe,ft=ve,Qe=ce,ce=Ze+de|0,ve=$0+Fe+(ce>>>0<Ze>>>0?1:0)|0,$0=Je,Ze=Me,Je=oe,Me=W,oe=J,W=V,V=de+gs|0,J=Fe+Gn+(V>>>0<de>>>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+Je+(T>>>0<Me>>>0?1:0),U=v.low=U+Ze,v.high=O+$0+(U>>>0<Ze>>>0?1:0),j=E.low=j+ce,E.high=Y+ve+(j>>>0<ce>>>0?1:0),K=_.low=K+Qe,_.high=X+ft+(K>>>0<Qe>>>0?1:0),P=A.low=P+et,A.high=$+ht+(P>>>0<et>>>0?1:0),k=w.low=k+tt,w.high=S+k0+(k>>>0<tt>>>0?1:0)},_doFinalize:function(){var f=this._data,y=f.words,h=this._nDataBytes*8,b=f.sigBytes*8;y[b>>>5]|=128<<24-b%32,y[(b+128>>>10<<5)+30]=Math.floor(h/4294967296),y[(b+128>>>10<<5)+31]=h,f.sigBytes=y.length*4,this._process();var d=this._hash.toX32();return d},clone:function(){var f=n.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});s.SHA512=n._createHelper(u),s.HmacSHA512=n._createHmacHelper(u)}(),t.SHA512})}(n0)),n0.exports}var o0={exports:{}},Nr;function Zi(){return Nr||(Nr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ut(),Hr())})(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})}(o0)),o0.exports}var a0={exports:{}},Wr;function Qi(){return Wr||(Wr=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 h=1,b=0,d=0;d<24;d++){g[h+5*b]=(d+1)*(d+2)/2%64;var l=b%5,v=(2*h+3*b)%5;h=l,b=v}for(var h=0;h<5;h++)for(var b=0;b<5;b++)o[h+5*b]=b+(2*h+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 f=[];(function(){for(var h=0;h<25;h++)f[h]=a.create()})();var y=c.SHA3=x.extend({cfg:x.cfg.extend({outputLength:512}),_doReset:function(){for(var h=this._state=[],b=0;b<25;b++)h[b]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(h,b){for(var d=this._state,l=this.blockSize/2,v=0;v<l;v++){var E=h[b+2*v],_=h[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=f[I];D.high=B,D.low=C}for(var I=0;I<5;I++)for(var T=f[(I+4)%5],O=f[(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=f[o[j]];P.high=B,P.low=C}var S=f[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=f[j],V=f[(I+1)%5+5*F],oe=f[(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 h=this._data,b=h.words;this._nDataBytes*8;var d=h.sigBytes*8,l=this.blockSize*32;b[d>>>5]|=1<<24-d%32,b[(s.ceil((d+1)/l)*l>>>5)-1]|=128,h.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 h=x.clone.call(this),b=h._state=this._state.slice(0),d=0;d<25;d++)b[d]=b[d].clone();return h}});i.SHA3=x._createHelper(y),i.HmacSHA3=x._createHmacHelper(y)}(Math),t.SHA3})}(a0)),a0.exports}var c0={exports:{}},Mr;function en(){return Mr||(Mr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){/** @preserve
|
|
49
|
+
`,s.action=t,s.target=this.$iFrameId}setupFormForUrl(e){const t=this.byId(this.$formId);t.method="GET",t.action=e,t.target=this.$iFrameId}initializePayment(e,t,s,i,n){this.mode=e,this.templateReload(),he.clearPollingEvent(),he.bind(t,s),i&&n&&he.setDefaultPaymentData(i,n)}}const W=new Wi,Ie=class Ie extends je{constructor(){super(),this.$session=De,this.$logger=H,this.$event=Ve,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=R.currentApplicationId(e.application_id),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)),Ie.invalidRequestParamsData(e),Ie.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 W.start(e);return H.debug("confirm ready",s),W.hidePaymentiFrame(),W.closePopup(),["done","issued"].indexOf(s.event)===-1&&this.$event.send({step:s.event,msg:"",request:e,response:s}),W.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${e.application_id}`),Promise.resolve(s)}catch(s){return this.eventError(s),Promise.reject(s)}}async confirm(){try{const e=await W.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):W.destroy()}eventError(e){le.hideProgress(),W.closePopup(),this.isDisplayErrorResult()&&e.event==="error"?this.displayResultErrorView(e):W.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.application_id,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 W.start(t,"CARD_SUBSCRIPTION");switch(H.debug("subscription success",s),this.$event.send({step:"confirm",msg:"결제승인전",request:{},response:s}),W.hidePaymentiFrame(),W.closePopup(),s.event){case"done":case"issued":break;case"confirm":W.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${e.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.application_id,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:$e.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 W.start(t,"AUTH");switch(H.debug("authentication success",s),this.$event.send({step:"confirm",msg:"본인인증 승인전",request:{},response:s}),W.hidePaymentiFrame(),W.closePopup(),s.event){case"done":case"issued":break;case"confirm":W.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${e.application_id}`)}return Promise.resolve(s)}catch(s){return this.eventError(s),Promise.reject(s)}}async requestPaymentUrl(e){try{const t=await W.startPaymentUrl(e.url);return["done","issued"].indexOf(t.event)===-1&&this.$event.send({step:t.event,msg:"",request:{url:e.url},response:t}),W.setConfirmFormUrl(`${t.gateway_url}/confirm/${t.receipt_id}?application_id=${e.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){W.moveToUrl(R.toDoor(`result/${e}`))}displayResultErrorView(e){W.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 xe({event:"error",error_code:"NEED_MORE_PARAMS",message:"결제 요청을 위한 최소한의 결제 정보를 입력해주세요."});Object.keys(Ie.invalidRequestParams).forEach(t=>{const s=e[t];if(se(s))throw new xe({event:"error",error_code:"INVALID_REQUEST_PARAMS",message:Ie.invalidRequestParams[t]})})}static invalidRequestItemsData(e,t){if(e!==void 0&&q(e)){let s=0;if(e.forEach((i,n)=>{if(se(i.id))throw new xe({event:"error",error_code:"NEED_ITEM_ID",message:`${n+1}번째 상품 고유 ID를 입력해주세요. [ key: id ]`});if(se(i.name))throw new xe({event:"error",error_code:"NEED_ITEM_NAME",message:`${n+1}번째 상품명을 입력해주세요. [ key: name ]`});if(se(i.qty))throw new xe({event:"error",error_code:"NEED_ITEM_QTY",message:`${n+1}번째 상품수량을 입력해주세요. [ key: qty ]`});if(se(i.price))throw new xe({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 xe({event:"error",error_code:"NEED_ITEM_TOTAL_PRICE_NOT_MATCH",message:`결제 금액과 상품 수량 및 상품 금액의 총합과 일치하지 않습니다. [ 요청금액: ${t} ${typeof t}, 상품 총합계 금액: ${s} ${typeof s} ]`})}}};Ie.invalidRequestParams={application_id:"application_id를 입력해주세요. [ key: application_id ]",order_name:"판매할 상품명을 입력해주세요. [ key: order_name ]",price:"판매할 상품의 금액을 입력해주세요. [ key: price ]",order_id:"가맹점에서 설정할 주문 ID를 입력해주세요. [ key: order_id ]"};let Ye=Ie;const Li=new Ye;class qi extends fe{constructor(){super(),this.$session=De}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=${$e.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=${$e.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 zi=new qi;(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:Li,$analytics:zi,$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(){W.readyToPopup()},setLogLevel(r){H.setLogLevel(r)},setUUID(r){return De.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),W.templateReload()},async dismiss(r=!1){if(r)try{await Ve.sendCloseEvent()}catch(e){H.debug("error",e.message)}he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})},getCurrentUUID(){return De.currentUserUUID()},destroy(){W.destroy()},overrideGlobalInstance(){window.Bootpay=Ee}};typeof window<"u"&&(window.Bootpay=Ee);class ji extends it{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":D0.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(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:{}},Sr;function Ki(){return Sr||(Sr=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:{}},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.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:{}},Tr;function Xi(){return Tr||(Tr=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=[],f=0;f<g;f+=3)for(var y=c[f>>>2]>>>24-f%4*8&255,h=c[f+1>>>2]>>>24-(f+1)%4*8&255,b=c[f+2>>>2]>>>24-(f+2)%4*8&255,d=y<<16|h<<8|b,l=0;l<4&&f+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 f=g.charAt(64);if(f){var y=p.indexOf(f);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 f=c[p.charCodeAt(u-1)]<<u%4*2,y=c[p.charCodeAt(u)]>>>6-u%4*2,h=f|y;g[o>>>2]|=h<<24-o%4*8,o++}return n.create(g,o)}}(),t.enc.Base64url})}(e0)),e0.exports}var t0={exports:{}},Rr;function r0(){return Rr||(Rr=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 f(b){return(b-(b|0))*4294967296|0}for(var y=2,h=0;h<64;)u(y)&&(h<8&&(a[h]=f(s.pow(y,1/2))),c[h]=f(s.pow(y,1/3)),h++),y++})();var g=[],o=p.SHA256=x.extend({_doReset:function(){this._hash=new m.init(a.slice(0))},_doProcessBlock:function(u,f){for(var y=this._hash.words,h=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[f+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=h&b^h&d^b&d,O=(h<<30|h>>>2)^(h<<19|h>>>13)^(h<<10|h>>>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=h,h=Y+j|0}y[0]=y[0]+h|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,f=u.words,y=this._nDataBytes*8,h=u.sigBytes*8;return f[h>>>5]|=128<<24-h%32,f[(h+64>>>9<<4)+14]=s.floor(y/4294967296),f[(h+64>>>9<<4)+15]=y,u.sigBytes=f.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:{}},Or;function Vi(){return Or||(Or=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:{}},Ur;function Hr(){return Ur||(Ur=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 f=0;f<80;f++)o[f]=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(f,y){for(var h=this._hash.words,b=h[0],d=h[1],l=h[2],v=h[3],E=h[4],_=h[5],A=h[6],w=h[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,M=F,Je=D,We=T,$0=O,Ze=U,ve=Y,ce=j,ft=X,Qe=K,ht=$,et=P,k0=S,tt=k,ye=0;ye<80;ye++){var ue,we,vt=o[ye];if(ye<16)we=vt.high=f[y+ye*2]|0,ue=vt.low=f[y+ye*2+1]|0;else{var cs=o[ye-15],Le=cs.high,rt=cs.low,In=(Le>>>1|rt<<31)^(Le>>>8|rt<<24)^Le>>>7,ds=(rt>>>1|Le<<31)^(rt>>>8|Le<<24)^(rt>>>7|Le<<25),xs=o[ye-2],qe=xs.high,st=xs.low,Tn=(qe>>>19|st<<13)^(qe<<3|st>>>29)^qe>>>6,ls=(st>>>19|qe<<13)^(st<<3|qe>>>29)^(st>>>6|qe<<26),us=o[ye-7],Rn=us.high,On=us.low,ps=o[ye-16],Un=ps.high,fs=ps.low;ue=ds+On,we=In+Rn+(ue>>>0<ds>>>0?1:0),ue=ue+ls,we=we+Tn+(ue>>>0<ls>>>0?1:0),ue=ue+fs,we=we+Un+(ue>>>0<fs>>>0?1:0),vt.high=we,vt.low=ue}var Hn=ve&ft^~ve&ht,hs=ce&Qe^~ce&et,Nn=J&oe^J&Je^oe&Je,Mn=V&M^V&We^M&We,Wn=(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),Ln=(ve>>>14|ce<<18)^(ve>>>18|ce<<14)^(ve<<23|ce>>>9),qn=(ce>>>14|ve<<18)^(ce>>>18|ve<<14)^(ce<<23|ve>>>9),ys=g[ye],zn=ys.high,ms=ys.low,de=tt+qn,Fe=k0+Ln+(de>>>0<tt>>>0?1:0),de=de+hs,Fe=Fe+Hn+(de>>>0<hs>>>0?1:0),de=de+ms,Fe=Fe+zn+(de>>>0<ms>>>0?1:0),de=de+ue,Fe=Fe+we+(de>>>0<ue>>>0?1:0),Es=vs+Mn,jn=Wn+Nn+(Es>>>0<vs>>>0?1:0);k0=ht,tt=et,ht=ft,et=Qe,ft=ve,Qe=ce,ce=Ze+de|0,ve=$0+Fe+(ce>>>0<Ze>>>0?1:0)|0,$0=Je,Ze=We,Je=oe,We=M,oe=J,M=V,V=de+Es|0,J=Fe+jn+(V>>>0<de>>>0?1:0)|0}B=b.low=B+V,b.high=I+J+(B>>>0<V>>>0?1:0),F=d.low=F+M,d.high=C+oe+(F>>>0<M>>>0?1:0),T=l.low=T+We,l.high=D+Je+(T>>>0<We>>>0?1:0),U=v.low=U+Ze,v.high=O+$0+(U>>>0<Ze>>>0?1:0),j=E.low=j+ce,E.high=Y+ve+(j>>>0<ce>>>0?1:0),K=_.low=K+Qe,_.high=X+ft+(K>>>0<Qe>>>0?1:0),P=A.low=P+et,A.high=$+ht+(P>>>0<et>>>0?1:0),k=w.low=k+tt,w.high=S+k0+(k>>>0<tt>>>0?1:0)},_doFinalize:function(){var f=this._data,y=f.words,h=this._nDataBytes*8,b=f.sigBytes*8;y[b>>>5]|=128<<24-b%32,y[(b+128>>>10<<5)+30]=Math.floor(h/4294967296),y[(b+128>>>10<<5)+31]=h,f.sigBytes=y.length*4,this._process();var d=this._hash.toX32();return d},clone:function(){var f=n.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});s.SHA512=n._createHelper(u),s.HmacSHA512=n._createHmacHelper(u)}(),t.SHA512})}(i0)),i0.exports}var n0={exports:{}},Nr;function Yi(){return Nr||(Nr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ut(),Hr())})(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:{}},Mr;function Ji(){return Mr||(Mr=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 h=1,b=0,d=0;d<24;d++){g[h+5*b]=(d+1)*(d+2)/2%64;var l=b%5,v=(2*h+3*b)%5;h=l,b=v}for(var h=0;h<5;h++)for(var b=0;b<5;b++)o[h+5*b]=b+(2*h+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 f=[];(function(){for(var h=0;h<25;h++)f[h]=a.create()})();var y=c.SHA3=x.extend({cfg:x.cfg.extend({outputLength:512}),_doReset:function(){for(var h=this._state=[],b=0;b<25;b++)h[b]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(h,b){for(var d=this._state,l=this.blockSize/2,v=0;v<l;v++){var E=h[b+2*v],_=h[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=f[I];D.high=B,D.low=C}for(var I=0;I<5;I++)for(var T=f[(I+4)%5],O=f[(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=f[o[j]];P.high=B,P.low=C}var S=f[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=f[j],V=f[(I+1)%5+5*F],oe=f[(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],M=u[w];A.high^=M.high,A.low^=M.low}},_doFinalize:function(){var h=this._data,b=h.words;this._nDataBytes*8;var d=h.sigBytes*8,l=this.blockSize*32;b[d>>>5]|=1<<24-d%32,b[(s.ceil((d+1)/l)*l>>>5)-1]|=128,h.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 h=x.clone.call(this),b=h._state=this._state.slice(0),d=0;d<25;d++)b[d]=b[d].clone();return h}});i.SHA3=x._createHelper(y),i.HmacSHA3=x._createHmacHelper(y)}(Math),t.SHA3})}(o0)),o0.exports}var a0={exports:{}},Wr;function Zi(){return Wr||(Wr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){/** @preserve
|
|
50
50
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
51
51
|
|
|
52
52
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
- 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.
|
|
56
56
|
|
|
57
57
|
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.
|
|
58
|
-
*/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]),f=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=f.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
|
|
58
|
+
*/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]),f=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=f.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 M,w=0;w<80;w+=1)M=j+_[A+T[w]]|0,w<16?M+=h(X,K,$)+F[0]:w<32?M+=b(X,K,$)+F[1]:w<48?M+=d(X,K,$)+F[2]:w<64?M+=l(X,K,$)+F[3]:M+=v(X,K,$)+F[4],M=M|0,M=E(M,U[w]),M=M+P|0,j=P,P=$,$=E(K,10),K=X,X=M,M=S+_[A+O[w]]|0,w<16?M+=v(k,J,V)+D[0]:w<32?M+=l(k,J,V)+D[1]:w<48?M+=d(k,J,V)+D[2]:w<64?M+=b(k,J,V)+D[3]:M+=h(k,J,V)+D[4],M=M|0,M=E(M,Y[w]),M=M+oe|0,S=oe,oe=V,V=E(J,10),J=k,k=M;M=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]=M},_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 h(_,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:{}},Lr;function Qi(){return Lr||(Lr=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,f=a.create(u.hasher,g),y=m.create(),h=m.create([1]),b=y.words,d=h.words,l=u.keySize,v=u.iterations;b.length<l;){var E=f.update(o).finalize(h);f.reset();for(var _=E.words,A=_.length,w=E,I=1;I<v;I++){w=f.finalize(w),f.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:{}},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.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:{}},zr;function tn(){return zr||(zr=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:{}},jr;function rn(){return jr||(jr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ee())})(N,function(t){/** @preserve
|
|
59
59
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
60
60
|
* derived from CryptoJS.mode.CTR
|
|
61
61
|
* Jan Hruby jhruby.web@gmail.com
|
|
62
|
-
*/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 f=0;f<c;f++)x[p+f]^=u[f]}});return s.Decryptor=m,s}(),t.mode.CTRGladman})}(u0)),u0.exports}var p0={exports:{}},Kr;function on(){return Kr||(Kr=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})}(p0)),p0.exports}var f0={exports:{}},Gr;function an(){return Gr||(Gr=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})}(f0)),f0.exports}var h0={exports:{}},Xr;function cn(){return Xr||(Xr=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 v0={exports:{}},Vr;function dn(){return Vr||(Vr=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})}(v0)),v0.exports}var y0={exports:{}},Yr;function xn(){return Yr||(Yr=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})}(y0)),y0.exports}var m0={exports:{}},Jr;function ln(){return Jr||(Jr=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})}(m0)),m0.exports}var E0={exports:{}},Zr;function un(){return Zr||(Zr=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})}(E0)),E0.exports}var g0={exports:{}},Qr;function pn(){return Qr||(Qr=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})}(g0)),g0.exports}var B0={exports:{}},es;function fn(){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.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],f.call(this,4,252645135),f.call(this,16,65535),y.call(this,2,858993459),y.call(this,8,16711935),f.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,f.call(this,1,1431655765),y.call(this,8,16711935),y.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),b[d]=this._lBlock,b[d+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function f(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 h=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(h)}(),t.TripleDES})}(B0)),B0.exports}var b0={exports:{}},ts;function hn(){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=m.RC4=n.extend({_doReset:function(){for(var c=this._key,g=c.words,o=c.sigBytes,u=this._S=[],f=0;f<256;f++)u[f]=f;for(var f=0,y=0;f<256;f++){var h=f%o,b=g[h>>>2]>>>24-h%4*8&255;y=(y+u[f]+b)%256;var d=u[f];u[f]=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,f=0;f<4;f++){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-f*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 _0={exports:{}},rs;function vn(){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.Rabbit=n.extend({_doReset:function(){for(var o=this._key.words,u=this.cfg.iv,f=0;f<4;f++)o[f]=(o[f]<<8|o[f]>>>24)&16711935|(o[f]<<24|o[f]>>>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],h=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++)h[f]^=y[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;h[0]^=v,h[1]^=_,h[2]^=E,h[3]^=A,h[4]^=v,h[5]^=_,h[6]^=E,h[7]^=A;for(var f=0;f<4;f++)g.call(this)}},_doProcessBlock:function(o,u){var f=this._X;g.call(this),x[0]=f[0]^f[5]>>>16^f[3]<<16,x[1]=f[2]^f[7]>>>16^f[5]<<16,x[2]=f[4]^f[1]>>>16^f[7]<<16,x[3]=f[6]^f[3]>>>16^f[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,f=0;f<8;f++)p[f]=u[f];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 f=0;f<8;f++){var y=o[f]+u[f],h=y&65535,b=y>>>16,d=((h*h>>>17)+h*b>>>15)+b*b,l=((y&4294901760)*y|0)+((y&65535)*y|0);a[f]=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})}(_0)),_0.exports}var C0={exports:{}},ss;function yn(){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.StreamCipher,m=s.algo,x=[],p=[],a=[],c=m.RabbitLegacy=n.extend({_doReset:function(){var o=this._key.words,u=this.cfg.iv,f=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 h=0;h<4;h++)g.call(this);for(var h=0;h<8;h++)y[h]^=f[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;y[0]^=v,y[1]^=_,y[2]^=E,y[3]^=A,y[4]^=v,y[5]^=_,y[6]^=E,y[7]^=A;for(var h=0;h<4;h++)g.call(this)}},_doProcessBlock:function(o,u){var f=this._X;g.call(this),x[0]=f[0]^f[5]>>>16^f[3]<<16,x[1]=f[2]^f[7]>>>16^f[5]<<16,x[2]=f[4]^f[1]>>>16^f[7]<<16,x[3]=f[6]^f[3]>>>16^f[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,f=0;f<8;f++)p[f]=u[f];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 f=0;f<8;f++){var y=o[f]+u[f],h=y&65535,b=y>>>16,d=((h*h>>>17)+h*b>>>15)+b*b,l=((y&4294901760)*y|0)+((y&65535)*y|0);a[f]=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})}(C0)),C0.exports}var A0={exports:{}},is;function mn(){return is||(is=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(h,b){let d=b>>24&255,l=b>>16&255,v=b>>8&255,E=b&255,_=h.sbox[0][d]+h.sbox[1][l];return _=_^h.sbox[2][v],_=_+h.sbox[3][E],_}function o(h,b,d){let l=b,v=d,E;for(let _=0;_<x;++_)l=l^h.pbox[_],v=g(h,l)^v,E=l,l=v,v=E;return E=l,l=v,v=E,v=v^h.pbox[x],l=l^h.pbox[x+1],{left:l,right:v}}function u(h,b,d){let l=b,v=d,E;for(let _=x+1;_>1;--_)l=l^h.pbox[_],v=g(h,l)^v,E=l,l=v,v=E;return E=l,l=v,v=E,v=v^h.pbox[1],l=l^h.pbox[0],{left:l,right:v}}function f(h,b,d){for(let A=0;A<4;A++){h.sbox[A]=[];for(let w=0;w<256;w++)h.sbox[A][w]=a[A][w]}let l=0;for(let A=0;A<x+2;A++)h.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(h,v,E),v=_.left,E=_.right,h.pbox[A]=v,h.pbox[A+1]=E;for(let A=0;A<4;A++)for(let w=0;w<256;w+=2)_=o(h,v,E),v=_.left,E=_.right,h.sbox[A][w]=v,h.sbox[A][w+1]=E;return!0}var y=m.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var h=this._keyPriorReset=this._key,b=h.words,d=h.sigBytes/4;f(c,b,d)}},encryptBlock:function(h,b){var d=o(c,h[b],h[b+1]);h[b]=d.left,h[b+1]=d.right},decryptBlock:function(h,b){var d=u(c,h[b],h[b+1]);h[b]=d.left,h[b+1]=d.right},blockSize:64/32,keySize:128/32,ivSize:64/32});s.Blowfish=n._createHelper(y)}(),t.Blowfish})}(A0)),A0.exports}(function(r,e){(function(t,s,i){r.exports=s(L(),ut(),Xi(),Vi(),Be(),Yi(),Ce,Cr(),s0(),Ji(),Hr(),Zi(),Qi(),en(),Xt(),tn(),Ae(),ee(),rn(),sn(),nn(),on(),an(),cn(),dn(),xn(),ln(),un(),pn(),$r(),fn(),hn(),vn(),yn(),mn())})(N,function(t){return t})})(kr);var En=kr.exports;const Se=Te(En);class gn{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=Yt.encrypt(t,Se.enc.Utf8.parse(this.encryptKey()),{mode:Se.mode.ECB,padding:Se.pad.Pkcs7});return Re.stringify(s.ciphertext)}decrypt(e){if(se(this.encryptKey()))throw new Error("privateKey is not set");const s=Yt.decrypt(e,Se.enc.Utf8.parse(this.encryptKey()),{mode:Se.mode.ECB,padding:Se.pad.Pkcs7}).toString(Se.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 Bn{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 bn extends Bn{constructor(e={}){super(e)}}const ge=new bn;class ns extends gn{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,log_level:H.level}))}encryptKey(){return q(this.data.application_id)?br(this.data.application_id).toString().substring(0,16):""}getExtra(e=void 0){return yt(e??{},yt(this.data.extra??{},this.widgetExtra??{}))}getRequestPaymentData(e=void 0){return this.data.widget_sandbox=this.data.sandbox,this.data.extra=this.getExtra(e.extra),yt(e,this.data)}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 ns;class _n 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.data.application_id}/${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 _n;class Cn extends je{constructor(){super(),this.message=Jt}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))throw new Error("application_id가 입력되지 않았습니다.");this.initialize(),z.setWidgetData(e,t),G.render(),os.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 xe({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 xe({event:"error",error_code:"RC_PG_METHOD_NOT_SELECTED",message:this.message.getLocaleMessage("notSelectPayment","ko")});if(!z.termsPassed&&z.data.use_terms)throw new xe({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 xe({event:"error",error_code:"RC_BRANDPAY_NEED_SELECT_WALLET",message:this.message.getLocaleMessage("notSelectBrandpay","ko")})}}const re=new Cn;class An 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?`
|
|
62
|
+
*/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 f=0;f<c;f++)x[p+f]^=u[f]}});return s.Decryptor=m,s}(),t.mode.CTRGladman})}(l0)),l0.exports}var u0={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.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:{}},Gr;function nn(){return Gr||(Gr=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 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.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})}(f0)),f0.exports}var h0={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.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})}(h0)),h0.exports}var v0={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.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:{}},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.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:{}},Zr;function xn(){return Zr||(Zr=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:{}},Qr;function ln(){return Qr||(Qr=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:{}},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.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],f.call(this,4,252645135),f.call(this,16,65535),y.call(this,2,858993459),y.call(this,8,16711935),f.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,f.call(this,1,1431655765),y.call(this,8,16711935),y.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),b[d]=this._lBlock,b[d+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function f(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 h=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(h)}(),t.TripleDES})}(g0)),g0.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=m.RC4=n.extend({_doReset:function(){for(var c=this._key,g=c.words,o=c.sigBytes,u=this._S=[],f=0;f<256;f++)u[f]=f;for(var f=0,y=0;f<256;f++){var h=f%o,b=g[h>>>2]>>>24-h%4*8&255;y=(y+u[f]+b)%256;var d=u[f];u[f]=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,f=0;f<4;f++){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-f*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:{}},rs;function fn(){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.Rabbit=n.extend({_doReset:function(){for(var o=this._key.words,u=this.cfg.iv,f=0;f<4;f++)o[f]=(o[f]<<8|o[f]>>>24)&16711935|(o[f]<<24|o[f]>>>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],h=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++)h[f]^=y[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;h[0]^=v,h[1]^=_,h[2]^=E,h[3]^=A,h[4]^=v,h[5]^=_,h[6]^=E,h[7]^=A;for(var f=0;f<4;f++)g.call(this)}},_doProcessBlock:function(o,u){var f=this._X;g.call(this),x[0]=f[0]^f[5]>>>16^f[3]<<16,x[1]=f[2]^f[7]>>>16^f[5]<<16,x[2]=f[4]^f[1]>>>16^f[7]<<16,x[3]=f[6]^f[3]>>>16^f[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,f=0;f<8;f++)p[f]=u[f];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 f=0;f<8;f++){var y=o[f]+u[f],h=y&65535,b=y>>>16,d=((h*h>>>17)+h*b>>>15)+b*b,l=((y&4294901760)*y|0)+((y&65535)*y|0);a[f]=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:{}},ss;function hn(){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.StreamCipher,m=s.algo,x=[],p=[],a=[],c=m.RabbitLegacy=n.extend({_doReset:function(){var o=this._key.words,u=this.cfg.iv,f=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 h=0;h<4;h++)g.call(this);for(var h=0;h<8;h++)y[h]^=f[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;y[0]^=v,y[1]^=_,y[2]^=E,y[3]^=A,y[4]^=v,y[5]^=_,y[6]^=E,y[7]^=A;for(var h=0;h<4;h++)g.call(this)}},_doProcessBlock:function(o,u){var f=this._X;g.call(this),x[0]=f[0]^f[5]>>>16^f[3]<<16,x[1]=f[2]^f[7]>>>16^f[5]<<16,x[2]=f[4]^f[1]>>>16^f[7]<<16,x[3]=f[6]^f[3]>>>16^f[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,f=0;f<8;f++)p[f]=u[f];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 f=0;f<8;f++){var y=o[f]+u[f],h=y&65535,b=y>>>16,d=((h*h>>>17)+h*b>>>15)+b*b,l=((y&4294901760)*y|0)+((y&65535)*y|0);a[f]=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:{}},is;function vn(){return is||(is=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(h,b){let d=b>>24&255,l=b>>16&255,v=b>>8&255,E=b&255,_=h.sbox[0][d]+h.sbox[1][l];return _=_^h.sbox[2][v],_=_+h.sbox[3][E],_}function o(h,b,d){let l=b,v=d,E;for(let _=0;_<x;++_)l=l^h.pbox[_],v=g(h,l)^v,E=l,l=v,v=E;return E=l,l=v,v=E,v=v^h.pbox[x],l=l^h.pbox[x+1],{left:l,right:v}}function u(h,b,d){let l=b,v=d,E;for(let _=x+1;_>1;--_)l=l^h.pbox[_],v=g(h,l)^v,E=l,l=v,v=E;return E=l,l=v,v=E,v=v^h.pbox[1],l=l^h.pbox[0],{left:l,right:v}}function f(h,b,d){for(let A=0;A<4;A++){h.sbox[A]=[];for(let w=0;w<256;w++)h.sbox[A][w]=a[A][w]}let l=0;for(let A=0;A<x+2;A++)h.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(h,v,E),v=_.left,E=_.right,h.pbox[A]=v,h.pbox[A+1]=E;for(let A=0;A<4;A++)for(let w=0;w<256;w+=2)_=o(h,v,E),v=_.left,E=_.right,h.sbox[A][w]=v,h.sbox[A][w+1]=E;return!0}var y=m.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var h=this._keyPriorReset=this._key,b=h.words,d=h.sigBytes/4;f(c,b,d)}},encryptBlock:function(h,b){var d=o(c,h[b],h[b+1]);h[b]=d.left,h[b+1]=d.right},decryptBlock:function(h,b){var d=u(c,h[b],h[b+1]);h[b]=d.left,h[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(),Ki(),Gi(),Be,Xi(),Ce,Cr(),r0(),Vi(),Hr(),Yi(),Ji(),Zi(),Gt(),Qi(),Ae(),ee(),en(),tn(),rn(),sn(),nn(),on(),an(),cn(),dn(),xn(),ln(),$r(),un(),pn(),fn(),hn(),vn())})(N,function(t){return t})})(kr);var yn=kr.exports;const Se=Te(yn);class mn{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,Se.enc.Utf8.parse(this.encryptKey()),{mode:Se.mode.ECB,padding:Se.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,Se.enc.Utf8.parse(this.encryptKey()),{mode:Se.mode.ECB,padding:Se.pad.Pkcs7}).toString(Se.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 En{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 gn extends En{constructor(e={}){super(e)}}const ge=new gn;class A0 extends mn{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,log_level:H.level}))}encryptKey(){return q(this.data.application_id)?br(this.data.application_id).toString().substring(0,16):""}getExtra(e=void 0){return yt(e??{},yt(this.data.extra??{},this.widgetExtra??{}))}getRequestPaymentData(e=void 0){return this.data.widget_sandbox=this.data.sandbox,this.data.extra=this.getExtra(e.extra),yt(e,this.data)}getManagerUrl(){return`brandpay/${this.data.application_id}/${this.encryptParameters()}/edit?__popup=${this.data.use_popup?"true":"false"}&__frame=${this.data.use_popup?"false":"true"}`}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 Bn 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.data.application_id}/${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 Bn;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))throw new Error("application_id가 입력되지 않았습니다.");this.initialize(),z.setWidgetData(e,t),G.render(),ns.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 xe({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 xe({event:"error",error_code:"RC_PG_METHOD_NOT_SELECTED",message:this.message.getLocaleMessage("notSelectPayment","ko")});if(!z.termsPassed&&z.data.use_terms)throw new xe({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 xe({event:"error",error_code:"RC_BRANDPAY_NEED_SELECT_WALLET",message:this.message.getLocaleMessage("notSelectBrandpay","ko")})}}const re=new bn;class _n 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?`
|
|
63
63
|
<div id="${this.$windowId}" class="bootpay-payment-background">
|
|
64
64
|
<div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$brandpayWindowId}">
|
|
65
65
|
<iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
<iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}" frameborder="0"></iframe>
|
|
72
72
|
</div>
|
|
73
73
|
</div>
|
|
74
|
-
`}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;")}addWallet(e){this.createIFrame(e)}removeWallet(e){this.createIFrame(`brandpay/destroy/${this.$widgetStore.data.application_id}/${e}`)}showCardInterestInformation(e){this.createIFrame(`card/interest/${this.$widgetStore.data.application_id}`)}brandpayPreference(e){const{popup:t}=e,s=`brandpay/${this.$widgetStore.data.application_id}/${this.$widgetStore.encryptParameters()}/edit`;console.log("url",s),t||R.isMobile()?window.open(R.toWidget(`${s}?__popup=true`),"widget-brandpay-environment-popup","width=500,height=800,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
|
|
74
|
+
`}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;")}addWallet(e){this.createIFrame(e)}removeWallet(e){this.createIFrame(`brandpay/destroy/${this.$widgetStore.data.application_id}/${e}`)}showCardInterestInformation(e){this.createIFrame(`card/interest/${this.$widgetStore.data.application_id}`)}brandpayPreference(e){const{popup:t}=e,s=`brandpay/${this.$widgetStore.data.application_id}/${this.$widgetStore.encryptParameters()}/edit`;console.log("url",s),t||R.isMobile()?window.open(R.toWidget(`${s}?__popup=true`),"widget-brandpay-environment-popup","width=500,height=800,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 _n;class Cn 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`
|
|
75
75
|
<div id="${this.$windowId}" class="bootpay-payment-background">
|
|
76
76
|
<div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$modalWindowId}">
|
|
77
77
|
<iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
|
|
78
78
|
</div>
|
|
79
79
|
</div>
|
|
80
|
-
`}createIFrame(e){this.createTemplateHtml();const t=document.getElementById(this.$iFrameId);t==null||t.setAttribute("src",e),t==null||t.classList.add("slide-up"),t==null||t.style.setProperty("display","block"),this.bodyOpen()}destroy(){const e=document.getElementById(this.$iFrameId);e==null||e.classList.remove("slide-up"),e==null||e.classList.add("slide-down"),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
|
|
80
|
+
`}createIFrame(e){this.createTemplateHtml();const t=document.getElementById(this.$iFrameId);t==null||t.setAttribute("src",e),t==null||t.classList.add("slide-static-up"),t==null||t.style.setProperty("display","block"),this.bodyOpen()}destroy(){const e=document.getElementById(this.$iFrameId);e==null||e.classList.remove("slide-static-up"),e==null||e.classList.add(".slide-static-down"),this.bodyClose(),setTimeout(()=>{const t=document.getElementById(this.$windowId);t!==void 0&&(t.outerHTML="",t.remove())},300)}resize(e){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 Cn;class An 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`
|
|
81
81
|
<div id="${this.$windowId}" class="bootpay-payment-background __alert">
|
|
82
82
|
<div class="bootpay-confirm-window fade-in" id="${this.$modalWindowId}">
|
|
83
83
|
<div class="bootpay__alert-header">
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
96
|
-
`}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
|
|
96
|
+
`}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 An,wn={$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 Fn extends it{constructor(){super({messageEventName:"message.BootpayWidgetEvent",messageEventHooks:{WidgetWindowMessage:wn}})}}const ns=new Fn;class Dn 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`
|
|
97
97
|
<div id="${this.$windowId}" class="bootpay-payment-background __alert">
|
|
98
98
|
<div class="slider-window slider-initial" id="${this.$modalWindowId}" style="display: none;">
|
|
99
99
|
<div class="bootpay__alert-header __text-center">
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
</div>
|
|
107
107
|
`}sliderButtonTemplate(e){let t="";return e.forEach(s=>{t+=`
|
|
108
108
|
<button class="bootpay__slider-button ${s.class}" id="${this.sliderButtonId(s.key)}">${s.name}</button>
|
|
109
|
-
`}),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
|
|
109
|
+
`}),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 $n=new Dn,kn={showSliderSelect(r){$n.show(this,r)},selectSliderSelect(r,e="sliderSelectResponse"){F0.$childInstance.postMessage(e,{key:r})}};class Pn extends it{constructor(){super({messageEventName:"message.BootpaySliderEvent",messageEventHooks:{StoreSliderEvent:kn}})}}const F0=new Pn;class Sn 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 ji,this.$session=De,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`
|
|
110
110
|
<div id="${this.$windowId}" class="bootpay-payment-background">
|
|
111
111
|
<div class="bootpay-payment-window" id="${this.$userWindowId}">
|
|
112
112
|
<iframe id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
|
|
@@ -117,4 +117,4 @@
|
|
|
117
117
|
`}setParams(e,t){if(t!==void 0){const s=this.byId(this.$bootpaySdkFormId);if(["POST","PUT"].indexOf(e.toUpperCase())>-1){const i=fe.encryptParams(fe.objectKeyToUnderscore(t));s.innerHTML=`
|
|
118
118
|
<input type="hidden" name="payload" value="${i.payload}" />
|
|
119
119
|
<input type="hidden" name="token" value="${i.token}" />
|
|
120
|
-
`}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()})})}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
|
|
120
|
+
`}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()})})}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)}ns.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=$e.version,e.platform_type=this.deviceType,e.sdk=!0,e.price=parseFloat(String(e.price)),e.tax_free=parseFloat(String(e.tax_free)),Ye.invalidRequestParamsData(e),Ye.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 D0=new Sn,os={$templateUserToken:D0,async requestPasswordToken(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 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 De.setUUID(r)},dismiss(){he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})}};typeof window<"u"&&(window.BootpaySDK=os);const as={render(r,e){re.render(r,e)},rerender(){re.rerender()},setEnvironmentMode(r,e){Ee.setEnvironmentMode(r,e),R.set(r)},async requestPayment(r){return new Promise(async(e,t)=>{try{const s=await re.requestPayment(r);return e(s)}catch(s){return t(this.errorHandler(s))}})},async requestSubscription(r){return new Promise(async(e,t)=>{try{const s=await re.requestSubscription(r);return e(s)}catch(s){return t(this.errorHandler(s))}})},launchBrandpayManager(r){D0.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"}})});
|