Comparing version 3.1.0 to 3.1.1
@@ -6,16 +6,4 @@ /*! Backstretch - v2.0.4 - 2013-06-19 | ||
$.backstretch([ | ||
"/hood/images/bg/1.jpg", | ||
"/hood/images/bg/3.jpg", | ||
"/hood/images/bg/4.jpg", | ||
"/hood/images/bg/5.jpg", | ||
"/hood/images/bg/6.jpg", | ||
"/hood/images/bg/7.jpg", | ||
"/hood/images/bg/8.jpg", | ||
"/hood/images/bg/9.jpg" | ||
], { | ||
fade: 1000, | ||
duration: 3000 | ||
}); | ||
$('.code-mask').mask("000-000", { placeholder: "___-___" }); | ||
$(window).on('load', function () { | ||
@@ -22,0 +10,0 @@ $('input:-webkit-autofill').each(function () { |
@@ -1,1 +0,1 @@ | ||
"use strict";!function(t,i,e){t.fn.backstretch=function(s,n){return(s===e||0===s.length)&&t.error("No images were supplied for Backstretch"),0===t(i).scrollTop()&&i.scrollTo(0,0),this.each(function(){var i=t(this),e=i.data("backstretch");if(e){if("string"==typeof s&&"function"==typeof e[s])return void e[s](n);n=t.extend(e.options,n),e.destroy(!0)}e=new o(this,s,n),i.data("backstretch",e)})},t.backstretch=function(i,e){return t("body").backstretch(i,e).data("backstretch")},t.expr[":"].backstretch=function(i){return t(i).data("backstretch")!==e},t.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0};var s={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},n={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},o=function(e,n,o){this.options=t.extend({},t.fn.backstretch.defaults,o||{}),this.images=t.isArray(n)?n:[n],t.each(this.images,function(){t("<img />")[0].src=this}),this.isBody=e===document.body,this.$container=t(e),this.$root=this.isBody?t(a?i:document):this.$container,e=this.$container.children(".backstretch").first(),this.$wrap=e.length?e:t('<div class="backstretch"></div>').css(s).appendTo(this.$container),this.isBody||(e=this.$container.css("position"),n=this.$container.css("zIndex"),this.$container.css({position:"static"===e?"relative":e,zIndex:"auto"===n?0:n,background:"none"}),this.$wrap.css({zIndex:-999998})),this.$wrap.css({position:this.isBody&&a?"fixed":"absolute"}),this.index=0,this.show(this.index),t(i).on("resize.backstretch",t.proxy(this.resize,this)).on("orientationchange.backstretch",t.proxy(function(){this.isBody&&0===i.pageYOffset&&(i.scrollTo(0,1),this.resize())},this))};o.prototype={resize:function(){try{var t,e={left:0,top:0},s=this.isBody?this.$root.width():this.$root.innerWidth(),n=s,o=this.isBody?i.innerHeight?i.innerHeight:this.$root.height():this.$root.innerHeight(),a=n/this.$img.data("ratio");a>=o?(t=(a-o)/2,this.options.centeredY&&(e.top="-"+t+"px")):(a=o,n=a*this.$img.data("ratio"),t=(n-s)/2,this.options.centeredX&&(e.left="-"+t+"px")),this.$wrap.css({width:s,height:o}).find("img:not(.deleteable)").css({width:n,height:a}).css(e)}catch(t){}return this},show:function(i){if(!(Math.abs(i)>this.images.length-1)){var e=this,s=e.$wrap.find("img").addClass("deleteable"),o={relatedTarget:e.$container[0]};return e.$container.trigger(t.Event("backstretch.before",o),[e,i]),this.index=i,clearInterval(e.interval),e.$img=t("<img />").css(n).bind("load",function(n){var a=this.width||t(n.target).width();n=this.height||t(n.target).height(),t(this).data("ratio",a/n),t(this).fadeIn(e.options.speed||e.options.fade,function(){s.remove(),e.paused||e.cycle(),t(["after","show"]).each(function(){e.$container.trigger(t.Event("backstretch."+this,o),[e,i])})}),e.resize()}).appendTo(e.$wrap),e.$img.attr("src",e.images[i]),e}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this.next(),this},cycle:function(){return 1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(t.proxy(function(){this.paused||this.next()},this),this.options.duration)),this},destroy:function(e){t(i).off("resize.backstretch orientationchange.backstretch"),clearInterval(this.interval),e||this.$wrap.remove(),this.$container.removeData("backstretch")}};var a,r=navigator.userAgent,h=navigator.platform,c=r.match(/AppleWebKit\/([0-9]+)/),c=!!c&&c[1],d=r.match(/Fennec\/([0-9]+)/),d=!!d&&d[1],g=r.match(/Opera Mobi\/([0-9]+)/),p=!!g&&g[1],l=r.match(/MSIE ([0-9]+)/),l=!!l&&l[1];a=!((-1<h.indexOf("iPhone")||-1<h.indexOf("iPad")||-1<h.indexOf("iPod"))&&c&&534>c||i.operamini&&"[object OperaMini]"==={}.toString.call(i.operamini)||g&&7458>p||-1<r.indexOf("Android")&&c&&533>c||d&&6>d||"palmGetResource"in i&&c&&534>c||-1<r.indexOf("MeeGo")&&-1<r.indexOf("NokiaBrowser/8.5.0")||l&&6>=l)}(jQuery,window),$.backstretch(["/hood/images/bg/1.jpg","/hood/images/bg/3.jpg","/hood/images/bg/4.jpg","/hood/images/bg/5.jpg","/hood/images/bg/6.jpg","/hood/images/bg/7.jpg","/hood/images/bg/8.jpg","/hood/images/bg/9.jpg"],{fade:1e3,duration:3e3}),$(".code-mask").mask("000-000",{placeholder:"___-___"}),$(window).on("load",function(){$("input:-webkit-autofill").each(function(){""!==$(this).val().length&&$(this).siblings("label, i").addClass("active")})}); | ||
"use strict";!function(t,i,e){t.fn.backstretch=function(n,s){return(n===e||0===n.length)&&t.error("No images were supplied for Backstretch"),0===t(i).scrollTop()&&i.scrollTo(0,0),this.each(function(){var i=t(this),e=i.data("backstretch");if(e){if("string"==typeof n&&"function"==typeof e[n])return void e[n](s);s=t.extend(e.options,s),e.destroy(!0)}e=new r(this,n,s),i.data("backstretch",e)})},t.backstretch=function(i,e){return t("body").backstretch(i,e).data("backstretch")},t.expr[":"].backstretch=function(i){return t(i).data("backstretch")!==e},t.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0};var n={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},s={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},r=function(e,s,r){this.options=t.extend({},t.fn.backstretch.defaults,r||{}),this.images=t.isArray(s)?s:[s],t.each(this.images,function(){t("<img />")[0].src=this}),this.isBody=e===document.body,this.$container=t(e),this.$root=this.isBody?t(a?i:document):this.$container,e=this.$container.children(".backstretch").first(),this.$wrap=e.length?e:t('<div class="backstretch"></div>').css(n).appendTo(this.$container),this.isBody||(e=this.$container.css("position"),s=this.$container.css("zIndex"),this.$container.css({position:"static"===e?"relative":e,zIndex:"auto"===s?0:s,background:"none"}),this.$wrap.css({zIndex:-999998})),this.$wrap.css({position:this.isBody&&a?"fixed":"absolute"}),this.index=0,this.show(this.index),t(i).on("resize.backstretch",t.proxy(this.resize,this)).on("orientationchange.backstretch",t.proxy(function(){this.isBody&&0===i.pageYOffset&&(i.scrollTo(0,1),this.resize())},this))};r.prototype={resize:function(){try{var t,e={left:0,top:0},n=this.isBody?this.$root.width():this.$root.innerWidth(),s=n,r=this.isBody?i.innerHeight?i.innerHeight:this.$root.height():this.$root.innerHeight(),a=s/this.$img.data("ratio");a>=r?(t=(a-r)/2,this.options.centeredY&&(e.top="-"+t+"px")):(a=r,s=a*this.$img.data("ratio"),t=(s-n)/2,this.options.centeredX&&(e.left="-"+t+"px")),this.$wrap.css({width:n,height:r}).find("img:not(.deleteable)").css({width:s,height:a}).css(e)}catch(t){}return this},show:function(i){if(!(Math.abs(i)>this.images.length-1)){var e=this,n=e.$wrap.find("img").addClass("deleteable"),r={relatedTarget:e.$container[0]};return e.$container.trigger(t.Event("backstretch.before",r),[e,i]),this.index=i,clearInterval(e.interval),e.$img=t("<img />").css(s).bind("load",function(s){var a=this.width||t(s.target).width();s=this.height||t(s.target).height(),t(this).data("ratio",a/s),t(this).fadeIn(e.options.speed||e.options.fade,function(){n.remove(),e.paused||e.cycle(),t(["after","show"]).each(function(){e.$container.trigger(t.Event("backstretch."+this,r),[e,i])})}),e.resize()}).appendTo(e.$wrap),e.$img.attr("src",e.images[i]),e}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this.next(),this},cycle:function(){return 1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(t.proxy(function(){this.paused||this.next()},this),this.options.duration)),this},destroy:function(e){t(i).off("resize.backstretch orientationchange.backstretch"),clearInterval(this.interval),e||this.$wrap.remove(),this.$container.removeData("backstretch")}};var a,o=navigator.userAgent,h=navigator.platform,c=o.match(/AppleWebKit\/([0-9]+)/),c=!!c&&c[1],d=o.match(/Fennec\/([0-9]+)/),d=!!d&&d[1],l=o.match(/Opera Mobi\/([0-9]+)/),f=!!l&&l[1],p=o.match(/MSIE ([0-9]+)/),p=!!p&&p[1];a=!((-1<h.indexOf("iPhone")||-1<h.indexOf("iPad")||-1<h.indexOf("iPod"))&&c&&534>c||i.operamini&&"[object OperaMini]"==={}.toString.call(i.operamini)||l&&7458>f||-1<o.indexOf("Android")&&c&&533>c||d&&6>d||"palmGetResource"in i&&c&&534>c||-1<o.indexOf("MeeGo")&&-1<o.indexOf("NokiaBrowser/8.5.0")||p&&6>=p)}(jQuery,window),$(".code-mask").mask("000-000",{placeholder:"___-___"}),$(window).on("load",function(){$("input:-webkit-autofill").each(function(){""!==$(this).val().length&&$(this).siblings("label, i").addClass("active")})}); |
@@ -1,1 +0,1 @@ | ||
"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e,a){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=t(require("jquery")):t(e||a)}(function(t){var e=function(e,a,n){var i={invalid:[],getCaret:function(){try{var t,a=0,n=e.get(0),s=document.selection,r=n.selectionStart;return s&&navigator.appVersion.indexOf("MSIE 10")===-1?(t=s.createRange(),t.moveStart("character",-i.val().length),a=t.text.length):(r||"0"===r)&&(a=r),a}catch(t){}},setCaret:function(t){try{if(e.is(":focus")){var a,n=e.get(0);n.setSelectionRange?n.setSelectionRange(t,t):(a=n.createTextRange(),a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select())}}catch(t){}},events:function(){e.on("keydown.mask",function(t){e.data("mask-keycode",t.keyCode||t.which),e.data("mask-previus-value",e.val()),e.data("mask-previus-caret-pos",i.getCaret()),i.maskDigitPosMapOld=i.maskDigitPosMap}).on(t.jMaskGlobals.useInput?"input.mask":"keyup.mask",i.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){e.keydown().keyup()},100)}).on("change.mask",function(){e.data("changed",!0)}).on("blur.mask",function(){o===i.val()||e.data("changed")||e.trigger("change"),e.data("changed",!1)}).on("blur.mask",function(){o=i.val()}).on("focus.mask",function(e){n.selectOnFocus===!0&&t(e.target).select()}).on("focusout.mask",function(){n.clearIfNotMatch&&!s.test(i.val())&&i.val("")})},getRegexMask:function(){for(var t,e,n,i,s,o,c=[],h=0;h<a.length;h++)t=r.translation[a.charAt(h)],t?(e=t.pattern.toString().replace(/.{1}$|^.{1}/g,""),n=t.optional,i=t.recursive,i?(c.push(a.charAt(h)),s={digit:a.charAt(h),pattern:e}):c.push(n||i?e+"?":e)):c.push(a.charAt(h).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));return o=c.join(""),s&&(o=o.replace(new RegExp("("+s.digit+"(.*"+s.digit+")?)"),"($1)?").replace(new RegExp(s.digit,"g"),s.pattern)),new RegExp(o)},destroyEvents:function(){e.off(["input","keydown","keyup","paste","drop","blur","focusout",""].join(".mask "))},val:function(t){var a,n=e.is("input"),i=n?"val":"text";return arguments.length>0?(e[i]()!==t&&e[i](t),a=e):a=e[i](),a},calculateCaretPosition:function(){var t=e.data("mask-previus-value")||"",a=i.getMasked(),n=i.getCaret();if(t!==a){var s=e.data("mask-previus-caret-pos")||0,r=a.length,o=t.length,c=0,h=0,l=0,d=0,u=0;for(u=n;u<r&&i.maskDigitPosMap[u];u++)h++;for(u=n-1;u>=0&&i.maskDigitPosMap[u];u--)c++;for(u=n-1;u>=0;u--)i.maskDigitPosMap[u]&&l++;for(u=s-1;u>=0;u--)i.maskDigitPosMapOld[u]&&d++;if(n>o)n=10*r;else if(s>=n&&s!==o){if(!i.maskDigitPosMapOld[n]){var p=n;n-=d-l,n-=c,i.maskDigitPosMap[n]&&(n=p)}}else n>s&&(n+=l-d,n+=h)}return n},behaviour:function(a){a=a||window.event,i.invalid=[];var n=e.data("mask-keycode");if(t.inArray(n,r.byPassKeys)===-1){var s=i.getMasked(),o=i.getCaret();return setTimeout(function(){i.setCaret(i.calculateCaretPosition())},t.jMaskGlobals.keyStrokeCompensation),i.val(s),i.setCaret(o),i.callbacks(a)}},getMasked:function(t,e){var s,o,c=[],h=void 0===e?i.val():e+"",l=0,d=a.length,u=0,p=h.length,f=1,g="push",m=-1,k=0,v=[];n.reverse?(g="unshift",f=-1,s=0,l=d-1,u=p-1,o=function(){return l>-1&&u>-1}):(s=d-1,o=function(){return l<d&&u<p});for(var b;o();){var y=a.charAt(l),M=h.charAt(u),w=r.translation[y];w?(M.match(w.pattern)?(c[g](M),w.recursive&&(m===-1?m=l:l===s&&l!==m&&(l=m-f),s===m&&(l-=f)),l+=f):M===b?(k--,b=void 0):w.optional?(l+=f,u-=f):w.fallback?(c[g](w.fallback),l+=f,u-=f):i.invalid.push({p:u,v:M,e:w.pattern}),u+=f):(t||c[g](y),M===y?(v.push(u),u+=f):(b=y,v.push(u+k),k++),l+=f)}var x=a.charAt(s);d!==p+1||r.translation[x]||c.push(x);var $=c.join("");return i.mapMaskdigitPositions($,v,p),$},mapMaskdigitPositions:function(t,e,a){var s=n.reverse?t.length-a:0;i.maskDigitPosMap={};for(var r=0;r<e.length;r++)i.maskDigitPosMap[e[r]+s]=1},callbacks:function(t){var s=i.val(),r=s!==o,c=[s,t,e,n],h=function(t,e,a){"function"==typeof n[t]&&e&&n[t].apply(this,a)};h("onChange",r===!0,c),h("onKeyPress",r===!0,c),h("onComplete",s.length===a.length,c),h("onInvalid",i.invalid.length>0,[s,t,e,i.invalid,n])}};e=t(e);var s,r=this,o=i.val();a="function"==typeof a?a(i.val(),void 0,e,n):a,r.mask=a,r.options=n,r.remove=function(){var t=i.getCaret();return r.options.placeholder&&e.removeAttr("placeholder"),e.data("mask-maxlength")&&e.removeAttr("maxlength"),i.destroyEvents(),i.val(r.getCleanVal()),i.setCaret(t),e},r.getCleanVal=function(){return i.getMasked(!0)},r.getMaskedVal=function(t){return i.getMasked(!1,t)},r.init=function(o){if(o=o||!1,n=n||{},r.clearIfNotMatch=t.jMaskGlobals.clearIfNotMatch,r.byPassKeys=t.jMaskGlobals.byPassKeys,r.translation=t.extend({},t.jMaskGlobals.translation,n.translation),r=t.extend(!0,{},r,n),s=i.getRegexMask(),o)i.events(),i.val(i.getMasked());else{n.placeholder&&e.attr("placeholder",n.placeholder),e.data("mask")&&e.attr("autocomplete","off");for(var c=0,h=!0;c<a.length;c++){var l=r.translation[a.charAt(c)];if(l&&l.recursive){h=!1;break}}h&&e.attr("maxlength",a.length).data("mask-maxlength",!0),i.destroyEvents(),i.events();var d=i.getCaret();i.val(i.getMasked()),i.setCaret(d)}},r.init(!e.is("input"))};t.maskWatchers={};var a=function(){var a=t(this),i={},s="data-mask-",r=a.attr("data-mask");if(a.attr(s+"reverse")&&(i.reverse=!0),a.attr(s+"clearifnotmatch")&&(i.clearIfNotMatch=!0),"true"===a.attr(s+"selectonfocus")&&(i.selectOnFocus=!0),n(a,r,i))return a.data("mask",new e(this,r,i))},n=function(e,a,n){n=n||{};var i=t(e).data("mask"),s=JSON.stringify,r=t(e).val()||t(e).text();try{return"function"==typeof a&&(a=a(r)),"object"!==_typeof(i)||s(i.options)!==s(n)||i.mask!==a}catch(t){}},i=function(t){var e,a=document.createElement("div");return t="on"+t,e=t in a,e||(a.setAttribute(t,"return;"),e="function"==typeof a[t]),a=null,e};t.fn.mask=function(a,i){i=i||{};var s=this.selector,r=t.jMaskGlobals,o=r.watchInterval,c=i.watchInputs||r.watchInputs,h=function(){if(n(this,a,i))return t(this).data("mask",new e(this,a,i))};return t(this).each(h),s&&""!==s&&c&&(clearInterval(t.maskWatchers[s]),t.maskWatchers[s]=setInterval(function(){t(document).find(s).each(h)},o)),this},t.fn.masked=function(t){return this.data("mask").getMaskedVal(t)},t.fn.unmask=function(){return clearInterval(t.maskWatchers[this.selector]),delete t.maskWatchers[this.selector],this.each(function(){var e=t(this).data("mask");e&&e.remove().removeData("mask")})},t.fn.cleanVal=function(){return this.data("mask").getCleanVal()},t.applyDataMask=function(e){e=e||t.jMaskGlobals.maskElements;var n=e instanceof t?e:t(e);n.filter(t.jMaskGlobals.dataMaskAttr).each(a)};var s={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,keyStrokeCompensation:10,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&&i("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};t.jMaskGlobals=t.jMaskGlobals||{},s=t.jMaskGlobals=t.extend(!0,{},s,t.jMaskGlobals),s.dataMask&&t.applyDataMask(),setInterval(function(){t.jMaskGlobals.watchDataMask&&t.applyDataMask()},s.watchInterval)},window.jQuery,window.Zepto),function(t,e,a){t.fn.backstretch=function(n,i){return(n===a||0===n.length)&&t.error("No images were supplied for Backstretch"),0===t(e).scrollTop()&&e.scrollTo(0,0),this.each(function(){var e=t(this),a=e.data("backstretch");if(a){if("string"==typeof n&&"function"==typeof a[n])return void a[n](i);i=t.extend(a.options,i),a.destroy(!0)}a=new s(this,n,i),e.data("backstretch",a)})},t.backstretch=function(e,a){return t("body").backstretch(e,a).data("backstretch")},t.expr[":"].backstretch=function(e){return t(e).data("backstretch")!==a},t.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0};var n={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},i={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},s=function(a,i,s){this.options=t.extend({},t.fn.backstretch.defaults,s||{}),this.images=t.isArray(i)?i:[i],t.each(this.images,function(){t("<img />")[0].src=this}),this.isBody=a===document.body,this.$container=t(a),this.$root=this.isBody?t(r?e:document):this.$container,a=this.$container.children(".backstretch").first(),this.$wrap=a.length?a:t('<div class="backstretch"></div>').css(n).appendTo(this.$container),this.isBody||(a=this.$container.css("position"),i=this.$container.css("zIndex"),this.$container.css({position:"static"===a?"relative":a,zIndex:"auto"===i?0:i,background:"none"}),this.$wrap.css({zIndex:-999998})),this.$wrap.css({position:this.isBody&&r?"fixed":"absolute"}),this.index=0,this.show(this.index),t(e).on("resize.backstretch",t.proxy(this.resize,this)).on("orientationchange.backstretch",t.proxy(function(){this.isBody&&0===e.pageYOffset&&(e.scrollTo(0,1),this.resize())},this))};s.prototype={resize:function(){try{var t,a={left:0,top:0},n=this.isBody?this.$root.width():this.$root.innerWidth(),i=n,s=this.isBody?e.innerHeight?e.innerHeight:this.$root.height():this.$root.innerHeight(),r=i/this.$img.data("ratio");r>=s?(t=(r-s)/2,this.options.centeredY&&(a.top="-"+t+"px")):(r=s,i=r*this.$img.data("ratio"),t=(i-n)/2,this.options.centeredX&&(a.left="-"+t+"px")),this.$wrap.css({width:n,height:s}).find("img:not(.deleteable)").css({width:i,height:r}).css(a)}catch(t){}return this},show:function(e){if(!(Math.abs(e)>this.images.length-1)){var a=this,n=a.$wrap.find("img").addClass("deleteable"),s={relatedTarget:a.$container[0]};return a.$container.trigger(t.Event("backstretch.before",s),[a,e]),this.index=e,clearInterval(a.interval),a.$img=t("<img />").css(i).bind("load",function(i){var r=this.width||t(i.target).width();i=this.height||t(i.target).height(),t(this).data("ratio",r/i),t(this).fadeIn(a.options.speed||a.options.fade,function(){n.remove(),a.paused||a.cycle(),t(["after","show"]).each(function(){a.$container.trigger(t.Event("backstretch."+this,s),[a,e])})}),a.resize()}).appendTo(a.$wrap),a.$img.attr("src",a.images[e]),a}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this.next(),this},cycle:function(){return 1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(t.proxy(function(){this.paused||this.next()},this),this.options.duration)),this},destroy:function(a){t(e).off("resize.backstretch orientationchange.backstretch"),clearInterval(this.interval),a||this.$wrap.remove(),this.$container.removeData("backstretch")}};var r,o=navigator.userAgent,c=navigator.platform,h=o.match(/AppleWebKit\/([0-9]+)/),h=!!h&&h[1],l=o.match(/Fennec\/([0-9]+)/),l=!!l&&l[1],d=o.match(/Opera Mobi\/([0-9]+)/),u=!!d&&d[1],p=o.match(/MSIE ([0-9]+)/),p=!!p&&p[1];r=!((-1<c.indexOf("iPhone")||-1<c.indexOf("iPad")||-1<c.indexOf("iPod"))&&h&&534>h||e.operamini&&"[object OperaMini]"==={}.toString.call(e.operamini)||d&&7458>u||-1<o.indexOf("Android")&&h&&533>h||l&&6>l||"palmGetResource"in e&&h&&534>h||-1<o.indexOf("MeeGo")&&-1<o.indexOf("NokiaBrowser/8.5.0")||p&&6>=p)}(jQuery,window),$.backstretch(["/hood/images/bg/1.jpg","/hood/images/bg/3.jpg","/hood/images/bg/4.jpg","/hood/images/bg/5.jpg","/hood/images/bg/6.jpg","/hood/images/bg/7.jpg","/hood/images/bg/8.jpg","/hood/images/bg/9.jpg"],{fade:1e3,duration:3e3}),$(".code-mask").mask("000-000",{placeholder:"___-___"}),$(window).on("load",function(){$("input:-webkit-autofill").each(function(){""!==$(this).val().length&&$(this).siblings("label, i").addClass("active")})}); | ||
"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e,a){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=t(require("jquery")):t(e||a)}(function(t){var e=function(e,a,n){var i={invalid:[],getCaret:function(){try{var t,a=0,n=e.get(0),s=document.selection,r=n.selectionStart;return s&&navigator.appVersion.indexOf("MSIE 10")===-1?(t=s.createRange(),t.moveStart("character",-i.val().length),a=t.text.length):(r||"0"===r)&&(a=r),a}catch(t){}},setCaret:function(t){try{if(e.is(":focus")){var a,n=e.get(0);n.setSelectionRange?n.setSelectionRange(t,t):(a=n.createTextRange(),a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select())}}catch(t){}},events:function(){e.on("keydown.mask",function(t){e.data("mask-keycode",t.keyCode||t.which),e.data("mask-previus-value",e.val()),e.data("mask-previus-caret-pos",i.getCaret()),i.maskDigitPosMapOld=i.maskDigitPosMap}).on(t.jMaskGlobals.useInput?"input.mask":"keyup.mask",i.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){e.keydown().keyup()},100)}).on("change.mask",function(){e.data("changed",!0)}).on("blur.mask",function(){o===i.val()||e.data("changed")||e.trigger("change"),e.data("changed",!1)}).on("blur.mask",function(){o=i.val()}).on("focus.mask",function(e){n.selectOnFocus===!0&&t(e.target).select()}).on("focusout.mask",function(){n.clearIfNotMatch&&!s.test(i.val())&&i.val("")})},getRegexMask:function(){for(var t,e,n,i,s,o,c=[],h=0;h<a.length;h++)t=r.translation[a.charAt(h)],t?(e=t.pattern.toString().replace(/.{1}$|^.{1}/g,""),n=t.optional,i=t.recursive,i?(c.push(a.charAt(h)),s={digit:a.charAt(h),pattern:e}):c.push(n||i?e+"?":e)):c.push(a.charAt(h).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));return o=c.join(""),s&&(o=o.replace(new RegExp("("+s.digit+"(.*"+s.digit+")?)"),"($1)?").replace(new RegExp(s.digit,"g"),s.pattern)),new RegExp(o)},destroyEvents:function(){e.off(["input","keydown","keyup","paste","drop","blur","focusout",""].join(".mask "))},val:function(t){var a,n=e.is("input"),i=n?"val":"text";return arguments.length>0?(e[i]()!==t&&e[i](t),a=e):a=e[i](),a},calculateCaretPosition:function(){var t=e.data("mask-previus-value")||"",a=i.getMasked(),n=i.getCaret();if(t!==a){var s=e.data("mask-previus-caret-pos")||0,r=a.length,o=t.length,c=0,h=0,l=0,u=0,d=0;for(d=n;d<r&&i.maskDigitPosMap[d];d++)h++;for(d=n-1;d>=0&&i.maskDigitPosMap[d];d--)c++;for(d=n-1;d>=0;d--)i.maskDigitPosMap[d]&&l++;for(d=s-1;d>=0;d--)i.maskDigitPosMapOld[d]&&u++;if(n>o)n=10*r;else if(s>=n&&s!==o){if(!i.maskDigitPosMapOld[n]){var f=n;n-=u-l,n-=c,i.maskDigitPosMap[n]&&(n=f)}}else n>s&&(n+=l-u,n+=h)}return n},behaviour:function(a){a=a||window.event,i.invalid=[];var n=e.data("mask-keycode");if(t.inArray(n,r.byPassKeys)===-1){var s=i.getMasked(),o=i.getCaret();return setTimeout(function(){i.setCaret(i.calculateCaretPosition())},t.jMaskGlobals.keyStrokeCompensation),i.val(s),i.setCaret(o),i.callbacks(a)}},getMasked:function(t,e){var s,o,c=[],h=void 0===e?i.val():e+"",l=0,u=a.length,d=0,f=h.length,p=1,g="push",k=-1,v=0,m=[];n.reverse?(g="unshift",p=-1,s=0,l=u-1,d=f-1,o=function(){return l>-1&&d>-1}):(s=u-1,o=function(){return l<u&&d<f});for(var y;o();){var b=a.charAt(l),M=h.charAt(d),w=r.translation[b];w?(M.match(w.pattern)?(c[g](M),w.recursive&&(k===-1?k=l:l===s&&l!==k&&(l=k-p),s===k&&(l-=p)),l+=p):M===y?(v--,y=void 0):w.optional?(l+=p,d-=p):w.fallback?(c[g](w.fallback),l+=p,d-=p):i.invalid.push({p:d,v:M,e:w.pattern}),d+=p):(t||c[g](b),M===b?(m.push(d),d+=p):(y=b,m.push(d+v),v++),l+=p)}var x=a.charAt(s);u!==f+1||r.translation[x]||c.push(x);var $=c.join("");return i.mapMaskdigitPositions($,m,f),$},mapMaskdigitPositions:function(t,e,a){var s=n.reverse?t.length-a:0;i.maskDigitPosMap={};for(var r=0;r<e.length;r++)i.maskDigitPosMap[e[r]+s]=1},callbacks:function(t){var s=i.val(),r=s!==o,c=[s,t,e,n],h=function(t,e,a){"function"==typeof n[t]&&e&&n[t].apply(this,a)};h("onChange",r===!0,c),h("onKeyPress",r===!0,c),h("onComplete",s.length===a.length,c),h("onInvalid",i.invalid.length>0,[s,t,e,i.invalid,n])}};e=t(e);var s,r=this,o=i.val();a="function"==typeof a?a(i.val(),void 0,e,n):a,r.mask=a,r.options=n,r.remove=function(){var t=i.getCaret();return r.options.placeholder&&e.removeAttr("placeholder"),e.data("mask-maxlength")&&e.removeAttr("maxlength"),i.destroyEvents(),i.val(r.getCleanVal()),i.setCaret(t),e},r.getCleanVal=function(){return i.getMasked(!0)},r.getMaskedVal=function(t){return i.getMasked(!1,t)},r.init=function(o){if(o=o||!1,n=n||{},r.clearIfNotMatch=t.jMaskGlobals.clearIfNotMatch,r.byPassKeys=t.jMaskGlobals.byPassKeys,r.translation=t.extend({},t.jMaskGlobals.translation,n.translation),r=t.extend(!0,{},r,n),s=i.getRegexMask(),o)i.events(),i.val(i.getMasked());else{n.placeholder&&e.attr("placeholder",n.placeholder),e.data("mask")&&e.attr("autocomplete","off");for(var c=0,h=!0;c<a.length;c++){var l=r.translation[a.charAt(c)];if(l&&l.recursive){h=!1;break}}h&&e.attr("maxlength",a.length).data("mask-maxlength",!0),i.destroyEvents(),i.events();var u=i.getCaret();i.val(i.getMasked()),i.setCaret(u)}},r.init(!e.is("input"))};t.maskWatchers={};var a=function(){var a=t(this),i={},s="data-mask-",r=a.attr("data-mask");if(a.attr(s+"reverse")&&(i.reverse=!0),a.attr(s+"clearifnotmatch")&&(i.clearIfNotMatch=!0),"true"===a.attr(s+"selectonfocus")&&(i.selectOnFocus=!0),n(a,r,i))return a.data("mask",new e(this,r,i))},n=function(e,a,n){n=n||{};var i=t(e).data("mask"),s=JSON.stringify,r=t(e).val()||t(e).text();try{return"function"==typeof a&&(a=a(r)),"object"!==_typeof(i)||s(i.options)!==s(n)||i.mask!==a}catch(t){}},i=function(t){var e,a=document.createElement("div");return t="on"+t,e=t in a,e||(a.setAttribute(t,"return;"),e="function"==typeof a[t]),a=null,e};t.fn.mask=function(a,i){i=i||{};var s=this.selector,r=t.jMaskGlobals,o=r.watchInterval,c=i.watchInputs||r.watchInputs,h=function(){if(n(this,a,i))return t(this).data("mask",new e(this,a,i))};return t(this).each(h),s&&""!==s&&c&&(clearInterval(t.maskWatchers[s]),t.maskWatchers[s]=setInterval(function(){t(document).find(s).each(h)},o)),this},t.fn.masked=function(t){return this.data("mask").getMaskedVal(t)},t.fn.unmask=function(){return clearInterval(t.maskWatchers[this.selector]),delete t.maskWatchers[this.selector],this.each(function(){var e=t(this).data("mask");e&&e.remove().removeData("mask")})},t.fn.cleanVal=function(){return this.data("mask").getCleanVal()},t.applyDataMask=function(e){e=e||t.jMaskGlobals.maskElements;var n=e instanceof t?e:t(e);n.filter(t.jMaskGlobals.dataMaskAttr).each(a)};var s={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,keyStrokeCompensation:10,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&&i("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};t.jMaskGlobals=t.jMaskGlobals||{},s=t.jMaskGlobals=t.extend(!0,{},s,t.jMaskGlobals),s.dataMask&&t.applyDataMask(),setInterval(function(){t.jMaskGlobals.watchDataMask&&t.applyDataMask()},s.watchInterval)},window.jQuery,window.Zepto),function(t,e,a){t.fn.backstretch=function(n,i){return(n===a||0===n.length)&&t.error("No images were supplied for Backstretch"),0===t(e).scrollTop()&&e.scrollTo(0,0),this.each(function(){var e=t(this),a=e.data("backstretch");if(a){if("string"==typeof n&&"function"==typeof a[n])return void a[n](i);i=t.extend(a.options,i),a.destroy(!0)}a=new s(this,n,i),e.data("backstretch",a)})},t.backstretch=function(e,a){return t("body").backstretch(e,a).data("backstretch")},t.expr[":"].backstretch=function(e){return t(e).data("backstretch")!==a},t.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0};var n={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},i={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},s=function(a,i,s){this.options=t.extend({},t.fn.backstretch.defaults,s||{}),this.images=t.isArray(i)?i:[i],t.each(this.images,function(){t("<img />")[0].src=this}),this.isBody=a===document.body,this.$container=t(a),this.$root=this.isBody?t(r?e:document):this.$container,a=this.$container.children(".backstretch").first(),this.$wrap=a.length?a:t('<div class="backstretch"></div>').css(n).appendTo(this.$container),this.isBody||(a=this.$container.css("position"),i=this.$container.css("zIndex"),this.$container.css({position:"static"===a?"relative":a,zIndex:"auto"===i?0:i,background:"none"}),this.$wrap.css({zIndex:-999998})),this.$wrap.css({position:this.isBody&&r?"fixed":"absolute"}),this.index=0,this.show(this.index),t(e).on("resize.backstretch",t.proxy(this.resize,this)).on("orientationchange.backstretch",t.proxy(function(){this.isBody&&0===e.pageYOffset&&(e.scrollTo(0,1),this.resize())},this))};s.prototype={resize:function(){try{var t,a={left:0,top:0},n=this.isBody?this.$root.width():this.$root.innerWidth(),i=n,s=this.isBody?e.innerHeight?e.innerHeight:this.$root.height():this.$root.innerHeight(),r=i/this.$img.data("ratio");r>=s?(t=(r-s)/2,this.options.centeredY&&(a.top="-"+t+"px")):(r=s,i=r*this.$img.data("ratio"),t=(i-n)/2,this.options.centeredX&&(a.left="-"+t+"px")),this.$wrap.css({width:n,height:s}).find("img:not(.deleteable)").css({width:i,height:r}).css(a)}catch(t){}return this},show:function(e){if(!(Math.abs(e)>this.images.length-1)){var a=this,n=a.$wrap.find("img").addClass("deleteable"),s={relatedTarget:a.$container[0]};return a.$container.trigger(t.Event("backstretch.before",s),[a,e]),this.index=e,clearInterval(a.interval),a.$img=t("<img />").css(i).bind("load",function(i){var r=this.width||t(i.target).width();i=this.height||t(i.target).height(),t(this).data("ratio",r/i),t(this).fadeIn(a.options.speed||a.options.fade,function(){n.remove(),a.paused||a.cycle(),t(["after","show"]).each(function(){a.$container.trigger(t.Event("backstretch."+this,s),[a,e])})}),a.resize()}).appendTo(a.$wrap),a.$img.attr("src",a.images[e]),a}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this.next(),this},cycle:function(){return 1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(t.proxy(function(){this.paused||this.next()},this),this.options.duration)),this},destroy:function(a){t(e).off("resize.backstretch orientationchange.backstretch"),clearInterval(this.interval),a||this.$wrap.remove(),this.$container.removeData("backstretch")}};var r,o=navigator.userAgent,c=navigator.platform,h=o.match(/AppleWebKit\/([0-9]+)/),h=!!h&&h[1],l=o.match(/Fennec\/([0-9]+)/),l=!!l&&l[1],u=o.match(/Opera Mobi\/([0-9]+)/),d=!!u&&u[1],f=o.match(/MSIE ([0-9]+)/),f=!!f&&f[1];r=!((-1<c.indexOf("iPhone")||-1<c.indexOf("iPad")||-1<c.indexOf("iPod"))&&h&&534>h||e.operamini&&"[object OperaMini]"==={}.toString.call(e.operamini)||u&&7458>d||-1<o.indexOf("Android")&&h&&533>h||l&&6>l||"palmGetResource"in e&&h&&534>h||-1<o.indexOf("MeeGo")&&-1<o.indexOf("NokiaBrowser/8.5.0")||f&&6>=f)}(jQuery,window),$(".code-mask").mask("000-000",{placeholder:"___-___"}),$(window).on("load",function(){$("input:-webkit-autofill").each(function(){""!==$(this).val().length&&$(this).siblings("label, i").addClass("active")})}); |
{ | ||
"name": "hoodcms", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Hood Digital's own content management system, built in ASP.NET Core 2.2, with JS and SCSS.", | ||
@@ -5,0 +5,0 @@ "dependencies": {}, |
@@ -27,3 +27,3 @@ # Hood CMS | ||
"destination": "wwwroot/hood", | ||
"library": "hoodcms@3.1.0", | ||
"library": "hoodcms@3.1.1", | ||
"provider": "jsdelivr" | ||
@@ -30,0 +30,0 @@ } |
13485449
103319