PageSourceSearch

https://www.americantourister.com.sg/on/demandware.static/Sites-Am…/v1790746888684/js/revampShopByColor.js

js americantourister.com.sg collected 2026-09-30 06:09:05 UTC 117,984 bytes, 88 lines download raw bytes

1!function(t){var e={};function i(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(s,n,function(e){return t[e]}.bind(null,n));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=198)}({1:function(t,e,i){i(8)},127:function(t,e,i){"use strict";i(1);var s=i(227),n={};function r(t){var e=t.replace(/^#/,""),i=parseInt(e,16);return{R:i>>16&255,G:i>>8&255,B:255&i}}function o(t){var e=t.toString(16);return 1===e.length?"0"+e:e}n.findClosestColor=function(t,e){var i,n=r(t),o=[];for(i=0;i<e.length;i++)o[i]=r(e[i]);var a,l=s.closest(n,o);for(i=0;i<e.length;i++)l===o[i]&&(a=e[i]),o[i]=r(e[i]);return a},n.rgbToHex=function(t){return"#"+o(t[0])+o(t[1])+o(t[2])},n.initProductCarousel=function(t){t.owlCarousel({items:6,loop:!1,nav:!0,dots:!1,lazyLoad:!0,responsive:{0:{items:3},768:{items:6}}})},n.getFilterValue=function(t){var e="";return t.length&&t.each(function(){var t=$(this);e?e+="|"+t.data("filterValue"):e=t.data("filterValue")}),e},n.updateProductLink=function(){var t=$(".product-wrapper .product a");if(t.length)for(var e=0;e<t.length;e++){t.eq(e).attr("target","_blank")}},n.updateShopNowButton=function(t){if(void 0!==t){var e=$(".shop-by-color-wrapper").data("baseUrl");if(e){var i=$(".refinement-selection.selected"),s=$(".shop-by-color-wheel .wheel-item-data.active").data("colorName");if(s&&(e=e.concat(s.toLowerCase())),e=(e=-1===e.indexOf("?")?e.concat("?"):e.concat("&")).concat("searchResultTemplate=true"),i.length){var r=n.getFilterValue(i),o=i.data("filterId");e=e.concat("&prefn1="+o+"&prefv1="+r)}$(".btn-shop-now").attr("href",e)}}},n.getColorConfiguration=function(){var t={warm:[],cool:[],blackText:[]},e=$(".wheel-item-data");if(e.length)for(var i=0;i<e.length;i++){var s=e.eq(i),n=s.data("bg-color"),r=s.data("warm"),o=s.data("black-text");r?t.warm.push(n):t.cool.push(n),o&&t.blackText.push(n)}return t},n.deleteDuplicatedProduct=function(t){var e=[],i=t.find(".product");if(i.length)for(var s=0;s<i.length;s++){var n=i.eq(s),r=n.data("pid");-1!==e.indexOf(r)?n.closest(".product-item").remove():e.push(r)}},n.updateProductHeight=function(t){if(window.screen.width<1200){var e=t.find(".product-tile"),i=0;e.each(function(){var t=$(this);t.css("height","auto"),t.height()>i&&(i=t.height())}),i&&e.height(i)}},t.exports=n},198:function(t,e,i){"use strict";const s=i(3);$(document).ready(function(){s(i(199)),s(i(200))})},199:function(t,e,i){"use strict";var s=i(127),n=window.screen.width,r=0,o=!1;n>=768&&n<1024?r=550:n>=1024?(r=45*n/100,o=!0):r=95*n/100;var a,l=0,h=!1,u=null,c=null,d=null;function p(){var t=(c=document.getElementById("canvas")).getContext("2d");t.fillStyle="#AAA",t.fillRect(0,0,c.width,c.height)}function g(t){var e=$(".shop-by-color-popup"),i=$(".shop-by-color-popup-overlay");e&&(e.addClass("active"),i.addClass("active"),"camera"===t&&$(".video-camera").addClass("active"),"uploaded"===t&&$(".uploaded-image").addClass("active"))}function m(t,e){if(t&&e){var i=e[0],n=e.parent().find("canvas"),r=n[0].getBoundingClientRect(),o=i.getBoundingClientRect(),a=o.left+i.offsetWidth/2-r.left,l=o.top+i.offsetHeight/2-r.top,h=n.width(),u=n.height(),c=a/(h/n.attr("width")),d=l/(u/n.attr("height")),p=t.getImageData(c,d,1,1),g=$(".confirm-color"),m=s.rgbToHex([p.data[0],p.data[1],p.data[2]]);e.find(".pointer-img").css("border-color",m),e.closest(".shop-by-color-popup").css("background",m),g.attr("data-current-color",m),e.draggable({disabled:!1,scroll:!1,containment:$(".shop-by-color-popup"),drag:function(){i=e[0],n=e.parent().find("canvas"),r=n[0].getBoundingClientRect(),o=i.getBoundingClientRect(),a=o.left+i.offsetWidth/2-r.left,l=o.top+i.offsetHeight/2-r.top,h=n.width(),u=n.height(),c=a/(h/n.attr("width")),d=l/(u/n.attr("height")),p=t.getImageData(c,d,1,1);var m=s.rgbToHex([p.data[0],p.data[1],p.data[2]]);e.find(".pointer-img").css("border-color",m),e.closest(".shop-by-color-popup").css("background",m),g.attr("data-current-color",m)}})}}function f(){$(".shop-by-color-popup").removeClass("active"),$(".video-camera").removeClass("active"),$(".uploaded-image").removeClass("active"),$(".video-camera-result").removeClass("captured").removeClass("active").removeClass("canvas-running"),$("#upload").val(""),$(".drag-item").draggable({disabled:!0}).attr("style",""),$(".shop-by-color-popup-overlay").removeClass("active"),$(".shadow-wheel").removeClass("active").removeClass("warm").removeClass("cool").removeClass("from-camera").removeClass("black"),$(".shadow-wheel-button").removeClass("active"),$(".shop-by-color-image-wrapper").removeClass("d-none")}function v(){u&&u.srcObject&&(u.pause(),u.src="",u.srcObject.getTracks()[0].stop(),$(".video-camera").css("min-height","0").css("max-height","none"))}function _(t){u=document.getElementById("video"),c=document.getElementById("canvas"),d=document.getElementById("capture-picture");
1var e=$(".video-camera-result"),i={video:!0,audio:!1};t||(i={video:{facingMode:"environment"},audio:!1}),navigator.mediaDevices.getUserMedia(i).then(function(t){u.srcObject=t,u.play(),e.addClass("active"),e.addClass("canvas-running")}),u.addEventListener("canplay",function(){if(!h){l=u.videoHeight/(u.videoWidth/r),isNaN(l)&&(l=r/(4/3)),u.setAttribute("width",r),u.setAttribute("height",l),h=!0;var t=$(".video-camera")?$(".video-camera").height():0;$(".video-camera").css("min-height",t+"px").css("max-height",t+"px")}a=setInterval(function(){if(!e.hasClass("captured")&&e.hasClass("canvas-running")){var t=(c=document.getElementById("canvas")).getContext("2d",{willReadFrequently:!0});u=document.getElementById("video"),c.width=r,c.height=l,t.drawImage(u,0,0,r,l),m(t,$(".video-camera-result .drag-item"))}else clearInterval(a)},10)},!1),d.addEventListener("click",function(t){!function(){p(),clearInterval(a),u=document.getElementById("video");var t=(c=document.getElementById("canvas")).getContext("2d");r&&l?(c.width=r,c.height=l,t.drawImage(u,0,0,r,l),$(".video-camera-result").addClass("active captured")):p()}(),t.preventDefault()},!1),p()}const w={initCameraFunction:function(){$(".take-image").on("click.takeImageFromCamera",function(){var t=$(".shop-by-color-popup");t&&!t.hasClass("active")&&(_(!1),g("camera"))}),$("#upload").on("change.uploadImageFromLibrary",function(t){var e=$(".shop-by-color-popup");if(e&&!e.hasClass("active")){var i=t.target.files[0];if(i){var s=new FileReader;s.onload=function(t){const e=new Image;e.onload=function(){var t=(c=document.getElementById("canvas-img")).getContext("2d");c.width=r,c.height=e.height/(e.width/r),t.drawImage(e,0,0,r,e.height/(e.width/r)),m(t,$(".uploaded-image .drag-item"))},e.src=t.target.result},s.readAsDataURL(i),g("uploaded")}}}),$("#switch-to-upload, .upload-new-image").on("click.initUpload",function(){f(),v(),$("#upload").trigger("click.uploadImage")}),$("#switch-to-camera").on("click.switchToCamera",function(){f(),v(),$(".take-image").trigger("click.takeImageFromCamera")}),$(".flip-camera").on("click.refreshCamera",function(){f(),v(),o?(_(!1),o=!1):(_(!0),o=!0),g("camera")}),$(".capture-new-picture").on("click.refreshCamera",function(){f(),v(),_(!1),o=!1,g("camera")}),$(".close-shop-by-color-popup").on("click",function(t){t.preventDefault(),f(),v()});var t,e=$(".shop-by-color-popup");n<768?e.length&&(t=95*n/100+20,e.css("min-width",t+"px")):n>=1024&&e.length&&(t=45*n/100+40,e.css("min-width",t+"px"))}};t.exports=w},200:function(t,e,i){"use strict";var s,n=i(201),r=i(202),o=i(127),a=o.getColorConfiguration(),l=a.warm,h=a.cool,u=a.blackText,c=!0,d=!1;function p(t,e){if(window&&window.wheel&&window.wheel.items){var i=1,s=window.wheel.getCurrentIndex(),n=window.wheel.items.length;s<=n/2&&t>s&&t<s+n/2?i=-1:s>n/2&&(t>s||t+n/2<=s)?i=-1:s===n-1&&t<=n/2&&(i=-1),window.wheel.spinToItem(t,e,!0,0,i,0)}}function g(t){if(void 0===t)return"";var e="",i=$(t).find(".product-tile-item"),s=[];if(i.length>0){i.each(function(t,e){var i=$(e);i.hasClass("product-tile-item")&&s.push(i)});for(var n=0;n<s.length;n++){var r=s[n];r&&(e+='<div class="product-item">'+r.html()+"</div>")}}return e}function m(t){$(".wheel-item-data").removeClass("active");var e=$(".wheel-item-data[data-color-value="+t.value+"]");if(e){var i=e.data("update-product"),s=e.data("id"),n=$(".product-wrapper .suggested-product");i&&s&&$.ajax({url:i,type:"GET"}).done(function(i){e.addClass("active");var r=$(".suggested-product");if(r.trigger("destroy.owl.carousel").find(".owl-stage-outer").children().unwrap(),function(t,e,i){if(void 0!==t&&void 0!==e){var s="",n=$(e).find(".product-tile-item"),r=[],o=$("."+i+".wheel-item-data");if(n.length>0){$(".shop-by-color-product-wrapper").removeClass("no-product"),n.each(function(t,e){var i=$(e);i.hasClass("product-tile-item")&&r.push(i)});for(var a=0;a<r.length;a++){var l=r[a];l&&(s+='<div class="product-item">'+l.html()+"</div>")}o.data("hasProduct",!0),o.data("pageTotal",r.length)}else $(".shop-by-color-product-wrapper").addClass("no-product");o.data("product",s)}}
1(n,i,s),function(t){if(void 0!==t){var e=$(".wheel-item-data."+t),i=e.data("product"),s=$(".suggested-product-wrapper .product-count"),n=$(".suggested-product");if(e.data("pageTotal")&&i){n.html(i);var r=s.data("countText").replace("0",e.data("pageTotal"));s.text(r)}}}(s),o.initProductCarousel(r),$(".refinement-selection .refiment-bg").css("background",t.backgroundColor),$(".refinement-selection").removeClass("black-text"),-1!==u.indexOf(t.backgroundColor)&&$(".refinement-selection").addClass("black-text"),o.updateShopNowButton(t.value),o.updateProductLink(),!c){var a=$(".product-animation-box");setTimeout(function(){a.addClass("fade-in-bottom")},200),setTimeout(function(){a.removeClass("fade-in-bottom").removeClass("fade-out-bottom"),o.updateProductHeight(n)},700)}c=!1});var r=$(".shadow-wheel"),a=$(".btn-com-color"),l=$(".complimentary-product-wrapper");if(l.addClass("d-none"),a.addClass("d-none"),e.data("complimentary")&&r.hasClass("active")){var h=e.data("complimentary").split(",");if(h&&h.length)for(var d="",p=0;p<h.length;p++){var m=$(".wheel-item-data[data-color-value="+h[p]+"]");if(m){var f=m.data("update-product");$.ajax({url:f,type:"GET"}).done(function(t){var e=l.find(".product-list");if(e.trigger("destroy.owl.carousel").find(".owl-stage-outer").children().unwrap(),d+=g(t)){e.html(d),a.removeClass("d-none"),o.updateProductLink(),o.deleteDuplicatedProduct(e),o.initProductCarousel(e);var i=$(".complimentary-product-wrapper .product-count"),s=i.data("countText").replace("0",$(".complimentary-product-wrapper .product-item").length);i.text(s)}})}}}}}function f(){var t=window.wheel.getCurrentIndex();if(s!==t||d){d=!1,$(".product-animation-box").addClass("fade-out-bottom"),s=t;var e=window.wheel.items[t];setTimeout(function(){m(e)},500)}}function v(t){if(window&&window.wheel&&window.wheel.items)for(var e=window.wheel.items,i=0;i<e.length;i++){e[i].backgroundColor===t&&(p(i,500),f())}$("body").trigger("onetag:customTracking",{trackingType:"shop_by_color",trackingSubType:"color_wheel",interactionType:"click",trackingLabel:t})}const _={initColorWheel:function(){var t,e={items:[]},i=[],s=$(".wheel-item-data");if(s.length)for(t=0;t<s.length;t++){var a=s.eq(t);if(a.data("color-value")&&a.data("bg-color")){var c={value:a.data("color-value"),backgroundColor:a.data("bg-color")};e.items.push(c),i.push(a.data("bg-color"))}}if(e){var g=document.querySelector(".wheel-container");window.wheel=new n.Wheel(g,e),window.wheel.borderWidth=0,window.wheel.lineWidth=0,window.wheel.radius=1,window.wheelHammer=new r(g)}(window.wheelHammer.on("tap",function(t){var e=$(".wheel-container canvas")?$(".wheel-container canvas")[0]:"";if(e){var i=e.getContext("2d",{willReadFrequently:!0}),s=t.srcEvent.offsetX,n=t.srcEvent.offsetY,r=$(".wheel-container");s=e.width*s/r.width(),n=e.height*n/r.height();var a=i.getImageData(s,n,1,1),l=[a.data[0],a.data[1],a.data[2]];v(o.rgbToHex(l))}}),$(".confirm-color").on("click",function(){var t=$(this),e=t.attr("data-current-color");if(e){$(".close-shop-by-color-popup").trigger("click");var s=o.findClosestColor(e,i);s&&(t.parent().hasClass("video-camera-result")&&$(".shadow-wheel").addClass("from-camera"),d=!0,v(s),function(t){$(".shadow-wheel").addClass("active"),$(".shadow-wheel-button").addClass("active"),-1!==l.indexOf(t)?$(".shadow-wheel").addClass("warm"):-1!==h.indexOf(t)&&$(".shadow-wheel").addClass("cool"),-1!==u.indexOf(t)&&$(".shadow-wheel").addClass("black"),$(".shadow-wheel").
1css("background",t),$(".shop-by-color-image-wrapper").addClass("d-none");var e=$(".shop-by-color-wheel"),i=$(".shadow-wheel-button");if(e.length&&i.length){e.append('<div class="shadow-overlay"></div>');var s=e.height()-i.height()/2;$(".shadow-overlay").height(s)}}(s))}}),$(".shadow-wheel-button").on("click",function(t){t.preventDefault(),$(".shadow-wheel").hasClass("from-camera")?$(".take-image").trigger("click.takeImageFromCamera"):$("#upload").trigger("click.uploadImage"),function(){$(".shadow-wheel").removeClass("active").removeClass("warm").removeClass("cool").removeClass("from-camera").removeClass("black"),$(".shadow-wheel-button").removeClass("active"),$(".shop-by-color-image-wrapper").removeClass("d-none");var t=$(".shadow-overlay");t.length&&t.remove()}()}),$(".shop-by-color-wrapper").on("click.filterProduct",".refinement-selection",function(t){t.preventDefault();var e=$(this);e.hasClass("selected")?e.removeClass("selected"):e.addClass("selected");var i=$(".refinement-selection.selected"),s="";i.length&&i.each(function(){var t=$(this);s?s+="|"+t.data("filterValue"):s=t.data("filterValue")});var n=$(".wheel-item-data.active").data("colorValue");if(function(t,e){var i=$(".wheel-item-data"),s=$("#enableStaticFilter").val();i.length&&i.each(function(i,n){var r=$(n),o=r.data("colorValue"),a="";if(s&&"true"===s)(a=r.data("updateProduct"))&&-1!==a.indexOf("?")&&(a=a.split("?")[0]),a=a.concat("?shopByColor=true&filterColor="+o),t&&e&&(a=a.concat("&prefn1="+t+"&prefv1="+e));else{var l=$(".shop-by-color-wrapper").data("baseUrl");a=(a=(a=-1===l.indexOf("?")?l.concat("?"):l.concat("&")).concat("shopByColor=true&prefn1=filterColor&prefv1="+o+"&filterColor="+o)).concat("&prefn2="+t+"&prefv2="+e)}r.data("catUrl",a),r.data("updateProduct",a)})}(e.data("filterId"),s),$(".product-animation-box").addClass("fade-out-bottom"),window&&window.wheel&&window.wheel.items)for(var r=window.wheel.items,o=0;o<r.length;o++){var a=r[o];a.value===n&&m(a)}}),$(".btn-com-color").on("click.showComColorProduct",function(t){t.preventDefault(),$(this).addClass("d-none");var e=$(".complimentary-product-wrapper");e.removeClass("d-none"),setTimeout(function(){o.updateProductHeight(e)},500)}),window&&window.wheel&&window.wheel.items&&window.wheel.items&&window.wheel.items)&&(m(window.wheel.items[0]),p(0,0),window.wheel.onRest=function(){f()},window.wheelHammer.on("panend",function(){window.wheel.stop(),f()}))},clickCarouselTracking:function(){$("body").on("click.prevCarousel",".owl-prev",()=>{$("body").trigger("onetag:customTracking",{trackingType:"shop_by_color",trackingSubType:"suggested_prd_arr",interactionType:"click",trackingLabel:"prev"})}),$("body").on("click.nextCarousel",".owl-next",()=>{$("body").trigger("onetag:customTracking",{trackingType:"shop_by_color",trackingSubType:"suggested_prd_arr",interactionType:"click",trackingLabel:"next"})})}};t.exports=_},201:function(t,e,i){"use strict";i.r(e),i.d(e,"Wheel",function(){return $});var s=Object.defineProperty,n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,a=Math.pow,l=(t,e,i)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,h=(t,e)=>{for(var i in e||(e={}))r.call(e,i)&&l(t,i,e[i]);if(n)for(var i of n(e))o.call(e,i)&&l(t,i,e[i]);return t};function u(t=0){return t*Math.PI/180}function c(t,e,i){return e<i?e<=t&&t<i:e<=t||t<i}function d(t,e,i,s){s.save(),s.font=`1px ${e}`;let n=s.measureText(t).width;return s.restore(),i/n}function p(t={x:0,y:0},e={},i=1){let s=e.getBoundingClientRect();return{x:(t.x-s.left)*i,y:(t.y-s.top)*i}}function g(t=0,e=0,i=1){let s=(t%360+e)%360;return s=function(t=0){return Number(t.toFixed(9))}(s),s=(1===i?360-s:360+s)%360,t+(s*=i)}function m(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}function f(t){return"number"==typeof t&&!Number.isNaN(t)}function v({val:t,isValid:e,errorMessage:i,defaultValue:s,action:n=null}){if(e)return n?n():t;if(void 0===t)return s;throw new Error(i)}function _(t){return t&&t.complete&&0!==t.naturalWidth&&0!==t.naturalHeight}function w(t){return Math.sin(t*Math.PI/2)}var y=(t={},e={})=>
1{if(window.ResizeObserver){let i=new ResizeObserver(()=>{e({redraw:!0})});return i.observe(t),{stop:()=>{i.unobserve(t),i.disconnect()}}}return window.addEventListener("resize",e),{stop:()=>{window.removeEventListener("resize",e)}}},b=Object.freeze({left:"left",right:"right",center:"center"}),C=Object.freeze({wheel:{borderColor:"#000",borderWidth:1,debug:!1,image:null,isInteractive:!0,itemBackgroundColors:["#fff"],itemLabelAlign:b.right,itemLabelBaselineOffset:0,itemLabelColors:["#000"],itemLabelFont:"sans-serif",itemLabelFontSizeMax:500,itemLabelRadius:.85,itemLabelRadiusMax:.2,itemLabelRotation:0,itemLabelStrokeColor:"#fff",itemLabelStrokeWidth:0,items:[],lineColor:"#000",lineWidth:1,pixelRatio:0,radius:.95,rotation:0,rotationResistance:-35,rotationSpeedMax:300,offset:{w:0,h:0},onCurrentIndexChange:null,onRest:null,onSpin:null,overlayImage:null,pointerAngle:0},item:{backgroundColor:null,image:null,imageOpacity:1,imageRadius:.5,imageRotation:0,imageScale:1,label:"",labelColor:null,value:null,weight:1}}),x=Object.freeze({pointerLineColor:"#ff00ff",labelOutlineColor:"#ff00ff",labelRadiusColor:"#00ff00",dragPointHue:300});function T(t={}){(function(t={}){let e=t.canvas;t._handler_onPointerMoveRefreshCursor=((e={})=>{let i={x:e.clientX,y:e.clientY};t._isCursorOverWheel=t.wheelHitTest(i),t.refreshCursor()}),t._handler_onMouseMoveRefreshCursor=((e={})=>{let i={x:e.clientX,y:e.clientY};t._isCursorOverWheel=t.wheelHitTest(i),t.refreshCursor()}),t._handler_onPointerDown=((i={})=>{let s={x:i.clientX,y:i.clientY};function n(e={}){e.preventDefault(),t.dragMove({x:e.clientX,y:e.clientY})}function r(i={}){i.preventDefault(),e.releasePointerCapture(i.pointerId),e.removeEventListener("pointermove",n),e.removeEventListener("pointerup",r),e.removeEventListener("pointercancel",r),e.removeEventListener("pointerout",r),t.dragEnd()}t.isInteractive&&t.wheelHitTest(s)&&(i.preventDefault(),t.dragStart(s),e.setPointerCapture(i.pointerId),e.addEventListener("pointermove",n),e.addEventListener("pointerup",r),e.addEventListener("pointercancel",r),e.addEventListener("pointerout",r))}),t._handler_onMouseDown=((e={})=>{let i={x:e.clientX,y:e.clientY};function s(e={}){e.preventDefault(),t.dragMove({x:e.clientX,y:e.clientY})}t.isInteractive&&t.wheelHitTest(i)&&(t.dragStart(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function e(i={}){i.preventDefault(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",e),t.dragEnd()}))}),t._handler_onTouchStart=((i={})=>{let s={x:i.targetTouches[0].clientX,y:i.targetTouches[0].clientY};function n(e={}){e.preventDefault(),t.dragMove({x:e.targetTouches[0].clientX,y:e.targetTouches[0].clientY})}function r(i={}){i.preventDefault(),e.removeEventListener("touchmove",n),e.removeEventListener("touchend",r),e.removeEventListener("touchcancel",r),t.dragEnd()}t.isInteractive&&t.wheelHitTest(s)&&(i.preventDefault(),t.dragStart(s),e.addEventListener("touchmove",n),e.addEventListener("touchend",r),e.addEventListener("touchcancel",r))}),"PointerEvent"in window?(e.addEventListener("pointerdown",t._handler_onPointerDown),e.addEventListener("pointermove",t._handler_onPointerMoveRefreshCursor)):(e.addEventListener("touchstart",t._handler_onTouchStart),e.addEventListener("mousedown",t._handler_onMouseDown),e.addEventListener("mousemove",t._handler_onMouseMoveRefreshCursor))})(t),t._handler_onResize=y(t._canvasContainer,({redraw:e=!0})=>{t.resize(),e&&t.draw(performance.now())});let e=()=>{t._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),t._mediaQueryList.addEventListener("change",t._handler_onDevicePixelRatioChange,{once:!0})};t._handler_onDevicePixelRatioChange=(()=>{t.resize(),e()}),e()}var E=class{constructor(t,e={}){if(!m(t))throw new Error("wheel must be an instance of Wheel");if(!m(e)&&null!==e)throw new Error("props must be an Object or null");this._wheel=t;for(let t of Object.keys(C.item))this["_"+t]=C.item[t];e?this.init(e):this.init(C.item)}init(t={}){this.backgroundColor=t.backgroundColor,this.image=t.image,this.imageOpacity=t.imageOpacity,this.imageRadius=t.
1imageRadius,this.imageRotation=t.imageRotation,this.imageScale=t.imageScale,this.label=t.label,this.labelColor=t.labelColor,this.value=t.value,this.weight=t.weight}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){this._backgroundColor="string"==typeof t?t:C.item.backgroundColor,this._wheel.refresh()}get image(){return this._image}set image(t){let e;"string"==typeof t?((e=new Image).src=t,e.onload=(t=>this._wheel.refresh())):e=C.item.image,this._image=e,this._wheel.refresh()}get imageOpacity(){return this._imageOpacity}set imageOpacity(t){this._imageOpacity="number"==typeof t?t:C.item.imageOpacity,this._wheel.refresh()}get imageRadius(){return this._imageRadius}set imageRadius(t){this._imageRadius="number"==typeof t?t:C.item.imageRadius,this._wheel.refresh()}get imageRotation(){return this._imageRotation}set imageRotation(t){this._imageRotation="number"==typeof t?t:C.item.imageRotation,this._wheel.refresh()}get imageScale(){return this._imageScale}set imageScale(t){this._imageScale="number"==typeof t?t:C.item.imageScale,this._wheel.refresh()}get label(){return this._label}set label(t){this._label="string"==typeof t?t:C.item.label,this._wheel.refresh()}get labelColor(){return this._labelColor}set labelColor(t){this._labelColor="string"==typeof t?t:C.item.labelColor,this._wheel.refresh()}get value(){return this._value}set value(t){this._value=void 0!==t?t:C.item.value}get weight(){return this._weight}set weight(t){this._weight="number"==typeof t?t:C.item.weight}getIndex(){let t=this._wheel.items.findIndex(t=>t===this);if(-1===t)throw new Error("Item not found in parent Wheel");return t}getCenterAngle(){let t=this._wheel.getItemAngles()[this.getIndex()];return t.start+(t.end-t.start)/2}getStartAngle(){return this._wheel.getItemAngles()[this.getIndex()].start}getEndAngle(){return this._wheel.getItemAngles()[this.getIndex()].end}getRandomAngle(){return function(t=0,e=0,i=14){return parseFloat((Math.random()*(e-t)+t).toFixed(i))}(this.getStartAngle(),this.getEndAngle())}},$=class{constructor(t,e={}){if(!(t instanceof Element))throw new Error("container must be an instance of Element");if(!m(e)&&null!==e)throw new Error("props must be an Object or null");this._frameRequestId=null,this._rotationSpeed=0,this._rotationDirection=1,this._spinToTimeEnd=null,this._lastSpinFrameTime=null,this._isCursorOverWheel=!1,this.add(t);for(let t of Object.keys(C.wheel))this["_"+t]=C.wheel[t];e?this.init(e):this.init(C.wheel)}init(t={}){this._isInitialising=!0,this.borderColor=t.borderColor,this.borderWidth=t.borderWidth,this.debug=t.debug,this.image=t.image,this.isInteractive=t.isInteractive,this.itemBackgroun
1dColors=t.itemBackgroundColors,this.itemLabelAlign=t.itemLabelAlign,this.itemLabelBaselineOffset=t.itemLabelBaselineOffset,this.itemLabelColors=t.itemLabelColors,this.itemLabelFont=t.itemLabelFont,this.itemLabelFontSizeMax=t.itemLabelFontSizeMax,this.itemLabelRadius=t.itemLabelRadius,this.itemLabelRadiusMax=t.itemLabelRadiusMax,this.itemLabelRotation=t.itemLabelRotation,this.itemLabelStrokeColor=t.itemLabelStrokeColor,this.itemLabelStrokeWidth=t.itemLabelStrokeWidth,this.items=t.items,this.lineColor=t.lineColor,this.lineWidth=t.lineWidth,this.pixelRatio=t.pixelRatio,this.rotationSpeedMax=t.rotationSpeedMax,this.radius=t.radius,this.rotation=t.rotation,this.rotationResistance=t.rotationResistance,this.offset=t.offset,this.onCurrentIndexChange=t.onCurrentIndexChange,this.onRest=t.onRest,this.onSpin=t.onSpin,this.overlayImage=t.overlayImage,this.pointerAngle=t.pointerAngle}add(t){this._canvasContainer=t,this.canvas=document.createElement("canvas"),this._context=this.canvas.getContext("2d"),this._canvasContainer.append(this.canvas),T(this),!1===this._isInitialising&&this.resize()}remove(){null!==this.canvas&&(null!==this._frameRequestId&&window.cancelAnimationFrame(this._frameRequestId),function(t={}){let e=t.canvas;"PointerEvent"in window?(e.removeEventListener("pointerdown",t._handler_onPointerDown),e.removeEventListener("pointermove",t._handler_onPointerMoveRefreshCursor)):(e.removeEventListener("touchstart",t._handler_onTouchStart),e.removeEventListener("mousedown",t._handler_onMouseDown),e.removeEventListener("mousemove",t._handler_onMouseMoveRefreshCursor)),t._handler_onResize.stop(),t._mediaQueryList.removeEventListener("change",t._handler_onDevicePixelRatioChange)}(this),this._canvasContainer.removeChild(this.canvas),this._canvasContainer=null,this.canvas=null,this._context=null)}resize(){if(null===this.canvas)return;this.canvas.style.width=this._canvasContainer.clientWidth+"px",this.canvas.style.height=this._canvasContainer.clientHeight+"px";let[t,e]=[this._canvasContainer.clientWidth*this.getActualPixelRatio(),this._canvasContainer.clientHeight*this.getActualPixelRatio()];this.canvas.width=t,this.canvas.height=e;let i=Math.min(t,e),s=i-i*this.offset.w,n=i-i*this.offset.h,r=Math.min(t/s,e/n);this._size=Math.max(s*r,n*r),this._center={x:t/2+t*this.offset.w,y:e/2+e*this.offset.h},this._actualRadius=this._size/2*this.radius,this._itemLabelFontSize=this.itemLabelFontSizeMax*(this._size/500),this._labelMaxWidth=this._actualRadius*(this.itemLabelRadius-this.itemLabelRadiusMax);for(let t of this._items)this._itemLabelFontSize=Math.min(this._itemLabelFontSize,d(t.label,this.itemLabelFont,this._labelMaxWidth,this._context));this.refresh()}draw(t=0){if(this._frameRequestId=null,null===this._context||null===this.canvas)return;let e=this._context;e.clearRect(0,0,this.canvas.width,this.canvas.height),this.animateRotation(t);let i=this.getItemAngles(this._rotation),s=this.getScaledNumber(this._borderWidth);e.textBaseline="middle",e.textAlign=this.itemLabelAlign,e.font=this._itemLabelFontSize+"px "+this.itemLabelFont,e.save();for(let[t,e]of i.entries()){let i=this._items[t],n=new Path2D;n.moveTo(this._center.x,this._center.y),n.arc(this._center.x,this._center.y,this._actualRadius-s/2,u(e.start+-90),u(e.end+-90)),i.path=n}
1this.drawItemBackgrounds(e,i),this.drawItemImages(e,i),this.drawItemLines(e,i),this.drawItemLabels(e,i),this.drawBorder(e),this.drawImage(e,this._image,!1),this.drawImage(e,this._overlayImage,!0),this.drawDebugPointerLine(e),this.drawDebugDragPoints(e),this._isInitialising=!1}drawItemBackgrounds(t,e=[]){var i;for(let[s,n]of e.entries()){let e=this._items[s];t.fillStyle=null!=(i=e.backgroundColor)?i:this._itemBackgroundColors[s%this._itemBackgroundColors.length],t.fill(e.path)}}drawItemImages(t,e=[]){for(let[i,s]of e.entries()){let e=this._items[i];if(!_(e.image))continue;t.save(),t.clip(e.path);let n=s.start+(s.end-s.start)/2;t.translate(this._center.x+Math.cos(u(n+-90))*(this._actualRadius*e.imageRadius),this._center.y+Math.sin(u(n+-90))*(this._actualRadius*e.imageRadius)),t.rotate(u(n+e.imageRotation)),t.globalAlpha=e.imageOpacity;let r=this._size/500*e.image.width*e.imageScale,o=this._size/500*e.image.height*e.imageScale,a=-r/2,l=-o/2;t.drawImage(e.image,a,l,r,o),t.restore()}}drawImage(t,e,i=!1){if(!_(e))return;t.translate(this._center.x,this._center.y),i||t.rotate(u(this._rotation));let s=i?this._size:this._size*this.radius,n=-s/2;t.drawImage(e,n,n,s,s),t.resetTransform()}drawDebugPointerLine(t){!this.debug||(t.translate(this._center.x,this._center.y),t.rotate(u(this._pointerAngle+-90)),t.beginPath(),t.moveTo(0,0),t.lineTo(2*this._actualRadius,0),t.strokeStyle=x.pointerLineColor,t.lineWidth=this.getScaledNumber(2),t.stroke(),t.resetTransform())}drawBorder(t){if(this._borderWidth<=0)return;let e=this.getScaledNumber(this._borderWidth),i=this._borderColor||"transparent";if(t.beginPath(),t.strokeStyle=i,t.lineWidth=e,t.arc(this._center.x,this._center.y,this._actualRadius-e/2,0,2*Math.PI),t.stroke(),this.debug){let e=this.getScaledNumber(1);t.beginPath(),t.strokeStyle=t.strokeStyle=x.labelRadiusColor,t.lineWidth=e,t.arc(this._center.x,this._center.y,this._actualRadius*this.itemLabelRadius,0,2*Math.PI),t.stroke(),t.beginPath(),t.strokeStyle=t.strokeStyle=x.labelRadiusColor,t.lineWidth=e,t.arc(this._center.x,this._center.y,this._actualRadius*this.itemLabelRadiusMax,0,2*Math.PI),t.stroke()}}drawItemLines(t,e=[]){if(this._lineWidth<=0)return;let i=this.getScaledNumber(this._lineWidth),s=this.getScaledNumber(this._borderWidth);t.translate(this._center.x,this._center.y);for(let n of e)t.rotate(u(n.start+-90)),t.beginPath(),t.moveTo(0,0),t.lineTo(this._actualRadius-s,0),t.strokeStyle=this.lineColor,t.lineWidth=i,t.stroke(),t.rotate(-u(n.start+-90));t.resetTransform()}drawItemLabels(t,e=[]){let i=this._itemLabelFontSize*-this.itemLabelBaselineOffset,s=this.getScaledNumber(1),n=this.getScaledNumber(2*this._itemLabelStrokeWidth);for(let[r,o]of e.entries()){let e=this._items[r],a=e.labelColor||this._itemLabelColors[r%this._itemLabelColors.length]||"transparent";if(""===e.label.trim()||"transparent"===a)continue;t.save(),t.clip(e.path);let l=o.start+(o.end-o.start)/2;t.translate(this._center.x+Math.cos(u(l+-90))*(this._actualRadius*this.itemLabelRadius),this._center.y+Math.sin(u(l+-90))*(this._actualRadius*this.itemLabelRadius)),t.rotate(u(l+-90)),t.rotate(u(this.itemLabelRotation)),this.debug&&(t.beginPath(),t.moveTo(0,0),t.lineTo(-this._labelMaxWidth,0),t.strokeStyle=x.labelOutlineColor,t.lineWidth=s,t.stroke(),t.strokeRect(0,-this._itemLabelFontSize/2,-this._labelMaxWidth,this._itemLabelFontSize)),this._itemLabelStrokeWidth>0&&(t.lineWidth=n,t.strokeStyle=this._itemLabelStrokeColor,t.lineJoin="round",t.strokeText(e.label,0,i)),t.fillStyle=a,t.fillText(e.label,0,i),t.restore()}}drawDebugDragPoints(t){var e;if(!this.debug||null==(e=this._dragEvents)||!e.length)return;let i=[...this._dragEvents].reverse(),s=this.getScaledNumber(.5),n=this.getScaledNumber(4);for(let[e,r]of i.entries()){let i=e/this._dragEvents.length*100;t.beginPath(),t.arc(r.x,r.y,n,0,2*Math.PI),t.fillStyle=`hsl(${x.dragPointHue},100%,${i}%)`,t.strokeStyle="#000",t.lineWidth=s,t.fill(),t.stroke()}}animateRotation(t=0){if(null!==this._spinToTimeEnd){if(t>=this._spinToTimeEnd)return this.rotation=this._spinToEndRotation,this._spinToTimeEnd=null,void this.raiseEvent_onRest();let e=this._spinToTimeEnd-this._spinToTimeStart,i=(t-this._spinToTimeStart)/e;i=i<0?0:i;let s=this._spinToEndRotation-this._spinToStartRotation;return this.rotation=this._spinToStartRotation+s*this._spinToEasingFunction(i),void this.refresh()}if(null!==this._lastSpinFrameTime){let e=t-this._lastSpinFrameTime;return e>0&&(this.rotation+=e/1e3*this._rotationSpeed%360,this._rotationSpeed=this.getRotationSpeedPlusDrag(e),0===this._rotationSpeed?(this.raiseEvent_onRest(),this._lastSpinFrameTime=null):this._lastSpinFrameTime=t),void this.refresh()}}getRotationSpeedPlusDrag(t=0){let e=this._rotationSpeed+this.rotationResistance*(t/1e3)*this._rotationDirection;return 1===this._rotationDirection&&e<0||-1===this._rotationDirection&&e>=0?0:e}spin(t=0){if(!f(t))throw new Error("rotationSpeed must be a number");this._dragEvents=[],this.beginSpin(t,"spin")}spinTo(t=0,e=0,i=null){if(!f(t))throw new Error("Error: rotation must be a number");if(!f(e))throw new Error("Error: duration must be a number");this.stop(),this._dragEvents=[],this.animate(t,e,i),this.raiseEvent_onSpin({method:"spinto",targetRotation:t,duration:e})}spinToItem(t=0,e=0,i=!0,s=1,n=1,r=null){this.stop(),this._dragEvents=[];let o=i?this.items[t].getCenterAngle():this.items[t].getRandomAngle(),a=g(this.rotation,o-this._pointerAngle,n);a+=360*s*n,this.animate(a,e,r),this.raiseEvent_onSpin({method:"spintoitem",targetItemIndex:t,targetRotation:a,duration:e})}animate(t,e,i){this._spinToStartRotation=this.rotation,this._spinToEndRotation=t,this._spinToTimeStart=performance.now(),this._spinToTimeEnd=this._spinToTimeStart+e,this._spinToEasingFunction=i||w,this.refresh()}stop(){this._spinToTimeEnd=null,this._rotationSpeed=0,this._lastSpinFrameTime=null}getScaledNumber(t){return t/500*this._size}getActualPixelRatio(){return 0!==this._pixelRatio?this._pixelRatio:window.devicePixelRatio}wheelHitTest(t={x:0,y:0}){if(null===this.canvas)return!1;return function(t={x:0,y:0},e,i,s){return a(t.x-e,2)+a(t.y-i,2)<=a(s,2)}(p(t,this.canvas,this.getActualPixelRatio()),this._center.x,this._center.y,this._actualRadius)}
1refreshCursor(){if(null!==this.canvas){if(this.isInteractive){if(this.isDragging)return void(this.canvas.style.cursor="grabbing");if(this._isCursorOverWheel)return void(this.canvas.style.cursor="grab")}this.canvas.style.cursor=""}}getAngleFromCenter(t={x:0,y:0}){return(function(t,e,i,s){let n=t-i,r=e-s,o=Math.atan2(-r,-n);return(o*=180/Math.PI)<0&&(o+=360),o}(this._center.x,this._center.y,t.x,t.y)+90)%360}getCurrentIndex(){return this._currentIndex}refreshCurrentIndex(t=[]){0===this._items.length&&(this._currentIndex=-1);for(let[e,i]of t.entries())if(c(this._pointerAngle,i.start%360,i.end%360)){if(this._currentIndex===e)break;this._currentIndex=e,this._isInitialising||this.raiseEvent_onCurrentIndexChange();break}}getItemAngles(t=0){let e=0;for(let t of this.items)e+=t.weight;let i,s=360/e,n=t,r=[];for(let t of this._items)i=t.weight*s,r.push({start:n,end:n+i}),n+=i;return this._items.length>1&&(r[r.length-1].end=r[0].start+360),r}refresh(){null===this._frameRequestId&&(this._frameRequestId=window.requestAnimationFrame(t=>this.draw(t)))}limitSpeed(t=0,e=0){let i=Math.min(t,e);return Math.max(i,-e)}beginSpin(t=0,e=""){this.stop(),this._rotationSpeed=this.limitSpeed(t,this._rotationSpeedMax),this._lastSpinFrameTime=performance.now(),this._rotationDirection=this._rotationSpeed>=0?1:-1,0!==this._rotationSpeed&&this.raiseEvent_onSpin({method:e,rotationSpeed:this._rotationSpeed,rotationResistance:this._rotationResistance}),this.refresh()}refreshAriaLabel(){if(null===this.canvas)return;this.canvas.setAttribute("role","img");let t=this.items.length>=2?` The wheel has ${this.items.length} slices.`:"";this.canvas.setAttribute("aria-label","An image of a spinning prize wheel."+t)}get borderColor(){return this._borderColor}set borderColor(t){this._borderColor=v({val:t,isValid:"string"==typeof t,errorMessage:"Wheel.borderColor must be a string",defaultValue:C.wheel.borderColor}),this.refresh()}get borderWidth(){return this._borderWidth}set borderWidth(t){this._borderWidth=v({val:t,isValid:f(t),errorMessage:"Wheel.borderWidth must be a number",defaultValue:C.wheel.borderWidth}),this.refresh()}get debug(){return this._debug}set debug(t){this._debug=v({val:t,isValid:"boolean"==typeof t,errorMessage:"Wheel.debug must be a boolean",defaultValue:C.wheel.debug}),this.refresh()}get image(){var t,e;return null!=(e=null==(t=this._image)?void 0:t.src)?e:null}set image(t){this._image=v({val:t,isValid:"string"==typeof t||null===t,errorMessage:"Wheel.image must be a url (string) or null",defaultValue:C.wheel.image,action:()=>{if(null===t)return null;let e=new Image;return e.src=t,e.onload=(t=>this.refresh()),e}}),this.refresh()}get isInteractive(){return this._isInteractive}set isInteractive(t){this._isInteractive=v({val:t,isValid:"boolean"==typeof t,errorMessage:"Wheel.isInteractive must be a boolean",defaultValue:C.wheel.isInteractive}),this.refreshCursor()}
1get itemBackgroundColors(){return this._itemBackgroundColors}set itemBackgroundColors(t){this._itemBackgroundColors=v({val:t,isValid:Array.isArray(t),errorMessage:"Wheel.itemBackgroundColors must be an array",defaultValue:C.wheel.itemBackgroundColors}),this.refresh()}get itemLabelAlign(){return this._itemLabelAlign}set itemLabelAlign(t){this._itemLabelAlign=v({val:t,isValid:"string"==typeof t,errorMessage:"Wheel.itemLabelAlign must be a string",defaultValue:C.wheel.itemLabelAlign}),this.refresh()}get itemLabelBaselineOffset(){return this._itemLabelBaselineOffset}set itemLabelBaselineOffset(t){this._itemLabelBaselineOffset=v({val:t,isValid:f(t),errorMessage:"Wheel.itemLabelBaselineOffset must be a number",defaultValue:C.wheel.itemLabelBaselineOffset}),this.resize()}get itemLabelColors(){return this._itemLabelColors}set itemLabelColors(t){this._itemLabelColors=v({val:t,isValid:Array.isArray(t),errorMessage:"Wheel.itemLabelColors must be an array",defaultValue:C.wheel.itemLabelColors}),this.refresh()}get itemLabelFont(){return this._itemLabelFont}set itemLabelFont(t){this._itemLabelFont=v({val:t,isValid:"string"==typeof t,errorMessage:"Wheel.itemLabelFont must be a string",defaultValue:C.wheel.itemLabelFont}),this.resize()}get itemLabelFontSizeMax(){return this._itemLabelFontSizeMax}set itemLabelFontSizeMax(t){this._itemLabelFontSizeMax=v({val:t,isValid:f(t),errorMessage:"Wheel.itemLabelFontSizeMax must be a number",defaultValue:C.wheel.itemLabelFontSizeMax}),this.resize()}get itemLabelRadius(){return this._itemLabelRadius}set itemLabelRadius(t){this._itemLabelRadius=v({val:t,isValid:f(t),errorMessage:"Wheel.itemLabelRadius must be a number",defaultValue:C.wheel.itemLabelRadius}),this.resize()}get itemLabelRadiusMax(){return this._itemLabelRadiusMax}set itemLabelRadiusMax(t){this._itemLabelRadiusMax=v({val:t,isValid:f(t),errorMessage:"Wheel.itemLabelRadiusMax must be a number",defaultValue:C.wheel.itemLabelRadiusMax}),this.resize()}get itemLabelRotation(){return this._itemLabelRotation}set itemLabelRotation(t){this._itemLabelRotation=v({val:t,isValid:f(t),errorMessage:"Wheel.itemLabelRotation must be a number",defaultValue:C.wheel.itemLabelRotation}),this.refresh()}get itemLabelStrokeColor(){return this._itemLabelStrokeColor}set itemLabelStrokeColor(t){this._itemLabelStrokeColor=v({val:t,isValid:"string"==typeof t,errorMessage:"Wheel.itemLabelStrokeColor must be a string",defaultValue:C.wheel.itemLabelStrokeColor}),this.refresh()}get itemLabelStrokeWidth(){return this._itemLabelStrokeWidth}set itemLabelStrokeWidth(t){this._itemLabelStrokeWidth=v({val:t,isValid:f(t),errorMessage:"Wheel.itemLabelStrokeWidth must be a number",defaultValue:C.wheel.itemLabelStrokeWidth}),this.refresh()}get items(){return this._items}set items(t){this._items=v({val:t,isValid:Array.isArray(t),errorMessage:"Wheel.items must be an array of Items",defaultValue:C.wheel.items,action:()=>{let e=[];for(let i of t)e.push(new E(this,{backgroundColor:i.backgroundColor,image:i.image,imageRadius:i.imageRadius,imageRotation:i.imageRotation,imageScale:i.imageScale,label:i.label,labelColor:i.labelColor,value:i.value,weight:i.weight}));return e}}),this.refreshAriaLabel(),this.refreshCurrentIndex(this.getItemAngles(this._rotation)),this.resize()}get lineColor(){return this._lineColor}set lineColor(t){this._lineColor=v({val:t,isValid:"string"==typeof t,errorMessage:"Wheel.lineColor must be a string",defaultValue:C.wheel.lineColor}),this.refresh()}get lineWidth(){return this._lineWidth}set lineWidth(t){this._lineWidth=v({val:t,isValid:f(t),errorMessage:"Wheel.lineWidth must be a number",defaultValue:C.wheel.lineWidth}),this.refresh()}get offset(){return this._offset}set offset(t){this._offset=v({val:t,isValid:m(t),errorMessage:"Wheel.offset must be an object",defaultValue:C.wheel.offset}),this.resize()}get onCurrentIndexChange(){return this._onCurrentIndexChange}set onCurrentIndexChange(t){this._onCurrentIndexChange=v({val:t,isValid:"function"==typeof t||null===t,errorMessage:"Wheel.onCurrentIndexChange must be a function or null",defaultValue:C.wheel.onCurrentIndexChange})}get onRest(){return this._onRest}set onRest(t){this._onRest=v({val:t,isValid:"function"==typeof t||null===t,errorMessage:"Wheel.onRest must be a function or null",defaultValue:C.wheel.onRest})}get onSpin(){return this._onSpin}set onSpin(t){this._onSpin=v({val:t,isValid:"function"==typeof t||null===t,errorMessage:"Wheel.onSpin must be a function or null",defaultValue:C.wheel.onSpin})}get overlayImage(){var t,e;return null!=(e=null==(t=this._overlayImage)?void 0:t.src)?e:null}set overlayImage(t){this._overlayImage=v({val:t,isValid:"string"==typeof t||null===t,errorMessage:"Wheel.overlayImage must be a url (string) or null",defaultValue:C.wheel.overlayImage,action:()=>
1{if(null===t)return null;let e=new Image;return e.src=t,e.onload=(t=>this.refresh()),e}}),this.refresh()}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=v({val:t,isValid:f(t),errorMessage:"Wheel.pixelRatio must be a number",defaultValue:C.wheel.pixelRatio}),this._dragEvents=[],this.resize()}get pointerAngle(){return this._pointerAngle}set pointerAngle(t){this._pointerAngle=v({val:t,isValid:f(t)&&t>=0,errorMessage:"Wheel.pointerAngle must be a number between 0 and 360",defaultValue:C.wheel.pointerAngle,action:()=>t%360}),this.debug&&this.refresh()}get radius(){return this._radius}set radius(t){this._radius=v({val:t,isValid:f(t),errorMessage:"Wheel.radius must be a number",defaultValue:C.wheel.radius}),this.resize()}get rotation(){return this._rotation}set rotation(t){this._rotation=v({val:t,isValid:f(t),errorMessage:"Wheel.rotation must be a number",defaultValue:C.wheel.rotation}),this.refreshCurrentIndex(this.getItemAngles(this._rotation)),this.refresh()}get rotationResistance(){return this._rotationResistance}set rotationResistance(t){this._rotationResistance=v({val:t,isValid:f(t),errorMessage:"Wheel.rotationResistance must be a number",defaultValue:C.wheel.rotationResistance})}get rotationSpeed(){return this._rotationSpeed}get rotationSpeedMax(){return this._rotationSpeedMax}set rotationSpeedMax(t){this._rotationSpeedMax=v({val:t,isValid:f(t)&&t>=0,errorMessage:"Wheel.rotationSpeedMax must be a number >= 0",defaultValue:C.wheel.rotationSpeedMax})}dragStart(t={x:0,y:0}){if(null===this.canvas)return;let e=p(t,this.canvas,this.getActualPixelRatio());this.isDragging=!0,this.stop(),this._dragEvents=[{distance:0,x:e.x,y:e.y,now:performance.now()}],this.refreshCursor()}dragMove(t={x:0,y:0}){if(null===this.canvas)return;let e=p(t,this.canvas,this.getActualPixelRatio()),i=this.getAngleFromCenter(e),s=this._dragEvents[0],n=function(t=0,e=0){return 180-function(t=0,e=0){let i,s=t+e;return 360==(i=s>0?s%360:360+s%360)&&(i=0),i}(t,180-e)}(this.getAngleFromCenter(s),i);this._dragEvents.unshift({distance:n,x:e.x,y:e.y,now:performance.now()}),this.debug&&this._dragEvents.length>=40&&this._dragEvents.pop(),this.rotation+=n}dragEnd(){this.isDragging=!1;let t=0,e=performance.now();for(let[i,s]of this._dragEvents.entries()){if(this.isDragEventTooOld(e,s)){this._dragEvents.length=i,this.debug&&this.refresh();break}t+=s.distance}this.refreshCursor(),0!==t&&this.beginSpin(4*t,"interact")}isDragEventTooOld(t=0,e={}){return t-e.now>250}raiseEvent_onCurrentIndexChange(t={}){var e;null==(e=this.onCurrentIndexChange)||e.call(this,h({type:"currentIndexChange",currentIndex:this._currentIndex},t))}raiseEvent_onRest(t={}){var e;null==(e=this.onRest)||e.call(this,h({type:"rest",currentIndex:this._currentIndex,rotation:this._rotation},t))}raiseEvent_onSpin(t={}){var e;null==(e=this.onSpin)||e.call(this,h({type:"spin"},t))}}},202:function(t,e,i){var s;
2/*! Hammer.JS - v2.0.7 - 2016-04-22
3 * http://hammerjs.github.io/
4 *
5 * Copyright (c) 2016 Jorik Tangelder;
6 * Licensed under the MIT license */!function(n,r,o,a){"use strict";function l(t,e,i){return setTimeout(p(t,i),e)}function h(t,e,i){return!!Array.isArray(t)&&(u(t,i[e],i),!0)}function u(t,e,i){var s;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(s=0;s<t.length;)e.call(i,t[s],s,t),s++;else for(s in t)t.hasOwnProperty(s)&&e.call(i,t[s],s,t)}function c(t,e,i){var s="DEPRECATED METHOD: "+e+"\n"+i+" AT \n";return function(){var e=new Error("get-stack-trace"),i=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=n.console&&(n.console.warn||n.console.log);return r&&r.call(n.console,s,i),t.apply(this,arguments)}}function d(t,e,i){var s,n=e.prototype;(s=t.prototype=Object.create(n)).constructor=t,s._super=n,i&&st(s,i)}function p(t,e){return function(){return t.apply(e,arguments)}}function g(t,e){return typeof t==ot?t.apply(e&&e[0]||a,e):t}function m(t,e){return t===a?e:t}function f(t,e,i){u(y(e),function(e){t.addEventListener(e,i,!1)})}function v(t,e,i){u(y(e),function(e){t.removeEventListener(e,i,!1)})}function _(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function w(t,e){return t.indexOf(e)>-1}function y(t){return t.trim().split(/\s+/g)}
vendor: 15,621 bytes, line 6
6function b(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var s=0;s<t.length;){if(i&&t[s][i]==e||!i&&t[s]===e)return s;s++}return-1}function C(t){return Array.prototype.slice.call(t,0)}function x(t,e,i){for(var s=[],n=[],r=0;r<t.length;){var o=e?t[r][e]:t[r];b(n,o)<0&&s.push(t[r]),n[r]=o,r++}return i&&(s=e?s.sort(function(t,i){return t[e]>i[e]}):s.sort()),s}function T(t,e){for(var i,s,n=e[0].toUpperCase()+e.slice(1),r=0;r<nt.length;){if((s=(i=nt[r])?i+n:e)in t)return s;r++}return a}function E(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||n}function $(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){g(t.options.enable,[t])&&i.handler(e)},this.init()}function R(t,e,i){var s=i.pointers.length,n=i.changedPointers.length,r=e&wt&&s-n==0,o=e&(bt|Ct)&&s-n==0;i.isFirst=!!r,i.isFinal=!!o,r&&(t.session={}),i.eventType=e,function(t,e){var i=t.session,s=e.pointers,n=s.length;i.firstInput||(i.firstInput=M(e)),n>1&&!i.firstMultiple?i.firstMultiple=M(e):1===n&&(i.firstMultiple=!1);var r=i.firstInput,o=i.firstMultiple,a=o?o.center:r.center,l=e.center=L(s);e.timeStamp=ht(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=P(a,l),e.distance=z(a,l),function(t,e){var i=e.center,s=t.offsetDelta||{},n=t.prevDelta||{},r=t.prevInput||{};e.eventType!==wt&&r.eventType!==bt||(n=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},s=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-s.x),e.deltaY=n.y+(i.y-s.y)}(i,e),e.offsetDirection=k(e.deltaX,e.deltaY);var h=I(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=lt(h.x)>lt(h.y)?h.x:h.y,e.scale=o?function(t,e){return z(e[0],e[1],kt)/z(t[0],t[1],kt)}(o.pointers,s):1,e.rotation=o?function(t,e){return P(e[1],e[0],kt)+P(t[1],t[0],kt)}(o.pointers,s):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,S(i,e);var u=t.element;_(e.srcEvent.target,u)&&(u=e.srcEvent.target),e.target=u}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function S(t,e){var i,s,n,r,o=t.lastInterval||e,l=e.timeStamp-o.timeStamp;if(e.eventType!=Ct&&(l>_t||o.velocity===a)){var h=e.deltaX-o.deltaX,u=e.deltaY-o.deltaY,c=I(l,h,u);s=c.x,n=c.y,i=lt(c.x)>lt(c.y)?c.x:c.y,r=k(h,u),t.lastInterval=e}else i=o.velocity,s=o.velocityX,n=o.velocityY,r=o.direction;e.velocity=i,e.velocityX=s,e.velocityY=n,e.direction=r}function M(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:at(t.pointers[i].clientX),clientY:at(t.pointers[i].clientY)},i++;return{timeStamp:ht(),pointers:e,center:L(e),deltaX:t.deltaX,deltaY:t.deltaY}}function L(t){var e=t.length;if(1===e)return{x:at(t[0].clientX),y:at(t[0].clientY)};for(var i=0,s=0,n=0;e>n;)i+=t[n].clientX,s+=t[n].clientY,n++;return{x:at(i/e),y:at(s/e)}}function I(t,e,i){return{x:e/t||0,y:i/t||0}}function k(t,e){return t===e?xt:lt(t)>=lt(e)?0>t?Tt:Et:0>e?$t:Rt}function z(t,e,i){i||(i=It);var s=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(s*s+n*n)}function P(t,e,i){i||(i=It);var s=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,s)/Math.PI}function A(){this.evEl=Pt,this.evWin=At,this.pressed=!1,$.apply(this,arguments)}function D(){this.evEl=Ot,this.evWin=Vt,$.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function W(){this.evTarget=Bt,this.evWin=jt,this.started=!1,$.apply(this,arguments)}function O(){this.evTarget=Nt,this.targetIds={},$.apply(this,arguments)}function V(){$.apply(this,arguments);var t=p(this.handler,this);this.touch=new O(this.manager,t),this.mouse=new A(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function F(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var s=this.lastTouches;setTimeout(function(){var t=s.indexOf(i);t>-1&&s.splice(t,1)},qt)}}function B(t,e){this.manager=t,this.set(e)}function j(t){this.options=st({},this.defaults,t||{}),this.id=dt++,this.manager=null,this.options.enable=m(this.options.enable,!0),this.state=ie,this.simultaneous={},this.requireFail=[]}function H(t){return t&ae?"cancel":t&re?"end":t&ne?"move":t&se?"start":""}function N(t){return t==Rt?"down":t==$t?"up":t==Tt?"left":t==Et?"right":""}function q(t,e){var i=e.manager;return i?i.get(t):t}function X(){j.apply(this,arguments)}function Y(){X.apply(this,arguments),this.pX=null,this.pY=null}function G(){X.apply(this,arguments)}function U(){j.apply(this,arguments),this._timer=null,this._input=null}function Z(){X.apply(this,arguments)}function Q(){X.apply(this,arguments)}function K(){j.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function J(t,e){return(e=e||{}).recognizers=m(e.recognizers,J.defaults.preset),new tt(t,e)}function tt(t,e){this.options=st({},J.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=function(t){var e=t.options.inputClass;return new(e||(gt?D:mt?O:pt?V:A))(t,R)}(this),this.touchAction=new B(this,this.options.touchAction),et(this,!0),u(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function et(t,e){var i,s=t.element;s.style&&(u(t.options.cssProps,function(n,r){i=T(s.style,r),e?(t.oldCssProps[i]=s.style[i],s.style[i]=n):s.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={}))}function it(t,e){var i=r.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e,e.target.dispatchEvent(i)}var st,nt=["","webkit","Moz","MS","ms","o"],rt=r.createElement("div"),ot="function",at=Math.round,lt=Math.abs,ht=Date.now;st="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var s=arguments[i];if(s!==a&&null!==s)for(var n in s)s.hasOwnProperty(n)&&(e[n]=s[n])}return e}:Object.assign;var ut=c(function(t,e,i){for(var s=Object.keys(e),n=0;n<s.length;)(!i||i&&t[s[n]]===a)&&(t[s[n]]=e[s[n]]),n++;return t},"extend","Use `assign`."),ct=c(function(t,e){return ut(t,e,!0)},"merge","Use `assign`."),dt=1,pt="ontouchstart"in n,gt=T(n,"PointerEvent")!==a,mt=pt&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),ft="touch",vt="mouse",_t=25,wt=1,yt=2,bt=4,Ct=8,xt=1,Tt=2,Et=4,$t=8,Rt=16,St=Tt|Et,Mt=$t|Rt,Lt=St|Mt,It=["x","y"],kt=["clientX","clientY"];$.prototype={handler:function(){},init:function(){this.evEl&&f(this.element,this.evEl,this.domHandler),this.evTarget&&f(this.target,this.evTarget,this.domHandler),this.evWin&&f(E(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&v(this.element,this.evEl,this.domHandler),this.evTarget&&v(this.target,this.evTarget,this.domHandler),this.evWin&&v(E(this.element),this.evWin,this.domHandler)}};var zt={mousedown:wt,mousemove:yt,mouseup:bt},Pt="mousedown",At="mousemove mouseup";d(A,$,{handler:function(t){var e=zt[t.type];e&wt&&0===t.button&&(this.pressed=!0),e&yt&&1!==t.which&&(e=bt),this.pressed&&(e&bt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:vt,srcEvent:t}))}});var Dt={pointerdown:wt,pointermove:yt,pointerup:bt,pointercancel:Ct,pointerout:Ct},Wt={2:ft,3:"pen",4:vt,5:"kinect"},Ot="pointerdown",Vt="pointermove pointerup pointercancel";n.MSPointerEvent&&!n.PointerEvent&&(Ot="MSPointerDown",Vt="MSPointerMove MSPointerUp MSPointerCancel"),d(D,$,{handler:function(t){var e=this.store,i=!1,s=t.type.toLowerCase().replace("ms",""),n=Dt[s],r=Wt[t.pointerType]||t.pointerType,o=r==ft,a=b(e,t.pointerId,"pointerId");n&wt&&(0===t.button||o)?0>a&&(e.push(t),a=e.length-1):n&(bt|Ct)&&(i=!0),0>a||(e[a]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(a,1))}});var Ft={touchstart:wt,touchmove:yt,touchend:bt,touchcancel:Ct},Bt="touchstart",jt="touchstart touchmove touchend touchcancel";d(W,$,{handler:function(t){var e=Ft[t.type];if(e===wt&&(this.started=!0),this.started){var i=function(t,e){var i=C(t.touches),s=C(t.changedTouches);return e&(bt|Ct)&&(i=x(i.concat(s),"identifier",!0)),[i,s]}.call(this,t,e);e&(bt|Ct)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:ft,srcEvent:t})}}});var Ht={touchstart:wt,touchmove:yt,touchend:bt,touchcancel:Ct},Nt="touchstart touchmove touchend touchcancel";d(O,$,{handler:function(t){var e=Ht[t.type],i=function(t,e){var i=C(t.touches),s=this.targetIds;if(e&(wt|yt)&&1===i.length)return s[i[0].identifier]=!0,[i,i];var n,r,o=C(t.changedTouches),a=[],l=this.target;if(r=i.filter(function(t){return _(t.target,l)}),e===wt)for(n=0;n<r.length;)s[r[n].identifier]=!0,n++;for(n=0;n<o.length;)s[o[n].identifier]&&a.push(o[n]),e&(bt|Ct)&&delete s[o[n].identifier],n++;return a.length?[x(r.concat(a),"identifier",!0),a]:void 0}.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:ft,srcEvent:t})}});var qt=2500,Xt=25;d(V,$,{handler:function(t,e,i){var s=i.pointerType==ft,n=i.pointerType==vt;if(!(n&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(s)(function(t,e){t&wt?(this.primaryTouch=e.changedPointers[0].identifier,F.call(this,e)):t&(bt|Ct)&&F.call(this,e)}).call(this,e,i);else if(n&&function(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,s=0;s<this.lastTouches.length;s++){var n=this.lastTouches[s],r=Math.abs(e-n.x),o=Math.abs(i-n.y);if(Xt>=r&&Xt>=o)return!0}return!1}.call(this,i))return;this.callback(t,e,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Yt=T(rt.style,"touchAction"),Gt=Yt!==a,Ut="compute",Zt="auto",Qt="manipulation",Kt="none",Jt="pan-x",te="pan-y",ee=function(){if(!Gt)return!1;var t={},e=n.CSS&&n.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){t[i]=!e||n.CSS.supports("touch-action",i)}),t}();B.prototype={set:function(t){t==Ut&&(t=this.compute()),Gt&&this.manager.element.style&&ee[t]&&(this.manager.element.style[Yt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return u(this.manager.recognizers,function(e){g(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(w(t,Kt))return Kt;var e=w(t,Jt),i=w(t,te);return e&&i?Kt:e||i?e?Jt:te:w(t,Qt)?Qt:Zt}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,i=t.offsetDirection;if(!this.manager.session.prevented){var s=this.actions,n=w(s,Kt)&&!ee[Kt],r=w(s,te)&&!ee[te],o=w(s,Jt)&&!ee[Jt];if(n){var a=1===t.pointers.length,l=t.distance<2,h=t.deltaTime<250;if(a&&l&&h)return}return o&&r?void 0:n||r&&i&St||o&&i&Mt?this.preventSrc(e):void 0}e.preventDefault()},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var ie=1,se=2,ne=4,re=8,oe=re,ae=16;j.prototype={defaults:{},set:function(t){return st(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(h(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=q(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return h(t,"dropRecognizeWith",this)?this:(t=q(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(h(t,"requireFailure",this))return this;var e=this.requireFail;return-1===b(e,t=q(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(h(t,"dropRequireFailure",this))return this;t=q(t,this);var e=b(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,s=this.state;re>s&&e(i.options.event+H(s)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),s>=re&&e(i.options.event+H(s))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=32)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|ie)))return!1;t++}return!0},recognize:function(t){var e=st({},t);return g(this.options.enable,[this,e])?(this.state&(oe|ae|32)&&(this.state=ie),this.state=this.process(e),void(this.state&(se|ne|re|ae)&&this.tryEmit(e))):(this.reset(),void(this.state=32))},process:function(t){},getTouchAction:function(){},reset:function(){}},d(X,j,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,i=t.eventType,s=e&(se|ne),n=this.attrTest(t);return s&&(i&Ct||!n)?e|ae:s||n?i&bt?e|re:e&se?e|ne:se:32}}),d(Y,X,{defaults:{event:"pan",threshold:10,pointers:1,direction:Lt},getTouchAction:function(){var t=this.options.direction,e=[];return t&St&&e.push(te),t&Mt&&e.push(Jt),e},directionTest:function(t){var e=this.options,i=!0,s=t.distance,n=t.direction,r=t.deltaX,o=t.deltaY;return n&e.direction||(e.direction&St?(n=0===r?xt:0>r?Tt:Et,i=r!=this.pX,s=Math.abs(t.deltaX)):(n=0===o?xt:0>o?$t:Rt,i=o!=this.pY,s=Math.abs(t.deltaY))),t.direction=n,i&&s>e.threshold&&n&e.direction},attrTest:function(t){return X.prototype.attrTest.call(this,t)&&(this.state&se||!(this.state&se)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=N(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),d(G,X,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Kt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&se)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),d(U,j,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Zt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,s=t.distance<e.threshold,n=t.deltaTime>e.time;if(this._input=t,!s||!i||t.eventType&(bt|Ct)&&!n)this.reset();else if(t.eventType&wt)this.reset(),this._timer=l(function(){this.state=oe,this.tryEmit()},e.time,this);else if(t.eventType&bt)return oe;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===oe&&(t&&t.eventType&bt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=ht(),this.manager.emit(this.options.event,this._input)))}}),d(Z,X,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Kt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&se)}}),d(Q,X,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:St|Mt,pointers:1},getTouchAction:function(){return Y.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(St|Mt)?e=t.overallVelocity:i&St?e=t.overallVelocityX:i&Mt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&lt(e)>this.options.velocity&&t.eventType&bt},emit:function(t){var e=N(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),d(K,j,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Qt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,s=t.distance<e.threshold,n=t.deltaTime<e.time;if(this.reset(),t.eventType&wt&&0===this.count)return this.failTimeout();
6if(s&&n&&i){if(t.eventType!=bt)return this.failTimeout();var r=!this.pTime||t.timeStamp-this.pTime<e.interval,o=!this.pCenter||z(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,o&&r?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=l(function(){this.state=oe,this.tryEmit()},e.interval,this),se):oe}return 32},failTimeout:function(){return this._timer=l(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==oe&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),J.VERSION="2.0.7",J.defaults={domEvents:!1,touchAction:Ut,enable:!0,inputTarget:null,inputClass:null,preset:[[Z,{enable:!1}],[G,{enable:!1},["rotate"]],[Q,{direction:St}],[Y,{direction:St},["swipe"]],[K],[K,{event:"doubletap",taps:2},["tap"]],[U]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};tt.prototype={set:function(t){return st(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var i,s=this.recognizers,n=e.curRecognizer;(!n||n&&n.state&oe)&&(n=e.curRecognizer=null);for(var r=0;r<s.length;)i=s[r],2===e.stopped||n&&i!=n&&!i.canRecognizeWith(n)?i.reset():i.recognize(t),!n&&i.state&(se|ne|re)&&(n=e.curRecognizer=i),r++}},get:function(t){if(t instanceof j)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event==t)return e[i];return null},add:function(t){if(h(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(h(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,i=b(e,t);-1!==i&&(e.splice(i,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var i=this.handlers;return u(y(t),function(t){i[t]=i[t]||[],i[t].push(e)}),this}},off:function(t,e){if(t!==a){var i=this.handlers;return u(y(t),function(t){e?i[t]&&i[t].splice(b(i[t],e),1):delete i[t]}),this}},emit:function(t,e){this.options.domEvents&&it(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var s=0;s<i.length;)i[s](e),s++}},destroy:function(){this.element&&et(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},st(J,{INPUT_START:wt,INPUT_MOVE:yt,INPUT_END:bt,INPUT_CANCEL:Ct,STATE_POSSIBLE:ie,STATE_BEGAN:se,STATE_CHANGED:ne,STATE_ENDED:re,STATE_RECOGNIZED:oe,STATE_CANCELLED:ae,STATE_FAILED:32,DIRECTION_NONE:xt,DIRECTION_LEFT:Tt,DIRECTION_RIGHT:Et,DIRECTION_UP:$t,DIRECTION_DOWN:Rt,DIRECTION_HORIZONTAL:St,DIRECTION_VERTICAL:Mt,DIRECTION_ALL:Lt,Manager:tt,Input:$,TouchAction:B,TouchInput:O,MouseInput:A,PointerEventInput:D,TouchMouseInput:V,SingleTouchInput:W,Recognizer:j,AttrRecognizer:X,Tap:K,Pan:Y,Swipe:Q,Pinch:G,Rotate:Z,Press:U,on:f,off:v,each:u,merge:ct,extend:ut,assign:st,inherit:d,bindFn:p,prefixed:T}),(void 0!==n?n:"undefined"!=typeof self?self:{}).Hammer=J,void 0===(s=function(){return J}.call(e,i,e,t))||(t.exports=s)}(window,document)},227:function(t,e,i){"use strict";
7/**
8 * @author Markus Ekholm
9 * @copyright 2012-2023 (c) Markus Ekholm <markus at botten dot org >
10 * @license Copyright (c) 2012-2023, Markus Ekholm
11 * All rights reserved.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions are met:
14 *    * Redistributions of source code must retain the above copyright
15 *      notice, this list of conditions and the following disclaimer.
16 *    * Redistributions in binary form must reproduce the above copyright
17 *      notice, this list of conditions and the following disclaimer in the
18 *      documentation and/or other materials provided with the distribution.
19 *    * Neither the name of the author nor the
20 *      names of its contributors may be used to endorse or promote products
21 *      derived from this software without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL MARKUS EKHOLM BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34function s(t,e){e=n(e||{R:255,G:255,B:255});let i=t=n(t);return void 0!==t.A&&(i={R:e.R+(t.R-e.R)*t.A,G:e.G+(t.G-e.G)*t.A,B:e.B+(t.B-e.B)*t.A}),function(t){let e=t.Y/100,i=t.Z/108.883,s=t.X/95.047;s=s>.008856?Math.pow(s,1/3):7.787*s+16/116;e=e>.008856?Math.pow(e,1/3):7.787*e+16/116;i=i>.008856?Math.pow(i,1/3):7.787*i+16/116;return{L:116*e-16,a:500*(s-e),b:200*(e-i)}}(function(t){let e=t.R/255,i=t.G/255,s=t.B/255;e>.04045?e=Math.pow((e+.055)/1.055,2.4):e/=12.92;i>.04045?i=Math.pow((i+.055)/1.055,2.4):i/=12.92;s>.04045?s=Math.pow((s+.055)/1.055,2.4):s/=12.92;return{X:.4124*(e*=100)+.3576*(i*=100)+.1805*(s*=100),Y:.2126*e+.7152*i+.0722*s,Z:.0193*e+.1192*i+.9505*s}}(i))}function n(t){let e,i,s,n;"R"in t?(e=t.R,i=t.G,s=t.B,n=t.A):(e=t.r,i=t.g,s=t.b,n=t.a);const r={R:e,G:i,B:s};return void 0!==n&&(r.A=n),r}
35/**
36 * @author Markus Ekholm
37 * @copyright 2012-2023 (c) Markus Ekholm <markus at botten dot org >
38 * @license Copyright (c) 2012-2023, Markus Ekholm
39 * All rights reserved.
40 * Redistribution and use in source and binary forms, with or without
41 * modification, are permitted provided that the following conditions are met:
42 *    * Redistributions of source code must retain the above copyright
43 *      notice, this list of conditions and the following disclaimer.
44 *    * Redistributions in binary form must reproduce the above copyright
45 *      notice, this list of conditions and the following disclaimer in the
46 *      documentation and/or other materials provided with the distribution.
47 *    * Neither the name of the author nor the
48 *      names of its contributors may be used to endorse or promote products
49 *      derived from this software without specific prior written permission.
50 *
51 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
52 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
53 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
54 * DISCLAIMED. IN NO EVENT SHALL MARKUS EKHOLM BE LIABLE FOR ANY
55 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
56 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
57 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
58 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
60 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61 */function r(t,e,i){("R"in t||"r"in t)&&(t=s(t,i)),("R"in e||"r"in e)&&(e=s(e,i));const n=t.L,r=t.a,l=t.b,h=e.L,u=e.a,c=e.b,d=Math.sqrt(Math.pow(r,2)+Math.pow(l,2)),p=Math.sqrt(Math.pow(u,2)+Math.pow(c,2)),g=(d+
61p)/2,m=.5*(1-Math.sqrt(Math.pow(g,7)/(Math.pow(g,7)+Math.pow(25,7)))),f=(1+m)*r,v=(1+m)*u,_=Math.sqrt(Math.pow(f,2)+Math.pow(l,2)),w=Math.sqrt(Math.pow(v,2)+Math.pow(c,2)),y=a(l,f),b=a(c,v),C=h-n,x=w-_,T=function(t,e,i,s){if(t*e==0)return 0;if(Math.abs(s-i)<=180)return s-i;if(s-i>180)return s-i-360;if(s-i<-180)return s-i+360;throw new Error}(d,p,y,b),E=2*Math.sqrt(_*w)*Math.sin(o(T)/2),$=(n+h)/2,R=(_+w)/2,S=function(t,e,i,s){if(t*e==0)return i+s;if(Math.abs(i-s)<=180)return(i+s)/2;if(Math.abs(i-s)>180&&i+s<360)return(i+s+360)/2;if(Math.abs(i-s)>180&&i+s>=360)return(i+s-360)/2;throw new Error}
62/**
63 * @author Markus Ekholm
64 * @copyright 2012-2023 (c) Markus Ekholm <markus at botten dot org >
65 * @license Copyright (c) 2012-2023, Markus Ekholm
66 * All rights reserved.
67 * Redistribution and use in source and binary forms, with or without
68 * modification, are permitted provided that the following conditions are met:
69 *    * Redistributions of source code must retain the above copyright
70 *      notice, this list of conditions and the following disclaimer.
71 *    * Redistributions in binary form must reproduce the above copyright
72 *      notice, this list of conditions and the following disclaimer in the
73 *      documentation and/or other materials provided with the distribution.
74 *    * Neither the name of the author nor the
75 *      names of its contributors may be used to endorse or promote products
76 *      derived from this software without specific prior written permission.
77 *
78 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
79 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
80 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
81 * DISCLAIMED. IN NO EVENT SHALL MARKUS EKHOLM BE LIABLE FOR ANY
82 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
83 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
84 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
85 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
86 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
87 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
88 */(d,p,y,b),M=1-.17*Math.cos(o(S-30))+.24*Math.cos(o(2*S))+.32*Math.cos(o(3*S+6))-.2*Math.cos(o(4*S-63)),L=30*Math.exp(-Math.pow((S-275)/25,2)),I=Math.sqrt(Math.pow(R,7)/(Math.pow(R,7)+Math.pow(25,7))),k=1+.015*Math.pow($-50,2)/Math.sqrt(20+Math.pow($-50,2)),z=1+.045*R,P=1+.015*R*M,A=-2*I*Math.sin(o(2*L));return Math.sqrt(Math.pow(C/(1*k),2)+Math.pow(x/(1*z),2)+Math.pow(E/(1*P),2)+A*(x/(1*z))*(E/(1*P)))}function o(t){return t*(Math.PI/180)}function a(t,e){if(0===t&&0===e)return 0;{const i=function(t){return t*(180/Math.PI)}(Math.atan2(t,e));return i>=0?i:i+360}}function l(t){return 1!==(t=n(t)).A?`rgba(${t.R}, ${t.G}, ${t.B}, ${t.A})`:`rgb(${t.R}, ${t.G}, ${t.B})`}function h(t){return`lab(${t.L}, ${t.a}, ${t.b})`}function u(t,e,i,s){const n={};s=s||{R:255,G:255,B:255},i=i||"closest";for(let o=0;o<t.length;o+=1){const a=t[o];let h,u;for(let t=0;t<e.length;t+=1){const n=e[t],o=r(a,n,s);h?void 0!==u&&"closest"===i&&o<u?(h=n,u=o):void 0!==u&&"furthest"===i&&o>u&&(h=n,u=o):(h=n,u=o)}h&&(n[l(a)]=h)}return n}function c(t,e,i){let s,n,o=e[0],a=r(t,o);for(let l=1,h=e.length;l<h;l+=1)n=r(t,s=e[l]),(!i&&n<a||i&&n>a)&&(o=s,a=n);return o}function d(t,e,i){const s={},n="furthest"===i;for(let i=0;i<t.length;i+=1){const r=t[i];s[h(r)]=c(r,e,n)}return s}function p(t,e,i){const s=l(t);return u([t],e,"closest",i=i||{R:255,G:255,B:255})[s]}function g(t,e){return c(t,e,!1)}function m(t,e,i){const s=l(t);return u([t],e,"furthest",i=i||{R:255,G:255,B:255})[s]}function f(t,e){return c(t,e,!0)}function v(t,e,i,s){return u(t,e,i,s)}function _(t){return l(t)}function w(t){return s(t)}function y(t){return s(t)}function b(t,e,i){return c(t,e,i)}function C(t,e,i){return d(t,e,i)}function x(t){return h(t)}function T(t,e){return g(t,e)}function E(t,e){return f(t,e)}i.r(e),i.d(e,"closest",function(){return p}),i.d(e,"closestLab",function(){return g}),i.d(e,"furthest",function(){return m}),i.d(e,"furthestLab",function(){return f}),i.d(e,"rgb_to_lab",function(){return w}),i.d(e,"rgba_to_lab",function(){return y}),i.d(e,"map_palette",function(){return v}),i.d(e,"palette_map_key",function(){return _}),i.d(e,"match_palette_lab",function(){return b}),i.d(e,"map_palette_lab",function(){return C}),i.d(e,"lab_palette_map_key",function(){return x}),i.d(e,"closest_lab",function(){return T}),i.d(e,"furthest_lab",function(){return E}),i.d(e,"mapPalette",function(){return u}),i.d(e,"paletteMapKey",function(){return l}),i.d(e,"matchPaletteLab",function(){return c}),i.d(e,"mapPaletteLab",function(){return d}),i.d(e,"labPaletteMapKey",function(){return h}),i.d(e,"diff",function(){return r}),i.d(e,"rgbaToLab",function(){return s})}
vendor: 44,296 bytes, line 88
88,3:function(t,e,i){"use strict";t.exports=function(t){"function"==typeof t?t():"object"==typeof t&&Object.keys(t).forEach(function(e){"function"==typeof t[e]&&t[e]()})}},8:function(t,e){!function(t,e,i,s){function n(e,i){this.settings=null,this.options=t.extend({},n.Defaults,i),this.$element=t(e),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},t.each(["onResize","onThrottledResize"],t.proxy(function(e,i){this._handlers[i]=t.proxy(this[i],this)},this)),t.each(n.Plugins,t.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),t.each(n.Workers,t.proxy(function(e,i){this._pipe.push({filter:i.filter,run:t.proxy(i.run,this)})},this)),this.setup(),this.initialize()}n.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:e,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},n.Width={Default:"default",Inner:"inner",Outer:"outer"},n.Type={Event:"event",State:"state"},n.Plugins={},n.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,s=this.settings.rtl,n={width:"auto","margin-left":s?e:"","margin-right":s?"":e};!i&&this.$stage.children().css(n),t.css=n}},{filter:["width","items","settings"],run:function(t){var e=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,i=null,s=this._items.length,n=!this.settings.autoWidth,r=[];for(t.items={merge:!1,width:e};s--;)i=this._mergers[s],i=this.settings.mergeFit&&Math.min(i,this.settings.items)||i,t.items.merge=i>1||t.items.merge,r[s]=n?e*i:this._items[s].width();this._widths=r}},{filter:["items","settings"],run:function(){var e=[],i=this._items,s=this.settings,n=Math.max(2*s.items,4),r=2*Math.ceil(i.length/2),o=s.loop&&i.length?s.rewind?n:Math.max(n,r):0,a="",l="";for(o/=2;o>0;)e.push(this.normalize(e.length/2,!0)),a+=i[e[e.length-1]][0].outerHTML,e.push(this.normalize(i.length-1-(e.length-1)/2,!0)),l=i[e[e.length-1]][0].outerHTML+l,o-=1;this._clones=e,t(a).addClass("cloned").appendTo(this.$stage),t(l).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,s=0,n=0,r=[];++i<e;)s=r[i-1]||0,n=this._widths[this.relative(i)]+this.settings.margin,r.push(s+n*t);this._coordinates=r}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""};this.$stage.css(i)}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,s=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],s.eq(e).css(t.css);else i&&(t.css.width=t.items.width,s.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,s,n=this.settings.rtl?1:-1,r=2*this.settings.stagePadding,o=this.coordinates(this.current())+r,a=o+this.width()*n,l=[];for(i=0,s=this._coordinates.length;i<s;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+r*n,(this.op(t,"<=",o)&&this.op(t,">",a)||this.op(e,"<",o)&&this.op(e,">",a))&&l.push(i);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+l.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],n.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=t("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(t("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},n.prototype.initializeItems=function(){var e=this.$element.find(".owl-item");if(e.length)return this._items=e.get().map(function(e){return t(e)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},n.prototype.initialize=function(){var t,e,i;(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading"))&&(t=this.$element.find("img"),e=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:void 0,i=this.$element.children(e).width(),t.length&&i<=0&&this.preloadAutoWidthImages(t));this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},n.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},n.prototype.setup=function(){var e=this.viewport(),i=this.options.responsive,s=-1,n=null;i?(t.each(i,function(t){t<=e&&t>s&&(s=Number(t))}),"function"==typeof(n=t.extend({},this.options,i[s])).stagePadding&&(n.stagePadding=n.stagePadding()),delete n.responsive,n.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+s))):n=t.extend({},this.options),this.trigger("change",{property:{name:"settings",value:n}}),this._breakpoint=s,this.settings=n,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},n.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},n.prototype.prepare=function(e){var i=this.trigger("prepare",{content:e});return i.data||(i.data=t("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(e)),this.trigger("prepared",{content:i.data}),i.data},n.prototype.update=function(){for(var e=0,i=this._pipe.length,s=t.proxy(function(t){return this[t]},this._invalidated),n={};e<i;)(this._invalidated.all||t.grep(this._pipe[e].filter,s).length>0)&&this._pipe[e].run(n),e++;this._invalidated={},!this.is("valid")&&this.enter("valid")},n.prototype.width=function(t){switch(t=t||n.Width.Default){case n.Width.Inner:case n.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},n.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},n.prototype.onThrottledResize=function(){e.clearTimeout(this.resizeTimer),this.resizeTimer=e.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},n.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},n.prototype.registerEventHandlers=function(){t.support.transition&&this.$stage.on(t.support.transition.end+".owl.core",t.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(e,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",t.proxy(this.onDragEnd,this)))},n.prototype.onDragStart=function(e){var s=null;3!==e.which&&(t.support.transform?s={x:(s=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===s.length?12:4],y:s[16===s.length?13:5]}:(s=this.$stage.position(),s={x:this.settings.rtl?s.left+this.$stage.width()-this.width()+this.settings.margin:s.left,y:s.top}),this.is("animating")&&(t.support.transform?this.animate(s.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===e.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=t(e.target),this._drag.stage.start=s,this._drag.stage.current=s,this._drag.pointer=this.pointer(e),t(i).on("mouseup.owl.core touchend.owl.core",t.proxy(this.onDragEnd,this)),t(i).one("mousemove.owl.core touchmove.owl.core",t.proxy(function(e){var s=this.difference(this._drag.pointer,this.pointer(e));t(i).on("mousemove.owl.core touchmove.owl.core",t.proxy(this.onDragMove,this)),Math.abs(s.x)<Math.abs(s.y)&&this.is("valid")||(e.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},n.prototype.onDragMove=function(t){var e=null,i=null,s=null,n=this.difference(this._drag.pointer,this.pointer(t)),r=this.difference(this._drag.stage.start,n);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(e=this.coordinates(this.minimum()),i=this.coordinates(this.maximum()+1)-e,r.x=((r.x-e)%i+i)%i+e):(e=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),i=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),s=this.settings.pullDrag?-1*n.x/5:0,r.x=Math.max(Math.min(r.x,e+s),i+s)),this._drag.stage.current=r,this.animate(r.x))},n.prototype.onDragEnd=function(e){var s=this.difference(this._drag.pointer,this.pointer(e)),n=this._drag.stage.current,r=s.x>0^this.settings.rtl?"left":"right";t(i).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==s.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(n.x,0!==s.x?r:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=r,(Math.abs(s.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},n.prototype.closest=function(e,i){var s=-1,n=this.width(),r=this.coordinates();return this.settings.freeDrag||t.each(r,t.proxy(function(t,o){return"left"===i&&e>o-30&&e<o+30?s=t:"right"===i&&e>o-n-30&&e<o-n+30?s=t+1:this.op(e,"<",o)&&this.op(e,">",void 0!==r[t+1]?r[t+1]:o-n)&&(s="left"===i?t+1:t),-1===s},this)),this.settings.loop||(this.op(e,">",r[this.minimum()])?s=e=this.minimum():this.op(e,"<",r[this.maximum()])&&(s=e=this.maximum())),s},n.prototype.animate=function(e){var i=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),i&&(this.enter("animating"),this.trigger("translate")),t.support.transform3d&&t.support.transition?this.$stage.css({transform:"translate3d("+e+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):i?this.$stage.animate({left:e+"px"},this.speed(),this.settings.fallbackEasing,t.proxy(this.onTransitionEnd,this)):this.$stage.css({left:e+"px"})},n.prototype.is=function(t){return this._states.current[t]&&this._states.current[t]>0},n.prototype.current=function(t){if(void 0===t)return this._current;if(0!==this._items.length){if(t=this.normalize(t),this._current!==t){var e=this.trigger("change",{property:{name:"position",value:t}});void 0!==e.data&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current}},n.prototype.invalidate=function(e){return"string"===t.type(e)&&(this._invalidated[e]=!0,this.is("valid")&&this.leave("valid")),t.map(this._invalidated,function(t,e){return e})},n.prototype.reset=function(t){void 0!==(t=this.normalize(t))&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},n.prototype.normalize=function(t,e){var i=this._items.length,s=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=void 0:(t<0||t>=i+s)&&(t=((t-s/2)%i+i)%i+s/2),t},n.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},n.prototype.maximum=function(t){var e,i,s,n=this.settings,r=this._coordinates.length;if(n.loop)r=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){if(e=this._items.length)for(i=this._items[--e].width(),s=this.$element.width();e--&&!((i+=this._items[e].width()+this.settings.margin)>s););r=e+1}else r=n.center?this._items.length-1:this._items.length-n.items;return t&&(r-=this._clones.length/2),Math.max(r,0)},n.prototype.minimum=function(t){return t?0:this._clones.length/2},n.prototype.items=function(t){return void 0===t?this._items.slice():(t=this.normalize(t,!0),this._items[t])},n.prototype.mergers=function(t){return void 0===t?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},n.prototype.clones=function(e){var i=this._clones.length/2,s=i+this._items.length,n=function(t){return t%2==0?s+t/2:i-(t+1)/2};return void 0===e?t.map(this._clones,function(t,e){return n(e)}):t.map(this._clones,function(t,i){return t===e?n(i):null})},n.prototype.speed=function(t){return void 0!==t&&(this._speed=t),this._speed},n.prototype.coordinates=function(e){var i,s=1,n=e-1;return void 0===e?t.map(this._coordinates,t.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(s=-1,n=e+1),i=this._coordinates[e],i+=(this.width()-i+(this._coordinates[n]||0))/2*s):i=this._coordinates[n]||0,i=Math.ceil(i))},n.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},n.prototype.to=function(t,e){var i=this.current(),s=null,n=t-this.relative(i),r=(n>0)-(n<0),o=this._items.length,a=this.minimum(),l=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(n)>o/2&&(n+=-1*r*o),(s=(((t=i+n)-a)%o+o)%o+a)!==t&&s-n<=l&&s-n>0&&(i=s-n,t=s,this.reset(i))):t=this.settings.rewind?(t%(l+=1)+l)%l:Math.max(a,Math.min(l,t)),this.speed(this.duration(i,t,e)),this.current(t),this.isVisible()&&this.update()},n.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},n.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},n.prototype.onTransitionEnd=function(t){if(void 0!==t&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},n.prototype.viewport=function(){var s;return this.options.responsiveBaseElement!==e?s=t(this.options.responsiveBaseElement).width():e.innerWidth?s=e.innerWidth:i.documentElement&&i.documentElement.clientWidth?s=i.documentElement.clientWidth:console.warn("Can not detect viewport width."),s},n.prototype.replace=function(e){this.$stage.empty(),this._items=[],e&&(e=e instanceof jQuery?e:t(e)),this.settings.nestedItemSelector&&(e=e.find("."+this.settings.nestedItemSelector)),e.filter(function(){return 1===this.nodeType}).each(t.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},n.prototype.add=function(e,i){var s=this.relative(this._current);i=void 0===i?this._items.length:this.normalize(i,!0),e=e instanceof jQuery?e:t(e),this.trigger("add",{content:e,position:i}),e=this.prepare(e),0===this._items.length||i===this._items.length?(0===this._items.length&&this.$stage.append(e),0!==this._items.length&&this._items[i-1].after(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[i].before(e),this._items.splice(i,0,e),this._mergers.splice(i,0,1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[s]&&this.reset(this._items[s].index()),this.invalidate("items"),this.trigger("added",{content:e,position:i})},n.prototype.remove=function(t){void 0!==(t=this.normalize(t,!0))&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},n.prototype.preloadAutoWidthImages=function(e){e.each(t.proxy(function(e,i){this.enter("pre-loading"),i=t(i),t(new Image).one("load",t.proxy(function(t){i.attr("src",t.target.src),i.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",i.attr("src")||i.attr("data-src")||i.attr("data-src-retina"))},this))},n.prototype.destroy=function(){for(var s in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),t(i).off(".owl.core"),!1!==this.settings.responsive&&(e.clearTimeout(this.resizeTimer),this.off(e,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[s].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},n.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?t>i:t<i;case">":return s?t<i:t>i;case">=":return s?t<=i:t>=i;case"<=":return s?t>=i:t<=i}},n.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},n.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},n.prototype.trigger=function(e,i,s,r,o){var a={item:{count:this._items.length,index:this.current()}},l=t.camelCase(t.grep(["on",e,s],function(t){return t}).join("-").toLowerCase()),h=t.Event([e,"owl",s||"carousel"].join(".").toLowerCase(),t.extend({relatedTarget:this},a,i));return this._supress[e]||(t.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(h)}),this.register({type:n.Type.Event,name:e}),this.$element.trigger(h),this.settings&&"function"==typeof this.settings[l]&&this.settings[l].call(this,h)),h},n.prototype.enter=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){void 0===this._states.current[e]&&(this._states.current[e]=0),this._states.current[e]++},this))},n.prototype.leave=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){this._states.current[e]--},this))},n.prototype.register=function(e){if(e.type===n.Type.Event){if(t.event.special[e.name]||(t.event.special[e.name]={}),!t.event.special[e.name].owl){var i=t.event.special[e.name]._default;t.event.special[e.name]._default=function(t){return!i||!i.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&t.namespace.indexOf("owl")>-1:i.apply(this,arguments)},t.event.special[e.name].owl=!0}}else e.type===n.Type.State&&(this._states.tags[e.name]?this._states.tags[e.name]=this._states.tags[e.name].concat(e.tags):this._states.tags[e.name]=e.tags,this._states.tags[e.name]=t.grep(this._states.tags[e.name],t.proxy(function(i,s){return t.inArray(i,this._states.tags[e.name])===s},this)))},n.prototype.suppress=function(e){t.each(e,t.proxy(function(t,e){this._supress[e]=!0},this))},n.prototype.release=function(e){t.each(e,t.proxy(function(t,e){delete this._supress[e]},this))},n.prototype.pointer=function(t){var i={x:null,y:null};return(t=(t=t.originalEvent||t||e.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(i.x=t.pageX,i.y=t.pageY):(i.x=t.clientX,i.y=t.clientY),i},n.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},n.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},t.fn.owlCarousel=function(e){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var s=t(this),r=s.data("owl.carousel");r||(r=new n(this,"object"==typeof e&&e),s.data("owl.carousel",r),t.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(e,i){r.register({type:n.Type.Event,name:i}),r.$element.on(i+".owl.carousel.core",t.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([i]),r[i].apply(this,[].slice.call(arguments,1)),this.release([i]))},r))})),"string"==typeof e&&"_"!==e.charAt(0)&&r[e].apply(r,i)})},t.fn.owlCarousel.Constructor=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={autoRefresh:!0,autoRefreshInterval:500},n.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=e.setInterval(t.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},n.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},n.prototype.destroy=function(){var t,i;for(t in e.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoRefresh=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":t.proxy(function(e){if(e.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(e.property&&"position"==e.property.name||"initialized"==e.type)){var i=this._core.settings,s=i.center&&Math.ceil(i.items/2)||i.items,n=i.center&&-1*s||0,r=(e.property&&void 0!==e.property.value?e.property.value:this._core.current())+n,o=this._core.clones().length,a=t.proxy(function(t,e){this.load(e)},this);for(i.lazyLoadEager>0&&(s+=i.lazyLoadEager,i.loop&&(r-=i.lazyLoadEager,s++));n++<s;)this.load(o/2+this._core.relative(r)),o&&t.each(this._core.clones(this._core.relative(r)),a),r++}},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={lazyLoad:!1,lazyLoadEager:0},n.prototype.load=function(i){var s=this._core.$stage.children().eq(i),n=s&&s.find(".owl-lazy");!n||t.inArray(s.get(0),this._loaded)>-1||(n.each(t.proxy(function(i,s){var n,r=t(s),o=e.devicePixelRatio>1&&r.attr("data-src-retina")||r.attr("data-src")||r.attr("data-srcset");this._core.trigger("load",{element:r,url:o},"lazy"),r.is("img")?r.one("load.owl.lazy",t.proxy(function(){r.css("opacity",1),this._core.trigger("loaded",{element:r,url:o},"lazy")},this)).attr("src",o):r.is("source")?r.one("load.owl.lazy",t.proxy(function(){this._core.trigger("loaded",{element:r,url:o},"lazy")},this)).attr("srcset",o):((n=new Image).onload=t.proxy(function(){r.css({"background-image":'url("'+o+'")',opacity:"1"}),this._core.trigger("loaded",{element:r,url:o},"lazy")},this),n.src=o)},this)),this._loaded.push(s.get(0)))},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Lazy=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(i){this._core=i,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()},this),"loaded.owl.lazy":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var s=this;t(e).on("load",function(){s._core.settings.autoHeight&&s.update()}),t(e).resize(function(){s._core.settings.autoHeight&&(null!=s._intervalId&&clearTimeout(s._intervalId),s._intervalId=setTimeout(function(){s.update()},250))})};n.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},n.prototype.update=function(){var e=this._core._current,i=e+this._core.settings.items,s=this._core.settings.lazyLoad,n=this._core.$stage.children().toArray().slice(e,i),r=[],o=0;t.each(n,function(e,i){r.push(t(i).height())}),(o=Math.max.apply(null,r))<=1&&s&&this._previousHeight&&(o=this._previousHeight),this._previousHeight=o,this._core.$stage.parent().height(o).addClass(this._core.settings.autoHeightClass)},n.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoHeight=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var i=t(e.content).find(".owl-video");i.length&&(i.css("display","none"),this.fetch(i,t(e.content)))}},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",t.proxy(function(t){this.play(t)},this))};n.Defaults={video:!1,videoHeight:!1,videoWidth:!1},n.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,r=t.attr("data-height")||this._core.settings.videoHeight,o=t.attr("href");if(!o)throw new Error("Missing video URL.");if((s=o.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu")>-1)i="youtube";else if(s[3].indexOf("vimeo")>-1)i="vimeo";else{if(!(s[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[o]={type:i,id:s,width:n,height:r},e.attr("data-video",o),this.thumbnail(t,this._videos[o])},n.prototype.thumbnail=function(e,i){var s,n,r,o=i.width&&i.height?"width:"+i.width+"px;height:"+i.height+"px;":"",a=e.find("img"),l="src",h="",u=this._core.settings,c=function(i){n='<div class="owl-video-play-icon"></div>',s=u.lazyLoad?t("<div/>",{class:"owl-video-tn "+h,srcType:i}):t("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+i+")"}),e.after(s),e.after(n)};if(e.wrap(t("<div/>",{class:"owl-video-wrapper",style:o})),this._core.settings.lazyLoad&&(l="data-src",h="owl-lazy"),a.length)return c(a.attr(l)),a.remove(),!1;"youtube"===i.type?(r="//img.youtube.com/vi/"+i.id+"/hqdefault.jpg",c(r)):"vimeo"===i.type?t.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){r=t[0].thumbnail_large,c(r)}}):"vzaar"===i.type&&t.ajax({type:"GET",url:"//vzaar.com/api/videos/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){r=t.framegrab_url,c(r)}})},n.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},n.prototype.play=function(e){var i,s=t(e.target).closest("."+this._core.settings.itemClass),n=this._videos[s.attr("data-video")],r=n.width||"100%",o=n.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),s=this._core.items(this._core.relative(s.index())),this._core.reset(s.index()),(i=t('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",o),i.attr("width",r),"youtube"===n.type?i.attr("src","//www.youtube.com/embed/"+n.id+"?autoplay=1&rel=0&v="+n.id):"vimeo"===n.type?i.attr("src","//player.vimeo.com/video/"+n.id+"?autoplay=1"):"vzaar"===n.type&&i.attr("src","//view.vzaar.com/"+n.id+"/player?autoplay=true"),t(i).wrap('<div class="owl-video-frame" />').insertAfter(s.find(".owl-video")),this._playing=s.addClass("owl-video-playing"))},n.prototype.isInFullScreen=function(){var e=i.fullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement;return e&&t(e).parent().hasClass("owl-video-frame")},n.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Video=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this.core=e,this.core.options=t.extend({},n.Defaults,this.core.options),this.swapping=!0,this.previous=void 0,this.next=void 0,this.handlers={"change.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":t.proxy(function(t){t.namespace&&(this.swapping="translated"==t.type)},this),"translate.owl.carousel":t.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};n.Defaults={animateOut:!1,animateIn:!1},n.prototype.swap=function(){if(1===this.core.settings.items&&t.support.animation&&t.support.transition){this.core.speed(0);var e,i=t.proxy(this.clear,this),s=this.core.$stage.children().eq(this.previous),n=this.core.$stage.children().eq(this.next),r=this.core.settings.animateIn,o=this.core.settings.animateOut;this.core.current()!==this.previous&&(o&&(e=this.core.coordinates(this.previous)-this.core.coordinates(this.next),s.one(t.support.animation.end,i).css({left:e+"px"}).addClass("animated owl-animated-out").addClass(o)),r&&n.one(t.support.animation.end,i).addClass("animated owl-animated-in").addClass(r))}},n.prototype.clear=function(e){t(e.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Animate=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":t.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":t.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":t.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=t.extend({},n.Defaults,this._core.options)};n.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},n.prototype._next=function(s){this._call=e.setTimeout(t.proxy(this._next,this,s),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||i.hidden||this._core.next(s||this._core.settings.autoplaySpeed)},n.prototype.read=function(){return(new Date).getTime()-this._time},n.prototype.play=function(i,s){var n;this._core.is("rotating")||this._core.enter("rotating"),i=i||this._core.settings.autoplayTimeout,n=Math.min(this._time%(this._timeout||i),i),this._paused?(this._time=this.read(),this._paused=!1):e.clearTimeout(this._call),this._time+=this.read()%i-n,this._timeout=i,this._call=e.setTimeout(t.proxy(this._next,this,s),i-n)},n.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,e.clearTimeout(this._call),this._core.leave("rotating"))},n.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,e.clearTimeout(this._call))},n.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.autoplay=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){"use strict";var n=function(e){this._core=e,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":t.proxy(function(e){e.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+t(e.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers)};n.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},n.prototype.initialize=function(){var e,i=this._core.settings;for(e in this._controls.$relative=(i.navContainer?t(i.navContainer):t("<div>").addClass(i.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=t("<"+i.navElement+">").addClass(i.navClass[0]).html(i.navText[0]).prependTo(this._controls.$relative).on("click",t.proxy(function(t){this.prev(i.navSpeed)},this)),this._controls.$next=t("<"+i.navElement+">").addClass(i.navClass[1]).html(i.navText[1]).appendTo(this._controls.$relative).on("click",t.proxy(function(t){this.next(i.navSpeed)},this)),i.dotsData||(this._templates=[t('<button role="button">').addClass(i.dotClass).append(t("<span>")).prop("outerHTML")]),this._controls.$absolute=(i.dotsContainer?t(i.dotsContainer):t("<div>").addClass(i.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",t.proxy(function(e){var s=t(e.target).parent().is(this._controls.$absolute)?t(e.target).index():t(e.target).parent().index();e.preventDefault(),this.to(s,i.dotsSpeed)},this)),this._overrides)this._core[e]=t.proxy(this[e],this)},n.prototype.destroy=function(){var t,e,i,s,n;for(t in n=this._core.settings,this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&n.navContainer?this._controls[e].html(""):this._controls[e].remove();for(s in this.overides)this._core[s]=this._overrides[s];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},n.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),r=this._core.settings,o=r.center||r.autoWidth||r.dotsData?1:r.dotsEach||r.items;if("page"!==r.slideBy&&(r.slideBy=Math.min(r.slideBy,r.items)),r.dots||"page"==r.slideBy)for(this._pages=[],t=i,e=0,0;t<s;t++){if(e>=o||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+o-1}),Math.min(n,t-i)===n)break;e=0,0}e+=this._core.mergers(this._core.relative(t))}},n.prototype.draw=function(){var e,i=this._core.settings,s=this._core.items().length<=i.items,n=this._core.relative(this._core.current()),r=i.loop||i.rewind;this._controls.$relative.toggleClass("disabled",!i.nav||s),i.nav&&(this._controls.$previous.toggleClass("disabled",!r&&n<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!r&&n>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!i.dots||s),i.dots&&(e=this._pages.length-this._controls.$absolute.children().length,i.dotsData&&0!==e?this._controls.$absolute.html(this._templates.join("")):e>0?this._controls.$absolute.append(new Array(e+1).join(this._templates[0])):e<0&&this._controls.$absolute.children().slice(e).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(t.inArray(this.current(),this._pages)).addClass("active"))},n.prototype.onTrigger=function(e){var i=this._core.settings;e.page={index:t.inArray(this.current(),this._pages),count:this._pages.length,size:i&&(i.center||i.autoWidth||i.dotsData?1:i.dotsEach||i.items)}},n.prototype.current=function(){var e=this._core.relative(this._core.current());return t.grep(this._pages,t.proxy(function(t,i){return t.start<=e&&t.end>=e},this)).pop()},n.prototype.getPosition=function(e){var i,s,n=this._core.settings;return"page"==n.slideBy?(i=t.inArray(this.current(),this._pages),s=this._pages.length,e?++i:--i,i=this._pages[(i%s+s)%s].start):(i=this._core.relative(this._core.current()),s=this._core.items().length,e?i+=n.slideBy:i-=n.slideBy),i},n.prototype.next=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!0),e)},n.prototype.prev=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!1),e)},n.prototype.to=function(e,i,s){var n;!s&&this._pages.length?(n=this._pages.length,t.proxy(this._overrides.to,this._core)(this._pages[(e%n+n)%n].start,i)):t.proxy(this._overrides.to,this._core)(e,i)},t.fn.owlCarousel.Constructor.Plugins.Navigation=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){"use strict";var n=function(i){this._core=i,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":t.proxy(function(i){i.namespace&&"URLHash"===this._core.settings.startPosition&&t(e).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var i=t(e.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!i)return;this._hashes[i]=e.content}},this),"changed.owl.carousel":t.proxy(function(i){if(i.namespace&&"position"===i.property.name){var s=this._core.items(this._core.relative(this._core.current())),n=t.map(this._hashes,function(t,e){return t===s?e:null}).join();if(!n||e.location.hash.slice(1)===n)return;e.location.hash=n}},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers),t(e).on("hashchange.owl.navigation",t.proxy(function(t){var i=e.location.hash.substring(1),s=this._core.$stage.children(),n=this._hashes[i]&&s.index(this._hashes[i]);void 0!==n&&n!==this._core.current()&&this._core.to(this._core.relative(n),!1,!0)},this))};n.Defaults={URLhashListener:!1},n.prototype.destroy=function(){var i,s;for(i in t(e).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(i,this._handlers[i]);for(s in Object.getOwnPropertyNames(this))"function"!=typeof this[s]&&(this[s]=null)},t.fn.owlCarousel.Constructor.Plugins.Hash=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=t("<support>").get(0).style,r="Webkit Moz O ms".split(" "),o={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},a=function(){return!!u("transform")},l=function(){return!!u("perspective")},h=function(){return!!u("animation")};function u(e,i){var o=!1,a=e.charAt(0).toUpperCase()+e.slice(1);return t.each((e+" "+r.join(a+" ")+a).split(" "),function(t,e){if(n[e]!==s)return o=!i||e,!1}),o}function c(t){return u(t,!0)}(function(){return!!u("transition")})()&&(t.support.transition=new String(c("transition")),t.support.transition.end=o.transition.end[t.support.transition]),h()&&(t.support.animation=new String(c("animation")),t.support.animation.end=o.animation.end[t.support.animation]),a()&&(t.support.transform=new String(c("transform")),t.support.transform3d=l())}(window.Zepto||window.jQuery,window,document)}});

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.