rails-uikit-sass 2.27.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +43 -0
- data/lib/assets/stylesheets/rails-uikit-sass.scss +3 -0
- data/lib/rails-uikit-sass.rb +12 -0
- data/vendor/assets/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/javascripts/components/accordion.js +180 -0
- data/vendor/assets/javascripts/components/accordion.min.js +2 -0
- data/vendor/assets/javascripts/components/autocomplete.js +340 -0
- data/vendor/assets/javascripts/components/autocomplete.min.js +2 -0
- data/vendor/assets/javascripts/components/datepicker.js +3167 -0
- data/vendor/assets/javascripts/components/datepicker.min.js +3 -0
- data/vendor/assets/javascripts/components/form-password.js +67 -0
- data/vendor/assets/javascripts/components/form-password.min.js +2 -0
- data/vendor/assets/javascripts/components/form-select.js +85 -0
- data/vendor/assets/javascripts/components/form-select.min.js +2 -0
- data/vendor/assets/javascripts/components/grid-parallax.js +168 -0
- data/vendor/assets/javascripts/components/grid-parallax.min.js +2 -0
- data/vendor/assets/javascripts/components/grid.js +540 -0
- data/vendor/assets/javascripts/components/grid.min.js +2 -0
- data/vendor/assets/javascripts/components/htmleditor.js +679 -0
- data/vendor/assets/javascripts/components/htmleditor.min.js +2 -0
- data/vendor/assets/javascripts/components/lightbox.js +588 -0
- data/vendor/assets/javascripts/components/lightbox.min.js +2 -0
- data/vendor/assets/javascripts/components/nestable.js +653 -0
- data/vendor/assets/javascripts/components/nestable.min.js +2 -0
- data/vendor/assets/javascripts/components/notify.js +189 -0
- data/vendor/assets/javascripts/components/notify.min.js +2 -0
- data/vendor/assets/javascripts/components/pagination.js +147 -0
- data/vendor/assets/javascripts/components/pagination.min.js +2 -0
- data/vendor/assets/javascripts/components/parallax.js +462 -0
- data/vendor/assets/javascripts/components/parallax.min.js +2 -0
- data/vendor/assets/javascripts/components/search.js +92 -0
- data/vendor/assets/javascripts/components/search.min.js +2 -0
- data/vendor/assets/javascripts/components/slider.js +552 -0
- data/vendor/assets/javascripts/components/slider.min.js +2 -0
- data/vendor/assets/javascripts/components/slideset.js +523 -0
- data/vendor/assets/javascripts/components/slideset.min.js +2 -0
- data/vendor/assets/javascripts/components/slideshow-fx.js +382 -0
- data/vendor/assets/javascripts/components/slideshow-fx.min.js +2 -0
- data/vendor/assets/javascripts/components/slideshow.js +596 -0
- data/vendor/assets/javascripts/components/slideshow.min.js +2 -0
- data/vendor/assets/javascripts/components/sortable.js +688 -0
- data/vendor/assets/javascripts/components/sortable.min.js +2 -0
- data/vendor/assets/javascripts/components/sticky.js +364 -0
- data/vendor/assets/javascripts/components/sticky.min.js +2 -0
- data/vendor/assets/javascripts/components/timepicker.js +192 -0
- data/vendor/assets/javascripts/components/timepicker.min.js +2 -0
- data/vendor/assets/javascripts/components/tooltip.js +235 -0
- data/vendor/assets/javascripts/components/tooltip.min.js +2 -0
- data/vendor/assets/javascripts/components/upload.js +262 -0
- data/vendor/assets/javascripts/components/upload.min.js +2 -0
- data/vendor/assets/javascripts/core/alert.js +66 -0
- data/vendor/assets/javascripts/core/alert.min.js +2 -0
- data/vendor/assets/javascripts/core/button.js +156 -0
- data/vendor/assets/javascripts/core/button.min.js +2 -0
- data/vendor/assets/javascripts/core/core.js +820 -0
- data/vendor/assets/javascripts/core/core.min.js +2 -0
- data/vendor/assets/javascripts/core/cover.js +87 -0
- data/vendor/assets/javascripts/core/cover.min.js +2 -0
- data/vendor/assets/javascripts/core/dropdown.js +534 -0
- data/vendor/assets/javascripts/core/dropdown.min.js +2 -0
- data/vendor/assets/javascripts/core/grid.js +117 -0
- data/vendor/assets/javascripts/core/grid.min.js +2 -0
- data/vendor/assets/javascripts/core/modal.js +387 -0
- data/vendor/assets/javascripts/core/modal.min.js +2 -0
- data/vendor/assets/javascripts/core/nav.js +153 -0
- data/vendor/assets/javascripts/core/nav.min.js +2 -0
- data/vendor/assets/javascripts/core/offcanvas.js +197 -0
- data/vendor/assets/javascripts/core/offcanvas.min.js +2 -0
- data/vendor/assets/javascripts/core/scrollspy.js +209 -0
- data/vendor/assets/javascripts/core/scrollspy.min.js +2 -0
- data/vendor/assets/javascripts/core/smooth-scroll.js +62 -0
- data/vendor/assets/javascripts/core/smooth-scroll.min.js +2 -0
- data/vendor/assets/javascripts/core/switcher.js +307 -0
- data/vendor/assets/javascripts/core/switcher.min.js +2 -0
- data/vendor/assets/javascripts/core/tab.js +169 -0
- data/vendor/assets/javascripts/core/tab.min.js +2 -0
- data/vendor/assets/javascripts/core/toggle.js +124 -0
- data/vendor/assets/javascripts/core/toggle.min.js +2 -0
- data/vendor/assets/javascripts/core/touch.js +175 -0
- data/vendor/assets/javascripts/core/touch.min.js +2 -0
- data/vendor/assets/javascripts/core/utility.js +335 -0
- data/vendor/assets/javascripts/core/utility.min.js +2 -0
- data/vendor/assets/javascripts/uikit.js +3898 -0
- data/vendor/assets/javascripts/uikit.min.js +3 -0
- data/vendor/assets/stylesheets/components/accordion.scss +94 -0
- data/vendor/assets/stylesheets/components/autocomplete.scss +107 -0
- data/vendor/assets/stylesheets/components/datepicker.scss +197 -0
- data/vendor/assets/stylesheets/components/dotnav.scss +212 -0
- data/vendor/assets/stylesheets/components/form-advanced.scss +128 -0
- data/vendor/assets/stylesheets/components/form-file.scss +63 -0
- data/vendor/assets/stylesheets/components/form-password.scss +74 -0
- data/vendor/assets/stylesheets/components/form-select.scss +66 -0
- data/vendor/assets/stylesheets/components/htmleditor.scss +269 -0
- data/vendor/assets/stylesheets/components/nestable.scss +231 -0
- data/vendor/assets/stylesheets/components/notify.scss +190 -0
- data/vendor/assets/stylesheets/components/placeholder.scss +66 -0
- data/vendor/assets/stylesheets/components/progress.scss +173 -0
- data/vendor/assets/stylesheets/components/search.scss +309 -0
- data/vendor/assets/stylesheets/components/slidenav.scss +183 -0
- data/vendor/assets/stylesheets/components/slider.scss +139 -0
- data/vendor/assets/stylesheets/components/slideshow.scss +208 -0
- data/vendor/assets/stylesheets/components/sortable.scss +124 -0
- data/vendor/assets/stylesheets/components/sticky.scss +57 -0
- data/vendor/assets/stylesheets/components/tooltip.scss +178 -0
- data/vendor/assets/stylesheets/components/upload.scss +34 -0
- data/vendor/assets/stylesheets/core/alert.scss +141 -0
- data/vendor/assets/stylesheets/core/animation.scss +599 -0
- data/vendor/assets/stylesheets/core/article.scss +139 -0
- data/vendor/assets/stylesheets/core/badge.scss +110 -0
- data/vendor/assets/stylesheets/core/base.scss +563 -0
- data/vendor/assets/stylesheets/core/block.scss +155 -0
- data/vendor/assets/stylesheets/core/breadcrumb.scss +86 -0
- data/vendor/assets/stylesheets/core/button.scss +406 -0
- data/vendor/assets/stylesheets/core/close.scss +132 -0
- data/vendor/assets/stylesheets/core/column.scss +209 -0
- data/vendor/assets/stylesheets/core/comment.scss +172 -0
- data/vendor/assets/stylesheets/core/contrast.scss +493 -0
- data/vendor/assets/stylesheets/core/cover.scss +70 -0
- data/vendor/assets/stylesheets/core/description-list.scss +71 -0
- data/vendor/assets/stylesheets/core/dropdown.scss +283 -0
- data/vendor/assets/stylesheets/core/flex.scss +320 -0
- data/vendor/assets/stylesheets/core/form.scss +629 -0
- data/vendor/assets/stylesheets/core/grid.scss +731 -0
- data/vendor/assets/stylesheets/core/icon.scss +930 -0
- data/vendor/assets/stylesheets/core/list.scss +102 -0
- data/vendor/assets/stylesheets/core/modal.scss +343 -0
- data/vendor/assets/stylesheets/core/nav.scss +468 -0
- data/vendor/assets/stylesheets/core/navbar.scss +325 -0
- data/vendor/assets/stylesheets/core/offcanvas.scss +203 -0
- data/vendor/assets/stylesheets/core/overlay.scss +534 -0
- data/vendor/assets/stylesheets/core/pagination.scss +197 -0
- data/vendor/assets/stylesheets/core/panel.scss +332 -0
- data/vendor/assets/stylesheets/core/print.scss +61 -0
- data/vendor/assets/stylesheets/core/subnav.scss +213 -0
- data/vendor/assets/stylesheets/core/switcher.scss +38 -0
- data/vendor/assets/stylesheets/core/tab.scss +368 -0
- data/vendor/assets/stylesheets/core/table.scss +147 -0
- data/vendor/assets/stylesheets/core/text.scss +136 -0
- data/vendor/assets/stylesheets/core/thumbnail.scss +122 -0
- data/vendor/assets/stylesheets/core/thumbnav.scss +122 -0
- data/vendor/assets/stylesheets/core/utility.scss +610 -0
- data/vendor/assets/stylesheets/core/variables.scss +23 -0
- data/vendor/assets/stylesheets/uikit-mixins.scss +327 -0
- data/vendor/assets/stylesheets/uikit-variables.scss +819 -0
- data/vendor/assets/stylesheets/uikit.scss +52 -0
- metadata +251 -0
@@ -0,0 +1,3 @@
|
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-datepicker",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e,n,a=!1;return t.component("datepicker",{defaults:{mobile:!1,weekstart:1,i18n:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},format:"YYYY-MM-DD",offsettop:5,maxDate:!1,minDate:!1,pos:"auto",template:function(e,n){var a,s="";if(s+='<div class="uk-datepicker-nav">',s+='<a href="" class="uk-datepicker-previous"></a>',s+='<a href="" class="uk-datepicker-next"></a>',t.formSelect){var i,r,o,u,c=(new Date).getFullYear(),d=[];for(a=0;a<n.i18n.months.length;a++)a==e.month?d.push('<option value="'+a+'" selected>'+n.i18n.months[a]+"</option>"):d.push('<option value="'+a+'">'+n.i18n.months[a]+"</option>");for(i='<span class="uk-form-select">'+n.i18n.months[e.month]+'<select class="update-picker-month">'+d.join("")+"</select></span>",d=[],o=e.minDate?e.minDate.year():c-50,u=e.maxDate?e.maxDate.year():c+20,a=o;u>=a;a++)a==e.year?d.push('<option value="'+a+'" selected>'+a+"</option>"):d.push('<option value="'+a+'">'+a+"</option>");r='<span class="uk-form-select">'+e.year+'<select class="update-picker-year">'+d.join("")+"</select></span>",s+='<div class="uk-datepicker-heading">'+i+" "+r+"</div>"}else s+='<div class="uk-datepicker-heading">'+n.i18n.months[e.month]+" "+e.year+"</div>";for(s+="</div>",s+='<table class="uk-datepicker-table">',s+="<thead>",a=0;a<e.weekdays.length;a++)e.weekdays[a]&&(s+="<th>"+e.weekdays[a]+"</th>");for(s+="</thead>",s+="<tbody>",a=0;a<e.days.length;a++)if(e.days[a]&&e.days[a].length){s+="<tr>";for(var l=0;l<e.days[a].length;l++)if(e.days[a][l]){var h=e.days[a][l],f=[];h.inmonth||f.push("uk-datepicker-table-muted"),h.selected&&f.push("uk-active"),h.disabled&&f.push("uk-datepicker-date-disabled uk-datepicker-table-muted"),s+='<td><a href="" class="'+f.join(" ")+'" data-date="'+h.day.format()+'">'+h.day.format("D")+"</a></td>"}s+="</tr>"}return s+="</tbody>",s+="</table>"}},boot:function(){t.$win.on("resize orientationchange",function(){a&&a.hide()}),t.$html.on("focus.datepicker.uikit","[data-uk-datepicker]",function(e){var n=t.$(this);n.data("datepicker")||(e.preventDefault(),t.datepicker(n,t.Utils.options(n.attr("data-uk-datepicker"))),n.trigger("focus"))}),t.$html.on("click focus","*",function(n){var s=t.$(n.target);!a||s[0]==e[0]||s.data("datepicker")||s.parents(".uk-datepicker:first").length||a.hide()})},init:function(){if(!t.support.touch||"date"!=this.element.attr("type")||this.options.mobile){var s=this;this.current=this.element.val()?n(this.element.val(),this.options.format):n(),this.on("click focus",function(){a!==s&&s.pick(this.value?this.value:"")}).on("change",function(){s.element.val()&&!n(s.element.val(),s.options.format).isValid()&&s.element.val(n().format(s.options.format))}),e||(e=t.$('<div class="uk-dropdown uk-datepicker"></div>'),e.on("click",".uk-datepicker-next, .uk-datepicker-previous, [data-date]",function(e){e.stopPropagation(),e.preventDefault();var s=t.$(this);return s.hasClass("uk-datepicker-date-disabled")?!1:(s.is("[data-date]")?(a.current=n(s.data("date")),a.element.val(a.current.isValid()?a.current.format(a.options.format):null).trigger("change"),a.hide()):a.add(s.hasClass("uk-datepicker-next")?1:-1,"months"),void 0)}),e.on("change",".update-picker-month, .update-picker-year",function(){var e=t.$(this);a[e.is(".update-picker-year")?"setYear":"setMonth"](Number(e.val()))}),e.appendTo("body"))}},pick:function(s){var i=this.element.offset(),r={left:i.left,right:""};this.current=isNaN(s)?n(s,this.options.format):n(),this.initdate=this.current.format("YYYY-MM-DD"),this.update(),"right"==t.langdirection&&(r.right=window.innerWidth-(r.left+this.element.outerWidth()),r.left="");var o=i.top-this.element.outerHeight()+this.element.height()-this.options.offsettop-e.outerHeight(),u=i.top+this.element.outerHeight()+this.options.offsettop;r.top=u,"top"==this.options.pos?r.top=o:"auto"==this.options.pos&&window.innerHeight-u-e.outerHeight()<0&&o>=0&&(r.top=o),e.css(r).show(),this.trigger("show.uk.datepicker"),a=this},add:function(t,e){this.current.add(t,e),this.update()},setMonth:function(t){this.current.month(t),this.update()},setYear:function(t){this.current.year(t),this.update()},update:function(){var t=this.getRows(this.current.year(),this.current.month()),n=this.options.template(t,this.options);e.html(n),this.trigger("update.uk.datepicker")},getRows:function(t,e){var a=this.options,s=n().format("YYYY-MM-DD"),i=[31,t%4===0&&t%100!==0||t%400===0?29:28,31,30,31,30,31,31,30,31,30,31][e],r=new Date(t,e,1,12).getDay(),o={month:e,year:t,weekdays:[],days:[],maxDate:!1,minDate:!1},u=[];a.maxDate!==!1&&(o.maxDate=isNaN(a.maxDate)?n(a.maxDate,a.format).startOf("day").hours(12):n().add(a.maxDate,"days").startOf("day").hours(12)),a.minDate!==!1&&(o.minDate=isNaN(a.minDate)?n(a.minDate,a.format).startOf("day").hours(12):n().add(a.minDate-1,"days").startOf("day").hours(12)),o.weekdays=function(){for(var t=0,e=[];7>t;t++){for(var n=t+(a.weekstart||0);n>=7;)n-=7;e.push(a.i18n.weekdays[n])}return e}(),a.weekstart&&a.weekstart>0&&(r-=a.weekstart,0>r&&(r+=7));for(var c=i+r,d=c;d>7;)d-=7;c+=7-d;for(var l,h,f,m,_,p=0,y=0;c>p;p++)l=new Date(t,e,1+(p-r),12),h=o.minDate&&o.minDate>l||o.maxDate&&l>o.maxDate,_=!(r>p||p>=i+r),l=n(l),f=this.initdate==l.format("YYYY-MM-DD"),m=s==l.format("YYYY-MM-DD"),u.push({selected:f,today:m,disabled:h,day:l,inmonth:_}),7===++y&&(o.days.push(u),u=[],y=0);return o},hide:function(){a&&a===this&&(e.hide(),a=!1,this.trigger("hide.uk.datepicker"))}}),n=function(t){function e(t,e,n){switch(arguments.length){case 2:return null!=t?t:e;case 3:return null!=t?t:null!=e?e:n;default:throw new Error("Implement me")}}function n(t,e){return Ye.call(t,e)}function a(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function s(t){De.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function i(t,e){var n=!0;return h(function(){return n&&(s(t),n=!1),e.apply(this,arguments)},e)}function r(t,e){mn[t]||(s(e),mn[t]=!0)}function o(t,e){return function(n){return _(t.call(this,n),e)}}function u(t,e){return function(n){return this.localeData().ordinal(t.call(this,n),e)}}function c(){}function d(t,e){e!==!1&&F(t),f(this,t),this._d=new Date(+t._d)}function l(t){var e=v(t),n=e.year||0,a=e.quarter||0,s=e.month||0,i=e.week||0,r=e.day||0,o=e.hour||0,u=e.minute||0,c=e.second||0,d=e.millisecond||0;this._milliseconds=+d+1e3*c+6e4*u+36e5*o,this._days=+r+7*i,this._months=+s+3*a+12*n,this._data={},this._locale=De.localeData(),this._bubble()}function h(t,e){for(var a in e)n(e,a)&&(t[a]=e[a]);return n(e,"toString")&&(t.toString=e.toString),n(e,"valueOf")&&(t.valueOf=e.valueOf),t}function f(t,e){var n,a,s;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=e._pf),"undefined"!=typeof e._locale&&(t._locale=e._locale),Fe.length>0)for(n in Fe)a=Fe[n],s=e[a],"undefined"!=typeof s&&(t[a]=s);return t}function m(t){return 0>t?Math.ceil(t):Math.floor(t)}function _(t,e,n){for(var a=""+Math.abs(t),s=t>=0;a.length<e;)a="0"+a;return(s?n?"+":"":"-")+a}function p(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function y(t,e){var n;return e=I(e,t),t.isBefore(e)?n=p(t,e):(n=p(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function D(t,e){return function(n,a){var s,i;return null===a||isNaN(+a)||(r(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),i=n,n=a,a=i),n="string"==typeof n?+n:n,s=De.duration(n,a),g(this,s,t),this}}function g(t,e,n,a){var s=e._milliseconds,i=e._days,r=e._months;a=null==a?!0:a,s&&t._d.setTime(+t._d+s*n),i&&fe(t,"Date",he(t,"Date")+i*n),r&&le(t,he(t,"Month")+r*n),a&&De.updateOffset(t,i||r)}function k(t){return"[object Array]"===Object.prototype.toString.call(t)}function M(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function Y(t,e,n){var a,s=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),r=0;for(a=0;s>a;a++)(n&&t[a]!==e[a]||!n&&S(t[a])!==S(e[a]))&&r++;return r+i}function w(t){if(t){var e=t.toLowerCase().replace(/(.)s$/,"$1");t=on[t]||un[e]||e}return t}function v(t){var e,a,s={};for(a in t)n(t,a)&&(e=w(a),e&&(s[e]=t[a]));return s}function b(e){var n,a;if(0===e.indexOf("week"))n=7,a="day";else{if(0!==e.indexOf("month"))return;n=12,a="month"}De[e]=function(s,i){var r,o,u=De._locale[e],c=[];if("number"==typeof s&&(i=s,s=t),o=function(t){var e=De().utc().set(a,t);return u.call(De._locale,e,s||"")},null!=i)return o(i);for(r=0;n>r;r++)c.push(o(r));return c}}function S(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function T(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function O(t,e,n){return oe(De([t,11,31+e-n]),e,n).week}function W(t){return U(t)?366:365}function U(t){return t%4===0&&t%100!==0||t%400===0}function F(t){var e;t._a&&-2===t._pf.overflow&&(e=t._a[ve]<0||t._a[ve]>11?ve:t._a[be]<1||t._a[be]>T(t._a[we],t._a[ve])?be:t._a[Se]<0||t._a[Se]>23?Se:t._a[Te]<0||t._a[Te]>59?Te:t._a[Oe]<0||t._a[Oe]>59?Oe:t._a[We]<0||t._a[We]>999?We:-1,t._pf._overflowDayOfYear&&(we>e||e>be)&&(e=be),t._pf.overflow=e)}function G(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length)),t._isValid}function C(t){return t?t.toLowerCase().replace("_","-"):t}function z(t){for(var e,n,a,s,i=0;i<t.length;){for(s=C(t[i]).split("-"),e=s.length,n=C(t[i+1]),n=n?n.split("-"):null;e>0;){if(a=x(s.slice(0,e).join("-")))return a;if(n&&n.length>=e&&Y(s,n,!0)>=e-1)break;e--}i++}return null}function x(t){var e=null;if(!Ue[t]&&Ge)try{e=De.locale(),require("./locale/"+t),De.locale(e)}catch(n){}return Ue[t]}function I(t,e){return e._isUTC?De(t).zone(e._offset||0):De(t).local()}function H(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function L(t){var e,n,a=t.match(Ie);for(e=0,n=a.length;n>e;e++)a[e]=fn[a[e]]?fn[a[e]]:H(a[e]);return function(s){var i="";for(e=0;n>e;e++)i+=a[e]instanceof Function?a[e].call(s,t):a[e];return i}}function P(t,e){return t.isValid()?(e=A(e,t.localeData()),cn[e]||(cn[e]=L(e)),cn[e](t)):t.localeData().invalidDate()}function A(t,e){function n(t){return e.longDateFormat(t)||t}var a=5;for(He.lastIndex=0;a>=0&&He.test(t);)t=t.replace(He,n),He.lastIndex=0,a-=1;return t}function N(t,e){var n,a=e._strict;switch(t){case"Q":return qe;case"DDDD":return Re;case"YYYY":case"GGGG":case"gggg":return a?Xe:Ae;case"Y":case"G":case"g":return Ke;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return a?Be:Ne;case"S":if(a)return qe;case"SS":if(a)return Qe;case"SSS":if(a)return Re;case"DDD":return Pe;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return je;case"a":case"A":return e._locale._meridiemParse;case"X":return Ve;case"Z":case"ZZ":return Ee;case"T":return $e;case"SSSS":return Ze;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return a?Qe:Le;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Le;case"Do":return Je;default:return n=new RegExp(R(Q(t.replace("\\","")),"i"))}}function Z(t){t=t||"";var e=t.match(Ee)||[],n=e[e.length-1]||[],a=(n+"").match(sn)||["-",0,0],s=+(60*a[1])+S(a[2]);return"+"===a[0]?-s:s}function j(t,e,n){var a,s=n._a;switch(t){case"Q":null!=e&&(s[ve]=3*(S(e)-1));break;case"M":case"MM":null!=e&&(s[ve]=S(e)-1);break;case"MMM":case"MMMM":a=n._locale.monthsParse(e),null!=a?s[ve]=a:n._pf.invalidMonth=e;break;case"D":case"DD":null!=e&&(s[be]=S(e));break;case"Do":null!=e&&(s[be]=S(parseInt(e,10)));break;case"DDD":case"DDDD":null!=e&&(n._dayOfYear=S(e));break;case"YY":s[we]=De.parseTwoDigitYear(e);break;case"YYYY":case"YYYYY":case"YYYYYY":s[we]=S(e);break;case"a":case"A":n._isPm=n._locale.isPM(e);break;case"H":case"HH":case"h":case"hh":s[Se]=S(e);break;case"m":case"mm":s[Te]=S(e);break;case"s":case"ss":s[Oe]=S(e);break;case"S":case"SS":case"SSS":case"SSSS":s[We]=S(1e3*("0."+e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=Z(e);break;case"dd":case"ddd":case"dddd":a=n._locale.weekdaysParse(e),null!=a?(n._w=n._w||{},n._w.d=a):n._pf.invalidWeekday=e;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":t=t.substr(0,1);case"gggg":case"GGGG":case"GGGGG":t=t.substr(0,2),e&&(n._w=n._w||{},n._w[t]=S(e));break;case"gg":case"GG":n._w=n._w||{},n._w[t]=De.parseTwoDigitYear(e)}}function E(t){var n,a,s,i,r,o,u;n=t._w,null!=n.GG||null!=n.W||null!=n.E?(r=1,o=4,a=e(n.GG,t._a[we],oe(De(),1,4).year),s=e(n.W,1),i=e(n.E,1)):(r=t._locale._week.dow,o=t._locale._week.doy,a=e(n.gg,t._a[we],oe(De(),r,o).year),s=e(n.w,1),null!=n.d?(i=n.d,r>i&&++s):i=null!=n.e?n.e+r:r),u=ue(a,s,i,o,r),t._a[we]=u.year,t._dayOfYear=u.dayOfYear}function $(t){var n,a,s,i,r=[];if(!t._d){for(s=J(t),t._w&&null==t._a[be]&&null==t._a[ve]&&E(t),t._dayOfYear&&(i=e(t._a[we],s[we]),t._dayOfYear>W(i)&&(t._pf._overflowDayOfYear=!0),a=ae(i,0,t._dayOfYear),t._a[ve]=a.getUTCMonth(),t._a[be]=a.getUTCDate()),n=0;3>n&&null==t._a[n];++n)t._a[n]=r[n]=s[n];for(;7>n;n++)t._a[n]=r[n]=null==t._a[n]?2===n?1:0:t._a[n];t._d=(t._useUTC?ae:ne).apply(null,r),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()+t._tzm)}}function V(t){var e;t._d||(e=v(t._i),t._a=[e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond],$(t))}function J(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function q(t){if(t._f===De.ISO_8601)return B(t),void 0;t._a=[],t._pf.empty=!0;var e,n,a,s,i,r=""+t._i,o=r.length,u=0;for(a=A(t._f,t._locale).match(Ie)||[],e=0;e<a.length;e++)s=a[e],n=(r.match(N(s,t))||[])[0],n&&(i=r.substr(0,r.indexOf(n)),i.length>0&&t._pf.unusedInput.push(i),r=r.slice(r.indexOf(n)+n.length),u+=n.length),fn[s]?(n?t._pf.empty=!1:t._pf.unusedTokens.push(s),j(s,n,t)):t._strict&&!n&&t._pf.unusedTokens.push(s);t._pf.charsLeftOver=o-u,r.length>0&&t._pf.unusedInput.push(r),t._isPm&&t._a[Se]<12&&(t._a[Se]+=12),t._isPm===!1&&12===t._a[Se]&&(t._a[Se]=0),$(t),F(t)}function Q(t){return t.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,a,s){return e||n||a||s})}function R(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function X(t){var e,n,s,i,r;if(0===t._f.length)return t._pf.invalidFormat=!0,t._d=new Date(0/0),void 0;for(i=0;i<t._f.length;i++)r=0,e=f({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._pf=a(),e._f=t._f[i],q(e),G(e)&&(r+=e._pf.charsLeftOver,r+=10*e._pf.unusedTokens.length,e._pf.score=r,(null==s||s>r)&&(s=r,n=e));h(t,n||e)}function B(t){var e,n,a=t._i,s=tn.exec(a);if(s){for(t._pf.iso=!0,e=0,n=nn.length;n>e;e++)if(nn[e][1].exec(a)){t._f=nn[e][0]+(s[6]||" ");break}for(e=0,n=an.length;n>e;e++)if(an[e][1].exec(a)){t._f+=an[e][0];break}a.match(Ee)&&(t._f+="Z"),q(t)}else t._isValid=!1}function K(t){B(t),t._isValid===!1&&(delete t._isValid,De.createFromInputFallback(t))}function te(t,e){var n,a=[];for(n=0;n<t.length;++n)a.push(e(t[n],n));return a}function ee(e){var n,a=e._i;a===t?e._d=new Date:M(a)?e._d=new Date(+a):null!==(n=Ce.exec(a))?e._d=new Date(+n[1]):"string"==typeof a?K(e):k(a)?(e._a=te(a.slice(0),function(t){return parseInt(t,10)}),$(e)):"object"==typeof a?V(e):"number"==typeof a?e._d=new Date(a):De.createFromInputFallback(e)}function ne(t,e,n,a,s,i,r){var o=new Date(t,e,n,a,s,i,r);return 1970>t&&o.setFullYear(t),o}function ae(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function se(t,e){if("string"==typeof t)if(isNaN(t)){if(t=e.weekdaysParse(t),"number"!=typeof t)return null}else t=parseInt(t,10);return t}function ie(t,e,n,a,s){return s.relativeTime(e||1,!!n,t,a)}function re(t,e,n){var a=De.duration(t).abs(),s=Me(a.as("s")),i=Me(a.as("m")),r=Me(a.as("h")),o=Me(a.as("d")),u=Me(a.as("M")),c=Me(a.as("y")),d=s<dn.s&&["s",s]||1===i&&["m"]||i<dn.m&&["mm",i]||1===r&&["h"]||r<dn.h&&["hh",r]||1===o&&["d"]||o<dn.d&&["dd",o]||1===u&&["M"]||u<dn.M&&["MM",u]||1===c&&["y"]||["yy",c];return d[2]=e,d[3]=+t>0,d[4]=n,ie.apply({},d)}function oe(t,e,n){var a,s=n-e,i=n-t.day();return i>s&&(i-=7),s-7>i&&(i+=7),a=De(t).add(i,"d"),{week:Math.ceil(a.dayOfYear()/7),year:a.year()}}function ue(t,e,n,a,s){var i,r,o=ae(t,0,1).getUTCDay();return o=0===o?7:o,n=null!=n?n:s,i=s-o+(o>a?7:0)-(s>o?7:0),r=7*(e-1)+(n-s)+i+1,{year:r>0?t:t-1,dayOfYear:r>0?r:W(t-1)+r}}function ce(e){var n=e._i,a=e._f;return e._locale=e._locale||De.localeData(e._l),null===n||a===t&&""===n?De.invalid({nullInput:!0}):("string"==typeof n&&(e._i=n=e._locale.preparse(n)),De.isMoment(n)?new d(n,!0):(a?k(a)?X(e):q(e):ee(e),new d(e)))}function de(t,e){var n,a;if(1===e.length&&k(e[0])&&(e=e[0]),!e.length)return De();for(n=e[0],a=1;a<e.length;++a)e[a][t](n)&&(n=e[a]);return n}function le(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),T(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function he(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function fe(t,e,n){return"Month"===e?le(t,n):t._d["set"+(t._isUTC?"UTC":"")+e](n)}function me(t,e){return function(n){return null!=n?(fe(this,t,n),De.updateOffset(this,e),this):he(this,t)}}function _e(t){return 400*t/146097}function pe(t){return 146097*t/400}function ye(t){De.duration.fn[t]=function(){return this._data[t]}}for(var De,ge,ke="2.8.3",Me=Math.round,Ye=Object.prototype.hasOwnProperty,we=0,ve=1,be=2,Se=3,Te=4,Oe=5,We=6,Ue={},Fe=[],Ge="undefined"!=typeof module&&module.exports,Ce=/^\/?Date\((\-?\d+)/i,ze=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,xe=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Ie=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,He=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,Le=/\d\d?/,Pe=/\d{1,3}/,Ae=/\d{1,4}/,Ne=/[+\-]?\d{1,6}/,Ze=/\d+/,je=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ee=/Z|[\+\-]\d\d:?\d\d/gi,$e=/T/i,Ve=/[\+\-]?\d+(\.\d{1,3})?/,Je=/\d{1,2}/,qe=/\d/,Qe=/\d\d/,Re=/\d{3}/,Xe=/\d{4}/,Be=/[+-]?\d{6}/,Ke=/[+-]?\d+/,tn=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,en="YYYY-MM-DDTHH:mm:ssZ",nn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],an=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],sn=/([\+\-]|\d\d)/gi,rn=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),on={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},un={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},cn={},dn={s:45,m:45,h:22,d:26,M:11},ln="DDD w W M D d".split(" "),hn="M D H h m s w W".split(" "),fn={M:function(){return this.month()+1},MMM:function(t){return this.localeData().monthsShort(this,t)},MMMM:function(t){return this.localeData().months(this,t)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(t){return this.localeData().weekdaysMin(this,t)},ddd:function(t){return this.localeData().weekdaysShort(this,t)},dddd:function(t){return this.localeData().weekdays(this,t)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return _(this.year()%100,2)},YYYY:function(){return _(this.year(),4)},YYYYY:function(){return _(this.year(),5)},YYYYYY:function(){var t=this.year(),e=t>=0?"+":"-";return e+_(Math.abs(t),6)},gg:function(){return _(this.weekYear()%100,2)},gggg:function(){return _(this.weekYear(),4)},ggggg:function(){return _(this.weekYear(),5)},GG:function(){return _(this.isoWeekYear()%100,2)},GGGG:function(){return _(this.isoWeekYear(),4)},GGGGG:function(){return _(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return S(this.milliseconds()/100)},SS:function(){return _(S(this.milliseconds()/10),2)},SSS:function(){return _(this.milliseconds(),3)},SSSS:function(){return _(this.milliseconds(),3)},Z:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+_(S(t/60),2)+":"+_(S(t)%60,2)},ZZ:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+_(S(t/60),2)+_(S(t)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},mn={},_n=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];ln.length;)ge=ln.pop(),fn[ge+"o"]=u(fn[ge],ge);for(;hn.length;)ge=hn.pop(),fn[ge+ge]=o(fn[ge],2);fn.DDDD=o(fn.DDD,3),h(c.prototype,{set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t){var e,n,a;for(this._monthsParse||(this._monthsParse=[]),e=0;12>e;e++)if(this._monthsParse[e]||(n=De.utc([2e3,e]),a="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[e]=new RegExp(a.replace(".",""),"i")),this._monthsParse[e].test(t))return e},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,a;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=De([2e3,1]).day(e),a="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(a.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(t,e){var n=this._calendar[t];return"function"==typeof n?n.apply(e):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,a){var s=this._relativeTime[n];return"function"==typeof s?s(t,e,n,a):s.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",preparse:function(t){return t},postformat:function(t){return t},week:function(t){return oe(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),De=function(e,n,s,i){var r;return"boolean"==typeof s&&(i=s,s=t),r={},r._isAMomentObject=!0,r._i=e,r._f=n,r._l=s,r._strict=i,r._isUTC=!1,r._pf=a(),ce(r)},De.suppressDeprecationWarnings=!1,De.createFromInputFallback=i("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i)}),De.min=function(){var t=[].slice.call(arguments,0);return de("isBefore",t)},De.max=function(){var t=[].slice.call(arguments,0);return de("isAfter",t)},De.utc=function(e,n,s,i){var r;return"boolean"==typeof s&&(i=s,s=t),r={},r._isAMomentObject=!0,r._useUTC=!0,r._isUTC=!0,r._l=s,r._i=e,r._f=n,r._strict=i,r._pf=a(),ce(r).utc()},De.unix=function(t){return De(1e3*t)},De.duration=function(t,e){var a,s,i,r,o=t,u=null;return De.isDuration(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(u=ze.exec(t))?(a="-"===u[1]?-1:1,o={y:0,d:S(u[be])*a,h:S(u[Se])*a,m:S(u[Te])*a,s:S(u[Oe])*a,ms:S(u[We])*a}):(u=xe.exec(t))?(a="-"===u[1]?-1:1,i=function(t){var e=t&&parseFloat(t.replace(",","."));return(isNaN(e)?0:e)*a},o={y:i(u[2]),M:i(u[3]),d:i(u[4]),h:i(u[5]),m:i(u[6]),s:i(u[7]),w:i(u[8])}):"object"==typeof o&&("from"in o||"to"in o)&&(r=y(De(o.from),De(o.to)),o={},o.ms=r.milliseconds,o.M=r.months),s=new l(o),De.isDuration(t)&&n(t,"_locale")&&(s._locale=t._locale),s},De.version=ke,De.defaultFormat=en,De.ISO_8601=function(){},De.momentProperties=Fe,De.updateOffset=function(){},De.relativeTimeThreshold=function(e,n){return dn[e]===t?!1:n===t?dn[e]:(dn[e]=n,!0)},De.lang=i("moment.lang is deprecated. Use moment.locale instead.",function(t,e){return De.locale(t,e)}),De.locale=function(t,e){var n;return t&&(n="undefined"!=typeof e?De.defineLocale(t,e):De.localeData(t),n&&(De.duration._locale=De._locale=n)),De._locale._abbr},De.defineLocale=function(t,e){return null!==e?(e.abbr=t,Ue[t]||(Ue[t]=new c),Ue[t].set(e),De.locale(t),Ue[t]):(delete Ue[t],null)},De.langData=i("moment.langData is deprecated. Use moment.localeData instead.",function(t){return De.localeData(t)}),De.localeData=function(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return De._locale;if(!k(t)){if(e=x(t))return e;t=[t]}return z(t)},De.isMoment=function(t){return t instanceof d||null!=t&&n(t,"_isAMomentObject")},De.isDuration=function(t){return t instanceof l};for(ge=_n.length-1;ge>=0;--ge)b(_n[ge]);De.normalizeUnits=function(t){return w(t)},De.invalid=function(t){var e=De.utc(0/0);return null!=t?h(e._pf,t):e._pf.userInvalidated=!0,e},De.parseZone=function(){return De.apply(null,arguments).parseZone()},De.parseTwoDigitYear=function(t){return S(t)+(S(t)>68?1900:2e3)},h(De.fn=d.prototype,{clone:function(){return De(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var t=De(this).utc();return 0<t.year()&&t.year()<=9999?P(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):P(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var t=this;return[t.year(),t.month(),t.date(),t.hours(),t.minutes(),t.seconds(),t.milliseconds()]},isValid:function(){return G(this)},isDSTShifted:function(){return this._a?this.isValid()&&Y(this._a,(this._isUTC?De.utc(this._a):De(this._a)).toArray())>0:!1},parsingFlags:function(){return h({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(t){return this.zone(0,t)},local:function(t){return this._isUTC&&(this.zone(0,t),this._isUTC=!1,t&&this.add(this._dateTzOffset(),"m")),this},format:function(t){var e=P(this,t||De.defaultFormat);return this.localeData().postformat(e)},add:D(1,"add"),subtract:D(-1,"subtract"),diff:function(t,e,n){var a,s,i,r=I(t,this),o=6e4*(this.zone()-r.zone());return e=w(e),"year"===e||"month"===e?(a=432e5*(this.daysInMonth()+r.daysInMonth()),s=12*(this.year()-r.year())+(this.month()-r.month()),i=this-De(this).startOf("month")-(r-De(r).startOf("month")),i-=6e4*(this.zone()-De(this).startOf("month").zone()-(r.zone()-De(r).startOf("month").zone())),s+=i/a,"year"===e&&(s/=12)):(a=this-r,s="second"===e?a/1e3:"minute"===e?a/6e4:"hour"===e?a/36e5:"day"===e?(a-o)/864e5:"week"===e?(a-o)/6048e5:a),n?s:m(s)},from:function(t,e){return De.duration({to:this,from:t}).locale(this.locale()).humanize(!e)},fromNow:function(t){return this.from(De(),t)},calendar:function(t){var e=t||De(),n=I(e,this).startOf("day"),a=this.diff(n,"days",!0),s=-6>a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse";return this.format(this.localeData().calendar(s,this))},isLeapYear:function(){return U(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=se(t,this.localeData()),this.add(t-e,"d")):e},month:me("Month",!0),startOf:function(t){switch(t=w(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t?this.weekday(0):"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=w(t),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(t,e){return e=w("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=De.isMoment(t)?t:De(t),+this>+t):+this.clone().startOf(e)>+De(t).startOf(e)},isBefore:function(t,e){return e=w("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=De.isMoment(t)?t:De(t),+t>+this):+this.clone().startOf(e)<+De(t).startOf(e)},isSame:function(t,e){return e=w(e||"millisecond"),"millisecond"===e?(t=De.isMoment(t)?t:De(t),+this===+t):+this.clone().startOf(e)===+I(t,this).startOf(e)},min:i("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(t){return t=De.apply(null,arguments),this>t?this:t}),max:i("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(t){return t=De.apply(null,arguments),t>this?this:t}),zone:function(t,e){var n,a=this._offset||0;return null==t?this._isUTC?a:this._dateTzOffset():("string"==typeof t&&(t=Z(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(n=this._dateTzOffset()),this._offset=t,this._isUTC=!0,null!=n&&this.subtract(n,"m"),a!==t&&(!e||this._changeInProgress?g(this,De.duration(a-t,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,De.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""
|
3
|
+
},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(t){return t=t?De(t).zone():0,(this.zone()-t)%60===0},daysInMonth:function(){return T(this.year(),this.month())},dayOfYear:function(t){var e=Me((De(this).startOf("day")-De(this).startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},quarter:function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},weekYear:function(t){var e=oe(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")},isoWeekYear:function(t){var e=oe(this,1,4).year;return null==t?e:this.add(t-e,"y")},week:function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},isoWeek:function(t){var e=oe(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},weekday:function(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},isoWeeksInYear:function(){return O(this.year(),1,4)},weeksInYear:function(){var t=this.localeData()._week;return O(this.year(),t.dow,t.doy)},get:function(t){return t=w(t),this[t]()},set:function(t,e){return t=w(t),"function"==typeof this[t]&&this[t](e),this},locale:function(e){var n;return e===t?this._locale._abbr:(n=De.localeData(e),null!=n&&(this._locale=n),this)},lang:i("moment().lang() is deprecated. Use moment().localeData() instead.",function(e){return e===t?this.localeData():this.locale(e)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),De.fn.millisecond=De.fn.milliseconds=me("Milliseconds",!1),De.fn.second=De.fn.seconds=me("Seconds",!1),De.fn.minute=De.fn.minutes=me("Minutes",!1),De.fn.hour=De.fn.hours=me("Hours",!0),De.fn.date=me("Date",!0),De.fn.dates=i("dates accessor is deprecated. Use date instead.",me("Date",!0)),De.fn.year=me("FullYear",!0),De.fn.years=i("years accessor is deprecated. Use year instead.",me("FullYear",!0)),De.fn.days=De.fn.day,De.fn.months=De.fn.month,De.fn.weeks=De.fn.week,De.fn.isoWeeks=De.fn.isoWeek,De.fn.quarters=De.fn.quarter,De.fn.toJSON=De.fn.toISOString,h(De.duration.fn=l.prototype,{_bubble:function(){var t,e,n,a=this._milliseconds,s=this._days,i=this._months,r=this._data,o=0;r.milliseconds=a%1e3,t=m(a/1e3),r.seconds=t%60,e=m(t/60),r.minutes=e%60,n=m(e/60),r.hours=n%24,s+=m(n/24),o=m(_e(s)),s-=m(pe(o)),i+=m(s/30),s%=30,o+=m(i/12),i%=12,r.days=s,r.months=i,r.years=o},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return m(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12)},humanize:function(t){var e=re(this,!t,this.localeData());return t&&(e=this.localeData().pastFuture(+this,e)),this.localeData().postformat(e)},add:function(t,e){var n=De.duration(t,e);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(t,e){var n=De.duration(t,e);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(t){return t=w(t),this[t.toLowerCase()+"s"]()},as:function(t){var e,n;if(t=w(t),"month"===t||"year"===t)return e=this._days+this._milliseconds/864e5,n=this._months+12*_e(e),"month"===t?n:n/12;switch(e=this._days+pe(this._months/12),t){case"week":return e/7+this._milliseconds/6048e5;case"day":return e+this._milliseconds/864e5;case"hour":return 24*e+this._milliseconds/36e5;case"minute":return 24*e*60+this._milliseconds/6e4;case"second":return 24*e*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+t)}},lang:De.fn.lang,locale:De.fn.locale,toIsoString:i("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var t=Math.abs(this.years()),e=Math.abs(this.months()),n=Math.abs(this.days()),a=Math.abs(this.hours()),s=Math.abs(this.minutes()),i=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(a||s||i?"T":"")+(a?a+"H":"")+(s?s+"M":"")+(i?i+"S":""):"P0D"},localeData:function(){return this._locale}}),De.duration.fn.toString=De.duration.fn.toISOString;for(ge in rn)n(rn,ge)&&ye(ge.toLowerCase());return De.duration.fn.asMilliseconds=function(){return this.as("ms")},De.duration.fn.asSeconds=function(){return this.as("s")},De.duration.fn.asMinutes=function(){return this.as("m")},De.duration.fn.asHours=function(){return this.as("h")},De.duration.fn.asDays=function(){return this.as("d")},De.duration.fn.asWeeks=function(){return this.as("weeks")},De.duration.fn.asMonths=function(){return this.as("M")},De.duration.fn.asYears=function(){return this.as("y")},De.locale("en",{ordinal:function(t){var e=t%10,n=1===S(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),De}.call(this),t.Utils.moment=n,t.datepicker});
|
@@ -0,0 +1,67 @@
|
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
(function(addon) {
|
3
|
+
|
4
|
+
var component;
|
5
|
+
|
6
|
+
if (window.UIkit) {
|
7
|
+
component = addon(UIkit);
|
8
|
+
}
|
9
|
+
|
10
|
+
if (typeof define == 'function' && define.amd) {
|
11
|
+
define('uikit-form-password', ['uikit'], function(){
|
12
|
+
return component || addon(UIkit);
|
13
|
+
});
|
14
|
+
}
|
15
|
+
|
16
|
+
})(function(UI){
|
17
|
+
|
18
|
+
"use strict";
|
19
|
+
|
20
|
+
UI.component('formPassword', {
|
21
|
+
|
22
|
+
defaults: {
|
23
|
+
lblShow: 'Show',
|
24
|
+
lblHide: 'Hide'
|
25
|
+
},
|
26
|
+
|
27
|
+
boot: function() {
|
28
|
+
// init code
|
29
|
+
UI.$html.on('click.formpassword.uikit', '[data-uk-form-password]', function(e) {
|
30
|
+
|
31
|
+
var ele = UI.$(this);
|
32
|
+
|
33
|
+
if (!ele.data('formPassword')) {
|
34
|
+
|
35
|
+
e.preventDefault();
|
36
|
+
|
37
|
+
UI.formPassword(ele, UI.Utils.options(ele.attr('data-uk-form-password')));
|
38
|
+
ele.trigger('click');
|
39
|
+
}
|
40
|
+
});
|
41
|
+
},
|
42
|
+
|
43
|
+
init: function() {
|
44
|
+
|
45
|
+
var $this = this;
|
46
|
+
|
47
|
+
this.on('click', function(e) {
|
48
|
+
|
49
|
+
e.preventDefault();
|
50
|
+
|
51
|
+
if($this.input.length) {
|
52
|
+
var type = $this.input.attr('type');
|
53
|
+
$this.input.attr('type', type=='text' ? 'password':'text');
|
54
|
+
$this.element.html($this.options[type=='text' ? 'lblShow':'lblHide']);
|
55
|
+
}
|
56
|
+
});
|
57
|
+
|
58
|
+
this.input = this.element.next('input').length ? this.element.next('input') : this.element.prev('input');
|
59
|
+
this.element.html(this.options[this.input.is('[type="password"]') ? 'lblShow':'lblHide']);
|
60
|
+
|
61
|
+
|
62
|
+
this.element.data('formPassword', this);
|
63
|
+
}
|
64
|
+
});
|
65
|
+
|
66
|
+
return UI.formPassword;
|
67
|
+
});
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-form-password",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";return t.component("formPassword",{defaults:{lblShow:"Show",lblHide:"Hide"},boot:function(){t.$html.on("click.formpassword.uikit","[data-uk-form-password]",function(i){var e=t.$(this);e.data("formPassword")||(i.preventDefault(),t.formPassword(e,t.Utils.options(e.attr("data-uk-form-password"))),e.trigger("click"))})},init:function(){var t=this;this.on("click",function(i){if(i.preventDefault(),t.input.length){var e=t.input.attr("type");t.input.attr("type","text"==e?"password":"text"),t.element.html(t.options["text"==e?"lblShow":"lblHide"])}}),this.input=this.element.next("input").length?this.element.next("input"):this.element.prev("input"),this.element.html(this.options[this.input.is('[type="password"]')?"lblShow":"lblHide"]),this.element.data("formPassword",this)}}),t.formPassword});
|
@@ -0,0 +1,85 @@
|
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
(function(addon) {
|
3
|
+
|
4
|
+
var component;
|
5
|
+
|
6
|
+
if (window.UIkit) {
|
7
|
+
component = addon(UIkit);
|
8
|
+
}
|
9
|
+
|
10
|
+
if (typeof define == 'function' && define.amd) {
|
11
|
+
define('uikit-form-select', ['uikit'], function(){
|
12
|
+
return component || addon(UIkit);
|
13
|
+
});
|
14
|
+
}
|
15
|
+
|
16
|
+
})(function(UI){
|
17
|
+
|
18
|
+
"use strict";
|
19
|
+
|
20
|
+
UI.component('formSelect', {
|
21
|
+
|
22
|
+
defaults: {
|
23
|
+
target: '>span:first',
|
24
|
+
activeClass: 'uk-active'
|
25
|
+
},
|
26
|
+
|
27
|
+
boot: function() {
|
28
|
+
// init code
|
29
|
+
UI.ready(function(context) {
|
30
|
+
|
31
|
+
UI.$('[data-uk-form-select]', context).each(function(){
|
32
|
+
|
33
|
+
var ele = UI.$(this);
|
34
|
+
|
35
|
+
if (!ele.data('formSelect')) {
|
36
|
+
UI.formSelect(ele, UI.Utils.options(ele.attr('data-uk-form-select')));
|
37
|
+
}
|
38
|
+
});
|
39
|
+
});
|
40
|
+
},
|
41
|
+
|
42
|
+
init: function() {
|
43
|
+
|
44
|
+
var $this = this;
|
45
|
+
|
46
|
+
this.target = this.find(this.options.target);
|
47
|
+
this.select = this.find('select');
|
48
|
+
|
49
|
+
// init + on change event
|
50
|
+
this.select.on({
|
51
|
+
|
52
|
+
change: (function(){
|
53
|
+
|
54
|
+
var select = $this.select[0], fn = function(){
|
55
|
+
|
56
|
+
try {
|
57
|
+
|
58
|
+
if($this.options.target === 'input') {
|
59
|
+
$this.target.val(select.options[select.selectedIndex].text);
|
60
|
+
} else {
|
61
|
+
$this.target.text(select.options[select.selectedIndex].text);
|
62
|
+
}
|
63
|
+
|
64
|
+
} catch(e) {}
|
65
|
+
|
66
|
+
$this.element[$this.select.val() ? 'addClass':'removeClass']($this.options.activeClass);
|
67
|
+
|
68
|
+
return fn;
|
69
|
+
};
|
70
|
+
|
71
|
+
return fn();
|
72
|
+
})(),
|
73
|
+
|
74
|
+
focus: function(){ $this.target.addClass('uk-focus') },
|
75
|
+
blur: function(){ $this.target.removeClass('uk-focus') },
|
76
|
+
mouseenter: function(){ $this.target.addClass('uk-hover') },
|
77
|
+
mouseleave: function(){ $this.target.removeClass('uk-hover') }
|
78
|
+
});
|
79
|
+
|
80
|
+
this.element.data("formSelect", this);
|
81
|
+
}
|
82
|
+
});
|
83
|
+
|
84
|
+
return UI.formSelect;
|
85
|
+
});
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-form-select",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";return t.component("formSelect",{defaults:{target:">span:first",activeClass:"uk-active"},boot:function(){t.ready(function(e){t.$("[data-uk-form-select]",e).each(function(){var e=t.$(this);e.data("formSelect")||t.formSelect(e,t.Utils.options(e.attr("data-uk-form-select")))})})},init:function(){var t=this;this.target=this.find(this.options.target),this.select=this.find("select"),this.select.on({change:function(){var e=t.select[0],n=function(){try{"input"===t.options.target?t.target.val(e.options[e.selectedIndex].text):t.target.text(e.options[e.selectedIndex].text)}catch(s){}return t.element[t.select.val()?"addClass":"removeClass"](t.options.activeClass),n};return n()}(),focus:function(){t.target.addClass("uk-focus")},blur:function(){t.target.removeClass("uk-focus")},mouseenter:function(){t.target.addClass("uk-hover")},mouseleave:function(){t.target.removeClass("uk-hover")}}),this.element.data("formSelect",this)}}),t.formSelect});
|
@@ -0,0 +1,168 @@
|
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
(function(addon) {
|
3
|
+
|
4
|
+
var component;
|
5
|
+
|
6
|
+
if (window.UIkit) {
|
7
|
+
component = addon(UIkit);
|
8
|
+
}
|
9
|
+
|
10
|
+
if (typeof define == 'function' && define.amd) {
|
11
|
+
define('uikit-grid-parallax', ['uikit'], function(){
|
12
|
+
return component || addon(UIkit);
|
13
|
+
});
|
14
|
+
}
|
15
|
+
|
16
|
+
})(function(UI){
|
17
|
+
|
18
|
+
var parallaxes = [], checkParallaxes = function() {
|
19
|
+
|
20
|
+
requestAnimationFrame(function(){
|
21
|
+
for (var i=0; i < parallaxes.length; i++) {
|
22
|
+
parallaxes[i].process();
|
23
|
+
}
|
24
|
+
});
|
25
|
+
};
|
26
|
+
|
27
|
+
|
28
|
+
UI.component('gridparallax', {
|
29
|
+
|
30
|
+
defaults: {
|
31
|
+
target : false,
|
32
|
+
smooth : 150,
|
33
|
+
translate : 150
|
34
|
+
},
|
35
|
+
|
36
|
+
boot: function() {
|
37
|
+
|
38
|
+
// listen to scroll and resize
|
39
|
+
UI.$doc.on('scrolling.uk.document', checkParallaxes);
|
40
|
+
UI.$win.on('load resize orientationchange', UI.Utils.debounce(function(){
|
41
|
+
checkParallaxes();
|
42
|
+
}, 50));
|
43
|
+
|
44
|
+
// init code
|
45
|
+
UI.ready(function(context) {
|
46
|
+
|
47
|
+
UI.$('[data-uk-grid-parallax]', context).each(function() {
|
48
|
+
|
49
|
+
var parallax = UI.$(this);
|
50
|
+
|
51
|
+
if (!parallax.data('gridparallax')) {
|
52
|
+
UI.gridparallax(parallax, UI.Utils.options(parallax.attr('data-uk-grid-parallax')));
|
53
|
+
}
|
54
|
+
});
|
55
|
+
});
|
56
|
+
},
|
57
|
+
|
58
|
+
init: function() {
|
59
|
+
|
60
|
+
var $this = this;
|
61
|
+
|
62
|
+
this.initItems().process();
|
63
|
+
parallaxes.push(this);
|
64
|
+
|
65
|
+
UI.$win.on('load resize orientationchange', (function() {
|
66
|
+
|
67
|
+
var fn = function() {
|
68
|
+
var columns = getcolumns($this.element);
|
69
|
+
|
70
|
+
$this.element.css('margin-bottom', '');
|
71
|
+
|
72
|
+
if (columns > 1) {
|
73
|
+
$this.element.css('margin-bottom', $this.options.translate + parseInt($this.element.css('margin-bottom')));
|
74
|
+
}
|
75
|
+
};
|
76
|
+
|
77
|
+
UI.$(function() { fn(); });
|
78
|
+
|
79
|
+
return UI.Utils.debounce(fn, 50);
|
80
|
+
})());
|
81
|
+
},
|
82
|
+
|
83
|
+
initItems: function() {
|
84
|
+
|
85
|
+
var smooth = this.options.smooth;
|
86
|
+
|
87
|
+
this.items = (this.options.target ? this.element.find(this.options.target) : this.element.children()).each(function(){
|
88
|
+
UI.$(this).css({
|
89
|
+
transition: 'transform '+smooth+'ms linear',
|
90
|
+
transform: ''
|
91
|
+
});
|
92
|
+
});
|
93
|
+
|
94
|
+
return this;
|
95
|
+
},
|
96
|
+
|
97
|
+
process: function() {
|
98
|
+
|
99
|
+
var percent = percentageInViewport(this.element),
|
100
|
+
columns = getcolumns(this.element),
|
101
|
+
items = this.items,
|
102
|
+
mods = [(columns-1)];
|
103
|
+
|
104
|
+
if (columns == 1 || !percent) {
|
105
|
+
items.css('transform', '');
|
106
|
+
return;
|
107
|
+
}
|
108
|
+
|
109
|
+
while(mods.length < columns) {
|
110
|
+
if (!(mods[mods.length-1] - 2)) break;
|
111
|
+
mods.push(mods[mods.length-1] - 2);
|
112
|
+
}
|
113
|
+
|
114
|
+
var translate = this.options.translate, percenttranslate = percent * translate;
|
115
|
+
|
116
|
+
items.each(function(idx, ele, translate){
|
117
|
+
translate = mods.indexOf((idx+1) % columns) != -1 ? percenttranslate : percenttranslate / 8;
|
118
|
+
UI.$(this).css('transform', 'translate3d(0,'+(translate)+'px, 0)');
|
119
|
+
});
|
120
|
+
}
|
121
|
+
|
122
|
+
});
|
123
|
+
|
124
|
+
|
125
|
+
function getcolumns(element) {
|
126
|
+
|
127
|
+
var children = element.children(),
|
128
|
+
first = children.filter(':visible:first'),
|
129
|
+
top = first[0].offsetTop + first.outerHeight();
|
130
|
+
|
131
|
+
for (var column=0;column<children.length;column++) {
|
132
|
+
if (children[column].offsetTop >= top) break;
|
133
|
+
}
|
134
|
+
|
135
|
+
return column || 1;
|
136
|
+
}
|
137
|
+
|
138
|
+
function percentageInViewport(element) {
|
139
|
+
|
140
|
+
var top = element.offset().top,
|
141
|
+
height = element.outerHeight(),
|
142
|
+
scrolltop = UIkit.$win.scrollTop(),
|
143
|
+
wh = window.innerHeight,
|
144
|
+
distance, percentage, percent;
|
145
|
+
|
146
|
+
if (top > (scrolltop + wh)) {
|
147
|
+
percent = 0;
|
148
|
+
} else if ((top + height) < scrolltop) {
|
149
|
+
percent = 1;
|
150
|
+
} else {
|
151
|
+
|
152
|
+
if ((top + height) < wh) {
|
153
|
+
percent = (scrolltop < wh ? scrolltop : scrolltop - wh) / (top+height);
|
154
|
+
} else {
|
155
|
+
|
156
|
+
distance = (scrolltop + wh) - top;
|
157
|
+
percentage = Math.round(distance / ((wh + height) / 100));
|
158
|
+
percent = percentage/100;
|
159
|
+
}
|
160
|
+
|
161
|
+
if (top < wh) {
|
162
|
+
percent = percent * scrolltop / ((top + height) - wh);
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
return percent > 1 ? 1:percent;
|
167
|
+
}
|
168
|
+
});
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
!function(t){var n;window.UIkit&&(n=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-grid-parallax",["uikit"],function(){return n||t(UIkit)})}(function(t){function n(t){for(var n=t.children(),i=n.filter(":visible:first"),e=i[0].offsetTop+i.outerHeight(),o=0;o<n.length&&!(n[o].offsetTop>=e);o++);return o||1}function i(t){var n,i,e,o=t.offset().top,r=t.outerHeight(),s=UIkit.$win.scrollTop(),a=window.innerHeight;return o>s+a?e=0:s>o+r?e=1:(a>o+r?e=(a>s?s:s-a)/(o+r):(n=s+a-o,i=Math.round(n/((a+r)/100)),e=i/100),a>o&&(e=e*s/(o+r-a))),e>1?1:e}var e=[],o=function(){requestAnimationFrame(function(){for(var t=0;t<e.length;t++)e[t].process()})};t.component("gridparallax",{defaults:{target:!1,smooth:150,translate:150},boot:function(){t.$doc.on("scrolling.uk.document",o),t.$win.on("load resize orientationchange",t.Utils.debounce(function(){o()},50)),t.ready(function(n){t.$("[data-uk-grid-parallax]",n).each(function(){var n=t.$(this);n.data("gridparallax")||t.gridparallax(n,t.Utils.options(n.attr("data-uk-grid-parallax")))})})},init:function(){var i=this;this.initItems().process(),e.push(this),t.$win.on("load resize orientationchange",function(){var e=function(){var t=n(i.element);i.element.css("margin-bottom",""),t>1&&i.element.css("margin-bottom",i.options.translate+parseInt(i.element.css("margin-bottom")))};return t.$(function(){e()}),t.Utils.debounce(e,50)}())},initItems:function(){var n=this.options.smooth;return this.items=(this.options.target?this.element.find(this.options.target):this.element.children()).each(function(){t.$(this).css({transition:"transform "+n+"ms linear",transform:""})}),this},process:function(){var e=i(this.element),o=n(this.element),r=this.items,s=[o-1];if(1==o||!e)return r.css("transform",""),void 0;for(;s.length<o&&s[s.length-1]-2;)s.push(s[s.length-1]-2);var a=this.options.translate,l=e*a;r.each(function(n,i,e){e=-1!=s.indexOf((n+1)%o)?l:l/8,t.$(this).css("transform","translate3d(0,"+e+"px, 0)")})}})});
|
@@ -0,0 +1,540 @@
|
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
|
+
(function(addon) {
|
3
|
+
|
4
|
+
var component;
|
5
|
+
|
6
|
+
if (window.UIkit) {
|
7
|
+
component = addon(UIkit);
|
8
|
+
}
|
9
|
+
|
10
|
+
if (typeof define == 'function' && define.amd) {
|
11
|
+
define('uikit-grid', ['uikit'], function(){
|
12
|
+
return component || addon(UIkit);
|
13
|
+
});
|
14
|
+
}
|
15
|
+
|
16
|
+
})(function(UI){
|
17
|
+
|
18
|
+
"use strict";
|
19
|
+
|
20
|
+
UI.component('grid', {
|
21
|
+
|
22
|
+
defaults: {
|
23
|
+
colwidth : 'auto',
|
24
|
+
animation : true,
|
25
|
+
duration : 300,
|
26
|
+
gutter : 0,
|
27
|
+
controls : false,
|
28
|
+
filter : false,
|
29
|
+
origin : UI.langdirection
|
30
|
+
},
|
31
|
+
|
32
|
+
boot: function() {
|
33
|
+
|
34
|
+
// init code
|
35
|
+
UI.ready(function(context) {
|
36
|
+
|
37
|
+
UI.$('[data-uk-grid]', context).each(function(){
|
38
|
+
|
39
|
+
var ele = UI.$(this);
|
40
|
+
|
41
|
+
if(!ele.data('grid')) {
|
42
|
+
UI.grid(ele, UI.Utils.options(ele.attr('data-uk-grid')));
|
43
|
+
}
|
44
|
+
});
|
45
|
+
});
|
46
|
+
},
|
47
|
+
|
48
|
+
init: function() {
|
49
|
+
|
50
|
+
var $this = this, gutter = String(this.options.gutter).trim().split(' ');
|
51
|
+
|
52
|
+
this.gutterv = parseInt(gutter[0], 10);
|
53
|
+
this.gutterh = parseInt((gutter[1] || gutter[0]), 10);
|
54
|
+
|
55
|
+
// make sure parent element has the right position property
|
56
|
+
this.element.css({'position': 'relative'});
|
57
|
+
|
58
|
+
this.controls = null;
|
59
|
+
this.origin = this.options.origin;
|
60
|
+
|
61
|
+
if (this.options.controls) {
|
62
|
+
|
63
|
+
this.controls = UI.$(this.options.controls);
|
64
|
+
|
65
|
+
// filter
|
66
|
+
this.controls.on('click', '[data-uk-filter]', function(e){
|
67
|
+
e.preventDefault();
|
68
|
+
$this.filter(UI.$(this).attr('data-uk-filter'));
|
69
|
+
});
|
70
|
+
|
71
|
+
// sort
|
72
|
+
this.controls.on('click', '[data-uk-sort]', function(e){
|
73
|
+
e.preventDefault();
|
74
|
+
var cmd = UI.$(this).attr('data-uk-sort').split(':');
|
75
|
+
$this.sort(cmd[0], cmd[1]);
|
76
|
+
});
|
77
|
+
}
|
78
|
+
|
79
|
+
UI.$win.on('load resize orientationchange', UI.Utils.debounce(function(){
|
80
|
+
|
81
|
+
if ($this.currentfilter) {
|
82
|
+
$this.filter($this.currentfilter);
|
83
|
+
} else {
|
84
|
+
this.update();
|
85
|
+
}
|
86
|
+
|
87
|
+
}.bind(this), 100));
|
88
|
+
|
89
|
+
this.on('display.uk.check', function(){
|
90
|
+
if ($this.element.is(':visible')) $this.update();
|
91
|
+
});
|
92
|
+
|
93
|
+
UI.domObserve(this.element, function(e) {
|
94
|
+
$this.update();
|
95
|
+
});
|
96
|
+
|
97
|
+
if (this.options.filter !== false) {
|
98
|
+
this.filter(this.options.filter);
|
99
|
+
} else {
|
100
|
+
this.update();
|
101
|
+
}
|
102
|
+
},
|
103
|
+
|
104
|
+
_prepareElements: function() {
|
105
|
+
|
106
|
+
var children = this.element.children(':not([data-grid-prepared])'), css;
|
107
|
+
|
108
|
+
// exit if no already prepared elements found
|
109
|
+
if (!children.length) {
|
110
|
+
return;
|
111
|
+
}
|
112
|
+
|
113
|
+
css = {
|
114
|
+
position : 'absolute',
|
115
|
+
boxSizing : 'border-box',
|
116
|
+
width : this.options.colwidth == 'auto' ? '' : this.options.colwidth
|
117
|
+
};
|
118
|
+
|
119
|
+
if (this.options.gutter) {
|
120
|
+
|
121
|
+
css['padding-'+this.origin] = this.gutterh;
|
122
|
+
css['padding-bottom'] = this.gutterv;
|
123
|
+
|
124
|
+
this.element.css('margin-'+this.origin, this.gutterh * -1);
|
125
|
+
}
|
126
|
+
|
127
|
+
children.attr('data-grid-prepared', 'true').css(css);
|
128
|
+
},
|
129
|
+
|
130
|
+
update: function(elements) {
|
131
|
+
|
132
|
+
var $this = this;
|
133
|
+
|
134
|
+
this._prepareElements();
|
135
|
+
|
136
|
+
elements = elements || this.element.children(':visible');
|
137
|
+
|
138
|
+
var children = elements,
|
139
|
+
maxwidth = this.element.width() + (2*this.gutterh) + 2,
|
140
|
+
left = 0,
|
141
|
+
top = 0,
|
142
|
+
positions = [],
|
143
|
+
|
144
|
+
item, width, height, pos, posi, i, z, max, size;
|
145
|
+
|
146
|
+
this.trigger('beforeupdate.uk.grid', [children]);
|
147
|
+
|
148
|
+
children.each(function(index){
|
149
|
+
|
150
|
+
size = getElementSize(this);
|
151
|
+
|
152
|
+
item = UI.$(this);
|
153
|
+
width = size.outerWidth;
|
154
|
+
height = size.outerHeight;
|
155
|
+
left = 0;
|
156
|
+
top = 0;
|
157
|
+
|
158
|
+
for (i=0,max=positions.length;i<max;i++) {
|
159
|
+
|
160
|
+
pos = positions[i];
|
161
|
+
|
162
|
+
if (left <= pos.aX) { left = pos.aX; }
|
163
|
+
if (maxwidth < (left + width)) { left = 0; }
|
164
|
+
if (top <= pos.aY) { top = pos.aY; }
|
165
|
+
}
|
166
|
+
|
167
|
+
posi = {
|
168
|
+
ele : item,
|
169
|
+
top : top,
|
170
|
+
width : width,
|
171
|
+
height : height,
|
172
|
+
aY : (top + height),
|
173
|
+
aX : (left + width)
|
174
|
+
};
|
175
|
+
|
176
|
+
posi[$this.origin] = left;
|
177
|
+
|
178
|
+
positions.push(posi);
|
179
|
+
});
|
180
|
+
|
181
|
+
var posPrev, maxHeight = 0, positionto;
|
182
|
+
|
183
|
+
// fix top
|
184
|
+
for (i=0,max=positions.length;i<max;i++) {
|
185
|
+
|
186
|
+
pos = positions[i];
|
187
|
+
top = 0;
|
188
|
+
|
189
|
+
for (z=0;z<i;z++) {
|
190
|
+
|
191
|
+
posPrev = positions[z];
|
192
|
+
|
193
|
+
// (posPrev.left + 1) fixex 1px bug when using % based widths
|
194
|
+
if (pos[this.origin] < posPrev.aX && (posPrev[this.origin] +1) < pos.aX) {
|
195
|
+
top = posPrev.aY;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
|
199
|
+
pos.top = top;
|
200
|
+
pos.aY = top + pos.height;
|
201
|
+
|
202
|
+
maxHeight = Math.max(maxHeight, pos.aY);
|
203
|
+
}
|
204
|
+
|
205
|
+
maxHeight = maxHeight - this.gutterv;
|
206
|
+
|
207
|
+
if (this.options.animation) {
|
208
|
+
|
209
|
+
this.element.stop().animate({'height': maxHeight}, 100);
|
210
|
+
|
211
|
+
positions.forEach(function(pos){
|
212
|
+
|
213
|
+
positionto = {"top": pos.top, opacity: 1};
|
214
|
+
positionto[$this.origin] = pos[$this.origin];
|
215
|
+
|
216
|
+
pos.ele.stop().animate(positionto, this.options.duration);
|
217
|
+
}.bind(this));
|
218
|
+
|
219
|
+
} else {
|
220
|
+
|
221
|
+
this.element.css('height', maxHeight);
|
222
|
+
|
223
|
+
positions.forEach(function(pos){
|
224
|
+
positionto = {"top": pos.top, opacity: 1};
|
225
|
+
positionto[$this.origin] = pos[$this.origin];
|
226
|
+
pos.ele.css(positionto);
|
227
|
+
}.bind(this));
|
228
|
+
}
|
229
|
+
|
230
|
+
// make sure to trigger possible scrollpies etc.
|
231
|
+
setTimeout(function() {
|
232
|
+
UI.$doc.trigger('scrolling.uk.document');
|
233
|
+
}, 2 * this.options.duration * (this.options.animation ? 1:0));
|
234
|
+
|
235
|
+
this.trigger('afterupdate.uk.grid', [children]);
|
236
|
+
},
|
237
|
+
|
238
|
+
filter: function(filter) {
|
239
|
+
|
240
|
+
this.currentfilter = filter;
|
241
|
+
|
242
|
+
filter = filter || [];
|
243
|
+
|
244
|
+
if (typeof(filter) === 'number') {
|
245
|
+
filter = filter.toString();
|
246
|
+
}
|
247
|
+
|
248
|
+
if (typeof(filter) === 'string') {
|
249
|
+
filter = filter.split(/,/).map(function(item){ return item.trim(); });
|
250
|
+
}
|
251
|
+
|
252
|
+
var $this = this, children = this.element.children(), elements = {"visible": [], "hidden": []}, visible, hidden;
|
253
|
+
|
254
|
+
children.each(function(index){
|
255
|
+
|
256
|
+
var ele = UI.$(this), f = ele.attr('data-uk-filter'), infilter = filter.length ? false : true;
|
257
|
+
|
258
|
+
if (f) {
|
259
|
+
|
260
|
+
f = f.split(/,/).map(function(item){ return item.trim(); });
|
261
|
+
|
262
|
+
filter.forEach(function(item){
|
263
|
+
if (f.indexOf(item) > -1) infilter = true;
|
264
|
+
});
|
265
|
+
}
|
266
|
+
|
267
|
+
elements[infilter ? "visible":"hidden"].push(ele);
|
268
|
+
});
|
269
|
+
|
270
|
+
// convert to jQuery collections
|
271
|
+
elements.hidden = UI.$(elements.hidden).map(function () {return this[0];});
|
272
|
+
elements.visible = UI.$(elements.visible).map(function () {return this[0];});
|
273
|
+
|
274
|
+
elements.hidden.attr('aria-hidden', 'true').filter(':visible').fadeOut(this.options.duration);
|
275
|
+
elements.visible.attr('aria-hidden', 'false').filter(':hidden').css('opacity', 0).show();
|
276
|
+
|
277
|
+
$this.update(elements.visible);
|
278
|
+
|
279
|
+
if (this.controls && this.controls.length) {
|
280
|
+
this.controls.find('[data-uk-filter]').removeClass('uk-active').filter('[data-uk-filter="'+filter+'"]').addClass('uk-active');
|
281
|
+
}
|
282
|
+
},
|
283
|
+
|
284
|
+
sort: function(by, order){
|
285
|
+
|
286
|
+
order = order || 1;
|
287
|
+
|
288
|
+
// covert from string (asc|desc) to number
|
289
|
+
if (typeof(order) === 'string') {
|
290
|
+
order = order.toLowerCase() == 'desc' ? -1 : 1;
|
291
|
+
}
|
292
|
+
|
293
|
+
var elements = this.element.children();
|
294
|
+
|
295
|
+
elements.sort(function(a, b){
|
296
|
+
|
297
|
+
a = UI.$(a);
|
298
|
+
b = UI.$(b);
|
299
|
+
|
300
|
+
return (b.data(by) || '') < (a.data(by) || '') ? order : (order*-1);
|
301
|
+
|
302
|
+
}).appendTo(this.element);
|
303
|
+
|
304
|
+
this.update(elements.filter(':visible'));
|
305
|
+
|
306
|
+
if (this.controls && this.controls.length) {
|
307
|
+
this.controls.find('[data-uk-sort]').removeClass('uk-active').filter('[data-uk-sort="'+by+':'+(order == -1 ? 'desc':'asc')+'"]').addClass('uk-active');
|
308
|
+
}
|
309
|
+
}
|
310
|
+
});
|
311
|
+
|
312
|
+
|
313
|
+
/*!
|
314
|
+
* getSize v1.2.2
|
315
|
+
* measure size of elements
|
316
|
+
* MIT license
|
317
|
+
* https://github.com/desandro/get-size
|
318
|
+
*/
|
319
|
+
function _getSize() {
|
320
|
+
|
321
|
+
var prefixes = 'Webkit Moz ms Ms O'.split(' ');
|
322
|
+
var docElemStyle = document.documentElement.style;
|
323
|
+
|
324
|
+
function getStyleProperty( propName ) {
|
325
|
+
if ( !propName ) {
|
326
|
+
return;
|
327
|
+
}
|
328
|
+
|
329
|
+
// test standard property first
|
330
|
+
if ( typeof docElemStyle[ propName ] === 'string' ) {
|
331
|
+
return propName;
|
332
|
+
}
|
333
|
+
|
334
|
+
// capitalize
|
335
|
+
propName = propName.charAt(0).toUpperCase() + propName.slice(1);
|
336
|
+
|
337
|
+
// test vendor specific properties
|
338
|
+
var prefixed;
|
339
|
+
for ( var i=0, len = prefixes.length; i < len; i++ ) {
|
340
|
+
prefixed = prefixes[i] + propName;
|
341
|
+
if ( typeof docElemStyle[ prefixed ] === 'string' ) {
|
342
|
+
return prefixed;
|
343
|
+
}
|
344
|
+
}
|
345
|
+
}
|
346
|
+
|
347
|
+
// -------------------------- helpers -------------------------- //
|
348
|
+
|
349
|
+
// get a number from a string, not a percentage
|
350
|
+
function getStyleSize( value ) {
|
351
|
+
var num = parseFloat( value );
|
352
|
+
// not a percent like '100%', and a number
|
353
|
+
var isValid = value.indexOf('%') === -1 && !isNaN( num );
|
354
|
+
return isValid && num;
|
355
|
+
}
|
356
|
+
|
357
|
+
function noop() {}
|
358
|
+
|
359
|
+
var logError = typeof console === 'undefined' ? noop : function( message ) {
|
360
|
+
console.error( message );
|
361
|
+
};
|
362
|
+
|
363
|
+
// -------------------------- measurements -------------------------- //
|
364
|
+
|
365
|
+
var measurements = [
|
366
|
+
'paddingLeft',
|
367
|
+
'paddingRight',
|
368
|
+
'paddingTop',
|
369
|
+
'paddingBottom',
|
370
|
+
'marginLeft',
|
371
|
+
'marginRight',
|
372
|
+
'marginTop',
|
373
|
+
'marginBottom',
|
374
|
+
'borderLeftWidth',
|
375
|
+
'borderRightWidth',
|
376
|
+
'borderTopWidth',
|
377
|
+
'borderBottomWidth'
|
378
|
+
];
|
379
|
+
|
380
|
+
function getZeroSize() {
|
381
|
+
var size = {
|
382
|
+
width: 0,
|
383
|
+
height: 0,
|
384
|
+
innerWidth: 0,
|
385
|
+
innerHeight: 0,
|
386
|
+
outerWidth: 0,
|
387
|
+
outerHeight: 0
|
388
|
+
};
|
389
|
+
for ( var i=0, len = measurements.length; i < len; i++ ) {
|
390
|
+
var measurement = measurements[i];
|
391
|
+
size[ measurement ] = 0;
|
392
|
+
}
|
393
|
+
return size;
|
394
|
+
}
|
395
|
+
|
396
|
+
|
397
|
+
// -------------------------- setup -------------------------- //
|
398
|
+
|
399
|
+
var isSetup = false;
|
400
|
+
var getStyle, boxSizingProp, isBoxSizeOuter;
|
401
|
+
|
402
|
+
/**
|
403
|
+
* setup vars and functions
|
404
|
+
* do it on initial getSize(), rather than on script load
|
405
|
+
* For Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=548397
|
406
|
+
*/
|
407
|
+
function setup() {
|
408
|
+
// setup once
|
409
|
+
if ( isSetup ) {
|
410
|
+
return;
|
411
|
+
}
|
412
|
+
isSetup = true;
|
413
|
+
|
414
|
+
var getComputedStyle = window.getComputedStyle;
|
415
|
+
getStyle = ( function() {
|
416
|
+
var getStyleFn = getComputedStyle ?
|
417
|
+
function( elem ) {
|
418
|
+
return getComputedStyle( elem, null );
|
419
|
+
} :
|
420
|
+
function( elem ) {
|
421
|
+
return elem.currentStyle;
|
422
|
+
};
|
423
|
+
|
424
|
+
return function getStyle( elem ) {
|
425
|
+
var style = getStyleFn( elem );
|
426
|
+
if ( !style ) {
|
427
|
+
logError( 'Style returned ' + style +
|
428
|
+
'. Are you running this code in a hidden iframe on Firefox? ' +
|
429
|
+
'See http://bit.ly/getsizebug1' );
|
430
|
+
}
|
431
|
+
return style;
|
432
|
+
};
|
433
|
+
})();
|
434
|
+
|
435
|
+
// -------------------------- box sizing -------------------------- //
|
436
|
+
|
437
|
+
boxSizingProp = getStyleProperty('boxSizing');
|
438
|
+
|
439
|
+
/**
|
440
|
+
* WebKit measures the outer-width on style.width on border-box elems
|
441
|
+
* IE & Firefox measures the inner-width
|
442
|
+
*/
|
443
|
+
if ( boxSizingProp ) {
|
444
|
+
var div = document.createElement('div');
|
445
|
+
div.style.width = '200px';
|
446
|
+
div.style.padding = '1px 2px 3px 4px';
|
447
|
+
div.style.borderStyle = 'solid';
|
448
|
+
div.style.borderWidth = '1px 2px 3px 4px';
|
449
|
+
div.style[ boxSizingProp ] = 'border-box';
|
450
|
+
|
451
|
+
var body = document.body || document.documentElement;
|
452
|
+
body.appendChild( div );
|
453
|
+
var style = getStyle( div );
|
454
|
+
|
455
|
+
isBoxSizeOuter = getStyleSize( style.width ) === 200;
|
456
|
+
body.removeChild( div );
|
457
|
+
}
|
458
|
+
|
459
|
+
}
|
460
|
+
|
461
|
+
// -------------------------- getSize -------------------------- //
|
462
|
+
|
463
|
+
function getSize( elem ) {
|
464
|
+
setup();
|
465
|
+
|
466
|
+
// use querySeletor if elem is string
|
467
|
+
if ( typeof elem === 'string' ) {
|
468
|
+
elem = document.querySelector( elem );
|
469
|
+
}
|
470
|
+
|
471
|
+
// do not proceed on non-objects
|
472
|
+
if ( !elem || typeof elem !== 'object' || !elem.nodeType ) {
|
473
|
+
return;
|
474
|
+
}
|
475
|
+
|
476
|
+
var style = getStyle( elem );
|
477
|
+
|
478
|
+
// if hidden, everything is 0
|
479
|
+
if ( style.display === 'none' ) {
|
480
|
+
return getZeroSize();
|
481
|
+
}
|
482
|
+
|
483
|
+
var size = {};
|
484
|
+
size.width = elem.offsetWidth;
|
485
|
+
size.height = elem.offsetHeight;
|
486
|
+
|
487
|
+
var isBorderBox = size.isBorderBox = !!( boxSizingProp &&
|
488
|
+
style[ boxSizingProp ] && style[ boxSizingProp ] === 'border-box' );
|
489
|
+
|
490
|
+
// get all measurements
|
491
|
+
for ( var i=0, len = measurements.length; i < len; i++ ) {
|
492
|
+
var measurement = measurements[i];
|
493
|
+
var value = style[ measurement ];
|
494
|
+
|
495
|
+
var num = parseFloat( value );
|
496
|
+
// any 'auto', 'medium' value will be 0
|
497
|
+
size[ measurement ] = !isNaN( num ) ? num : 0;
|
498
|
+
}
|
499
|
+
|
500
|
+
var paddingWidth = size.paddingLeft + size.paddingRight;
|
501
|
+
var paddingHeight = size.paddingTop + size.paddingBottom;
|
502
|
+
var marginWidth = size.marginLeft + size.marginRight;
|
503
|
+
var marginHeight = size.marginTop + size.marginBottom;
|
504
|
+
var borderWidth = size.borderLeftWidth + size.borderRightWidth;
|
505
|
+
var borderHeight = size.borderTopWidth + size.borderBottomWidth;
|
506
|
+
|
507
|
+
var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
|
508
|
+
|
509
|
+
// overwrite width and height if we can get it from style
|
510
|
+
var styleWidth = getStyleSize( style.width );
|
511
|
+
if ( styleWidth !== false ) {
|
512
|
+
size.width = styleWidth +
|
513
|
+
// add padding and border unless it's already including it
|
514
|
+
( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
|
515
|
+
}
|
516
|
+
|
517
|
+
var styleHeight = getStyleSize( style.height );
|
518
|
+
if ( styleHeight !== false ) {
|
519
|
+
size.height = styleHeight +
|
520
|
+
// add padding and border unless it's already including it
|
521
|
+
( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
|
522
|
+
}
|
523
|
+
|
524
|
+
size.innerWidth = size.width - ( paddingWidth + borderWidth );
|
525
|
+
size.innerHeight = size.height - ( paddingHeight + borderHeight );
|
526
|
+
|
527
|
+
size.outerWidth = size.width + marginWidth;
|
528
|
+
size.outerHeight = size.height + marginHeight;
|
529
|
+
|
530
|
+
return size;
|
531
|
+
}
|
532
|
+
|
533
|
+
return getSize;
|
534
|
+
|
535
|
+
}
|
536
|
+
|
537
|
+
function getElementSize(ele) {
|
538
|
+
return _getSize()(ele);
|
539
|
+
}
|
540
|
+
});
|