1"use strict";(self["webpackChunkseo"]=self["webpackChunkseo"]||[]).push([[467],{71114:function(e,t,a){a.d(t,{A:function(){return h}});a(14603),a(47566),a(98721);var n=a(84963),o=a(41756);class r{init(){window.KODEPAY_APPLICATION_ID=o.K.currentConfig.kodepay.applicationID,window.KODEPAY_CLIENT_ID=o.K.currentConfig.kodepay.clientID,window.KODEPAY_ENV=o.K.isProd?"production":"development",window.kodepayCallbackBind=!1;const e=document.createElement("script");e.referrerPolicy="no-referrer",e.src="https://kodepay-global.zingfront.com/resource/kodepay/2.1.4/kodepay-website.js",e.async=!0,document.head.appendChild(e)}async request(e,t,a){const n=`${window.location.protocol}//${window.location.host}${a}`;return new Promise((a=>{window.KodePay.open_payment_page_new(e,{origin_data:{orderId:t},redirect_url:n,width:1e3,height:800}).then((e=>{"success"===e.code?(console.log(e.data),a(e.data)):(console.log(e),a(""))}))}))}}const i=new r;var s=i,l=a(58044),u=a(591),c=a(88939);class d{constructor(){this.isPageHide=!1}init(){s.init();const e=navigator.userAgent,t=/iPad|iPhone|iPod/.test(e)&&/Safari/.test(e)&&!/Chrome/.test(e);t&&(window.addEventListener("pageshow",(()=>{this.isPageHide&&(window.location.reload(),this.isPageHide=!1)})),window.addEventListener("pagehide",(()=>{this.isPageHide=!0})))}async start(e,t,a,n){try{return"kodepay"===t?this.startWithKodePay(e,n,a):"useepay"===t?this.startWithUseepay(e,n,a):"oceanpayment"===t?this.startWithOceanpayment(e,n,a):{status:!1}}catch(o){return{status:!1}}}async startWithKodePay(e,t,a){const o=await n.n.createKodepaySession({productId:e});if(200===o.code){localStorage.setItem("createTimestamp",`${parseInt(+new Date/1e3)}`);const e=await s.request(o.data.kodepayProductId,o.data.orderId,a);return e?(t&&t(e),await this.goToPurchase(e)):{status:!1}}return{status:!1,error:o.message}}async startWithUseepay(e,t,a){const o=`${window.location.protocol}//${window.location.host}${a}`;try{const a=await n.n.createUseepaySession({productId:e,reset_url:o});return 200===a.code?(localStorage.setItem("createTimestamp",`${parseInt(+new Date/1e3)}`),a.data.url?(t&&t(),await this.goToPurchase(a.data.url)):{status:!1}):{status:!1,error:a.message}}catch(r){return{status:!1}}}async startWithOceanpayment(e,t,a){const o=`${window.location.protocol}//${window.location.host}${a}`;try{const a=await n.n.createOceanpaymentSession({productId:e,backUrl:o});if(200===a.code){localStorage.setItem("createTimestamp",`${parseInt(+new Date/1e3)}`),localStorage.setItem("oceanpayment",JSON.stringify(a.data)),t&&t();const e=`${window.location.protocol}//${window.location.host}${(0,u.gR)(u.gu.OceanpaymentWrapper,l.Ru.global.locale)}`;return await this.goToPurchase(e)}return{status:!1,error:a.message}}catch(r){return{status:!1}}}async goToPurchase(e){return c.o.isWebview?(this.goToPurchaseWithDirect(e),!0):this.goToPurchaseWithOpen(e)}async goToPurchaseWithDirect(e){window.location.href=e}async goToPurchaseWithOpen(e){return new Promise((t=>{let a;const n=window.open(e,"_blank");window.addEventListener("message",(async e=>{if(null!=e.data?.status)if(clearInterval(a),setTimeout((()=>n.close()),300),"1"===e.data.status||"success"===e.data.status){const e=await this.fetchLatestPurchaseStatus();t({status:e})}else t({status:!1})})),a=setInterval((()=>{try{n.closed&&(clearInterval(a),t({status:!1}))}catch(o){this.goToPurchaseWithDirect(e)}}),1e3)}))}async directBackGangplankHandle(e){let t=new URLSearchParams(e||window.location.search),a=t.get("status")||-1;try{window.opener&&window!==window.opener?(console.info("window open 1 ->",a),window.opener.postMessage({status:a},"*")):(console.info("window open 2 ->",a),window.localStorage.setItem("paymentStatus","1"===a||"success"===a?"1":"-1"),(0,u.LF)(u.gu.Pricing,l.Ru.global.locale))}catch(n){console.error("window open 3 ->",n),window.localStorage.setItem("paymentStatus","1"===a||"success"===a?"1":"-1"),(0,u.LF)(u.gu.Pricing,l.Ru.global.locale)}}needPurchaseResponseFromGangplank(){const e=window.localStorage.getItem("paymentStatus");return"1"===e||"success"===e||"-1"===e}async purchaseResponseFromGangplank(){const e=window.localStorage.getItem("paymentStatus");return!!e&&(window.localStorage.removeItem("paymentStatus"),await this.fetchLatestPurchaseStatus())}async fetchLatestPurchaseStatus(){const e=localStorage.getItem("createTimestamp");let t=!1;try{const a=await n.n.checkLastPurchaseOrderSuccess(e);if(200===a.code)return!0;let o=0;while(!t){if(o>5)break;await new Promise((e=>{setTimeout((()=>e()),1e3)}));const a=await n.n.checkLastPurchaseOrderSuccess(parseInt(e));t=200===a.code,o++}}catch(a){t=!1}return t}formPostRequest(e,t,a){const n=document.createElement("form");n.id="form",n.name="form",document.body.appendChild(n);for(const o in t){const e=document.createElement("input");e.type="text",e.name=o,e.value=t[o],n.appendChild(e)}n.method="POST",n.action=e,a&&(n.target="_blank"),n.submit(),document.body.removeChild(n)}}const p=new d;var h=p},80467:function(e,t,a){a.r(t),a.d(t,{default:function(){return T}});var n=a(20641),o=a(50953),r=a(71114);const i=["value"],s=["value"],l=["value"],u=["value"],c=["value"],d=["value"],p=["value"],h=["value"],m=["value"],w=["value"],g=["value"],y=["value"],v=["value"],f=["value"],k=["value"],P=["value"],b=["value"],L=["value"],S=["value"];var _={__name:"OceanpaymentWrapperPage",setup(e){const{i18n:t}=(0,n.nI)().appContext.config.globalProperties,a=localStorage.getItem("oceanpayment"),_=JSON.parse(a),I=(0,o.KR)(null),R=(0,o.KR)(null);return(0,n.sV)((()=>{window.addEventListener("message",(e=>{e.data.callback&&(r.A.directBackGangplankHandle(e.data.callback),localStorage.removeItem("oceanpayment"))})),I.value.setAttribute("action",_.api),I.value.submit()})),(e,a)=>((0,n.uX)(),(0,n.CE)(n.FK,null,[(0,n.Lk)("form",{ref_key:"formDOM",ref:I,method:"post",enctype:"application/x-www-form-urlencoded",target:"render-frame"},[(0,n.Lk)("input",{type:"hidden",name:"account",value:(0,o.R1)(_).account},null,8,i),(0,n.Lk)("input",{type:"hidden",name:"terminal",value:(0,o.R1)(_).terminal},null,8,s),(0,n.Lk)("input",{type:"hidden",name:"signValue",value:(0,o.R1)(_).signValue},null,8,l),(0,n.Lk)("input",{type:"hidden",name:"backUrl",value:(0,o.R1)(_).backUrl},null,8,u),(0,n.Lk)("input",{type:"hidden",name:"methods",value:(0,o.R1)(_).methods},null,8,c),(0,n.Lk)("input",{type:"hidden",name:"order_number",value:(0,o.R1)(_).order_number},null,8,d),(0,n.Lk)("input",{type:"hidden",name:"order_currency",value:(0,o.R1)(_).order_currency},null,8,p),(0,n.Lk)("input",{type:"hidden",name:"order_amount",value:(0,o.R1)(_).order_amount},null,8,h),(0,n.Lk)("input",{type:"hidden",name:"billing_firstName",value:(0,o.R1)(_).billing_firstName},null,8,m),(0,n.Lk)("input",{type:"hidden",name:"billing_lastName",value:(0,o.R1)(_).billing_lastName},null,8,w),(0,n.Lk)("input",{type:"hidden",name:"billing_email",value:(0,o.R1)(_).billing_email},null,8,g),(0,n.Lk)("input",{type:"hidden",name:"billing_country",value:(0,o.R1)(_).billing_country},null,8,y),(0,n.Lk)("input",{type:"hidden",name:"billing_state",value:(0,o.R1)(_).billing_state},null,8,v),(0,n.Lk)("input",{type:"hidden",name:"productSku",value:(0,o.R1)(_).productSku},null,8,f),(0,n.Lk)("input",{type:"hidden",name:"productName",value:(0,o.R1)(_).productName},null,8,k),(0,n.Lk)("input",{type:"hidden",name:"productNum",value:(0,o.R1)(_).productNum},null,8,P),(0,n.Lk)("input",{type:"hidden",name:"productPrice",value:(0,o.R1)(_).productPrice},null,8,b),(0,n.Lk)("input",{type:"hidden",name:"language",value:(0,o.R1)(t).global.locale},null,8,L),(0,n.Lk)("input",{type:"hidden",name:"noticeUrl",value:(0,o.R1)(_).noticeUrl},null,8,S)],512),(0,n.Lk)("iframe",{ref_key:"iframeDOM",ref:R,name:"render-frame"},null,512)],64))}},I=a(66262);const R=(0,I.A)(_,[["__scopeId","data-v-9ac153f8"]]);var T=R},62106:function(e,t,a){var n=a(50283),o=a(24913);e.exports=function(e,t,a){return a.get&&n(a.get,t,{getter:!0}),a.set&&n(a.set,t,{setter:!0}),o.f(e,t,a)}},22812:function(e){var t=TypeError;e.exports=function(e,a){if(e<a)throw new t("Not enough arguments");return e}},14603:function(e,t,a){var n=a(36840),o=a(79504),r=a(655),i=a(22812),s=URLSearchParams,l=s.prototype,u=o(l.append),c=o(l["delete"]),d=o(l.forEach),p=o([].push),h=new s("a=1&a=2&b=3");h["delete"]("a",1),h["delete"]("b",void 0),h+""!=="a=2"&&n(l,"delete",(function(e){var t=arguments.length,a=t<2?void 0:arguments[1];if(t&&void 0===a)return c(this,e);var n=[];d(this,(function(e,t){p(n,{key:t,value:e})})),i(t,1);var o,s=r(e),l=r(a),h=0,m=0,w=!1,g=n.length;while(h<g)o=n[h++],w||o.key===s?(w=!0,c(this,o.key)):m++;while(m<g)o=n[m++],o.key===s&&o.value===l||u(this,o.key,o.value)}),{enumerable:!0,unsafe:!0})},47566:function(e,t,a){var n=a(36840),o=a(79504),r=a(655),i=a(22812),s=URLSearchParams,l=s.prototype,u=o(l.getAll),c=o(l.has),d=new s("a=1");!d.has("a",2)&&d.has("a",void 0)||n(l,"has",(function(e){var t=arguments.length,a=t<2?void 0:arguments[1];if(t&&void 0===a)return c(this,e);var n=u(this,e);i(t,1);var o=r(a),s=0;while(s<n.length)if(n[s++]===o)return!0;return!1}),{enumerable:!0,unsafe:!0})},98721:function(e,t,a){var n=a(43724),o=a(79504),r=a(62106),i=URLSearchParams.prototype,s=o(i.forEach);n&&!("size"in i)&&r(i,"size",{get:function(){var e=0;return s(this,(function(){e++})),e},configurable:!0,enumerable:!0})}}]); 2//# sourceMappingURL=467.9ffdad22.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.