1!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof module&&module.exports?module.exports=e():t.Colcade=e()}(window,function(){function a(t,e){if((t=u(t))&&t.colcadeGUID){var i=n[t.colcadeGUID];return i.option(e),i}this.element=t,this.options={},this.option(e),this.create()}var t=a.prototype;t.option=function(t){this.options=function(t,e){for(var i in e)t[i]=e[i];return t}(this.options,t)};var e=0,n={};function i(t){var e=t.getAttribute("data-colcade").split(","),o={};e.forEach(function(t){var e=t.split(":"),i=e[0].trim(),n=e[1].trim();o[i]=n}),new a(t,o)}function o(t){var e=[];if(Array.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e}function s(t,e){return o((e=e||document).querySelectorAll(t))}function u(t){return"string"==typeof t&&(t=document.querySelector(t)),t}return t.create=function(){this.errorCheck();var t=this.guid=++e;this.element.colcadeGUID=t,(n[t]=this).reload(),this._windowResizeHandler=this.onWindowResize.bind(this),this._loadHandler=this.onLoad.bind(this),window.addEventListener("resize",this._windowResizeHandler),this.element.addEventListener("load",this._loadHandler,!0)},t.errorCheck=function(){var t=[];if(this.element||t.push("Bad element: "+this.element),this.options.columns||t.push("columns option required: "+this.options.columns),this.options.items||t.push("items option required: "+this.options.items),t.length)throw new Error("[Colcade error] "+t.join(". "))},t.reload=function(){this.updateColumns(),this.updateItems(),this.layout()},t.updateColumns=function(){this.columns=s(this.options.columns,this.element)},t.updateItems=function(){this.items=s(this.options.items,this.element)},t.getActiveColumns=function(){return this.columns.filter(function(t){return"none"!=getComputedStyle(t).display})},t.layout=function(){this.activeColumns=this.getActiveColumns(),this._layout()},t._layout=function(){this.columnHeights=this.activeColumns.map(function(){return 0}),this.layoutItems(this.items)},t.layoutItems=function(t){t.forEach(this.layoutItem,this)},t.layoutItem=function(t){var e=Math.min.apply(Math,this.columnHeights),i=this.columnHeights.indexOf(e);this.activeColumns[i].appendChild(t),this.columnHeights[i]+=t.offsetHeight||1},t.append=function(t){var e=this.getQueryItems(t);this.items=this.items.concat(e),this.layoutItems(e)},t.prepend=function(t){var e=this.getQueryItems(t);this.items=e.concat(this.items),this._layout()},t.getQueryItems=function(t){t=o(t);var e=document.createDocumentFragment();return t.forEach(function(t){e.appendChild(t)}),s(this.options.items,e)},t.measureColumnHeight=function(n){var o=this.element.getBoundingClientRect();this.activeColumns.forEach(function(t,e){var i;n&&!t.contains(n)||(i=t.lastElementChild.getBoundingClientRect(),this.columnHeights[e]=i.bottom-o.top)},this)},t.onWindowResize=function(){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){this.onDebouncedResize()}.bind(this),100)},t.onDebouncedResize=function(){var i=this.getActiveColumns(),t=i.length==this.activeColumns.length,n=!0;this.activeColumns.forEach(function(t,e){n=n&&t==i[e]}),t&&n||(this.activeColumns=i,this._layout())},t.onLoad=function(t){this.measureColumnHeight(t.target)},t.destroy=function(){this.items.forEach(function(t){this.element.appendChild(t)},this),window.removeEventListener("resize",this._windowResizeHandler),this.element.removeEventListener("load",this._loadHandler,!0),delete this.element.colcadeGUID,delete n[this.guid]},function(t){if("complete"==document.readyState)return t();document.addEventListener("DOMContentLoaded",t)}(function(){s("[data-colcade]").forEach(i)}),a.data=function(t){var e=(t=u(t))&&t.colcadeGUID;return e&&n[e]},(a.makeJQueryPlugin=function(r){(r=r||window.jQuery)&&(r.fn.colcade=function(t){if("string"!=typeof t)return n=t,this.each(function(t,e){var i=r.data(e,"colcade");i?(i.option(n),i.layout()):(i=new a(e,n),r.data(e,"colcade",i))}),this;var e,o,s,u,n,i=Array.prototype.slice.call(arguments,1);return o=t,s=i,(e=this).each(function(t,e){var i,n=r.data(e,"colcade");n&&(i=n[o].apply(n,s),u=void 0===u?i:u)}),void 0!==u?u:e})})(),a});
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.