Файловый менеджер - Редактировать - /home/harasnat/www/sommer/components/com_spsimpleportfolio/assets/js/jquery.shuffle.modernizr.min.js
Назад
/*! * Shuffle.js by @Vestride * Categorize, sort, and filter a responsive grid of items. * Dependencies: jQuery 1.9+, Modernizr 2.6.2+ * @license MIT license * @version 3.1.1 */ window.Modernizr=function(t,e,i){function n(t,e){return typeof t===e}function s(t,e){return!!~(""+t).indexOf(e)}function o(t,e){for(var n in t){var o=t[n];if(!s(o,"-")&&f[o]!==i)return"pfx"!=e||o}return!1}function r(t,e,s){for(var o in t){var r=e[t[o]];if(r!==i)return!1===s?t[o]:n(r,"function")?r.bind(s||e):r}return!1}function a(t,e,i){var s=t.charAt(0).toUpperCase()+t.slice(1),a=(t+" "+_.join(s+" ")+s).split(" ");return n(e,"string")||n(e,"undefined")?o(a,e):r(a=(t+" "+g.join(s+" ")+s).split(" "),e,i)}var l,h,u={},p=e.documentElement,d="modernizr",c=e.createElement(d),f=c.style,m=" -webkit- -moz- -o- -ms- ".split(" "),y="Webkit Moz O ms",_=y.split(" "),g=y.toLowerCase().split(" "),v={},C=[],b=C.slice,T=function(t,i,n,s){var o,r,a,l,h=e.createElement("div"),u=e.body,c=u||e.createElement("body");if(parseInt(n,10))for(;n--;)(a=e.createElement("div")).id=s?s[n]:d+(n+1),h.appendChild(a);return o=["­",'<style id="s',d,'">',t,"</style>"].join(""),h.id=d,(u?h:c).innerHTML+=o,c.appendChild(h),u||(c.style.background="",c.style.overflow="hidden",l=p.style.overflow,p.style.overflow="hidden",p.appendChild(c)),r=i(h,t),u?h.parentNode.removeChild(h):(c.parentNode.removeChild(c),p.style.overflow=l),!!r},E={}.hasOwnProperty;for(var S in h=n(E,"undefined")||n(E.call,"undefined")?function(t,e){return e in t&&n(t.constructor.prototype[e],"undefined")}:function(t,e){return E.call(t,e)},Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError;var i=b.call(arguments,1),n=function(){if(this instanceof n){var s=function(){};s.prototype=e.prototype;var o=new s,r=e.apply(o,i.concat(b.call(arguments)));return Object(r)===r?r:o}return e.apply(t,i.concat(b.call(arguments)))};return n}),v.csstransforms=function(){return!!a("transform")},v.csstransforms3d=function(){var t=!!a("perspective");return t&&"webkitPerspective"in p.style&&T("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",(function(e){t=9===e.offsetLeft&&3===e.offsetHeight})),t},v.csstransitions=function(){return a("transition")},v)h(v,S)&&(l=S.toLowerCase(),u[l]=v[S](),C.push((u[l]?"":"no-")+l));return u.addTest=function(t,e){if("object"==typeof t)for(var n in t)h(t,n)&&u.addTest(n,t[n]);else{if(t=t.toLowerCase(),u[t]!==i)return u;e="function"==typeof e?e():e,p.className+=" "+(e?"":"no-")+t,u[t]=e}return u},function(t){f.cssText=t}(""),c=null,u._version="2.6.2",u._prefixes=m,u._domPrefixes=g,u._cssomPrefixes=_,u.testProp=function(t){return o([t])},u.testAllProps=a,u.testStyles=T,u.prefixed=function(t,e,i){return e?a(t,e,i):a(t,"pfx")},p.className=p.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+" js "+C.join(" "),u}(0,this.document),function(t){"function"==typeof define&&define.amd?define(["jquery","modernizr"],t):"object"==typeof exports?module.exports=t(require("jquery"),window.Modernizr):window.Shuffle=t(window.jQuery,window.Modernizr)}((function(t,e,i){"use strict";function n(t,e,i){for(var n=0,s=t.length;s>n;n++)if(e.call(i,t[n],n,t)==={})return}function s(e,i,n){return setTimeout(t.proxy(e,i),n)}function o(t){return Math.max.apply(Math,t)}function r(e){return t.isNumeric(e)?e:0}if("object"!=typeof e)throw new Error("Shuffle.js requires Modernizr.\nhttp://vestride.github.io/Shuffle/#dependencies");var a=e.prefixed("transition"),l=e.prefixed("transitionDelay"),h=e.prefixed("transitionDuration"),u={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[a],p=e.prefixed("transform"),d=function(t){return t?t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()})).replace(/^ms-/,"-ms-"):""}(p),c=e.csstransforms&&e.csstransitions,f=e.csstransforms3d,m=!!window.getComputedStyle,y="shuffle",_="all",g=.001,v=window.getComputedStyle||function(){},C=function(t,e){this.x=r(t),this.y=r(e)};C.equals=function(t,e){return t.x===e.x&&t.y===e.y};var b=function(){if(!m)return!1;var t=document.body||document.documentElement,e=document.createElement("div");e.style.cssText="width:10px;padding:2px;-webkit-box-sizing:border-box;box-sizing:border-box;",t.appendChild(e);var i="10px"===v(e,null).width;return t.removeChild(e),i}(),T=0,E=t(window),S=function(e,i){i=i||{},t.extend(this,S.options,i,S.settings),this.$el=t(e),this.element=e,this.unique="shuffle_"+T++,this._fire(S.EventType.LOADING),this._init(),s((function(){this.initialized=!0,this._fire(S.EventType.DONE)}),this,16)};return S.EventType={LOADING:"loading",DONE:"done",LAYOUT:"layout",REMOVED:"removed"},S.ClassName={BASE:y,SHUFFLE_ITEM:"shuffle-item",FILTERED:"filtered",CONCEALED:"concealed"},S.options={group:_,speed:250,easing:"ease-out",itemSelector:"",sizer:null,gutterWidth:0,columnWidth:0,delimeter:null,buffer:0,columnThreshold:m?.01:.1,initialSort:null,throttle:function(e,i,n){var s,o,r,a=null,l=0;n=n||{};var h=function(){l=!1===n.leading?0:t.now(),a=null,r=e.apply(s,o),s=o=null};return function(){var u=t.now();l||!1!==n.leading||(l=u);var p=i-(u-l);return s=this,o=arguments,0>=p||p>i?(clearTimeout(a),a=null,l=u,r=e.apply(s,o),s=o=null):a||!1===n.trailing||(a=setTimeout(h,p)),r}},throttleTime:300,sequentialFadeDelay:150,supported:c},S.settings={useSizer:!1,itemCss:{position:"absolute",top:0,left:0,visibility:"visible"},revealAppendedDelay:300,lastSort:{},lastFilter:_,enabled:!0,destroyed:!1,initialized:!1,_animations:[],_transitions:[],_isMovementCanceled:!1,styleQueue:[]},S.Point=C,S._getItemTransformString=function(t,e){return f?"translate3d("+t.x+"px, "+t.y+"px, 0) scale3d("+e+", "+e+", 1)":"translate("+t.x+"px, "+t.y+"px) scale("+e+")"},S._getNumberStyle=function(e,i,n){if(m){n=n||v(e,null);var s=S._getFloat(n[i]);return b||"width"!==i?b||"height"!==i||(s+=S._getFloat(n.paddingTop)+S._getFloat(n.paddingBottom)+S._getFloat(n.borderTopWidth)+S._getFloat(n.borderBottomWidth)):s+=S._getFloat(n.paddingLeft)+S._getFloat(n.paddingRight)+S._getFloat(n.borderLeftWidth)+S._getFloat(n.borderRightWidth),s}return S._getFloat(t(e).css(i))},S._getFloat=function(t){return r(parseFloat(t))},S._getOuterWidth=function(t,e){var i=v(t,null),n=S._getNumberStyle(t,"width",i);e&&(n+=S._getNumberStyle(t,"marginLeft",i)+S._getNumberStyle(t,"marginRight",i));return n},S._getOuterHeight=function(t,e){var i=v(t,null),n=S._getNumberStyle(t,"height",i);e&&(n+=S._getNumberStyle(t,"marginTop",i)+S._getNumberStyle(t,"marginBottom",i));return n},S._skipTransition=function(t,e,i){var n=t.style[h];t.style[h]="0ms",e.call(i);t.offsetWidth;t.style[h]=n},S.prototype._init=function(){this.$items=this._getItems(),this.sizer=this._getElementOption(this.sizer),this.sizer&&(this.useSizer=!0),this.$el.addClass(S.ClassName.BASE),this._initItems(),E.on("resize."+y+"."+this.unique,this._getResizeFunction());var t=this.$el.css(["position","overflow"]),e=S._getOuterWidth(this.element);this._validateStyles(t),this._setColumns(e),this.shuffle(this.group,this.initialSort),this.supported&&s((function(){this._setTransitions(),this.element.style[a]="height "+this.speed+"ms "+this.easing}),this)},S.prototype._getResizeFunction=function(){var e=t.proxy(this._onResize,this);return this.throttle?this.throttle(e,this.throttleTime):e},S.prototype._getElementOption=function(t){return"string"==typeof t?this.$el.find(t)[0]||null:t&&t.nodeType&&1===t.nodeType?t:t&&t.jquery?t[0]:null},S.prototype._validateStyles=function(t){"static"===t.position&&(this.element.style.position="relative"),"hidden"!==t.overflow&&(this.element.style.overflow="hidden")},S.prototype._filter=function(t,e){t=t||this.lastFilter,e=e||this.$items;var i=this._getFilteredSets(t,e);return this._toggleFilterClasses(i.filtered,i.concealed),this.lastFilter=t,"string"==typeof t&&(this.group=t),i.filtered},S.prototype._getFilteredSets=function(e,i){var s=t(),o=t();return e===_?s=i:n(i,(function(i){var n=t(i);this._doesPassFilter(e,n)?s=s.add(n):o=o.add(n)}),this),{filtered:s,concealed:o}},S.prototype._doesPassFilter=function(e,i){if(t.isFunction(e))return e.call(i[0],i,this);var n=i.data("groups"),s=this.delimeter&&!t.isArray(n)?n.split(this.delimeter):n;return t.inArray(e,s)>-1},S.prototype._toggleFilterClasses=function(t,e){t.removeClass(S.ClassName.CONCEALED).addClass(S.ClassName.FILTERED),e.removeClass(S.ClassName.FILTERED).addClass(S.ClassName.CONCEALED)},S.prototype._initItems=function(t){(t=t||this.$items).addClass([S.ClassName.SHUFFLE_ITEM,S.ClassName.FILTERED].join(" ")),t.css(this.itemCss).data("point",new C).data("scale",1)},S.prototype._updateItemCount=function(){this.visibleItems=this._getFilteredItems().length},S.prototype._setTransition=function(t){t.style[a]=d+" "+this.speed+"ms "+this.easing+", opacity "+this.speed+"ms "+this.easing},S.prototype._setTransitions=function(t){n(t=t||this.$items,(function(t){this._setTransition(t)}),this)},S.prototype._setSequentialDelay=function(t){this.supported&&n(t,(function(t,e){t.style[l]="0ms,"+(e+1)*this.sequentialFadeDelay+"ms"}),this)},S.prototype._getItems=function(){return this.$el.children(this.itemSelector)},S.prototype._getFilteredItems=function(){return this.$items.filter("."+S.ClassName.FILTERED)},S.prototype._getConcealedItems=function(){return this.$items.filter("."+S.ClassName.CONCEALED)},S.prototype._getColumnSize=function(e,i){var n;return 0===(n=t.isFunction(this.columnWidth)?this.columnWidth(e):this.useSizer?S._getOuterWidth(this.sizer):this.columnWidth?this.columnWidth:this.$items.length>0?S._getOuterWidth(this.$items[0],!0):e)&&(n=e),n+i},S.prototype._getGutterSize=function(e){return t.isFunction(this.gutterWidth)?this.gutterWidth(e):this.useSizer?S._getNumberStyle(this.sizer,"marginLeft"):this.gutterWidth},S.prototype._setColumns=function(t){var e=t||S._getOuterWidth(this.element),i=this._getGutterSize(e),n=this._getColumnSize(e,i),s=(e+i)/n;Math.abs(Math.round(s)-s)<this.columnThreshold&&(s=Math.round(s)),this.cols=Math.max(Math.floor(s),1),this.containerWidth=e,this.colWidth=n},S.prototype._setContainerSize=function(){this.$el.css("height",this._getContainerSize())},S.prototype._getContainerSize=function(){return o(this.positions)},S.prototype._fire=function(t,e){this.$el.trigger(t+"."+y,e&&e.length?e:[this])},S.prototype._resetCols=function(){var t=this.cols;for(this.positions=[];t--;)this.positions.push(0)},S.prototype._layout=function(t,e){n(t,(function(t){this._layoutItem(t,!!e)}),this),this._processStyleQueue(),this._setContainerSize()},S.prototype._layoutItem=function(e,i){var n=t(e),s=n.data(),o=s.point,r=s.scale,a={width:S._getOuterWidth(e,!0),height:S._getOuterHeight(e,!0)},l=this._getItemPosition(a);C.equals(o,l)&&1===r||(s.point=l,s.scale=1,this.styleQueue.push({$item:n,point:l,scale:1,opacity:i?0:1,skipTransition:i||0===this.speed,callfront:function(){i||n.css("visibility","visible")},callback:function(){i&&n.css("visibility","hidden")}}))},S.prototype._getItemPosition=function(t){for(var e=this._getColumnSpan(t.width,this.colWidth,this.cols),i=this._getColumnSet(e,this.cols),n=this._getShortColumn(i,this.buffer),s=new C(Math.round(this.colWidth*n),Math.round(i[n])),o=i[n]+t.height,r=this.cols+1-i.length,a=0;r>a;a++)this.positions[n+a]=o;return s},S.prototype._getColumnSpan=function(t,e,i){var n=t/e;return Math.abs(Math.round(n)-n)<this.columnThreshold&&(n=Math.round(n)),Math.min(Math.ceil(n),i)},S.prototype._getColumnSet=function(t,e){if(1===t)return this.positions;for(var i=e+1-t,n=[],s=0;i>s;s++)n[s]=o(this.positions.slice(s,s+t));return n},S.prototype._getShortColumn=function(t,e){for(var i=function(t){return Math.min.apply(Math,t)}(t),n=0,s=t.length;s>n;n++)if(t[n]>=i-e&&t[n]<=i+e)return n;return 0},S.prototype._shrink=function(e){n(e||this._getConcealedItems(),(function(e){var i=t(e),n=i.data();n.scale!==g&&(n.scale=g,this.styleQueue.push({$item:i,point:n.point,scale:g,opacity:0,callback:function(){i.css("visibility","hidden")}}))}),this)},S.prototype._onResize=function(){this.enabled&&!this.destroyed&&(S._getOuterWidth(this.element)!==this.containerWidth&&this.update())},S.prototype._getStylesForTransition=function(t){var e={opacity:t.opacity};return this.supported?e[p]=S._getItemTransformString(t.point,t.scale):(e.left=t.point.x,e.top=t.point.y),e},S.prototype._transition=function(e){var i=this._getStylesForTransition(e);this._startItemAnimation(e.$item,i,e.callfront||t.noop,e.callback||t.noop)},S.prototype._startItemAnimation=function(e,i,n,s){function o(e){e.target===e.currentTarget&&(t(e.target).off(u,o),r._removeTransitionReference(a),s())}var r=this,a={$element:e,handler:o};if(n(),!this.initialized)return e.css(i),void s();if(this.supported)e.css(i),e.on(u,o),this._transitions.push(a);else{var l=e.stop(!0).animate(i,this.speed,"swing",s);this._animations.push(l.promise())}},S.prototype._processStyleQueue=function(e){this.isTransitioning&&this._cancelMovement();var i=t();n(this.styleQueue,(function(t){t.skipTransition?this._styleImmediately(t):(i=i.add(t.$item),this._transition(t))}),this),i.length>0&&this.initialized&&this.speed>0?(this.isTransitioning=!0,this.supported?this._whenCollectionDone(i,u,this._movementFinished):this._whenAnimationsDone(this._movementFinished)):e||s(this._layoutEnd,this),this.styleQueue.length=0},S.prototype._cancelMovement=function(){this.supported?n(this._transitions,(function(t){t.$element.off(u,t.handler)})):(this._isMovementCanceled=!0,this.$items.stop(!0),this._isMovementCanceled=!1),this._transitions.length=0,this.isTransitioning=!1},S.prototype._removeTransitionReference=function(e){var i=t.inArray(e,this._transitions);i>-1&&this._transitions.splice(i,1)},S.prototype._styleImmediately=function(t){S._skipTransition(t.$item[0],(function(){t.$item.css(this._getStylesForTransition(t))}),this)},S.prototype._movementFinished=function(){this.isTransitioning=!1,this._layoutEnd()},S.prototype._layoutEnd=function(){this._fire(S.EventType.LAYOUT)},S.prototype._addItems=function(t,e,i){this._initItems(t),this._setTransitions(t),this.$items=this._getItems(),this._shrink(t),n(this.styleQueue,(function(t){t.skipTransition=!0})),this._processStyleQueue(!0),e?this._addItemsToEnd(t,i):this.shuffle(this.lastFilter)},S.prototype._addItemsToEnd=function(t,e){var i=this._filter(null,t).get();this._updateItemCount(),this._layout(i,!0),e&&this.supported&&this._setSequentialDelay(i),this._revealAppended(i)},S.prototype._revealAppended=function(e){s((function(){n(e,(function(e){var i=t(e);this._transition({$item:i,opacity:1,point:i.data("point"),scale:1})}),this),this._whenCollectionDone(t(e),u,(function(){t(e).css(l,"0ms"),this._movementFinished()}))}),this,this.revealAppendedDelay)},S.prototype._whenCollectionDone=function(e,i,n){function s(e){e.target===e.currentTarget&&(t(e.target).off(i,s),++o===r&&(a._removeTransitionReference(l),n.call(a)))}var o=0,r=e.length,a=this,l={$element:e,handler:s};e.on(i,s),this._transitions.push(l)},S.prototype._whenAnimationsDone=function(e){t.when.apply(null,this._animations).always(t.proxy((function(){this._animations.length=0,this._isMovementCanceled||e.call(this)}),this))},S.prototype.shuffle=function(t,e){this.enabled&&(t||(t=_),this._filter(t),this._updateItemCount(),this._shrink(),this.sort(e))},S.prototype.sort=function(t){if(this.enabled){this._resetCols();var e=t||this.lastSort,i=this._getFilteredItems().sorted(e);this._layout(i),this.lastSort=e}},S.prototype.update=function(t){this.enabled&&(t||this._setColumns(),this.sort())},S.prototype.layout=function(){this.update(!0)},S.prototype.appended=function(t,e,i){this._addItems(t,!0===e,!1!==i)},S.prototype.disable=function(){this.enabled=!1},S.prototype.enable=function(t){this.enabled=!0,!1!==t&&this.update()},S.prototype.remove=function(e){e.length&&e.jquery&&(this._toggleFilterClasses(t(),e),this._shrink(e),this.sort(),this.$el.one(S.EventType.LAYOUT+"."+y,t.proxy((function(){e.remove(),this.$items=this._getItems(),this._updateItemCount(),this._fire(S.EventType.REMOVED,[e,this]),e=null}),this)))},S.prototype.destroy=function(){E.off("."+this.unique),this.$el.removeClass(y).removeAttr("style").removeData(y),this.$items.removeAttr("style").removeData("point").removeData("scale").removeClass([S.ClassName.CONCEALED,S.ClassName.FILTERED,S.ClassName.SHUFFLE_ITEM].join(" ")),this.$items=null,this.$el=null,this.sizer=null,this.element=null,this._transitions=null,this.destroyed=!0},t.fn.shuffle=function(e){var i=Array.prototype.slice.call(arguments,1);return this.each((function(){var n=t(this),s=n.data(y);s?"string"==typeof e&&s[e]&&s[e].apply(s,i):(s=new S(this,e),n.data(y,s))}))},t.fn.sorted=function(e){var n=t.extend({},t.fn.sorted.defaults,e),s=this.get(),o=!1;return s.length?n.randomize?function(t){var e,i,n=t.length;if(!n)return t;for(;--n;)e=t[i=Math.floor(Math.random()*(n+1))],t[i]=t[n],t[n]=e;return t}(s):(t.isFunction(n.by)&&s.sort((function(e,s){if(o)return 0;var r=n.by(t(e)),a=n.by(t(s));return r===i&&a===i?(o=!0,0):a>r||"sortFirst"===r||"sortLast"===a?-1:r>a||"sortLast"===r||"sortFirst"===a?1:0})),o?this.get():(n.reverse&&s.reverse(),s)):[]},t.fn.sorted.defaults={reverse:!1,by:null,randomize:!1},S}));
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка