drill.init(async(e,a)=>{let l=a.que("p-previewer"),t=a.que(".size_selector"),o=a.que("p-viewcon"),i=a.que(".size_width"),u=a.que(".size_height"),n=a.que(".screen_icon"),c=a.que(".zoomin_btn"),v=a.que(".zoomout_btn"),s=a.que(".center_btn"),r=a.que(".view_percent_input");l.w&&(i.value=parseInt(l.w),u.value=parseInt(l.h)),l.watch("w",()=>{i.value=parseInt(l.w)}),l.watch("h",()=>{u.value=parseInt(l.h)}),c.on("click",e=>{o.zoom+=.1}),v.on("click",e=>{o.zoom-=.1}),s.on("click",e=>{o.toCenter({anime:1}),o.toCoverSize({anime:1})}),o.watch("zoom",(e,a)=>{let l=100*a;l=l.toFixed(2),r.value=l+"%"},!0),r.watch("value",(e,a)=>{o.zoom=parseFloat(a)/100});let m=()=>{let e=i.value,a=u.value;l.w=e+"px",l.h=a+"px",o.w=e,o.h=a,o.toCenter({anime:1}),o.toCoverSize({anime:1}),n.class.remove("rotate");let c=t.que(`option[value="${e}x${a}"]`);if(c)return t.value=`${e}x${a}`,void("mobile"==c.data.type?n.class.add("mobile_icon"):n.class.remove("mobile_icon"));(c=t.que(`option[value="${a}x${e}"]`))?"mobile"==c.data.type?(n.class.add("mobile_icon"),n.class.add("rotate")):n.class.remove("mobile_icon"):t.value="custom"};m(),t.watch("value",e=>{let a=t.value.split("x");2==a.length&&(i.value=a[0],u.value=a[1])}),i.watch("value",m),u.watch("value",m),n.on("click",e=>{if(!n.class.contains("mobile_icon"))return;let a=i.value,l=u.value;i.value=l,u.value=a})});