PageSourceSearch

https://amtexprecision.com/wp-content/plugins/dvgallery/js/wookmark.js?ver=7.1.2

js amtexprecision.com collected 2026-10-04 20:06:35 UTC 16,297 bytes, 19 lines download raw bytes

1/*!
2 * imagesLoaded PACKAGED v3.1.8
3 * JavaScript is all like "You images are done yet or what?"
4 * MIT License
5 */
6
7(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;
7if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s});
8/*!
9wookmark plugin
10@name wookmark.js
11@author Christoph Ono ([email protected] or @gbks)
12@author Sebastian Helzle ([email protected] or @sebobo)
13@version 2.0.1
14@date 06/16/2015
15@category jQuery plugin
16@copyright (c) 2009-2015 Christoph Ono (www.wookmark.com)
17@license Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
18*/
19!function(a){"function"==typeof define&&define.amd?define(["window","document"],a):a(window,document)}(function(a,b){function c(a,b){return function(){return a.apply(b,arguments)}}function d(a,b){var c;for(c in b)b.hasOwnProperty(c)&&(a.style[c]=b[c])}function e(a){v(function(){var b,c;for(b=0;b<a.length;b++)c=a[b],d(c.el,c.css)})}function f(a){return a.replace(/^\s+|\s+$/g,"").toLowerCase()}function g(a,b,c){a.removeEventListener?a.removeEventListener(b,c):a.detachEvent("on"+b,c)}function h(a,b,c){g(a,b,c),a.addEventListener?a.addEventListener(b,c):a.attachEvent("on"+b,function(){c.call(a)})}function i(a){return null===a.offsetParent}function j(a){return a.offsetHeight}function k(a){return a.offsetWidth}function l(a,b){return a.classList?a.classList.contains(b):new RegExp("(^| )"+b+"( |$)","gi").test(a.className)}function m(a,b){a.classList?a.classList.add(b):a.className+=" "+b}function n(a,b){a.classList?a.classList.remove(b):a.className=a.className.replace(new RegExp("(^|\\b)"+b.split(" ").join("|")+"(\\b|$)","gi")," ")}function o(a,b,c,d){void 0===d&&(d="wookmark-");var e=a.getAttribute("data-"+d+b);return c===!0?parseInt(e,10):e}function p(a,b,c,d){void 0===d&&(d="wookmark-"),a.setAttribute("data-"+d+b,c)}function q(a){for(var b,c={},d=[],e=a.length;e--;)b=o(a[e],"id",!0),c.hasOwnProperty(b)||(c[b]=1,d.push(a[e]));return d}function r(b,c){return void 0!==a.getComputedStyle?a.getComputedStyle(b,null).getPropertyValue(c):b.currentStyle[c]}function s(a,b){var c,d=a.length;for(c=0;d>c;c++)if(a[c]===b)return c;return-1}function t(d,e){e=e||{},"string"==typeof d&&(d=b.querySelector(d)),this.container=d,this.columns=this.containerWidth=this.resizeTimer=null,this.activeItemCount=0,this.placeholders=[],this.itemHeightsInitialized=!1,this.itemHeightsDirty=!1,this.elementTag="div",this.initItems=c(this.initItems,this),this.updateOptions=c(this.updateOptions,this),this.onResize=c(this.onResize,this),this.onRefresh=c(this.onRefresh,this),this.getItemWidth=c(this.getItemWidth,this),this.layout=c(this.layout,this),this.layoutFull=c(this.layoutFull,this),this.layoutColumns=c(this.layoutColumns,this),this.filter=c(this.filter,this),this.clear=c(this.clear,this),this.getActiveItems=c(this.getActiveItems,this),this.refreshPlaceholders=c(this.refreshPlaceholders,this),this.sortElements=c(this.sortElements,this),this.updateFilterClasses=c(this.updateFilterClasses,this),this.initItems(),this.container.style.display="block",this.updateOptions(e),this.updateFilterClasses(),this.autoResize&&h(a,"resize",this.onResize),h(this.container,"refreshWookmark",this.onRefresh)}var u={align:"center",autoResize:!0,comparator:null,direction:void 0,ignoreInactiveItems:!0,inactiveClass:"wookmark-inactive",itemSelector:void 0,itemWidth:0,fillEmptySpace:!1,flexibleWidth:0,offset:5,outerOffset:0,onLayoutChanged:void 0,placeholderClass:"wookmark-placeholder",possibleFilters:[],resizeDelay:50,verticalOffset:void 0},v=a.requestAnimationFrame||function(a){a()};return t.prototype.initItems=function(){if(void 0===this.itemSelector){for(var a,b=[],c=this.container.children,d=c.length;d--;)a=c[d],8!==a.nodeType&&(a.style.display="",p(a,"id",d),b.unshift(a));this.items=b}else this.items=this.container.querySelectorAll(this.itemSelector);this.items.length&&(this.elementTag=this.items[0].tagName),this.itemHeightsDirt
19y=!0},t.prototype.updateFilterClasses=function(){for(var a,b,c,d,e,g=this.items.length,h={},i=this.possibleFilters,j=i.length;g--;)if(c=this.items[g],b=JSON.parse(o(c,"filter-class",!1,"")),b&&"object"==typeof b)for(a=b.length;a--;)d=f(b[a]),h.hasOwnProperty(d)||(h[d]=[]),h[d].push(c);for(;j--;)e=f(i[j]),h.hasOwnProperty(e)||(h[e]=[]);this.filterClasses=h},t.prototype.updateOptions=function(a){var b;this.itemHeightsDirty=!0,a=a||{};for(b in u)u.hasOwnProperty(b)&&(a.hasOwnProperty(b)?this[b]=a[b]:this.hasOwnProperty(b)||(this[b]=u[b]));this.verticalOffset=this.verticalOffset||this.offset,this.layout(!0)},t.prototype.onResize=function(){clearTimeout(this.resizeTimer),this.itemHeightsDirty=0!==this.flexibleWidth,this.resizeTimer=setTimeout(this.layout,this.resizeDelay)},t.prototype.onRefresh=function(){this.itemHeightsDirty=!0,this.layout()},t.prototype.filter=function(a,b,c){var d,e,g,h,i,j=[],k=[];if(a=a||[],b=b||"or",c=c||!1,a.length){for(e=0;e<a.length;e++)i=f(a[e]),this.filterClasses.hasOwnProperty(i)&&j.push(this.filterClasses[i]);if(e=d=j.length,"or"===b||1===d)for(;e--;)k=k.concat(j[e]);else if("and"===b){for(var l,o,p,r=j[0],t=!0;e--;)j[e].length<r.length&&(r=j[e]);for(r=r||[],e=r.length;e--;){for(o=r[e],g=d,t=!0;g--&&t;)if(p=j[g],r!==p){for(l=!1,h=p.length;h--&&!l;)l=p[h]===o;t&=l}t&&(k=k.concat(r[e]))}}if(d>1&&(k=q(k)),!c)for(e=this.items.length;e--;)-1===s(k,this.items[e])&&m(this.items[e],this.inactiveClass)}else k=this.items;if(!c){for(e=k.length;e--;)n(k[e],this.inactiveClass);this.columns=null,this.layout()}return k},t.prototype.refreshPlaceholders=function(a,b){var c,e,f,g,h,i,k,l=j(this.container),m=this.columns.length,n="";if(this.placeholders.length<m){for(c=0;c<m-this.placeholders.length;c++)n+="<"+this.elementTag+' class="'+this.placeholderClass+'"/>';this.container.insertAdjacentHTML("beforeend",n),this.placeholders=this.container.querySelectorAll("."+this.placeholderClass)}for(g=this.offset+2*parseInt(r(this.placeholders[0],"border-left-width"),10)||0,g+=2*parseInt(r(this.placeholders[0],"padding-left"),10)||0,c=0;c<this.placeholders.length;c++)i=this.placeholders[c],e=this.columns[c],c>=m||0===e.length?i.style.display="none":(h=e[e.length-1],k=o(h,"top",!0)+o(h,"height",!0)+this.verticalOffset,f=Math.max(0,l-k-g),d(i,{position:"absolute",display:f>0?"block":"none",left:c*a+b+"px",top:k+"px",width:a-g+"px",height:f+"px"}))},t.prototype.getActiveItems=function(){var a,b,c=this.inactiveClass,d=[],e=this.items;if(this.ignoreInactiveItems)for(a=0;a<e.length;a++)b=e[a],l(b,c)||d.push(b);return d},t.prototype.getItemWidth=function(){var a=this.itemWidth,b=k(this.container)-2*this.outerOffset,c=this.flexibleWidth;if("function"==typeof a&&(a=this.itemWidth()),this.items.length>0&&(void 0===a||0===a&&!this.flexibleWidth)?a=k(this.items[0]):"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(this.itemWidth)/100*b),c){"function"==typeof c&&(c=c()),"string"==typeof c&&c.indexOf("%")>=0&&(c=parseFloat(c)/100*b);var d=b+this.offset,e=Math.floor(.5+d/(c+this.offset)),f=Math.floor(d/(a+this.offset)),g=Math.max(e,f),h=Math.min(c,Math.floor((b-(g-1)*this.offset)/g));a=Math.max(a,h)}return a},t.prototype.layout=function(a,b){if(!i(this.container)){var c,d=this.getItemWidth(),e=d+this.offset,f=k(this.container),g=f-2*this.outerOffset,h=Math.floor((g+this.offset)/e),j=0,l=0,m=this.getActiveItems(),n=m.length,o=n;if(this.itemHeightsDirty||!this.itemHeightsInitialized){for(;o--;)c=m[o],this.flexibleWidth&&(c.style.width=d+"px"),p(c,"height",c.offsetHeight);this.itemHeightsDirty=!1,this.itemHeightsInitialized=!0}h=Math.max(1,Math.min(h,n)),j=this.outerOffset,"center"===this.align&&(j+=Math.floor(.5+(g-(h*e-this.offset))>>1)),this.direction=this.direction||("right"===this.align?"right":"left"),l=a||null===this.columns||this.columns.length!==h||this.activeItemCount!==n?this.layoutFull(e,h,j):this.layoutColumns(e,j),this.activeItemCount=n,this.container.style.height=l+"px",this.fillEmptySpace&&this.refreshPlaceholders(e,j),void 0!==this.onLayoutChanged&&"function"==typeof this.onLayoutChanged&&this.onLayoutChanged(),"function"==typeof b&&b()}},t.prototype.sortElements=function(a){return"function"==typeof this.comparator?a.sort(this.comparator):a},t.prototype.layoutFull=function(a,b,c){var d,f,g,h,i=0,j=0,k=null,l=null,m=[],n=[],q="left"
19===this.align;for(this.columns=[],f=this.sortElements(this.getActiveItems()),g=f.length;m.length<b;)m.push(this.outerOffset),this.columns.push([]);for(;g>j;){for(d=f[j],k=m[0],l=0,i=0;b>i;i++)m[i]<k&&(k=m[i],l=i);p(d,"top",k),h=c,(l>0||!q)&&(h+=l*a),n[j]={el:d,css:{position:"absolute",top:k+"px"}},n[j].css[this.direction]=h+"px",m[l]+=o(d,"height",!0)+this.verticalOffset,this.columns[l].push(d),j++}return e(n),Math.max.apply(Math,m)},t.prototype.layoutColumns=function(a,b){for(var c,d,f,g,h=[],i=[],j=0,k=0,l=this.columns.length;l--;){for(c=this.outerOffset,h.push(c),d=this.columns[l],g=l*a+b,j=0;j<d.length;j++,k++)f=d[j],p(f,"top",c),i[k]={el:f,css:{top:c+"px"}},i[k].css[this.direction]=g+"px",c+=o(f,"height",!0)+this.verticalOffset;h[l]=c}return e(i),Math.max.apply(Math,h)},t.prototype.clear=function(){clearTimeout(this.resizeTimer);for(var b=this.placeholders.length;b--;)this.container.removeChild(this.placeholders[b]);g(a,"resize",this.onResize),g(this.container,"refreshWookmark",this.onRefresh)},void 0!==a.jQuery&&(jQuery.fn.wookmark=function(a){var b=this.length;if(void 0!==a&&a.container instanceof jQuery&&(a.container=a.container[0]),b>1)for(;b--;)$(this).eq(b).wookmark(a);else 1===b&&(this.wookmarkInstance?this.wookmarkInstance.updateOptions(a||{}):this.wookmarkInstance=new t(this[0],a||{}));return this}),a.Wookmark=t,t});

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.