"use weex:vue";

if (typeof Promise !== 'undefined' && !Promise.prototype.finally) {
  Promise.prototype.finally = function(callback) {
    const promise = this.constructor
    return this.then(
      value => promise.resolve(callback()).then(() => value),
      reason => promise.resolve(callback()).then(() => {
        throw reason
      })
    )
  }
};

if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
  const global = uni.requireGlobal()
  ArrayBuffer = global.ArrayBuffer
  Int8Array = global.Int8Array
  Uint8Array = global.Uint8Array
  Uint8ClampedArray = global.Uint8ClampedArray
  Int16Array = global.Int16Array
  Uint16Array = global.Uint16Array
  Int32Array = global.Int32Array
  Uint32Array = global.Uint32Array
  Float32Array = global.Float32Array
  Float64Array = global.Float64Array
  BigInt64Array = global.BigInt64Array
  BigUint64Array = global.BigUint64Array
};


(()=>{var g=Object.create;var p=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var _=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of b(e))!m.call(t,i)&&i!==s&&p(t,i,{get:()=>e[i],enumerable:!(r=h(e,i))||r.enumerable});return t};var v=(t,e,s)=>(s=t!=null?g(f(t)):{},_(e||!t||!t.__esModule?p(s,"default",{value:t,enumerable:!0}):s,t));var d=y((B,w)=>{w.exports=Vue});var o=v(d());var c=(t,e)=>{let s=t.__vccOpts||t;for(let[r,i]of e)s[r]=i;return s};var x={bigbox:{"":{flex:1,position:"fixed",left:0,top:0,width:"750rpx"}},box:{"":{flex:1,backgroundColor:"#ffffff",position:"fixed",left:0,top:0}}},S={data(){return{webviewStyles:{progress:{color:"#FF3333"}},theUrl:"../../",iStatusBarHeight:0,scrollHeight:0,windowHeight:0,windowWidth:0,windowScale:1,webViewTop:0,webViewHeight:0}},onLoad(t){let e=uni.getSystemInfoSync();this.iStatusBarHeight=e.statusBarHeight,this.windowHeight=e.windowHeight,this.windowWidth=e.windowWidth,this.windowScale=750/this.windowWidth,e.platform=="ios"?(this.webViewHeight=e.windowHeight+e.statusBarHeight,this.webViewTop=-e.statusBarHeight):this.webViewHeight=e.windowHeight,this.theUrl=decodeURIComponent(t.page)},methods:{postMessage(t){switch(t.detail.data[0].type){case"video":uni.navigateTo({url:"/pages/video/index?id="+t.detail.data[0].id});break;case"news":uni.navigateTo({url:"/pages/news/index?id="+t.detail.data[0].id});break;case"compare":var e=[{id:t.detail.data[0].id,seriesName:t.detail.data[0].info.name,title:t.detail.data[0].info.product_name,price:t.detail.data[0].info.minmsrp}];uni.setStorageSync("pkLocal",e),uni.navigateTo({url:"/pages/pk/index"});break;case"inquiry":uni.navigateTo({url:"/pages/inquiry/index?detail="+encodeURIComponent(JSON.stringify({bseriesId:t.detail.data[0].id}))});break;case"back":uni.navigateBack();break}}}};function k(t,e,s,r,i,l){return(0,o.openBlock)(),(0,o.createElementBlock)("scroll-view",{scrollY:!0,showScrollbar:!0,enableBackToTop:!0,bubble:"true",style:{flexDirection:"column"}},[(0,o.createElementVNode)("view",{class:"bigbox"},[(0,o.createElementVNode)("u-web-view",{class:"box",style:(0,o.normalizeStyle)({height:i.webViewHeight+"px",width:i.windowWidth+"px",top:i.webViewTop+"px"}),updateTitle:"true",webviewStyles:i.webviewStyles,src:"/hybrid/html/koubei_green.html?statusBarHeight="+i.iStatusBarHeight,onOnPostMessage:e[0]||(e[0]=(...u)=>l.postMessage&&l.postMessage(...u))},null,44,["webviewStyles","src"])])])}var a=c(S,[["render",k],["styles",[x]]]);var n=plus.webview.currentWebview();if(n){let t=parseInt(n.id),e="pages/select/koubei_green",s={};try{s=JSON.parse(n.__query__)}catch(i){}a.mpType="page";let r=Vue.createPageApp(a,{$store:getApp({allowDefault:!0}).$store,__pageId:t,__pagePath:e,__pageQuery:s});r.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...a.styles||[]])),r.mount("#root")}})();
