text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-10913d82"],{"043f":function(t,e,i){t.exports=i.p+"img/circle3.f2a79aa1.png"},"06d1":function(t,e,i){t.exports=i.p+"img/oringe.caada83c.png"},"20fc":function(t,e,i){},2340:function(t,e,i){"use strict";i("20fc")},"40e7":function(t,e,i){t.exports=i.p+"img/paper.a6181c67.png"},5899:function(t,e){t.exports="\t\n\v\f\r                　\u2028\u2029\ufeff"},"58a8":function(t,e,i){var s=i("1d80"),c=i("5899"),a="["+c+"]",r=RegExp("^"+a+a+"*"),l=RegExp(a+a+"*$"),o=function(t){return function(e){var i=String(s(e));return 1&t&&(i=i.replace(r,"")),2&t&&(i=i.replace(l,"")),i}};t.exports={start:o(1),end:o(2),trim:o(3)}},"6c8c":function(t,e,i){t.exports=i.p+"img/yellow.e188c4ae.png"},7156:function(t,e,i){var s=i("861d"),c=i("d2bb");t.exports=function(t,e,i){var a,r;return c&&"function"==typeof(a=e.constructor)&&a!==i&&s(r=a.prototype)&&r!==i.prototype&&c(t,r),t}},"84cc":function(t,e,i){t.exports=i.p+"img/green.994ca49b.png"},9260:function(t,e,i){t.exports=i.p+"img/circle2.f248b725.png"},a21a:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"userhomeapp"}},[i("div",{staticClass:"user-wrap"},[i("div",{staticClass:"head-wrap"},[i("div",{staticClass:"head"},[i("div",{staticClass:"head-img"},[i("div",{staticClass:"head-circle",style:{backgroundImage:"url("+t.circlenow+")"}})]),i("div",{staticClass:"circle-box",class:{"circle-box-active":t.circleFlag}},t._l(t.circle,(function(e,s){return i("div",{key:s,staticClass:"circle-item",class:{"circle-box-active":t.circleFlag},style:{backgroundImage:"url("+e.src+")"},on:{click:function(i){return t.changeCircle(e.src,s)}}},[t.islock<=s?i("div",{staticClass:"lock"},[i("div",{staticClass:"cover",class:{"circle-box-active":t.circleFlag}},[i("font-awesome-icon",{staticClass:"icon",attrs:{icon:["fas","lock"]}})],1)]):t._e()])})),0)]),i("div",{staticClass:"btn",on:{click:function(e){return t.toggleCicleBox()}}},[t._v("Change headframe")])]),t._m(0)]),i("div",{staticClass:"puzzlehome"},[i("div",{staticClass:"puzzle_des"},[i("div",{staticClass:"title"},[t._v("Puzzle's difficulty level")]),i("div",{staticClass:"btn",on:{click:function(e){return t.toGame()}}},[t._v("Get more puzzles")])]),i("div",{staticClass:"puzzlehome_img"},[i("div",{staticClass:"item"},[t._m(1),i("div",{staticClass:"reds"},[i("div",{staticClass:"redss"},t._l(t.list_red,(function(t,e){return i("div",{key:e,staticClass:"red item-item",style:{backgroundImage:"url("+t.coverImg+")"}},[i("div",{staticClass:"red-subitem cover"},[i("font-awesome-icon",{staticClass:"icon",attrs:{icon:["fas","lock"]}})],1)])})),0)]),t._m(2)]),i("div",{staticClass:"item",class:t.showLeftIcon?"active":"",staticStyle:{transition:"margin-left 2s"}},[i("div",{staticClass:"arrowleftoringe item-item oringe"},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.showLeftIcon,expression:"showLeftIcon"}],on:{click:t.leftClick}})]),i("div",{staticClass:"oringes",attrs:{id:"classifyoringes"}},[i("div",{staticClass:"oringess",staticStyle:{transition:"margin-left .5s"}},t._l(t.list_oringe,(function(t,e){return i("div",{key:e,ref:"item"+e,refInFor:!0,staticClass:"oringe item-item classifys-item",style:{backgroundImage:"url("+t.coverImg+")"}},[i("div",{staticClass:"cover"},[i("font-awesome-icon",{staticClass:"icon",attrs:{icon:["fas","lock"]}})],1)])})),0)]),i("div",{staticClass:"arrowrightoringe item-item oringe"},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.showRightIcon,expression:"showRightIcon"}],on:{click:t.rightClick}})])]),i("div",{staticClass:"item"},[t._m(3),i("div",{staticClass:"yellows"},[i("div",{staticClass:"yellowss",staticStyle:{transition:"margin-left .5s"}},t._l(t.list_yellow,(function(t,e){return i("div",{key:e,staticClass:"yellow item-item",style:{backgroundImage:"url("+t.coverImg+")"}},[i("div",{staticClass:"cover"},[i("font-awesome-icon",{staticClass:"icon",attrs:{icon:["fas","lock"]}})],1)])})),0)]),t._m(4)]),i("div",{staticClass:"item"},[t._m(5),i("div",{staticClass:"greens"},[i("div",{staticClass:"greenss",staticStyle:{transition:"margin-left .5s"}},t._l(t.list_green,(function(t,e){return i("div",{key:e,staticClass:"green item-item ",style:{backgroundImage:"url("+t.coverImg+")"}},[i("div",{staticClass:"cover"},[i("font-awesome-icon",{staticClass:"icon",attrs:{icon:["fas","lock"]}})],1)])})),0)]),t._m(6)])])]),i("div",{staticClass:"logout-btn",on:{click:function(e){return t.logout()}}},[t._v("Log out")])])},c=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"desc"},[i("span",[t._v("ID: Jamie ")]),i("span",[t._v("Level: Environmental newcomer")]),i("span",[t._v("Collected puzzles:")]),i("span",[t._v("Puzzle to be composed:")]),i("span",[t._v("Puzzles to be collected:")])])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"arrowsredlefr item-item red"},[i("div")])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"arrowredright item-item red"},[i("div")])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"arrowleftyellow item-item yellow"},[i("div")])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"arrowrightyellow item-item yellow"},[i("div")])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"arrowleftgreen item-item green"},[i("div")])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"arrowrightgreen item-item green"},[i("div")])}],a=(i("a9e3"),i("96cf"),i("1da1")),r={data:function(){return{circleFlag:!1,circle:[{src:i("e535")},{src:i("9260")},{src:i("043f")}],circlenow:i("e535"),id:"",allPuzzle:1,list_red:[{coverImg:i("fca7"),text:"Light bulb off",subImg:i("40e7")},{coverImg:i("fca7"),text:"Reusable tableware",subImg:i("d47a")},{coverImg:i("fca7"),text:"Kraft paper bag",subImg:i("f608")}],list_oringe:[{coverImg:i("06d1"),text:"Light bulb off"},{coverImg:i("06d1"),text:"Reusable tableware"},{coverImg:i("06d1"),text:"Kraft paper bag"},{coverImg:i("06d1"),text:"Light bulb off"},{coverImg:i("06d1"),text:"Reusable tableware"},{coverImg:i("06d1"),text:"Kraft paper bag"}],list_yellow:[{coverImg:i("6c8c"),text:"Light bulb off"},{coverImg:i("6c8c"),text:"Reusable tableware"},{coverImg:i("6c8c"),text:"Kraft paper bag"}],list_green:[{coverImg:i("84cc"),text:"Light bulb off"},{coverImg:i("84cc"),text:"Reusable tableware"},{coverImg:i("84cc"),text:"Kraft paper bag"}],collected:"",PuzzleTBcom:"",PUZZleTBcl:"",islock:"",showRightIcon:!0,maxClickNum:0,lastLeft:0,clickNum:0}},created:function(){var t=this;return Object(a["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.id=t.$route.query.id,t.collected=Number(localStorage.getItem("puzzles")),t.PuzzleTBcom=parseInt(Number(localStorage.getItem("puzzles")/6)),t.islock=Number(localStorage.getItem("Checkpoint")),0==t.islock&&(t.islock=1);case 5:case"end":return e.stop()}}),e)})))()},computed:{showLeftIcon:function(){return this.clickNum>0}},methods:{toggleCicleBox:function(){this.circleFlag=!this.circleFlag},changeCircle:function(t,e){this.islock>e?this.circlenow=t:alert("locked!")},toGame:function(){this.$router.push("/index/game")},logout:function(){localStorage.clear(),this.$router.push("/index/login")},rightClick:function(){if(console.log("11111111"),console.log(this.clickNum),console.log(this.list_oringe.length),this.clickNum<this.list_oringe.length-1){var t=document.querySelectorAll(".classifys-item")[this.clickNum].offsetWidth;console.log("获取当前元素宽度",t);var e=document.getElementsByClassName("classifys-item")[this.list_oringe.length-1].offsetLeft;console.log("获取最后一个元素距离左侧的距离",e);var i=document.getElementById("classifyoringes").clientWidth;console.log("如果最后一个元素距离左侧的距离大于可视区域的宽度，表示最后一个元素没有出现，执行滚动效果",i),e>i&&(document.getElementsByClassName("oringess")[0].style.marginLeft="".concat(-t+this.lastLeft,"px"),this.lastLeft=-t+this.lastLeft,this.clickNum+=1,this.maxClickNum=this.clickNum),this.showRightIcon=e>i+t,console.log("showRightIcon",this.showRightIcon)}},leftClick:function(){if(this.clickNum>0){var t=document.querySelectorAll(".classifys-item")[this.clickNum-1].offsetWidth;document.getElementsByClassName("oringess")[0].style.marginLeft="".concat(this.lastLeft+t,"px"),this.lastLeft=t+this.lastLeft,console.log("lastLeft",this.lastLeft),this.clickNum--,this.clickNum<this.maxClickNum&&(this.showRightIcon=!0)}}}},l=r,o=(i("2340"),i("2877")),n=Object(o["a"])(l,s,c,!1,null,null,null);e["default"]=n.exports},a9e3:function(t,e,i){"use strict";var s=i("83ab"),c=i("da84"),a=i("94ca"),r=i("6eeb"),l=i("5135"),o=i("c6b6"),n=i("7156"),u=i("c04e"),f=i("d039"),g=i("7c73"),m=i("241c").f,d=i("06cf").f,v=i("9bf2").f,h=i("58a8").trim,p="Number",C=c[p],b=C.prototype,I=o(g(b))==p,w=function(t){var e,i,s,c,a,r,l,o,n=u(t,!1);if("string"==typeof n&&n.length>2)if(n=h(n),e=n.charCodeAt(0),43===e||45===e){if(i=n.charCodeAt(2),88===i||120===i)return NaN}else if(48===e){switch(n.charCodeAt(1)){case 66:case 98:s=2,c=49;break;case 79:case 111:s=8,c=55;break;default:return+n}for(a=n.slice(2),r=a.length,l=0;l<r;l++)if(o=a.charCodeAt(l),o<48||o>c)return NaN;return parseInt(a,s)}return+n};if(a(p,!C(" 0o1")||!C("0b1")||C("+0x1"))){for(var _,k=function(t){var e=arguments.length<1?0:t,i=this;return i instanceof k&&(I?f((function(){b.valueOf.call(i)})):o(i)!=p)?n(new C(w(e)),i,k):w(e)},x=s?m(C):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),y=0;x.length>y;y++)l(C,_=x[y])&&!l(k,_)&&v(k,_,d(C,_));k.prototype=b,b.constructor=k,r(c,p,k)}},d47a:function(t,e,i){t.exports=i.p+"img/chazi.f2b5f4d2.png"},e535:function(t,e,i){t.exports=i.p+"img/circle1.f8943583.png"},f608:function(t,e,i){t.exports=i.p+"img/bicyck.864fc351.png"},fca7:function(t,e,i){t.exports=i.p+"img/red.90ddb230.png"}}]);
  //# sourceMappingURL=chunk-10913d82.475c7fe6.js.map