SiteOrigin Widgets Bundle - Version 1.9.6

Version Description

  • 4 August 2017 =
  • Slider: Background Video: Try embedding the video if oEmbed fails.
  • Contact: Added some nonce checks.
  • Contact: add reply-to header.
  • Remove elementor panel width override.
  • Editor: Fix TinyMCE editor button filters in WP >
Download this release

Release Info

Developer gpriday
Plugin Icon 128x128 SiteOrigin Widgets Bundle
Version 1.9.6
Comparing to
See all releases

Code changes from version 1.9.5 to 1.9.6

Files changed (40) hide show
  1. admin/trianglify.min.js +2 -2
  2. base/inc/fields/css/so-measurement-field.css +0 -7
  3. base/inc/fields/css/so-tinymce-field.css +0 -3
  4. base/inc/fields/css/tinymce-field.css +2 -2
  5. base/inc/fields/js/autocomplete-field.min.js +1 -1
  6. base/inc/fields/js/code-field.min.js +1 -1
  7. base/inc/fields/js/icon-field.min.js +1 -1
  8. base/inc/fields/js/lib/pikaday/pikaday.min.js +1 -1
  9. base/inc/fields/js/media-field.min.js +1 -1
  10. base/inc/fields/js/order-field.min.js +1 -1
  11. base/inc/fields/js/tinymce-field-pre48.min.js +1 -1
  12. base/inc/fields/js/tinymce-field.js +7 -1
  13. base/inc/fields/js/tinymce-field.min.js +1 -1
  14. base/inc/fields/tinymce.class.php +12 -10
  15. base/inc/widgets/base-slider.class.php +20 -11
  16. base/js/admin.min.js +1 -1
  17. base/js/meta-box-manager.min.js +1 -1
  18. compat/beaver-builder/sowb-beaver-builder.min.js +1 -1
  19. compat/visual-composer/sowb-vc-widget.min.js +1 -1
  20. js/jquery.cycle.min.js +1 -1
  21. js/jquery.cycle.swipe.min.js +1 -1
  22. js/jquery.touchSwipe.min.js +1 -1
  23. js/lib/imagesloaded.pkgd.min.js +1 -1
  24. js/lib/packery.pkgd.min.js +2 -2
  25. js/slider/jquery.slider.min.js +1 -1
  26. lang/so-widgets-bundle.pot +9 -9
  27. readme.txt +11 -2
  28. so-widgets-bundle.php +2 -2
  29. widgets/contact/contact.php +6 -2
  30. widgets/contact/js/contact.min.js +1 -1
  31. widgets/contact/tpl/default.php +2 -1
  32. widgets/google-map/js/js-map.min.js +1 -1
  33. widgets/google-map/js/static-map.min.js +1 -1
  34. widgets/image-grid/js/image-grid.min.js +1 -1
  35. widgets/post-carousel/css/style.css +1 -0
  36. widgets/post-carousel/js/carousel.min.js +1 -1
  37. widgets/price-table/js/pricetable.min.js +1 -1
  38. widgets/simple-masonry/js/simple-masonry.min.js +1 -1
  39. widgets/social-media-buttons/js/social-media-buttons-admin.min.js +1 -1
  40. widgets/video/js/so-video-widget.min.js +1 -1
admin/trianglify.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.Trianglify=e()}}(function(){var e;return function r(e,n,t){function f(o,i){if(!n[o]){if(!e[o]){var c="function"==typeof require&&require;if(!i&&c)return c(o,!0);if(a)return a(o,!0);var d=new Error("Cannot find module '"+o+"'");throw d.code="MODULE_NOT_FOUND",d}var s=n[o]={exports:{}};e[o][0].call(s.exports,function(r){var n=e[o][1][r];return f(n?n:r)},s,s.exports,r,e,n,t)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<t.length;o++)f(t[o]);return f}({"./lib/trianglify.js":[function(e,r,n){function t(e){function r(e,r,n){return(e-r[0])*(n[1]-n[0])/(r[1]-r[0])+n[0]}function n(n,t){for(var f=[],a=-y;a<n+y;a+=e.cell_size)for(var o=-w;o<t+w;o+=e.cell_size){var i=a+e.cell_size/2+r(rand(),[0,1],[-v,v]),c=o+e.cell_size/2+r(rand(),[0,1],[-v,v]);f.push([i,c].map(Math.floor))}return f}function t(e){return{x:(e[0][0]+e[1][0]+e[2][0])/3,y:(e[0][1]+e[1][1]+e[2][1])/3}}function i(){if(e.palette instanceof Array)return e.palette[Math.floor(rand()*e.palette.length)];var r=Object.keys(e.palette);return e.palette[r[Math.floor(rand()*r.length)]]}function s(e,r){var n={};for(var t in e)n[t]=e[t];for(t in r){if(!e.hasOwnProperty(t))throw new Error(t+" is not a configuration option for Trianglify. Check your spelling?");n[t]=r[t]}return n}if(e=s(d,e),rand=a(e.seed),"random"===e.x_colors&&(e.x_colors=i()),"random"===e.y_colors&&(e.y_colors=i()),"match_x"===e.y_colors&&(e.y_colors=e.x_colors),!(e.width>0&&e.height>0))throw new Error("Width and height must be numbers greater than 0");if(e.cell_size<2)throw new Error("Cell size must be greater than 2.");var u;if(e.color_function)u=function(r,n){return o(e.color_function(r,n))};else{var l=o.scale(e.x_colors).mode(e.color_space),b=o.scale(e.y_colors).mode(e.color_space);u=function(r,n){return o.interpolate(l(r),b(n),.5,e.color_space)}}for(var h=e.width,g=e.height,p=Math.floor((h+4*e.cell_size)/e.cell_size),m=Math.floor((g+4*e.cell_size)/e.cell_size),y=(p*e.cell_size-h)/2,w=(m*e.cell_size-g)/2,v=e.cell_size*e.variance/2,x=function(e){return r(e,[-y,h+y],[0,1])},_=function(e){return r(e,[-w,g+w],[0,1])},k=n(h,g),j=f.triangulate(k),M=[],N=function(e){return k[e]},D=0;D<j.length;D+=3){var U=[j[D],j[D+1],j[D+2]].map(N),A=t(U),P=u(x(A.x),_(A.y)).hex();M.push([P,U])}return c(M,e)}var f=e("delaunay-fast"),a=e("seedrandom"),o=e("chroma-js"),i=e("./colorbrewer"),c=e("./pattern"),d={width:600,height:400,cell_size:75,variance:.75,seed:null,x_colors:"random",y_colors:"match_x",palette:i,color_space:"lab",color_function:null,stroke_width:1.51};t.colorbrewer=i,t.defaults=d,r.exports=t},{"./colorbrewer":"/Users/gpriday/Downloads/trianglify-master 2/lib/colorbrewer.js","./pattern":"/Users/gpriday/Downloads/trianglify-master 2/lib/pattern.js","chroma-js":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/chroma-js/chroma.js","delaunay-fast":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/delaunay-fast/delaunay.js",seedrandom:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/index.js"}],"/Users/gpriday/Downloads/trianglify-master 2/lib/colorbrewer.js":[function(e,r,n){r.exports={YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]}},{}],"/Users/gpriday/Downloads/trianglify-master 2/lib/pattern.js":[function(e,r,n){(function(n){function t(r,t){function a(){var e=f.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width",t.width),e.setAttribute("height",t.height),r.forEach(function(r){var n=f.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("d","M"+r[1].join("L")+"Z"),n.setAttribute("fill",r[0]),n.setAttribute("stroke",r[0]),n.setAttribute("stroke-width",t.stroke_width),e.appendChild(n)}),e}function o(a){if("undefined"!=typeof n)try{e("canvas")}catch(o){throw Error("The optional node-canvas dependency is needed for Trianglify to render using canvas in node.")}return a||(a=f.createElement("canvas")),a.setAttribute("width",t.width),a.setAttribute("height",t.height),ctx=a.getContext("2d"),ctx.canvas.width=t.width,ctx.canvas.height=t.height,r.forEach(function(e){ctx.fillStyle=ctx.strokeStyle=e[0],ctx.lineWidth=t.stroke_width,ctx.beginPath(),ctx.moveTo.apply(ctx,e[1][0]),ctx.lineTo.apply(ctx,e[1][1]),ctx.lineTo.apply(ctx,e[1][2]),ctx.fill(),ctx.stroke()}),a}function i(){return o().toDataURL("image/png")}return{polys:r,opts:t,svg:a,canvas:o,png:i}}var f="undefined"!=typeof document?document:e("jsdom").jsdom("<html/>");r.exports=t}).call(this,e("_process"))},{_process:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/process/browser.js",canvas:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js",jsdom:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js"}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js":[function(e,r,n){},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/process/browser.js":[function(e,r,n){function t(){if(!i){i=!0;for(var e,r=o.length;r;){e=o,o=[];for(var n=-1;++n<r;)e[n]();r=o.length}i=!1}}function f(){}var a=r.exports={},o=[],i=!1;a.nextTick=function(e){o.push(e),i||setTimeout(t,0)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=f,a.addListener=f,a.once=f,a.off=f,a.removeListener=f,a.removeAllListeners=f,a.emit=f,a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/chroma-js/chroma.js":[function(r,n,t){(function(){var r,f,a,o,i,c,d,s,u,l,b,h,g,p,m,y,w,v,x,_,k,j,M,N,D,U,A,P,z,G,E,B,I,q,R,S,O,C,T;l=function(e,n,t,f){return new r(e,n,t,f)},"undefined"!=typeof n&&null!==n&&null!=n.exports&&(n.exports=l),"function"==typeof e&&e.amd?e([],function(){return l}):(q="undefined"!=typeof t&&null!==t?t:this,q.chroma=l),l.color=function(e,n,t,f){return new r(e,n,t,f)},l.hsl=function(e,n,t,f){return new r(e,n,t,f,"hsl")},l.hsv=function(e,n,t,f){return new r(e,n,t,f,"hsv")},l.rgb=function(e,n,t,f){return new r(e,n,t,f,"rgb")},l.hex=function(e){return new r(e)},l.css=function(e){return new r(e)},l.lab=function(e,n,t){return new r(e,n,t,"lab")},l.lch=function(e,n,t){return new r(e,n,t,"lch")},l.hsi=function(e,n,t){return new r(e,n,t,"hsi")},l.gl=function(e,n,t,f){return new r(255*e,255*n,255*t,f,"gl")},l.interpolate=function(e,n,t,f){return null==e||null==n?"#000":("string"===R(e)&&(e=new r(e)),"string"===R(n)&&(n=new r(n)),e.interpolate(t,n,f))},l.mix=l.interpolate,l.contrast=function(e,n){var t,f;return"string"===R(e)&&(e=new r(e)),"string"===R(n)&&(n=new r(n)),t=e.luminance(),f=n.luminance(),t>f?(t+.05)/(f+.05):(f+.05)/(t+.05)},l.luminance=function(e){return l(e).luminance()},l._Color=r,r=function(){function e(){var e,r,n,t,f,a,o,i,c,d,s,u,l,h,g,p;for(f=this,n=[],d=0,s=arguments.length;d<s;d++)r=arguments[d],null!=r&&n.push(r);if(0===n.length)u=[255,0,255,1,"rgb"],o=u[0],i=u[1],c=u[2],e=u[3],t=u[4];else if("array"===R(n[0])){if(3===n[0].length)l=n[0],o=l[0],i=l[1],c=l[2],e=1;else{if(4!==n[0].length)throw"unknown input argument";h=n[0],o=h[0],i=h[1],c=h[2],e=h[3]}t=null!=(g=n[1])?g:"rgb"}else"string"===R(n[0])?(o=n[0],t="hex"):"object"===R(n[0])?(p=n[0]._rgb,o=p[0],i=p[1],c=p[2],e=p[3],t="rgb"):n.length>=3&&(o=n[0],i=n[1],c=n[2]);3===n.length?(t="rgb",e=1):4===n.length?"string"===R(n[3])?(t=n[3],e=1):"number"===R(n[3])&&(t="rgb",e=n[3]):5===n.length&&(e=n[3],t=n[4]),null==e&&(e=1),"rgb"===t?f._rgb=[o,i,c,e]:"gl"===t?f._rgb=[255*o,255*i,255*c,e]:"hsl"===t?(f._rgb=w(o,i,c),f._rgb[3]=e):"hsv"===t?(f._rgb=v(o,i,c),f._rgb[3]=e):"hex"===t?f._rgb=m(o):"lab"===t?(f._rgb=_(o,i,c),f._rgb[3]=e):"lch"===t?(f._rgb=M(o,i,c),f._rgb[3]=e):"hsi"===t&&(f._rgb=y(o,i,c),f._rgb[3]=e),a=b(f._rgb)}return e.prototype.rgb=function(){return this._rgb.slice(0,3)},e.prototype.rgba=function(){return this._rgb},e.prototype.hex=function(){return A(this._rgb)},e.prototype.toString=function(){return this.name()},e.prototype.hsl=function(){return z(this._rgb)},e.prototype.hsv=function(){return G(this._rgb)},e.prototype.lab=function(){return E(this._rgb)},e.prototype.lch=function(){return B(this._rgb)},e.prototype.hsi=function(){return P(this._rgb)},e.prototype.gl=function(){return[this._rgb[0]/255,this._rgb[1]/255,this._rgb[2]/255,this._rgb[3]]},e.prototype.luminance=function(r,n){var t,f,a,o;return null==n&&(n="rgb"),arguments.length?(0===r&&(this._rgb=[0,0,0,this._rgb[3]]),1===r&&(this._rgb=[255,255,255,this._rgb[3]]),t=D(this._rgb),f=1e-7,a=20,o=function(e,t){var i,c;return c=e.interpolate(.5,t,n),i=c.luminance(),Math.abs(r-i)<f||!a--?c:i>r?o(e,c):o(c,t)},this._rgb=(t>r?o(new e("black"),this):o(this,new e("white"))).rgba(),this):D(this._rgb)},e.prototype.name=function(){var e,r;e=this.hex();for(r in l.colors)if(e===l.colors[r])return r;return e},e.prototype.alpha=function(e){return arguments.length?(this._rgb[3]=e,this):this._rgb[3]},e.prototype.css=function(e){var r,n,t,f;return null==e&&(e="rgb"),n=this,t=n._rgb,3===e.length&&t[3]<1&&(e+="a"),"rgb"===e?e+"("+t.slice(0,3).map(Math.round).join(",")+")":"rgba"===e?e+"("+t.slice(0,3).map(Math.round).join(",")+","+t[3]+")":"hsl"===e||"hsla"===e?(r=n.hsl(),f=function(e){return Math.round(100*e)/100},r[0]=f(r[0]),r[1]=f(100*r[1])+"%",r[2]=f(100*r[2])+"%",4===e.length&&(r[3]=t[3]),e+"("+r.join(",")+")"):void 0},e.prototype.interpolate=function(r,n,t){var f,a,o,i,c,d,s,u,l,b,h,g,p,m;if(u=this,null==t&&(t="rgb"),"string"===R(n)&&(n=new e(n)),"hsl"===t||"hsv"===t||"lch"===t||"hsi"===t)"hsl"===t?(p=u.hsl(),m=n.hsl()):"hsv"===t?(p=u.hsv(),m=n.hsv()):"hsi"===t?(p=u.hsi(),m=n.hsi()):"lch"===t&&(p=u.lch(),m=n.lch()),"h"===t.substr(0,1)?(o=p[0],h=p[1],d=p[2],i=m[0],g=m[1],s=m[2]):(d=p[0],h=p[1],o=p[2],s=m[0],g=m[1],i=m[2]),isNaN(o)||isNaN(i)?isNaN(o)?isNaN(i)?a=Number.NaN:(a=i,1!==d&&0!==d||"hsv"===t||(b=g)):(a=o,1!==s&&0!==s||"hsv"===t||(b=h)):(f=i>o&&i-o>180?i-(o+360):i<o&&o-i>180?i+360-o:i-o,a=o+r*f),null==b&&(b=h+r*(g-h)),c=d+r*(s-d),l="h"===t.substr(0,1)?new e(a,b,c,t):new e(c,b,a,t);else if("rgb"===t)p=u._rgb,m=n._rgb,l=new e(p[0]+r*(m[0]-p[0]),p[1]+r*(m[1]-p[1]),p[2]+r*(m[2]-p[2]),t);else{if("lab"!==t)throw"color mode "+t+" is not supported";p=u.lab(),m=n.lab(),l=new e(p[0]+r*(m[0]-p[0]),p[1]+r*(m[1]-p[1]),p[2]+r*(m[2]-p[2]),t)}return l.alpha(u.alpha()+r*(n.alpha()-u.alpha())),l},e.prototype.premultiply=function(){var e,r;return r=this.rgb(),e=this.alpha(),l(r[0]*e,r[1]*e,r[2]*e,e)},e.prototype.darken=function(e){var r,n;return null==e&&(e=20),n=this,r=n.lch(),r[0]-=e,l.lch(r).alpha(n.alpha())},e.prototype.darker=function(e){return this.darken(e)},e.prototype.brighten=function(e){return null==e&&(e=20),this.darken(-e)},e.prototype.brighter=function(e){return this.brighten(e)},e.prototype.saturate=function(e){var r,n;return null==e&&(e=20),n=this,r=n.lch(),r[1]+=e,l.lch(r).alpha(n.alpha())},e.prototype.desaturate=function(e){return null==e&&(e=20),this.saturate(-e)},e}(),b=function(e){var r;for(r in e)r<3?(e[r]<0&&(e[r]=0),e[r]>255&&(e[r]=255)):3===r&&(e[r]<0&&(e[r]=0),e[r]>1&&(e[r]=1));return e},p=function(e){var r,n,t,f,a,o,i,c;if(e=e.toLowerCase(),null!=l.colors&&l.colors[e])return m(l.colors[e]);if(t=e.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(f=t.slice(1,4),n=a=0;a<=2;n=++a)f[n]=+f[n];f[3]=1}else if(t=e.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(f=t.slice(1,5),n=o=0;o<=3;n=++o)f[n]=+f[n];else if(t=e.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(f=t.slice(1,4),n=i=0;i<=2;n=++i)f[n]=Math.round(2.55*f[n]);f[3]=1}else if(t=e.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(f=t.slice(1,5),n=c=0;c<=2;n=++c)f[n]=Math.round(2.55*f[n]);f[3]=+f[3]}else(t=e.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?(r=t.slice(1,4),r[1]*=.01,r[2]*=.01,f=w(r),f[3]=1):(t=e.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&(r=t.slice(1,4),r[1]*=.01,r[2]*=.01,f=w(r),f[3]=+t[4]);return f},m=function(e){var r,n,t,f,a,o;if(e.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return 4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),o=parseInt(e,16),f=o>>16,t=o>>8&255,n=255&o,[f,t,n,1];if(e.match(/^#?([A-Fa-f0-9]{8})$/))return 9===e.length&&(e=e.substr(1)),o=parseInt(e,16),f=o>>24&255,t=o>>16&255,n=o>>8&255,r=255&o,[f,t,n,r];if(a=p(e))return a;throw"unknown color: "+e},y=function(e,r,n){var t,f,i,c;return c=S(arguments),e=c[0],r=c[1],n=c[2],e/=360,e<1/3?(t=(1-r)/3,i=(1+r*g(o*e)/g(a-o*e))/3,f=1-(t+i)):e<2/3?(e-=1/3,i=(1-r)/3,f=(1+r*g(o*e)/g(a-o*e))/3,t=1-(i+f)):(e-=2/3,f=(1-r)/3,t=(1+r*g(o*e)/g(a-o*e))/3,i=1-(f+t)),i=N(n*i*3),f=N(n*f*3),t=N(n*t*3),[255*i,255*f,255*t]},w=function(){var e,r,n,t,f,a,o,i,c,d,s,u,l,b;if(l=S(arguments),t=l[0],i=l[1],a=l[2],0===i)o=n=e=255*a;else{for(s=[0,0,0],r=[0,0,0],d=a<.5?a*(1+i):a+i-a*i,c=2*a-d,t/=360,s[0]=t+1/3,s[1]=t,s[2]=t-1/3,f=u=0;u<=2;f=++u)s[f]<0&&(s[f]+=1),s[f]>1&&(s[f]-=1),6*s[f]<1?r[f]=c+6*(d-c)*s[f]:2*s[f]<1?r[f]=d:3*s[f]<2?r[f]=c+(d-c)*(2/3-s[f])*6:r[f]=c;b=[Math.round(255*r[0]),Math.round(255*r[1]),Math.round(255*r[2])],o=b[0],n=b[1],e=b[2]}return[o,n,e]},v=function(){var e,r,n,t,f,a,o,i,c,d,s,u,l,b,h,g,p,m;if(u=S(arguments),t=u[0],c=u[1],s=u[2],s*=255,0===c)i=n=e=s;else switch(360===t&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60,f=Math.floor(t),r=t-f,a=s*(1-c),o=s*(1-c*r),d=s*(1-c*(1-r)),f){case 0:l=[s,d,a],i=l[0],n=l[1],e=l[2];break;case 1:b=[o,s,a],i=b[0],n=b[1],e=b[2];break;case 2:h=[a,s,d],i=h[0],n=h[1],e=h[2];break;case 3:g=[a,o,s],i=g[0],n=g[1],e=g[2];break;case 4:p=[d,a,s],i=p[0],n=p[1],e=p[2];break;case 5:m=[s,a,o],i=m[0],n=m[1],e=m[2]}return i=Math.round(i),n=Math.round(n),e=Math.round(e),[i,n,e]},f=18,i=.95047,c=1,d=1.08883,x=function(){var e,r,n,t,f,a;return a=S(arguments),f=a[0],e=a[1],r=a[2],n=Math.sqrt(e*e+r*r),t=Math.atan2(r,e)/Math.PI*180,[f,n,t]},_=function(e,r,n){var t,f,a,o,s,u,l;return void 0!==e&&3===e.length&&(u=e,e=u[0],r=u[1],n=u[2]),void 0!==e&&3===e.length&&(l=e,e=l[0],r=l[1],n=l[2]),o=(e+16)/116,a=o+r/500,s=o-n/200,a=k(a)*i,o=k(o)*c,s=k(s)*d,f=C(3.2404542*a-1.5371385*o-.4985314*s),t=C(-.969266*a+1.8760108*o+.041556*s),n=C(.0556434*a-.2040259*o+1.0572252*s),[N(f,0,255),N(t,0,255),N(n,0,255),1]},k=function(e){return e>.206893034?e*e*e:(e-4/29)/7.787037},C=function(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))},j=function(){var e,r,n,t;return t=S(arguments),n=t[0],e=t[1],r=t[2],r=r*Math.PI/180,[n,Math.cos(r)*e,Math.sin(r)*e]},M=function(e,r,n){var t,f,a,o,i,c,d;return c=j(e,r,n),t=c[0],f=c[1],a=c[2],d=_(t,f,a),i=d[0],o=d[1],a=d[2],[N(i,0,255),N(o,0,255),N(a,0,255)]},D=function(e,r,n){var t;return t=S(arguments),e=t[0],r=t[1],n=t[2],e=U(e),r=U(r),n=U(n),.2126*e+.7152*r+.0722*n},U=function(e){return e/=255,e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},A=function(){var e,r,n,t,f,a;return a=S(arguments),n=a[0],r=a[1],e=a[2],f=n<<16|r<<8|e,t="000000"+f.toString(16),"#"+t.substr(t.length-6)},P=function(){var e,r,n,t,f,a,o,i,c;return c=S(arguments),o=c[0],n=c[1],r=c[2],e=2*Math.PI,o/=255,n/=255,r/=255,a=Math.min(o,n,r),f=(o+n+r)/3,i=1-a/f,0===i?t=0:(t=(o-n+(o-r))/2,t/=Math.sqrt((o-n)*(o-n)+(o-r)*(n-r)),t=Math.acos(t),r>n&&(t=e-t),t/=e),[360*t,i,f]},z=function(e,r,n){var t,f,a,o,i,c;return void 0!==e&&e.length>=3&&(c=e,e=c[0],r=c[1],n=c[2]),e/=255,r/=255,n/=255,o=Math.min(e,r,n),a=Math.max(e,r,n),f=(a+o)/2,a===o?(i=0,t=Number.NaN):i=f<.5?(a-o)/(a+o):(a-o)/(2-a-o),e===a?t=(r-n)/(a-o):r===a?t=2+(n-e)/(a-o):n===a&&(t=4+(e-r)/(a-o)),t*=60,t<0&&(t+=360),[t,i,f]},G=function(){var e,r,n,t,f,a,o,i,c,d;return d=S(arguments),o=d[0],n=d[1],e=d[2],a=Math.min(o,n,e),f=Math.max(o,n,e),r=f-a,c=f/255,0===f?(t=Number.NaN,i=0):(i=r/f,o===f&&(t=(n-e)/r),n===f&&(t=2+(e-o)/r),e===f&&(t=4+(o-n)/r),t*=60,t<0&&(t+=360)),[t,i,c]},E=function(){var e,r,n,t,f,a,o;return o=S(arguments),n=o[0],r=o[1],e=o[2],n=I(n),r=I(r),e=I(e),t=O((.4124564*n+.3575761*r+.1804375*e)/i),f=O((.2126729*n+.7151522*r+.072175*e)/c),a=O((.0193339*n+.119192*r+.9503041*e)/d),[116*f-16,500*(t-f),200*(f-a)]},I=function(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},O=function(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29},B=function(){var e,r,n,t,f,a,o;return a=S(arguments),f=a[0],n=a[1],r=a[2],o=E(f,n,r),t=o[0],e=o[1],r=o[2],x(t,e,r)},l.scale=function(e,r){var n,t,f,a,o,i,c,d,s,u,b,h,g,p,m,y,w,v,x,_,k;return y="rgb",w=l("#ccc"),k=0,g=!1,h=[0,1],u=[],x=!1,_=[],m=0,p=1,b=!1,v=0,s={},i=function(e,r){var n,t,f,a,i,c,d;if(null==e&&(e=["#ddd","#222"]),null!=e&&"string"===R(e)&&null!=(null!=(i=l.brewer)?i[e]:void 0)&&(e=l.brewer[e]),"array"===R(e)){for(e=e.slice(0),n=f=0,c=e.length-1;0<=c?f<=c:f>=c;n=0<=c?++f:--f)t=e[n],"string"===R(t)&&(e[n]=l(t));if(null!=r)_=r;else for(_=[],n=a=0,d=e.length-1;0<=d?a<=d:a>=d;n=0<=d?++a:--a)_.push(n/(e.length-1))}return o(),u=e},c=function(e){return null==e&&(e=[]),h=e,m=e[0],p=e[e.length-1],o(),v=2===e.length?0:e.length-1},f=function(e){var r,n;if(null!=h){for(n=h.length-1,r=0;r<n&&e>=h[r];)r++;return r-1}return 0},d=function(e){return e},n=function(e){var r,n,t,a,o;return o=e,h.length>2&&(a=h.length-1,r=f(e),t=h[0]+(h[1]-h[0])*(0+.5*k),n=h[a-1]+(h[a]-h[a-1])*(1-.5*k),o=m+(h[r]+.5*(h[r+1]-h[r])-t)/(n-t)*(p-m)),o},a=function(e,r){var n,t,a,o,i,c,b,g,x;if(null==r&&(r=!1),isNaN(e))return w;if(r?b=e:h.length>2?(n=f(e),b=n/(v-1)):(b=a=m!==p?(e-m)/(p-m):0,b=a=(e-m)/(p-m),b=Math.min(1,Math.max(0,b))),r||(b=d(b)),i=Math.floor(1e4*b),s[i])t=s[i];else{if("array"===R(u))for(o=g=0,x=_.length-1;0<=x?g<=x:g>=x;o=0<=x?++g:--g){if(c=_[o],b<=c){t=u[o];break}if(b>=c&&o===_.length-1){t=u[o];break}if(b>c&&b<_[o+1]){b=(b-c)/(_[o+1]-c),t=l.interpolate(u[o],u[o+1],b,y);break}}else"function"===R(u)&&(t=u(b));s[i]=t}return t},o=function(){return s={}},i(e,r),t=function(e){var r;return r=a(e),x&&r[x]?r[x]():r},t.domain=function(e,r,n,f){var a;return null==n&&(n="e"),arguments.length?(null!=r&&(a=l.analyze(e,f),e=0===r?[a.min,a.max]:l.limits(a,n,r)),c(e),t):h},t.mode=function(e){return arguments.length?(y=e,o(),t):y},t.range=function(e,r){return i(e,r),t},t.out=function(e){return x=e,t},t.spread=function(e){return arguments.length?(k=e,t):k},t.correctLightness=function(e){return arguments.length?(b=e,o(),d=b?function(e){var r,n,t,f,o,i,c,d,s;for(r=a(0,!0).lab()[0],n=a(1,!0).lab()[0],c=r>n,t=a(e,!0).lab()[0],o=r+(n-r)*e,f=t-o,d=0,s=1,i=20;Math.abs(f)>.01&&i-- >0;)!function(){return c&&(f*=-1),f<0?(d=e,e+=.5*(s-e)):(s=e,e+=.5*(d-e)),t=a(e,!0).lab()[0],f=t-o}();return e}:function(e){return e},t):b},t.colors=function(r){var n,f,a,o,i,c;if(null==r&&(r="hex"),e=[],f=[],h.length>2)for(n=a=1,c=h.length;1<=c?a<c:a>c;n=1<=c?++a:--a)f.push(.5*(h[n-1]+h[n]));else f=h;for(o=0,i=f.length;o<i;o++)n=f[o],e.push(t(n)[r]());return e},t},null==(T=l.scales)&&(l.scales={}),l.scales.cool=function(){return l.scale([l.hsl(180,1,.9),l.hsl(250,.7,.4)])},l.scales.hot=function(){return l.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")},l.analyze=function(e,r,n){var t,f,a,o,i,c,d;if(a={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0},null==n&&(n=function(){return!0}),t=function(e){null==e||isNaN(e)||(a.values.push(e),a.sum+=e,e<a.min&&(a.min=e),e>a.max&&(a.max=e),a.count+=1)},i=function(e,f){if(n(e,f))return t(null!=r&&"function"===R(r)?r(e):null!=r&&"string"===R(r)||"number"===R(r)?e[r]:e)},"array"===R(e))for(c=0,d=e.length;c<d;c++)o=e[c],i(o);else for(f in e)o=e[f],i(o,f);return a.domain=[a.min,a.max],a.limits=function(e,r){return l.limits(a,e,r)},a},l.limits=function(e,r,n){var t,f,a,o,i,c,d,s,u,b,h,g,p,m,y,w,v,x,_,k,j,M,N,D,U,A,P,z,G,E,B,I,q,S,O,C,T,Y,L,F,V,X,W,$,Z,H,J,K,Q,ee,re,ne,te,fe,ae,oe;if(null==r&&(r="equal"),null==n&&(n=7),"array"===R(e)&&(e=l.analyze(e)),p=e.min,h=e.max,N=e.sum,A=e.values.sort(function(e,r){return e-r}),b=[],"c"===r.substr(0,1)&&(b.push(p),b.push(h)),"e"===r.substr(0,1)){for(b.push(p),d=P=1,T=n-1;1<=T?P<=T:P>=T;d=1<=T?++P:--P)b.push(p+d/n*(h-p));b.push(h)}else if("l"===r.substr(0,1)){if(p<=0)throw"Logarithmic scales are only possible for values > 0";for(m=Math.LOG10E*Math.log(p),g=Math.LOG10E*Math.log(h),b.push(p),d=z=1,$=n-1;1<=$?z<=$:z>=$;d=1<=$?++z:--z)b.push(Math.pow(10,m+d/n*(g-m)));b.push(h)}else if("q"===r.substr(0,1)){for(b.push(p),d=G=1,Z=n-1;1<=Z?G<=Z:G>=Z;d=1<=Z?++G:--G)_=A.length*d/n,k=Math.floor(_),k===_?b.push(A[k]):(j=_-k,b.push(A[k]*j+A[k+1]*(1-j)));b.push(h)}else if("k"===r.substr(0,1)){for(w=A.length,t=new Array(w),i=new Array(n),M=!0,v=0,a=null,a=[],a.push(p),d=E=1,H=n-1;1<=H?E<=H:E>=H;d=1<=H?++E:--E)a.push(p+d/n*(h-p));for(a.push(h);M;){for(s=B=0,J=n-1;0<=J?B<=J:B>=J;s=0<=J?++B:--B)i[s]=0;for(d=I=0,K=w-1;0<=K?I<=K:I>=K;d=0<=K?++I:--I){for(U=A[d],y=Number.MAX_VALUE,s=q=0,Q=n-1;0<=Q?q<=Q:q>=Q;s=0<=Q?++q:--q)c=Math.abs(a[s]-U),c<y&&(y=c,f=s);i[f]++,t[d]=f}for(x=new Array(n),s=S=0,ee=n-1;0<=ee?S<=ee:S>=ee;s=0<=ee?++S:--S)x[s]=null;for(d=O=0,re=w-1;0<=re?O<=re:O>=re;d=0<=re?++O:--O)o=t[d],null===x[o]?x[o]=A[d]:x[o]+=A[d];for(s=C=0,Y=n-1;0<=Y?C<=Y:C>=Y;s=0<=Y?++C:--C)x[s]*=1/i[s];for(M=!1,s=ne=0,L=n-1;0<=L?ne<=L:ne>=L;s=0<=L?++ne:--ne)if(x[s]!==a[d]){M=!0;break}a=x,v++,v>200&&(M=!1)}for(u={},s=te=0,F=n-1;0<=F?te<=F:te>=F;s=0<=F?++te:--te)u[s]=[];for(d=fe=0,V=w-1;0<=V?fe<=V:fe>=V;d=0<=V?++fe:--fe)o=t[d],u[o].push(A[d]);for(D=[],s=ae=0,X=n-1;0<=X?ae<=X:ae>=X;s=0<=X?++ae:--ae)D.push(u[s][0]),D.push(u[s][u[s].length-1]);for(D=D.sort(function(e,r){return e-r}),b.push(D[0]),d=oe=1,W=D.length-1;oe<=W;d=oe+=2)isNaN(D[d])||b.push(D[d])}return b},l.brewer=u={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},l.colors=h={indigo:"#4b0082",gold:"#ffd700",hotpink:"#ff69b4",firebrick:"#b22222",indianred:"#cd5c5c",yellow:"#ffff00",mistyrose:"#ffe4e1",darkolivegreen:"#556b2f",olive:"#808000",darkseagreen:"#8fbc8f",pink:"#ffc0cb",tomato:"#ff6347",lightcoral:"#f08080",orangered:"#ff4500",navajowhite:"#ffdead",lime:"#00ff00",palegreen:"#98fb98",darkslategrey:"#2f4f4f",greenyellow:"#adff2f",burlywood:"#deb887",seashell:"#fff5ee",mediumspringgreen:"#00fa9a",fuchsia:"#ff00ff",papayawhip:"#ffefd5",blanchedalmond:"#ffebcd",chartreuse:"#7fff00",dimgray:"#696969",black:"#000000",peachpuff:"#ffdab9",springgreen:"#00ff7f",aquamarine:"#7fffd4",white:"#ffffff",orange:"#ffa500",lightsalmon:"#ffa07a",darkslategray:"#2f4f4f",brown:"#a52a2a",ivory:"#fffff0",dodgerblue:"#1e90ff",peru:"#cd853f",lawngreen:"#7cfc00",chocolate:"#d2691e",crimson:"#dc143c",forestgreen:"#228b22",darkgrey:"#a9a9a9",lightseagreen:"#20b2aa",cyan:"#00ffff",mintcream:"#f5fffa",silver:"#c0c0c0",antiquewhite:"#faebd7",mediumorchid:"#ba55d3",skyblue:"#87ceeb",gray:"#808080",darkturquoise:"#00ced1",goldenrod:"#daa520",darkgreen:"#006400",floralwhite:"#fffaf0",darkviolet:"#9400d3",darkgray:"#a9a9a9",moccasin:"#ffe4b5",saddlebrown:"#8b4513",grey:"#808080",darkslateblue:"#483d8b",lightskyblue:"#87cefa",lightpink:"#ffb6c1",mediumvioletred:"#c71585",slategrey:"#708090",red:"#ff0000",deeppink:"#ff1493",limegreen:"#32cd32",darkmagenta:"#8b008b",palegoldenrod:"#eee8aa",plum:"#dda0dd",turquoise:"#40e0d0",lightgrey:"#d3d3d3",lightgoldenrodyellow:"#fafad2",darkgoldenrod:"#b8860b",lavender:"#e6e6fa",maroon:"#800000",yellowgreen:"#9acd32",sandybrown:"#f4a460",thistle:"#d8bfd8",violet:"#ee82ee",navy:"#000080",magenta:"#ff00ff",dimgrey:"#696969",tan:"#d2b48c",rosybrown:"#bc8f8f",olivedrab:"#6b8e23",blue:"#0000ff",lightblue:"#add8e6",ghostwhite:"#f8f8ff",honeydew:"#f0fff0",cornflowerblue:"#6495ed",slateblue:"#6a5acd",linen:"#faf0e6",darkblue:"#00008b",powderblue:"#b0e0e6",seagreen:"#2e8b57",darkkhaki:"#bdb76b",snow:"#fffafa",sienna:"#a0522d",mediumblue:"#0000cd",royalblue:"#4169e1",lightcyan:"#e0ffff",green:"#008000",mediumpurple:"#9370db",midnightblue:"#191970",cornsilk:"#fff8dc",paleturquoise:"#afeeee",bisque:"#ffe4c4",slategray:"#708090",darkcyan:"#008b8b",khaki:"#f0e68c",wheat:"#f5deb3",teal:"#008080",darkorchid:"#9932cc",deepskyblue:"#00bfff",salmon:"#fa8072",darkred:"#8b0000",steelblue:"#4682b4",palevioletred:"#db7093",lightslategray:"#778899",aliceblue:"#f0f8ff",lightslategrey:"#778899",lightgreen:"#90ee90",orchid:"#da70d6",gainsboro:"#dcdcdc",mediumseagreen:"#3cb371",lightgray:"#d3d3d3",mediumturquoise:"#48d1cc",lemonchiffon:"#fffacd",cadetblue:"#5f9ea0",lightyellow:"#ffffe0",lavenderblush:"#fff0f5",coral:"#ff7f50",purple:"#800080",aqua:"#00ffff",whitesmoke:"#f5f5f5",mediumslateblue:"#7b68ee",darkorange:"#ff8c00",mediumaquamarine:"#66cdaa",darksalmon:"#e9967a",beige:"#f5f5dc",blueviolet:"#8a2be2",azure:"#f0ffff",lightsteelblue:"#b0c4de",oldlace:"#fdf5e6"},R=function(){var e,r,n,t,f;for(e={},f="Boolean Number String Function Array Date RegExp Undefined Null".split(" "),n=0,t=f.length;n<t;n++)r=f[n],e["[object "+r+"]"]=r.toLowerCase();return function(r){var n;return n=Object.prototype.toString.call(r),e[n]||"object"}}(),N=function(e,r,n){return null==r&&(r=0),null==n&&(n=1),e<r&&(e=r),e>n&&(e=n),e},S=function(e){return e.length>=3?e:e[0]},o=2*Math.PI,a=Math.PI/3,g=Math.cos,s=function(e){var r,n,t,f,a,o,i,c,d,u,b;return e=function(){var r,n,t;for(t=[],r=0,n=e.length;r<n;r++)f=e[r],t.push(l(f));return t}(),2===e.length?(d=function(){var r,n,t;for(t=[],r=0,n=e.length;r<n;r++)f=e[r],
2
- t.push(f.lab());return t}(),a=d[0],o=d[1],r=function(e){var r,n;return n=function(){var n,t;for(t=[],r=n=0;n<=2;r=++n)t.push(a[r]+e*(o[r]-a[r]));return t}(),l.lab.apply(l,n)}):3===e.length?(u=function(){var r,n,t;for(t=[],r=0,n=e.length;r<n;r++)f=e[r],t.push(f.lab());return t}(),a=u[0],o=u[1],i=u[2],r=function(e){var r,n;return n=function(){var n,t;for(t=[],r=n=0;n<=2;r=++n)t.push((1-e)*(1-e)*a[r]+2*(1-e)*e*o[r]+e*e*i[r]);return t}(),l.lab.apply(l,n)}):4===e.length?(b=function(){var r,n,t;for(t=[],r=0,n=e.length;r<n;r++)f=e[r],t.push(f.lab());return t}(),a=b[0],o=b[1],i=b[2],c=b[3],r=function(e){var r,n;return n=function(){var n,t;for(t=[],r=n=0;n<=2;r=++n)t.push((1-e)*(1-e)*(1-e)*a[r]+3*(1-e)*(1-e)*e*o[r]+3*(1-e)*e*e*i[r]+e*e*e*c[r]);return t}(),l.lab.apply(l,n)}):5===e.length&&(n=s(e.slice(0,3)),t=s(e.slice(2,5)),r=function(e){return e<.5?n(2*e):t(2*(e-.5))}),r},l.interpolate.bezier=s}).call(this)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/delaunay-fast/delaunay.js":[function(e,r,n){var t;!function(){"use strict";function e(e){var r,n,t,f,a,o,i=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY;for(r=e.length;r--;)e[r][0]<i&&(i=e[r][0]),e[r][0]>d&&(d=e[r][0]),e[r][1]<c&&(c=e[r][1]),e[r][1]>s&&(s=e[r][1]);return n=d-i,t=s-c,f=Math.max(n,t),a=i+.5*n,o=c+.5*t,[[a-20*f,o-f],[a,o+20*f],[a+20*f,o-f]]}function n(e,r,n,t){var f,o,i,c,d,s,u,l,b,h,g=e[r][0],p=e[r][1],m=e[n][0],y=e[n][1],w=e[t][0],v=e[t][1],x=Math.abs(p-y),_=Math.abs(y-v);if(x<a&&_<a)throw new Error("Eek! Coincident points!");return x<a?(c=-((w-m)/(v-y)),s=(m+w)/2,l=(y+v)/2,f=(m+g)/2,o=c*(f-s)+l):_<a?(i=-((m-g)/(y-p)),d=(g+m)/2,u=(p+y)/2,f=(w+m)/2,o=i*(f-d)+u):(i=-((m-g)/(y-p)),c=-((w-m)/(v-y)),d=(g+m)/2,s=(m+w)/2,u=(p+y)/2,l=(y+v)/2,f=(i*d-c*s+l-u)/(i-c),o=x>_?i*(f-d)+u:c*(f-s)+l),b=m-f,h=y-o,{i:r,j:n,k:t,x:f,y:o,r:b*b+h*h}}function f(e){var r,n,t,f,a,o;for(n=e.length;n;)for(f=e[--n],t=e[--n],r=n;r;)if(o=e[--r],a=e[--r],t===a&&f===o||t===o&&f===a){e.splice(n,2),e.splice(r,2);break}}var a=1/1048576;t={triangulate:function(r,t){var o,i,c,d,s,u,l,b,h,g,p,m,y=r.length;if(y<3)return[];if(r=r.slice(0),t)for(o=y;o--;)r[o]=r[o][t];for(c=new Array(y),o=y;o--;)c[o]=o;for(c.sort(function(e,n){return r[n][0]-r[e][0]}),d=e(r),r.push(d[0],d[1],d[2]),s=[n(r,y+0,y+1,y+2)],u=[],l=[],o=c.length;o--;l.length=0){for(m=c[o],i=s.length;i--;)b=r[m][0]-s[i].x,b>0&&b*b>s[i].r?(u.push(s[i]),s.splice(i,1)):(h=r[m][1]-s[i].y,b*b+h*h-s[i].r>a||(l.push(s[i].i,s[i].j,s[i].j,s[i].k,s[i].k,s[i].i),s.splice(i,1)));for(f(l),i=l.length;i;)p=l[--i],g=l[--i],s.push(n(r,g,p,m))}for(o=s.length;o--;)u.push(s[o]);for(s.length=0,o=u.length;o--;)u[o].i<y&&u[o].j<y&&u[o].k<y&&s.push(u[o].i,u[o].j,u[o].k);return s},contains:function(e,r){if(r[0]<e[0][0]&&r[0]<e[1][0]&&r[0]<e[2][0]||r[0]>e[0][0]&&r[0]>e[1][0]&&r[0]>e[2][0]||r[1]<e[0][1]&&r[1]<e[1][1]&&r[1]<e[2][1]||r[1]>e[0][1]&&r[1]>e[1][1]&&r[1]>e[2][1])return null;var n=e[1][0]-e[0][0],t=e[2][0]-e[0][0],f=e[1][1]-e[0][1],a=e[2][1]-e[0][1],o=n*a-t*f;if(0===o)return null;var i=(a*(r[0]-e[0][0])-t*(r[1]-e[0][1]))/o,c=(n*(r[1]-e[0][1])-f*(r[0]-e[0][0]))/o;return i<0||c<0||i+c>1?null:[i,c]}},"undefined"!=typeof r&&(r.exports=t)}()},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/index.js":[function(e,r,n){var t=e("./lib/alea"),f=e("./lib/xor128"),a=e("./lib/xorwow"),o=e("./lib/xorshift7"),i=e("./lib/xor4096"),c=e("./lib/tychei"),d=e("./seedrandom");d.alea=t,d.xor128=f,d.xorwow=a,d.xorshift7=o,d.xor4096=i,d.tychei=c,r.exports=d},{"./lib/alea":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/alea.js","./lib/tychei":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/tychei.js","./lib/xor128":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor128.js","./lib/xor4096":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor4096.js","./lib/xorshift7":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorshift7.js","./lib/xorwow":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorwow.js","./seedrandom":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/seedrandom.js"}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/alea.js":[function(r,n,t){!function(e,r,n){function t(e){var r=this,n=o();r.next=function(){var e=2091639*r.s0+2.3283064365386963e-10*r.c;return r.s0=r.s1,r.s1=r.s2,r.s2=e-(r.c=0|e)},r.c=1,r.s0=n(" "),r.s1=n(" "),r.s2=n(" "),r.s0-=n(e),r.s0<0&&(r.s0+=1),r.s1-=n(e),r.s1<0&&(r.s1+=1),r.s2-=n(e),r.s2<0&&(r.s2+=1),n=null}function f(e,r){return r.c=e.c,r.s0=e.s0,r.s1=e.s1,r.s2=e.s2,r}function a(e,r){var n=new t(e),a=r&&r.state,o=n.next;return o.int32=function(){return 4294967296*n.next()|0},o["double"]=function(){return o()+1.1102230246251565e-16*(2097152*o()|0)},o.quick=o,a&&("object"==typeof a&&f(a,n),o.state=function(){return f(n,{})}),o}function o(){var e=4022871197,r=function(r){r=r.toString();for(var n=0;n<r.length;n++){e+=r.charCodeAt(n);var t=.02519603282416938*e;e=t>>>0,t-=e,t*=e,e=t>>>0,t-=e,e+=4294967296*t}return 2.3283064365386963e-10*(e>>>0)};return r}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.alea=a}(this,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/tychei.js":[function(r,n,t){!function(e,r,n){function t(e){var r=this,n="";r.next=function(){var e=r.b,n=r.c,t=r.d,f=r.a;return e=e<<25^e>>>7^n,n=n-t|0,t=t<<24^t>>>8^f,f=f-e|0,r.b=e=e<<20^e>>>12^n,r.c=n=n-t|0,r.d=t<<16^n>>>16^f,r.a=f-e|0},r.a=0,r.b=0,r.c=-1640531527,r.d=1367130551,e===Math.floor(e)?(r.a=e/4294967296|0,r.b=0|e):n+=e;for(var t=0;t<n.length+20;t++)r.b^=0|n.charCodeAt(t),r.next()}function f(e,r){return r.a=e.a,r.b=e.b,r.c=e.c,r.d=e.d,r}function a(e,r){var n=new t(e),a=r&&r.state,o=function(){return(n.next()>>>0)/4294967296};return o["double"]=function(){do var e=n.next()>>>11,r=(n.next()>>>0)/4294967296,t=(e+r)/(1<<21);while(0===t);return t},o.int32=n.next,o.quick=o,a&&("object"==typeof a&&f(a,n),o.state=function(){return f(n,{})}),o}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.tychei=a}(this,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor128.js":[function(r,n,t){!function(e,r,n){function t(e){var r=this,n="";r.x=0,r.y=0,r.z=0,r.w=0,r.next=function(){var e=r.x^r.x<<11;return r.x=r.y,r.y=r.z,r.z=r.w,r.w^=r.w>>>19^e^e>>>8},e===(0|e)?r.x=e:n+=e;for(var t=0;t<n.length+64;t++)r.x^=0|n.charCodeAt(t),r.next()}function f(e,r){return r.x=e.x,r.y=e.y,r.z=e.z,r.w=e.w,r}function a(e,r){var n=new t(e),a=r&&r.state,o=function(){return(n.next()>>>0)/4294967296};return o["double"]=function(){do var e=n.next()>>>11,r=(n.next()>>>0)/4294967296,t=(e+r)/(1<<21);while(0===t);return t},o.int32=n.next,o.quick=o,a&&("object"==typeof a&&f(a,n),o.state=function(){return f(n,{})}),o}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.xor128=a}(this,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor4096.js":[function(r,n,t){!function(e,r,n){function t(e){function r(e,r){var n,t,f,a,o,i=[],c=128;for(r===(0|r)?(t=r,r=null):(r+="\0",t=0,c=Math.max(c,r.length)),f=0,a=-32;a<c;++a)r&&(t^=r.charCodeAt((a+32)%r.length)),0===a&&(o=t),t^=t<<10,t^=t>>>15,t^=t<<4,t^=t>>>13,a>=0&&(o=o+1640531527|0,n=i[127&a]^=t+o,f=0==n?f+1:0);for(f>=128&&(i[127&(r&&r.length||0)]=-1),f=127,a=512;a>0;--a)t=i[f+34&127],n=i[f=f+1&127],t^=t<<13,n^=n<<17,t^=t>>>15,n^=n>>>12,i[f]=t^n;e.w=o,e.X=i,e.i=f}var n=this;n.next=function(){var e,r,t=n.w,f=n.X,a=n.i;return n.w=t=t+1640531527|0,r=f[a+34&127],e=f[a=a+1&127],r^=r<<13,e^=e<<17,r^=r>>>15,e^=e>>>12,r=f[a]=r^e,n.i=a,r+(t^t>>>16)|0},r(n,e)}function f(e,r){return r.i=e.i,r.w=e.w,r.X=e.X.slice(),r}function a(e,r){null==e&&(e=+new Date);var n=new t(e),a=r&&r.state,o=function(){return(n.next()>>>0)/4294967296};return o["double"]=function(){do var e=n.next()>>>11,r=(n.next()>>>0)/4294967296,t=(e+r)/(1<<21);while(0===t);return t},o.int32=n.next,o.quick=o,a&&(a.X&&f(a,n),o.state=function(){return f(n,{})}),o}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.xor4096=a}(this,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorshift7.js":[function(r,n,t){!function(e,r,n){function t(e){function r(e,r){var n,t,f=[];if(r===(0|r))t=f[0]=r;else for(r=""+r,n=0;n<r.length;++n)f[7&n]=f[7&n]<<15^r.charCodeAt(n)+f[n+1&7]<<13;for(;f.length<8;)f.push(0);for(n=0;n<8&&0===f[n];++n);for(t=8==n?f[7]=-1:f[n],e.x=f,e.i=0,n=256;n>0;--n)e.next()}var n=this;n.next=function(){var e,r,t=n.x,f=n.i;return e=t[f],e^=e>>>7,r=e^e<<24,e=t[f+1&7],r^=e^e>>>10,e=t[f+3&7],r^=e^e>>>3,e=t[f+4&7],r^=e^e<<7,e=t[f+7&7],e^=e<<13,r^=e^e<<9,t[f]=r,n.i=f+1&7,r},r(n,e)}function f(e,r){return r.x=e.x.slice(),r.i=e.i,r}function a(e,r){null==e&&(e=+new Date);var n=new t(e),a=r&&r.state,o=function(){return(n.next()>>>0)/4294967296};return o["double"]=function(){do var e=n.next()>>>11,r=(n.next()>>>0)/4294967296,t=(e+r)/(1<<21);while(0===t);return t},o.int32=n.next,o.quick=o,a&&(a.x&&f(a,n),o.state=function(){return f(n,{})}),o}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.xorshift7=a}(this,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorwow.js":[function(r,n,t){!function(e,r,n){function t(e){var r=this,n="";r.next=function(){var e=r.x^r.x>>>2;return r.x=r.y,r.y=r.z,r.z=r.w,r.w=r.v,(r.d=r.d+362437|0)+(r.v=r.v^r.v<<4^(e^e<<1))|0},r.x=0,r.y=0,r.z=0,r.w=0,r.v=0,e===(0|e)?r.x=e:n+=e;for(var t=0;t<n.length+64;t++)r.x^=0|n.charCodeAt(t),t==n.length&&(r.d=r.x<<10^r.x>>>4),r.next()}function f(e,r){return r.x=e.x,r.y=e.y,r.z=e.z,r.w=e.w,r.v=e.v,r.d=e.d,r}function a(e,r){var n=new t(e),a=r&&r.state,o=function(){return(n.next()>>>0)/4294967296};return o["double"]=function(){do var e=n.next()>>>11,r=(n.next()>>>0)/4294967296,t=(e+r)/(1<<21);while(0===t);return t},o.int32=n.next,o.quick=o,a&&("object"==typeof a&&f(a,n),o.state=function(){return f(n,{})}),o}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.xorwow=a}(this,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/seedrandom.js":[function(r,n,t){!function(t,f){function a(e,r,n){var a=[];r=1==r?{entropy:!0}:r||{};var l=d(c(r.entropy?[e,u(t)]:null==e?s():e,3),a),b=new o(a),p=function(){for(var e=b.g(g),r=y,n=0;e<w;)e=(e+n)*h,r*=h,n=b.g(1);for(;e>=v;)e/=2,r/=2,n>>>=1;return(e+n)/r};return p.int32=function(){return 0|b.g(4)},p.quick=function(){return b.g(4)/4294967296},p["double"]=p,d(u(b.S),t),(r.pass||n||function(e,r,n,t){return t&&(t.S&&i(t,b),e.state=function(){return i(b,{})}),n?(f[m]=e,r):e})(p,l,"global"in r?r.global:this==f,r.state)}function o(e){var r,n=e.length,t=this,f=0,a=t.i=t.j=0,o=t.S=[];for(n||(e=[n++]);f<h;)o[f]=f++;for(f=0;f<h;f++)o[f]=o[a=x&a+e[f%n]+(r=o[f])],o[a]=r;(t.g=function(e){for(var r,n=0,f=t.i,a=t.j,o=t.S;e--;)r=o[f=x&f+1],n=n*h+o[x&(o[f]=o[a=x&a+r])+(o[a]=r)];return t.i=f,t.j=a,n})(h)}function i(e,r){return r.i=e.i,r.j=e.j,r.S=e.S.slice(),r}function c(e,r){var n,t=[],f=typeof e;if(r&&"object"==f)for(n in e)try{t.push(c(e[n],r-1))}catch(a){}return t.length?t:"string"==f?e:e+"\0"}function d(e,r){for(var n,t=e+"",f=0;f<t.length;)r[x&f]=x&(n^=19*r[x&f])+t.charCodeAt(f++);return u(r)}function s(){try{if(l)return u(l.randomBytes(h));var e=new Uint8Array(h);return(b.crypto||b.msCrypto).getRandomValues(e),u(e)}catch(r){var n=b.navigator,f=n&&n.plugins;return[+new Date,b,f,b.screen,u(t)]}}function u(e){return String.fromCharCode.apply(0,e)}var l,b=this,h=256,g=6,p=52,m="random",y=f.pow(h,g),w=f.pow(2,p),v=2*w,x=h-1;if(f["seed"+m]=a,d(f.random(),t),"object"==typeof n&&n.exports){n.exports=a;try{l=r("crypto")}catch(_){}}else"function"==typeof e&&e.amd&&e(function(){return a})}([],Math)},{crypto:!1}]},{},["./lib/trianglify.js"])("./lib/trianglify.js")});
1
+ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.Trianglify=e()}}(function(){var e;return function e(r,n,t){function f(o,i){if(!n[o]){if(!r[o]){var c="function"==typeof require&&require;if(!i&&c)return c(o,!0);if(a)return a(o,!0);var d=new Error("Cannot find module '"+o+"'");throw d.code="MODULE_NOT_FOUND",d}var s=n[o]={exports:{}};r[o][0].call(s.exports,function(e){var n=r[o][1][e];return f(n||e)},s,s.exports,e,r,n,t)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<t.length;o++)f(t[o]);return f}({"./lib/trianglify.js":[function(e,r,n){function t(e){function r(e,r,n){return(e-r[0])*(n[1]-n[0])/(r[1]-r[0])+n[0]}function n(){if(e.palette instanceof Array)return e.palette[Math.floor(rand()*e.palette.length)];var r=Object.keys(e.palette);return e.palette[r[Math.floor(rand()*r.length)]]}if(e=function(e,r){var n={};for(var t in e)n[t]=e[t];for(t in r){if(!e.hasOwnProperty(t))throw new Error(t+" is not a configuration option for Trianglify. Check your spelling?");n[t]=r[t]}return n}(d,e),rand=a(e.seed),"random"===e.x_colors&&(e.x_colors=n()),"random"===e.y_colors&&(e.y_colors=n()),"match_x"===e.y_colors&&(e.y_colors=e.x_colors),!(e.width>0&&e.height>0))throw new Error("Width and height must be numbers greater than 0");if(e.cell_size<2)throw new Error("Cell size must be greater than 2.");var t;if(e.color_function)t=function(r,n){return o(e.color_function(r,n))};else{var i=o.scale(e.x_colors).mode(e.color_space),s=o.scale(e.y_colors).mode(e.color_space);t=function(r,n){return o.interpolate(i(r),s(n),.5,e.color_space)}}for(var u=e.width,l=e.height,b=Math.floor((u+4*e.cell_size)/e.cell_size),h=Math.floor((l+4*e.cell_size)/e.cell_size),g=(b*e.cell_size-u)/2,p=(h*e.cell_size-l)/2,m=e.cell_size*e.variance/2,y=function(n,t){for(var f=[],a=-g;a<n+g;a+=e.cell_size)for(var o=-p;o<t+p;o+=e.cell_size){var i=a+e.cell_size/2+r(rand(),[0,1],[-m,m]),c=o+e.cell_size/2+r(rand(),[0,1],[-m,m]);f.push([i,c].map(Math.floor))}return f}(u,l),w=f.triangulate(y),v=[],x=function(e){return y[e]},_=0;_<w.length;_+=3){var k=[w[_],w[_+1],w[_+2]].map(x),j=function(e){return{x:(e[0][0]+e[1][0]+e[2][0])/3,y:(e[0][1]+e[1][1]+e[2][1])/3}}(k),M=t(function(e){return r(e,[-g,u+g],[0,1])}(j.x),function(e){return r(e,[-p,l+p],[0,1])}(j.y)).hex();v.push([M,k])}return c(v,e)}var f=e("delaunay-fast"),a=e("seedrandom"),o=e("chroma-js"),i=e("./colorbrewer"),c=e("./pattern"),d={width:600,height:400,cell_size:75,variance:.75,seed:null,x_colors:"random",y_colors:"match_x",palette:i,color_space:"lab",color_function:null,stroke_width:1.51};t.colorbrewer=i,t.defaults=d,r.exports=t},{"./colorbrewer":"/Users/gpriday/Downloads/trianglify-master 2/lib/colorbrewer.js","./pattern":"/Users/gpriday/Downloads/trianglify-master 2/lib/pattern.js","chroma-js":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/chroma-js/chroma.js","delaunay-fast":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/delaunay-fast/delaunay.js",seedrandom:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/index.js"}],"/Users/gpriday/Downloads/trianglify-master 2/lib/colorbrewer.js":[function(e,r,n){r.exports={YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]}},{}],"/Users/gpriday/Downloads/trianglify-master 2/lib/pattern.js":[function(e,r,n){(function(n){function t(r,t){function a(){var e=f.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width",t.width),e.setAttribute("height",t.height),r.forEach(function(r){var n=f.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("d","M"+r[1].join("L")+"Z"),n.setAttribute("fill",r[0]),n.setAttribute("stroke",r[0]),n.setAttribute("stroke-width",t.stroke_width),e.appendChild(n)}),e}function o(a){if(void 0!==n)try{e("canvas")}catch(e){throw Error("The optional node-canvas dependency is needed for Trianglify to render using canvas in node.")}return a||(a=f.createElement("canvas")),a.setAttribute("width",t.width),a.setAttribute("height",t.height),ctx=a.getContext("2d"),ctx.canvas.width=t.width,ctx.canvas.height=t.height,r.forEach(function(e){ctx.fillStyle=ctx.strokeStyle=e[0],ctx.lineWidth=t.stroke_width,ctx.beginPath(),ctx.moveTo.apply(ctx,e[1][0]),ctx.lineTo.apply(ctx,e[1][1]),ctx.lineTo.apply(ctx,e[1][2]),ctx.fill(),ctx.stroke()}),a}function i(){return o().toDataURL("image/png")}return{polys:r,opts:t,svg:a,canvas:o,png:i}}var f="undefined"!=typeof document?document:e("jsdom").jsdom("<html/>");r.exports=t}).call(this,e("_process"))},{_process:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/process/browser.js",canvas:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js",jsdom:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js"}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js":[function(e,r,n){},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/process/browser.js":[function(e,r,n){function t(){if(!i){i=!0;for(var e,r=o.length;r;){e=o,o=[];for(var n=-1;++n<r;)e[n]();r=o.length}i=!1}}function f(){}var a=r.exports={},o=[],i=!1;a.nextTick=function(e){o.push(e),i||setTimeout(t,0)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=f,a.addListener=f,a.once=f,a.off=f,a.removeListener=f,a.removeAllListeners=f,a.emit=f,a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/chroma-js/chroma.js":[function(r,n,t){(function(){var r,f,a,o,i,c,d,s,u,l,b,h,g,p,m,y,w,v,x,_,k,j,M,N,D,U,A,P,z,G,E,B,I,q,R;s=function(e,n,t,f){return new r(e,n,t,f)},void 0!==n&&null!==n&&null!=n.exports&&(n.exports=s),"function"==typeof e&&e.amd?e([],function(){return s}):(E=void 0!==t&&null!==t?t:this,E.chroma=s),s.color=function(e,n,t,f){return new r(e,n,t,f)},s.hsl=function(e,n,t,f){return new r(e,n,t,f,"hsl")},s.hsv=function(e,n,t,f){return new r(e,n,t,f,"hsv")},s.rgb=function(e,n,t,f){return new r(e,n,t,f,"rgb")},s.hex=function(e){return new r(e)},s.css=function(e){return new r(e)},s.lab=function(e,n,t){return new r(e,n,t,"lab")},s.lch=function(e,n,t){return new r(e,n,t,"lch")},s.hsi=function(e,n,t){return new r(e,n,t,"hsi")},s.gl=function(e,n,t,f){return new r(255*e,255*n,255*t,f,"gl")},s.interpolate=function(e,n,t,f){return null==e||null==n?"#000":("string"===B(e)&&(e=new r(e)),"string"===B(n)&&(n=new r(n)),e.interpolate(t,n,f))},s.mix=s.interpolate,s.contrast=function(e,n){var t,f;return"string"===B(e)&&(e=new r(e)),"string"===B(n)&&(n=new r(n)),t=e.luminance(),f=n.luminance(),t>f?(t+.05)/(f+.05):(f+.05)/(t+.05)},s.luminance=function(e){return s(e).luminance()},s._Color=r,r=function(){function e(){var e,r,n,t,f,a,o,i,c,d,s,l,b,y,v;for(f=this,n=[],c=0,d=arguments.length;c<d;c++)null!=(r=arguments[c])&&n.push(r);if(0===n.length)s=[255,0,255,1,"rgb"],a=s[0],o=s[1],i=s[2],e=s[3],t=s[4];else if("array"===B(n[0])){if(3===n[0].length)l=n[0],a=l[0],o=l[1],i=l[2],e=1;else{if(4!==n[0].length)throw"unknown input argument";b=n[0],a=b[0],o=b[1],i=b[2],e=b[3]}t=null!=(y=n[1])?y:"rgb"}else"string"===B(n[0])?(a=n[0],t="hex"):"object"===B(n[0])?(v=n[0]._rgb,a=v[0],o=v[1],i=v[2],e=v[3],t="rgb"):n.length>=3&&(a=n[0],o=n[1],i=n[2]);3===n.length?(t="rgb",e=1):4===n.length?"string"===B(n[3])?(t=n[3],e=1):"number"===B(n[3])&&(t="rgb",e=n[3]):5===n.length&&(e=n[3],t=n[4]),null==e&&(e=1),"rgb"===t?f._rgb=[a,o,i,e]:"gl"===t?f._rgb=[255*a,255*o,255*i,e]:"hsl"===t?(f._rgb=p(a,o,i),f._rgb[3]=e):"hsv"===t?(f._rgb=m(a,o,i),f._rgb[3]=e):"hex"===t?f._rgb=h(a):"lab"===t?(f._rgb=w(a,o,i),f._rgb[3]=e):"lch"===t?(f._rgb=_(a,o,i),f._rgb[3]=e):"hsi"===t&&(f._rgb=g(a,o,i),f._rgb[3]=e),u(f._rgb)}return e.prototype.rgb=function(){return this._rgb.slice(0,3)},e.prototype.rgba=function(){return this._rgb},e.prototype.hex=function(){return N(this._rgb)},e.prototype.toString=function(){return this.name()},e.prototype.hsl=function(){return U(this._rgb)},e.prototype.hsv=function(){return A(this._rgb)},e.prototype.lab=function(){return P(this._rgb)},e.prototype.lch=function(){return z(this._rgb)},e.prototype.hsi=function(){return D(this._rgb)},e.prototype.gl=function(){return[this._rgb[0]/255,this._rgb[1]/255,this._rgb[2]/255,this._rgb[3]]},e.prototype.luminance=function(r,n){var t,f,a,o;return null==n&&(n="rgb"),arguments.length?(0===r&&(this._rgb=[0,0,0,this._rgb[3]]),1===r&&(this._rgb=[255,255,255,this._rgb[3]]),t=j(this._rgb),f=1e-7,a=20,o=function(e,t){var i,c;return c=e.interpolate(.5,t,n),i=c.luminance(),Math.abs(r-i)<f||!a--?c:i>r?o(e,c):o(c,t)},this._rgb=(t>r?o(new e("black"),this):o(this,new e("white"))).rgba(),this):j(this._rgb)},e.prototype.name=function(){var e,r;e=this.hex();for(r in s.colors)if(e===s.colors[r])return r;return e},e.prototype.alpha=function(e){return arguments.length?(this._rgb[3]=e,this):this._rgb[3]},e.prototype.css=function(e){var r,n,t,f;return null==e&&(e="rgb"),n=this,t=n._rgb,3===e.length&&t[3]<1&&(e+="a"),"rgb"===e?e+"("+t.slice(0,3).map(Math.round).join(",")+")":"rgba"===e?e+"("+t.slice(0,3).map(Math.round).join(",")+","+t[3]+")":"hsl"===e||"hsla"===e?(r=n.hsl(),f=function(e){return Math.round(100*e)/100},r[0]=f(r[0]),r[1]=f(100*r[1])+"%",r[2]=f(100*r[2])+"%",4===e.length&&(r[3]=t[3]),e+"("+r.join(",")+")"):void 0},e.prototype.interpolate=function(r,n,t){var f,a,o,i,c,d,s,u,l,b,h,g,p,m;if(u=this,null==t&&(t="rgb"),"string"===B(n)&&(n=new e(n)),"hsl"===t||"hsv"===t||"lch"===t||"hsi"===t)"hsl"===t?(p=u.hsl(),m=n.hsl()):"hsv"===t?(p=u.hsv(),m=n.hsv()):"hsi"===t?(p=u.hsi(),m=n.hsi()):"lch"===t&&(p=u.lch(),m=n.lch()),"h"===t.substr(0,1)?(o=p[0],h=p[1],d=p[2],i=m[0],g=m[1],s=m[2]):(d=p[0],h=p[1],o=p[2],s=m[0],g=m[1],i=m[2]),isNaN(o)||isNaN(i)?isNaN(o)?isNaN(i)?a=Number.NaN:(a=i,1!==d&&0!==d||"hsv"===t||(b=g)):(a=o,1!==s&&0!==s||"hsv"===t||(b=h)):(f=i>o&&i-o>180?i-(o+360):i<o&&o-i>180?i+360-o:i-o,a=o+r*f),null==b&&(b=h+r*(g-h)),c=d+r*(s-d),l="h"===t.substr(0,1)?new e(a,b,c,t):new e(c,b,a,t);else if("rgb"===t)p=u._rgb,m=n._rgb,l=new e(p[0]+r*(m[0]-p[0]),p[1]+r*(m[1]-p[1]),p[2]+r*(m[2]-p[2]),t);else{if("lab"!==t)throw"color mode "+t+" is not supported";p=u.lab(),m=n.lab(),l=new e(p[0]+r*(m[0]-p[0]),p[1]+r*(m[1]-p[1]),p[2]+r*(m[2]-p[2]),t)}return l.alpha(u.alpha()+r*(n.alpha()-u.alpha())),l},e.prototype.premultiply=function(){var e,r;return r=this.rgb(),e=this.alpha(),s(r[0]*e,r[1]*e,r[2]*e,e)},e.prototype.darken=function(e){var r,n;return null==e&&(e=20),n=this,r=n.lch(),r[0]-=e,s.lch(r).alpha(n.alpha())},e.prototype.darker=function(e){return this.darken(e)},e.prototype.brighten=function(e){return null==e&&(e=20),this.darken(-e)},e.prototype.brighter=function(e){return this.brighten(e)},e.prototype.saturate=function(e){var r,n;return null==e&&(e=20),n=this,r=n.lch(),r[1]+=e,s.lch(r).alpha(n.alpha())},e.prototype.desaturate=function(e){return null==e&&(e=20),this.saturate(-e)},e}(),u=function(e){var r;for(r in e)r<3?(e[r]<0&&(e[r]=0),e[r]>255&&(e[r]=255)):3===r&&(e[r]<0&&(e[r]=0),e[r]>1&&(e[r]=1));return e},b=function(e){var r,n,t,f,a,o,i,c;if(e=e.toLowerCase(),null!=s.colors&&s.colors[e])return h(s.colors[e]);if(t=e.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(f=t.slice(1,4),n=a=0;a<=2;n=++a)f[n]=+f[n];f[3]=1}else if(t=e.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(f=t.slice(1,5),n=o=0;o<=3;n=++o)f[n]=+f[n];else if(t=e.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(f=t.slice(1,4),n=i=0;i<=2;n=++i)f[n]=Math.round(2.55*f[n]);f[3]=1}else if(t=e.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(f=t.slice(1,5),n=c=0;c<=2;n=++c)f[n]=Math.round(2.55*f[n]);f[3]=+f[3]}else(t=e.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?(r=t.slice(1,4),r[1]*=.01,r[2]*=.01,f=p(r),f[3]=1):(t=e.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&(r=t.slice(1,4),r[1]*=.01,r[2]*=.01,f=p(r),f[3]=+t[4]);return f},h=function(e){var r,n,t,f,a,o;if(e.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return 4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),o=parseInt(e,16),f=o>>16,t=o>>8&255,n=255&o,[f,t,n,1];if(e.match(/^#?([A-Fa-f0-9]{8})$/))return 9===e.length&&(e=e.substr(1)),o=parseInt(e,16),f=o>>24&255,t=o>>16&255,n=o>>8&255,r=255&o,[f,t,n,r];if(a=b(e))return a;throw"unknown color: "+e},g=function(e,r,n){var t,o,i,c;return c=I(arguments),e=c[0],r=c[1],n=c[2],e/=360,e<1/3?(t=(1-r)/3,i=(1+r*l(a*e)/l(f-a*e))/3,o=1-(t+i)):e<2/3?(e-=1/3,i=(1-r)/3,o=(1+r*l(a*e)/l(f-a*e))/3,t=1-(i+o)):(e-=2/3,o=(1-r)/3,t=(1+r*l(a*e)/l(f-a*e))/3,i=1-(o+t)),i=k(n*i*3),o=k(n*o*3),t=k(n*t*3),[255*i,255*o,255*t]},p=function(){var e,r,n,t,f,a,o,i,c,d,s,u,l,b;if(l=I(arguments),t=l[0],i=l[1],a=l[2],0===i)o=n=e=255*a;else{for(s=[0,0,0],r=[0,0,0],d=a<.5?a*(1+i):a+i-a*i,c=2*a-d,t/=360,s[0]=t+1/3,s[1]=t,s[2]=t-1/3,f=u=0;u<=2;f=++u)s[f]<0&&(s[f]+=1),s[f]>1&&(s[f]-=1),6*s[f]<1?r[f]=c+6*(d-c)*s[f]:2*s[f]<1?r[f]=d:3*s[f]<2?r[f]=c+(d-c)*(2/3-s[f])*6:r[f]=c;b=[Math.round(255*r[0]),Math.round(255*r[1]),Math.round(255*r[2])],o=b[0],n=b[1],e=b[2]}return[o,n,e]},m=function(){var e,r,n,t,f,a,o,i,c,d,s,u,l,b,h,g,p,m;if(u=I(arguments),t=u[0],c=u[1],s=u[2],s*=255,0===c)i=n=e=s;else switch(360===t&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60,f=Math.floor(t),r=t-f,a=s*(1-c),o=s*(1-c*r),d=s*(1-c*(1-r)),f){case 0:l=[s,d,a],i=l[0],n=l[1],e=l[2];break;case 1:b=[o,s,a],i=b[0],n=b[1],e=b[2];break;case 2:h=[a,s,d],i=h[0],n=h[1],e=h[2];break;case 3:g=[a,o,s],i=g[0],n=g[1],e=g[2];break;case 4:p=[d,a,s],i=p[0],n=p[1],e=p[2];break;case 5:m=[s,a,o],i=m[0],n=m[1],e=m[2]}return i=Math.round(i),n=Math.round(n),e=Math.round(e),[i,n,e]},o=.95047,i=1,c=1.08883,y=function(){var e,r,n,t,f,a;return a=I(arguments),f=a[0],e=a[1],r=a[2],n=Math.sqrt(e*e+r*r),t=Math.atan2(r,e)/Math.PI*180,[f,n,t]},w=function(e,r,n){var t,f,a,d,s,u,l;return void 0!==e&&3===e.length&&(u=e,e=u[0],r=u[1],n=u[2]),void 0!==e&&3===e.length&&(l=e,e=l[0],r=l[1],n=l[2]),d=(e+16)/116,a=d+r/500,s=d-n/200,a=v(a)*o,d=v(d)*i,s=v(s)*c,f=R(3.2404542*a-1.5371385*d-.4985314*s),t=R(-.969266*a+1.8760108*d+.041556*s),n=R(.0556434*a-.2040259*d+1.0572252*s),[k(f,0,255),k(t,0,255),k(n,0,255),1]},v=function(e){return e>.206893034?e*e*e:(e-4/29)/7.787037},R=function(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))},x=function(){var e,r,n,t;return t=I(arguments),n=t[0],e=t[1],r=t[2],r=r*Math.PI/180,[n,Math.cos(r)*e,Math.sin(r)*e]},_=function(e,r,n){var t,f,a,o,i,c,d;return c=x(e,r,n),t=c[0],f=c[1],a=c[2],d=w(t,f,a),i=d[0],o=d[1],a=d[2],[k(i,0,255),k(o,0,255),k(a,0,255)]},j=function(e,r,n){var t;return t=I(arguments),e=t[0],r=t[1],n=t[2],e=M(e),r=M(r),n=M(n),.2126*e+.7152*r+.0722*n},M=function(e){return e/=255,e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},N=function(){var e,r,n,t,f,a;return a=I(arguments),n=a[0],r=a[1],e=a[2],f=n<<16|r<<8|e,t="000000"+f.toString(16),"#"+t.substr(t.length-6)},D=function(){var e,r,n,t,f,a,o,i,c;return c=I(arguments),o=c[0],n=c[1],r=c[2],e=2*Math.PI,o/=255,n/=255,r/=255,a=Math.min(o,n,r),f=(o+n+r)/3,i=1-a/f,0===i?t=0:(t=(o-n+(o-r))/2,t/=Math.sqrt((o-n)*(o-n)+(o-r)*(n-r)),t=Math.acos(t),r>n&&(t=e-t),t/=e),[360*t,i,f]},U=function(e,r,n){var t,f,a,o,i,c;return void 0!==e&&e.length>=3&&(c=e,e=c[0],r=c[1],n=c[2]),e/=255,r/=255,n/=255,o=Math.min(e,r,n),a=Math.max(e,r,n),f=(a+o)/2,a===o?(i=0,t=Number.NaN):i=f<.5?(a-o)/(a+o):(a-o)/(2-a-o),e===a?t=(r-n)/(a-o):r===a?t=2+(n-e)/(a-o):n===a&&(t=4+(e-r)/(a-o)),t*=60,t<0&&(t+=360),[t,i,f]},A=function(){var e,r,n,t,f,a,o,i,c,d;return d=I(arguments),o=d[0],n=d[1],e=d[2],a=Math.min(o,n,e),f=Math.max(o,n,e),r=f-a,c=f/255,0===f?(t=Number.NaN,i=0):(i=r/f,o===f&&(t=(n-e)/r),n===f&&(t=2+(e-o)/r),e===f&&(t=4+(o-n)/r),(t*=60)<0&&(t+=360)),[t,i,c]},P=function(){var e,r,n,t,f,a,d;return d=I(arguments),n=d[0],r=d[1],e=d[2],n=G(n),r=G(r),e=G(e),t=q((.4124564*n+.3575761*r+.1804375*e)/o),f=q((.2126729*n+.7151522*r+.072175*e)/i),a=q((.0193339*n+.119192*r+.9503041*e)/c),[116*f-16,500*(t-f),200*(f-a)]},G=function(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},q=function(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29},z=function(){var e,r,n,t,f,a,o;return a=I(arguments),f=a[0],n=a[1],r=a[2],o=P(f,n,r),t=o[0],e=o[1],r=o[2],y(t,e,r)},s.scale=function(e,r){var n,t,f,a,o,i,c,d,u,l,b,h,g,p,m,y,w,v,x;return p="rgb",m=s("#ccc"),x=0,!1,b=[0,1],u=[],w=!1,v=[],g=0,h=1,l=!1,y=0,d={},o=function(e,r){var n,t,f,o,i,c,d;if(null==e&&(e=["#ddd","#222"]),null!=e&&"string"===B(e)&&null!=(null!=(i=s.brewer)?i[e]:void 0)&&(e=s.brewer[e]),"array"===B(e)){for(e=e.slice(0),n=f=0,c=e.length-1;0<=c?f<=c:f>=c;n=0<=c?++f:--f)t=e[n],"string"===B(t)&&(e[n]=s(t));if(null!=r)v=r;else for(v=[],n=o=0,d=e.length-1;0<=d?o<=d:o>=d;n=0<=d?++o:--o)v.push(n/(e.length-1))}return a(),u=e},i=function(e){return null==e&&(e=[]),b=e,g=e[0],h=e[e.length-1],a(),y=2===e.length?0:e.length-1},t=function(e){var r,n;if(null!=b){for(n=b.length-1,r=0;r<n&&e>=b[r];)r++;return r-1}return 0},c=function(e){return e},function(e){var r,n,f,a,o;return o=e,b.length>2&&(a=b.length-1,r=t(e),f=b[0]+(b[1]-b[0])*(0+.5*x),n=b[a-1]+(b[a]-b[a-1])*(1-.5*x),o=g+(b[r]+.5*(b[r+1]-b[r])-f)/(n-f)*(h-g)),o},f=function(e,r){var n,f,a,o,i,l,w,x;if(null==r&&(r=!1),isNaN(e))return m;if(r?l=e:b.length>2?(n=t(e),l=n/(y-1)):(l=g!==h?(e-g)/(h-g):0,l=(e-g)/(h-g),l=Math.min(1,Math.max(0,l))),r||(l=c(l)),o=Math.floor(1e4*l),d[o])f=d[o];else{if("array"===B(u))for(a=w=0,x=v.length-1;0<=x?w<=x:w>=x;a=0<=x?++w:--w){if(i=v[a],l<=i){f=u[a];break}if(l>=i&&a===v.length-1){f=u[a];break}if(l>i&&l<v[a+1]){l=(l-i)/(v[a+1]-i),f=s.interpolate(u[a],u[a+1],l,p);break}}else"function"===B(u)&&(f=u(l));d[o]=f}return f},a=function(){return d={}},o(e,r),n=function(e){var r;return r=f(e),w&&r[w]?r[w]():r},n.domain=function(e,r,t,f){var a;return null==t&&(t="e"),arguments.length?(null!=r&&(a=s.analyze(e,f),e=0===r?[a.min,a.max]:s.limits(a,t,r)),i(e),n):b},n.mode=function(e){return arguments.length?(p=e,a(),n):p},n.range=function(e,r){return o(e,r),n},n.out=function(e){return w=e,n},n.spread=function(e){return arguments.length?(x=e,n):x},n.correctLightness=function(e){return arguments.length?(l=e,a(),c=l?function(e){var r,n,t,a,o,i,c,d,s;for(r=f(0,!0).lab()[0],n=f(1,!0).lab()[0],c=r>n,t=f(e,!0).lab()[0],o=r+(n-r)*e,a=t-o,d=0,s=1,i=20;Math.abs(a)>.01&&i-- >0;)!function(){c&&(a*=-1),a<0?(d=e,e+=.5*(s-e)):(s=e,e+=.5*(d-e)),t=f(e,!0).lab()[0],a=t-o}();return e}:function(e){return e},n):l},n.colors=function(r){var t,f,a,o,i,c;if(null==r&&(r="hex"),e=[],f=[],b.length>2)for(t=a=1,c=b.length;1<=c?a<c:a>c;t=1<=c?++a:--a)f.push(.5*(b[t-1]+b[t]));else f=b;for(o=0,i=f.length;o<i;o++)t=f[o],e.push(n(t)[r]());return e},n},null==s.scales&&(s.scales={}),s.scales.cool=function(){return s.scale([s.hsl(180,1,.9),s.hsl(250,.7,.4)])},s.scales.hot=function(){return s.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")},s.analyze=function(e,r,n){var t,f,a,o,i,c,d;if(a={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},null==n&&(n=function(){return!0}),t=function(e){null==e||isNaN(e)||(a.values.push(e),a.sum+=e,e<a.min&&(a.min=e),e>a.max&&(a.max=e),a.count+=1)},i=function(e,f){if(n(e,f))return t(null!=r&&"function"===B(r)?r(e):null!=r&&"string"===B(r)||"number"===B(r)?e[r]:e)},"array"===B(e))for(c=0,d=e.length;c<d;c++)o=e[c],i(o);else for(f in e)o=e[f],i(o,f);return a.domain=[a.min,a.max],a.limits=function(e,r){return s.limits(a,e,r)},a},s.limits=function(e,r,n){var t,f,a,o,i,c,d,u,l,b,h,g,p,m,y,w,v,x,_,k,j,M,N,D,U,A,P,z,G,E,I,q,R,S,O,C,T,Y,L,F,V,X,W,$,Z,H,J,K,Q,ee,re,ne,te,fe,ae;if(null==r&&(r="equal"),null==n&&(n=7),"array"===B(e)&&(e=s.analyze(e)),p=e.min,h=e.max,e.sum,U=e.values.sort(function(e,r){return e-r}),b=[],"c"===r.substr(0,1)&&(b.push(p),b.push(h)),"e"===r.substr(0,1)){for(b.push(p),d=A=1,C=n-1;1<=C?A<=C:A>=C;d=1<=C?++A:--A)b.push(p+d/n*(h-p));b.push(h)}else if("l"===r.substr(0,1)){if(p<=0)throw"Logarithmic scales are only possible for values > 0";for(m=Math.LOG10E*Math.log(p),g=Math.LOG10E*Math.log(h),b.push(p),d=P=1,W=n-1;1<=W?P<=W:P>=W;d=1<=W?++P:--P)b.push(Math.pow(10,m+d/n*(g-m)));b.push(h)}else if("q"===r.substr(0,1)){for(b.push(p),d=z=1,$=n-1;1<=$?z<=$:z>=$;d=1<=$?++z:--z)_=U.length*d/n,k=Math.floor(_),k===_?b.push(U[k]):(j=_-k,b.push(U[k]*j+U[k+1]*(1-j)));b.push(h)}else if("k"===r.substr(0,1)){for(w=U.length,t=new Array(w),i=new Array(n),M=!0,v=0,a=null,a=[],a.push(p),d=G=1,Z=n-1;1<=Z?G<=Z:G>=Z;d=1<=Z?++G:--G)a.push(p+d/n*(h-p));for(a.push(h);M;){for(u=E=0,H=n-1;0<=H?E<=H:E>=H;u=0<=H?++E:--E)i[u]=0;for(d=I=0,J=w-1;0<=J?I<=J:I>=J;d=0<=J?++I:--I){for(D=U[d],y=Number.MAX_VALUE,u=q=0,K=n-1;0<=K?q<=K:q>=K;u=0<=K?++q:--q)(c=Math.abs(a[u]-D))<y&&(y=c,f=u);i[f]++,t[d]=f}for(x=new Array(n),u=R=0,Q=n-1;0<=Q?R<=Q:R>=Q;u=0<=Q?++R:--R)x[u]=null;for(d=S=0,ee=w-1;0<=ee?S<=ee:S>=ee;d=0<=ee?++S:--S)o=t[d],null===x[o]?x[o]=U[d]:x[o]+=U[d];for(u=O=0,T=n-1;0<=T?O<=T:O>=T;u=0<=T?++O:--O)x[u]*=1/i[u];for(M=!1,u=re=0,Y=n-1;0<=Y?re<=Y:re>=Y;u=0<=Y?++re:--re)if(x[u]!==a[d]){M=!0;break}a=x,v++,v>200&&(M=!1)}for(l={},u=ne=0,L=n-1;0<=L?ne<=L:ne>=L;u=0<=L?++ne:--ne)l[u]=[];for(d=te=0,F=w-1;0<=F?te<=F:te>=F;d=0<=F?++te:--te)o=t[d],l[o].push(U[d]);for(N=[],u=fe=0,V=n-1;0<=V?fe<=V:fe>=V;u=0<=V?++fe:--fe)N.push(l[u][0]),N.push(l[u][l[u].length-1]);for(N=N.sort(function(e,r){return e-r}),b.push(N[0]),d=ae=1,X=N.length-1;ae<=X;d=ae+=2)isNaN(N[d])||b.push(N[d])}return b},s.brewer={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},s.colors={indigo:"#4b0082",gold:"#ffd700",hotpink:"#ff69b4",firebrick:"#b22222",indianred:"#cd5c5c",yellow:"#ffff00",mistyrose:"#ffe4e1",darkolivegreen:"#556b2f",olive:"#808000",darkseagreen:"#8fbc8f",pink:"#ffc0cb",tomato:"#ff6347",lightcoral:"#f08080",orangered:"#ff4500",navajowhite:"#ffdead",lime:"#00ff00",palegreen:"#98fb98",darkslategrey:"#2f4f4f",greenyellow:"#adff2f",burlywood:"#deb887",seashell:"#fff5ee",mediumspringgreen:"#00fa9a",fuchsia:"#ff00ff",papayawhip:"#ffefd5",blanchedalmond:"#ffebcd",chartreuse:"#7fff00",dimgray:"#696969",black:"#000000",peachpuff:"#ffdab9",springgreen:"#00ff7f",aquamarine:"#7fffd4",white:"#ffffff",orange:"#ffa500",lightsalmon:"#ffa07a",darkslategray:"#2f4f4f",brown:"#a52a2a",ivory:"#fffff0",dodgerblue:"#1e90ff",peru:"#cd853f",lawngreen:"#7cfc00",chocolate:"#d2691e",crimson:"#dc143c",forestgreen:"#228b22",darkgrey:"#a9a9a9",lightseagreen:"#20b2aa",cyan:"#00ffff",mintcream:"#f5fffa",silver:"#c0c0c0",antiquewhite:"#faebd7",mediumorchid:"#ba55d3",skyblue:"#87ceeb",gray:"#808080",darkturquoise:"#00ced1",goldenrod:"#daa520",darkgreen:"#006400",floralwhite:"#fffaf0",darkviolet:"#9400d3",darkgray:"#a9a9a9",moccasin:"#ffe4b5",saddlebrown:"#8b4513",grey:"#808080",darkslateblue:"#483d8b",lightskyblue:"#87cefa",lightpink:"#ffb6c1",mediumvioletred:"#c71585",slategrey:"#708090",red:"#ff0000",deeppink:"#ff1493",limegreen:"#32cd32",darkmagenta:"#8b008b",palegoldenrod:"#eee8aa",plum:"#dda0dd",turquoise:"#40e0d0",lightgrey:"#d3d3d3",lightgoldenrodyellow:"#fafad2",darkgoldenrod:"#b8860b",lavender:"#e6e6fa",maroon:"#800000",yellowgreen:"#9acd32",sandybrown:"#f4a460",thistle:"#d8bfd8",violet:"#ee82ee",navy:"#000080",magenta:"#ff00ff",dimgrey:"#696969",tan:"#d2b48c",rosybrown:"#bc8f8f",olivedrab:"#6b8e23",blue:"#0000ff",lightblue:"#add8e6",ghostwhite:"#f8f8ff",honeydew:"#f0fff0",cornflowerblue:"#6495ed",slateblue:"#6a5acd",linen:"#faf0e6",darkblue:"#00008b",powderblue:"#b0e0e6",seagreen:"#2e8b57",darkkhaki:"#bdb76b",snow:"#fffafa",sienna:"#a0522d",mediumblue:"#0000cd",royalblue:"#4169e1",lightcyan:"#e0ffff",green:"#008000",mediumpurple:"#9370db",midnightblue:"#191970",cornsilk:"#fff8dc",paleturquoise:"#afeeee",bisque:"#ffe4c4",slategray:"#708090",darkcyan:"#008b8b",khaki:"#f0e68c",wheat:"#f5deb3",teal:"#008080",darkorchid:"#9932cc",deepskyblue:"#00bfff",salmon:"#fa8072",darkred:"#8b0000",steelblue:"#4682b4",palevioletred:"#db7093",lightslategray:"#778899",aliceblue:"#f0f8ff",lightslategrey:"#778899",lightgreen:"#90ee90",orchid:"#da70d6",gainsboro:"#dcdcdc",mediumseagreen:"#3cb371",lightgray:"#d3d3d3",mediumturquoise:"#48d1cc",lemonchiffon:"#fffacd",cadetblue:"#5f9ea0",lightyellow:"#ffffe0",lavenderblush:"#fff0f5",coral:"#ff7f50",purple:"#800080",aqua:"#00ffff",whitesmoke:"#f5f5f5",mediumslateblue:"#7b68ee",darkorange:"#ff8c00",mediumaquamarine:"#66cdaa",darksalmon:"#e9967a",beige:"#f5f5dc",blueviolet:"#8a2be2",azure:"#f0ffff",lightsteelblue:"#b0c4de",oldlace:"#fdf5e6"},B=function(){var e,r,n,t,f;for(e={},f="Boolean Number String Function Array Date RegExp Undefined Null".split(" "),n=0,t=f.length;n<t;n++)r=f[n],e["[object "+r+"]"]=r.toLowerCase();return function(r){var n;return n=Object.prototype.toString.call(r),e[n]||"object"}}(),k=function(e,r,n){return null==r&&(r=0),null==n&&(n=1),e<r&&(e=r),e>n&&(e=n),e},I=function(e){return e.length>=3?e:e[0]},a=2*Math.PI,f=Math.PI/3,l=Math.cos,d=function(e){var r,n,t,f,a,o,i,c,u,l,b;return e=function(){var r,n,t;for(t=[],r=0,n=e.length;r<n;r++)f=e[r],t.push(s(f));return t}(),2===e.length?(u=function(){var r,n,t;for(t=[],r=0,n=e.length;r<n;r++)f=e[r],t.push(f.lab());return t}(),a=u[0],o=u[1],r=function(e){var r,n;return n=function(){
2
+ var n,t;for(t=[],r=n=0;n<=2;r=++n)t.push(a[r]+e*(o[r]-a[r]));return t}(),s.lab.apply(s,n)}):3===e.length?(l=function(){var r,n,t;for(t=[],r=0,n=e.length;r<n;r++)f=e[r],t.push(f.lab());return t}(),a=l[0],o=l[1],i=l[2],r=function(e){var r,n;return n=function(){var n,t;for(t=[],r=n=0;n<=2;r=++n)t.push((1-e)*(1-e)*a[r]+2*(1-e)*e*o[r]+e*e*i[r]);return t}(),s.lab.apply(s,n)}):4===e.length?(b=function(){var r,n,t;for(t=[],r=0,n=e.length;r<n;r++)f=e[r],t.push(f.lab());return t}(),a=b[0],o=b[1],i=b[2],c=b[3],r=function(e){var r,n;return n=function(){var n,t;for(t=[],r=n=0;n<=2;r=++n)t.push((1-e)*(1-e)*(1-e)*a[r]+3*(1-e)*(1-e)*e*o[r]+3*(1-e)*e*e*i[r]+e*e*e*c[r]);return t}(),s.lab.apply(s,n)}):5===e.length&&(n=d(e.slice(0,3)),t=d(e.slice(2,5)),r=function(e){return e<.5?n(2*e):t(2*(e-.5))}),r},s.interpolate.bezier=d}).call(this)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/delaunay-fast/delaunay.js":[function(e,r,n){var t;!function(){"use strict";function e(e){var r,n,t,f,a,o,i=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY;for(r=e.length;r--;)e[r][0]<i&&(i=e[r][0]),e[r][0]>d&&(d=e[r][0]),e[r][1]<c&&(c=e[r][1]),e[r][1]>s&&(s=e[r][1]);return n=d-i,t=s-c,f=Math.max(n,t),a=i+.5*n,o=c+.5*t,[[a-20*f,o-f],[a,o+20*f],[a+20*f,o-f]]}function n(e,r,n,t){var f,o,i,c,d,s,u,l,b,h,g=e[r][0],p=e[r][1],m=e[n][0],y=e[n][1],w=e[t][0],v=e[t][1],x=Math.abs(p-y),_=Math.abs(y-v);if(x<a&&_<a)throw new Error("Eek! Coincident points!");return x<a?(c=-(w-m)/(v-y),s=(m+w)/2,l=(y+v)/2,f=(m+g)/2,o=c*(f-s)+l):_<a?(i=-(m-g)/(y-p),d=(g+m)/2,u=(p+y)/2,f=(w+m)/2,o=i*(f-d)+u):(i=-(m-g)/(y-p),c=-(w-m)/(v-y),d=(g+m)/2,s=(m+w)/2,u=(p+y)/2,l=(y+v)/2,f=(i*d-c*s+l-u)/(i-c),o=x>_?i*(f-d)+u:c*(f-s)+l),b=m-f,h=y-o,{i:r,j:n,k:t,x:f,y:o,r:b*b+h*h}}function f(e){var r,n,t,f,a,o;for(n=e.length;n;)for(f=e[--n],t=e[--n],r=n;r;)if(o=e[--r],a=e[--r],t===a&&f===o||t===o&&f===a){e.splice(n,2),e.splice(r,2);break}}var a=1/1048576;t={triangulate:function(r,t){var o,i,c,d,s,u,l,b,h,g,p,m,y=r.length;if(y<3)return[];if(r=r.slice(0),t)for(o=y;o--;)r[o]=r[o][t];for(c=new Array(y),o=y;o--;)c[o]=o;for(c.sort(function(e,n){return r[n][0]-r[e][0]}),d=e(r),r.push(d[0],d[1],d[2]),s=[n(r,y+0,y+1,y+2)],u=[],l=[],o=c.length;o--;l.length=0){for(m=c[o],i=s.length;i--;)b=r[m][0]-s[i].x,b>0&&b*b>s[i].r?(u.push(s[i]),s.splice(i,1)):(h=r[m][1]-s[i].y,b*b+h*h-s[i].r>a||(l.push(s[i].i,s[i].j,s[i].j,s[i].k,s[i].k,s[i].i),s.splice(i,1)));for(f(l),i=l.length;i;)p=l[--i],g=l[--i],s.push(n(r,g,p,m))}for(o=s.length;o--;)u.push(s[o]);for(s.length=0,o=u.length;o--;)u[o].i<y&&u[o].j<y&&u[o].k<y&&s.push(u[o].i,u[o].j,u[o].k);return s},contains:function(e,r){if(r[0]<e[0][0]&&r[0]<e[1][0]&&r[0]<e[2][0]||r[0]>e[0][0]&&r[0]>e[1][0]&&r[0]>e[2][0]||r[1]<e[0][1]&&r[1]<e[1][1]&&r[1]<e[2][1]||r[1]>e[0][1]&&r[1]>e[1][1]&&r[1]>e[2][1])return null;var n=e[1][0]-e[0][0],t=e[2][0]-e[0][0],f=e[1][1]-e[0][1],a=e[2][1]-e[0][1],o=n*a-t*f;if(0===o)return null;var i=(a*(r[0]-e[0][0])-t*(r[1]-e[0][1]))/o,c=(n*(r[1]-e[0][1])-f*(r[0]-e[0][0]))/o;return i<0||c<0||i+c>1?null:[i,c]}},void 0!==r&&(r.exports=t)}()},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/index.js":[function(e,r,n){var t=e("./lib/alea"),f=e("./lib/xor128"),a=e("./lib/xorwow"),o=e("./lib/xorshift7"),i=e("./lib/xor4096"),c=e("./lib/tychei"),d=e("./seedrandom");d.alea=t,d.xor128=f,d.xorwow=a,d.xorshift7=o,d.xor4096=i,d.tychei=c,r.exports=d},{"./lib/alea":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/alea.js","./lib/tychei":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/tychei.js","./lib/xor128":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor128.js","./lib/xor4096":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor4096.js","./lib/xorshift7":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorshift7.js","./lib/xorwow":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorwow.js","./seedrandom":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/seedrandom.js"}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/alea.js":[function(r,n,t){!function(e,r,n){function t(e){var r=this,n=o();r.next=function(){var e=2091639*r.s0+2.3283064365386963e-10*r.c;return r.s0=r.s1,r.s1=r.s2,r.s2=e-(r.c=0|e)},r.c=1,r.s0=n(" "),r.s1=n(" "),r.s2=n(" "),r.s0-=n(e),r.s0<0&&(r.s0+=1),r.s1-=n(e),r.s1<0&&(r.s1+=1),r.s2-=n(e),r.s2<0&&(r.s2+=1),n=null}function f(e,r){return r.c=e.c,r.s0=e.s0,r.s1=e.s1,r.s2=e.s2,r}function a(e,r){var n=new t(e),a=r&&r.state,o=n.next;return o.int32=function(){return 4294967296*n.next()|0},o.double=function(){return o()+1.1102230246251565e-16*(2097152*o()|0)},o.quick=o,a&&("object"==typeof a&&f(a,n),o.state=function(){return f(n,{})}),o}function o(){var e=4022871197;return function(r){r=r.toString();for(var n=0;n<r.length;n++){e+=r.charCodeAt(n);var t=.02519603282416938*e;e=t>>>0,t-=e,t*=e,e=t>>>0,t-=e,e+=4294967296*t}return 2.3283064365386963e-10*(e>>>0)}}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.alea=a}(0,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/tychei.js":[function(r,n,t){!function(e,r,n){function t(e){var r=this,n="";r.next=function(){var e=r.b,n=r.c,t=r.d,f=r.a;return e=e<<25^e>>>7^n,n=n-t|0,t=t<<24^t>>>8^f,f=f-e|0,r.b=e=e<<20^e>>>12^n,r.c=n=n-t|0,r.d=t<<16^n>>>16^f,r.a=f-e|0},r.a=0,r.b=0,r.c=-1640531527,r.d=1367130551,e===Math.floor(e)?(r.a=e/4294967296|0,r.b=0|e):n+=e;for(var t=0;t<n.length+20;t++)r.b^=0|n.charCodeAt(t),r.next()}function f(e,r){return r.a=e.a,r.b=e.b,r.c=e.c,r.d=e.d,r}function a(e,r){var n=new t(e),a=r&&r.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=n.next()>>>11,r=(n.next()>>>0)/4294967296,t=(e+r)/(1<<21)}while(0===t);return t},o.int32=n.next,o.quick=o,a&&("object"==typeof a&&f(a,n),o.state=function(){return f(n,{})}),o}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.tychei=a}(0,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor128.js":[function(r,n,t){!function(e,r,n){function t(e){var r=this,n="";r.x=0,r.y=0,r.z=0,r.w=0,r.next=function(){var e=r.x^r.x<<11;return r.x=r.y,r.y=r.z,r.z=r.w,r.w^=r.w>>>19^e^e>>>8},e===(0|e)?r.x=e:n+=e;for(var t=0;t<n.length+64;t++)r.x^=0|n.charCodeAt(t),r.next()}function f(e,r){return r.x=e.x,r.y=e.y,r.z=e.z,r.w=e.w,r}function a(e,r){var n=new t(e),a=r&&r.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=n.next()>>>11,r=(n.next()>>>0)/4294967296,t=(e+r)/(1<<21)}while(0===t);return t},o.int32=n.next,o.quick=o,a&&("object"==typeof a&&f(a,n),o.state=function(){return f(n,{})}),o}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.xor128=a}(0,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor4096.js":[function(r,n,t){!function(e,r,n){function t(e){var r=this;r.next=function(){var e,n,t=r.w,f=r.X,a=r.i;return r.w=t=t+1640531527|0,n=f[a+34&127],e=f[a=a+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=f[a]=n^e,r.i=a,n+(t^t>>>16)|0},function(e,r){var n,t,f,a,o,i=[],c=128;for(r===(0|r)?(t=r,r=null):(r+="\0",t=0,c=Math.max(c,r.length)),f=0,a=-32;a<c;++a)r&&(t^=r.charCodeAt((a+32)%r.length)),0===a&&(o=t),t^=t<<10,t^=t>>>15,t^=t<<4,t^=t>>>13,a>=0&&(o=o+1640531527|0,n=i[127&a]^=t+o,f=0==n?f+1:0);for(f>=128&&(i[127&(r&&r.length||0)]=-1),f=127,a=512;a>0;--a)t=i[f+34&127],n=i[f=f+1&127],t^=t<<13,n^=n<<17,t^=t>>>15,n^=n>>>12,i[f]=t^n;e.w=o,e.X=i,e.i=f}(r,e)}function f(e,r){return r.i=e.i,r.w=e.w,r.X=e.X.slice(),r}function a(e,r){null==e&&(e=+new Date);var n=new t(e),a=r&&r.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=n.next()>>>11,r=(n.next()>>>0)/4294967296,t=(e+r)/(1<<21)}while(0===t);return t},o.int32=n.next,o.quick=o,a&&(a.X&&f(a,n),o.state=function(){return f(n,{})}),o}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.xor4096=a}(0,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorshift7.js":[function(r,n,t){!function(e,r,n){function t(e){var r=this;r.next=function(){var e,n,t=r.x,f=r.i;return e=t[f],e^=e>>>7,n=e^e<<24,e=t[f+1&7],n^=e^e>>>10,e=t[f+3&7],n^=e^e>>>3,e=t[f+4&7],n^=e^e<<7,e=t[f+7&7],e^=e<<13,n^=e^e<<9,t[f]=n,r.i=f+1&7,n},function(e,r){var n,t=[];if(r===(0|r))t[0]=r;else for(r=""+r,n=0;n<r.length;++n)t[7&n]=t[7&n]<<15^r.charCodeAt(n)+t[n+1&7]<<13;for(;t.length<8;)t.push(0);for(n=0;n<8&&0===t[n];++n);for(8==n?t[7]=-1:t[n],e.x=t,e.i=0,n=256;n>0;--n)e.next()}(r,e)}function f(e,r){return r.x=e.x.slice(),r.i=e.i,r}function a(e,r){null==e&&(e=+new Date);var n=new t(e),a=r&&r.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=n.next()>>>11,r=(n.next()>>>0)/4294967296,t=(e+r)/(1<<21)}while(0===t);return t},o.int32=n.next,o.quick=o,a&&(a.x&&f(a,n),o.state=function(){return f(n,{})}),o}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.xorshift7=a}(0,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorwow.js":[function(r,n,t){!function(e,r,n){function t(e){var r=this,n="";r.next=function(){var e=r.x^r.x>>>2;return r.x=r.y,r.y=r.z,r.z=r.w,r.w=r.v,(r.d=r.d+362437|0)+(r.v=r.v^r.v<<4^e^e<<1)|0},r.x=0,r.y=0,r.z=0,r.w=0,r.v=0,e===(0|e)?r.x=e:n+=e;for(var t=0;t<n.length+64;t++)r.x^=0|n.charCodeAt(t),t==n.length&&(r.d=r.x<<10^r.x>>>4),r.next()}function f(e,r){return r.x=e.x,r.y=e.y,r.z=e.z,r.w=e.w,r.v=e.v,r.d=e.d,r}function a(e,r){var n=new t(e),a=r&&r.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=n.next()>>>11,r=(n.next()>>>0)/4294967296,t=(e+r)/(1<<21)}while(0===t);return t},o.int32=n.next,o.quick=o,a&&("object"==typeof a&&f(a,n),o.state=function(){return f(n,{})}),o}r&&r.exports?r.exports=a:n&&n.amd?n(function(){return a}):this.xorwow=a}(0,"object"==typeof n&&n,"function"==typeof e&&e)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/seedrandom.js":[function(r,n,t){!function(t,f){function a(e,r,n){var a=[];r=1==r?{entropy:!0}:r||{};var l=d(c(r.entropy?[e,u(t)]:null==e?s():e,3),a),b=new o(a),v=function(){for(var e=b.g(g),r=m,n=0;e<y;)e=(e+n)*h,r*=h,n=b.g(1);for(;e>=w;)e/=2,r/=2,n>>>=1;return(e+n)/r};return v.int32=function(){return 0|b.g(4)},v.quick=function(){return b.g(4)/4294967296},v.double=v,d(u(b.S),t),(r.pass||n||function(e,r,n,t){return t&&(t.S&&i(t,b),e.state=function(){return i(b,{})}),n?(f[p]=e,r):e})(v,l,"global"in r?r.global:this==f,r.state)}function o(e){var r,n=e.length,t=this,f=0,a=t.i=t.j=0,o=t.S=[];for(n||(e=[n++]);f<h;)o[f]=f++;for(f=0;f<h;f++)o[f]=o[a=v&a+e[f%n]+(r=o[f])],o[a]=r;(t.g=function(e){for(var r,n=0,f=t.i,a=t.j,o=t.S;e--;)r=o[f=v&f+1],n=n*h+o[v&(o[f]=o[a=v&a+r])+(o[a]=r)];return t.i=f,t.j=a,n})(h)}function i(e,r){return r.i=e.i,r.j=e.j,r.S=e.S.slice(),r}function c(e,r){var n,t=[],f=typeof e;if(r&&"object"==f)for(n in e)try{t.push(c(e[n],r-1))}catch(e){}return t.length?t:"string"==f?e:e+"\0"}function d(e,r){for(var n,t=e+"",f=0;f<t.length;)r[v&f]=v&(n^=19*r[v&f])+t.charCodeAt(f++);return u(r)}function s(){try{if(l)return u(l.randomBytes(h));var e=new Uint8Array(h);return(b.crypto||b.msCrypto).getRandomValues(e),u(e)}catch(e){var r=b.navigator,n=r&&r.plugins;return[+new Date,b,n,b.screen,u(t)]}}function u(e){return String.fromCharCode.apply(0,e)}var l,b=this,h=256,g=6,p="random",m=f.pow(h,g),y=f.pow(2,52),w=2*y,v=h-1;if(f["seed"+p]=a,d(f.random(),t),"object"==typeof n&&n.exports){n.exports=a;try{l=r("crypto")}catch(e){}}else"function"==typeof e&&e.amd&&e(function(){return a})}([],Math)},{crypto:!1}]},{},["./lib/trianglify.js"])("./lib/trianglify.js")});
base/inc/fields/css/so-measurement-field.css DELETED
@@ -1,7 +0,0 @@
1
- .siteorigin-widget-form .siteorigin-widget-field input[type="text"].siteorigin-widget-input-measurement {
2
- float: left;
3
- max-width: 58px;
4
- margin: 1px;
5
- height: 28px;
6
- vertical-align: middle;
7
- }
 
 
 
 
 
 
 
base/inc/fields/css/so-tinymce-field.css DELETED
@@ -1,3 +0,0 @@
1
- .wp-customizer .mce-floatpanel {
2
- z-index: 1000000 !important;
3
- }
 
 
 
base/inc/fields/css/tinymce-field.css CHANGED
@@ -1,6 +1,6 @@
1
- .wp-customizer .mce-floatpanel {
2
  z-index: 1000000 !important;
3
  }
4
- .wp-customizer #mceu_44-body {
5
  z-index: 1000000 !important;
6
  }
1
+ .mce-floatpanel {
2
  z-index: 1000000 !important;
3
  }
4
+ #mceu_44-body {
5
  z-index: 1000000 !important;
6
  }
base/inc/fields/js/autocomplete-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e(document).on("sowsetupformfield",".siteorigin-widget-field-type-autocomplete",function(t){var i=e(this);if(!i.data("initialized")){var n=function(){var e=i.find("input.siteorigin-widget-input").val();return 0===e.length?[]:e.split(",")},a=function(){var t=n();i.find("ul.items > li").each(function(i,n){var a=e(this);t.indexOf(a.data("value"))>-1?a.addClass("selected"):a.removeClass("selected")})},l=null,s=function(){null!==l&&l.abort();var t=i.find(".content-text-search"),n=t.val(),a=t.data("source"),s=t.data("postTypes"),o={action:"so_widgets_search_"+a};"posts"===a?(o.query=n,o.postTypes=s):"terms"===a&&(o.term=n);var d=i.find("ul.items").empty().addClass("loading");return e.get(soWidgets.ajaxurl,o,function(t){t.forEach(function(t){""===t.label&&(t.label="&nbsp;"),d.append(e("<li>").html(t.label+"<span>("+t.type+")</span>").data(t))}),d.removeClass("loading")})};i.find(".siteorigin-widget-autocomplete-input").click(function(){var t=i.find(".existing-content-selector");t.show();var n=new e.Deferred;t.is(":visible")&&0===t.find("ul.items li").length?n=s():n.resolve(),n.done(a)});var o=function(){i.find(".existing-content-selector").hide()};e(window).mousedown(function(e){var t=0===i.find(e.target).length;t&&o()}),i.find(".button-close").click(o),i.on("click",".items li",function(t){t.preventDefault();var a=e(this),l=n(),s=a.data("value"),o=l.indexOf(s);o>-1?(l.splice(o,1),a.removeClass("selected")):(l.push(s),a.addClass("selected"));var d=i.find("input.siteorigin-widget-input");d.val(l.join(",")),d.change()});var d=null;i.find(".content-text-search").keyup(function(){null!==d&&clearTimeout(d),d=setTimeout(function(){s()},500)}),i.data("initialized",!0)}})}(jQuery);
1
+ !function(e){e(document).on("sowsetupformfield",".siteorigin-widget-field-type-autocomplete",function(t){var i=e(this);if(!i.data("initialized")){var n=function(){var e=i.find("input.siteorigin-widget-input").val();return 0===e.length?[]:e.split(",")},a=function(){var t=n();i.find("ul.items > li").each(function(i,n){var a=e(this);t.indexOf(a.data("value"))>-1?a.addClass("selected"):a.removeClass("selected")})},l=null,s=function(){null!==l&&l.abort();var t=i.find(".content-text-search"),n=t.val(),a=t.data("source"),s=t.data("postTypes"),o={action:"so_widgets_search_"+a};"posts"===a?(o.query=n,o.postTypes=s):"terms"===a&&(o.term=n);var d=i.find("ul.items").empty().addClass("loading");return e.get(soWidgets.ajaxurl,o,function(t){t.forEach(function(t){""===t.label&&(t.label="&nbsp;"),d.append(e("<li>").html(t.label+"<span>("+t.type+")</span>").data(t))}),d.removeClass("loading")})};i.find(".siteorigin-widget-autocomplete-input").click(function(){var t=i.find(".existing-content-selector");t.show();var n=new e.Deferred;t.is(":visible")&&0===t.find("ul.items li").length?n=s():n.resolve(),n.done(a)});var o=function(){i.find(".existing-content-selector").hide()};e(window).mousedown(function(e){0===i.find(e.target).length&&o()}),i.find(".button-close").click(o),i.on("click",".items li",function(t){t.preventDefault();var a=e(this),l=n(),s=a.data("value"),o=l.indexOf(s);o>-1?(l.splice(o,1),a.removeClass("selected")):(l.push(s),a.addClass("selected"));var d=i.find("input.siteorigin-widget-input");d.val(l.join(",")),d.change()});var d=null;i.find(".content-text-search").keyup(function(){null!==d&&clearTimeout(d),d=setTimeout(function(){s()},500)}),i.data("initialized",!0)}})}(jQuery);
base/inc/fields/js/code-field.min.js CHANGED
@@ -1 +1 @@
1
- (function(e){"use strict";var t=t||function(){var e={};return{add:function(t,r){if("object"==typeof t){var n;for(n=0;n<t.length;n++){var a=t[n];e[a]||(e[a]=[]),e[a].push(r)}}else e[t]||(e[t]=[]),e[t].push(r)},get:function(t){if(e[t])return e[t]}}}(),r=r||function(r){"function"!=typeof String.prototype.repeat&&(String.prototype.repeat=function(e){if(e<1)return"";if(e%2)return this.repeat(e-1)+this;var t=this.repeat(e/2);return t+t}),"function"!=typeof Array.prototype.filter&&(Array.prototype.filter=function(e){if(null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=[],a=arguments[1],o=0;o<r;o++)if(o in t){var i=t[o];e.call(a,i,o,t)&&n.push(i)}return n});var n,a,o={textarea:null,replaceTab:!0,softTabs:!0,tabSize:4,autoOpen:!0,overwrite:!0,autoStrip:!0,autoIndent:!0,fence:!1},i={keyMap:[{open:'"',close:'"',canBreak:!1},{open:"'",close:"'",canBreak:!1},{open:"(",close:")",canBreak:!1},{open:"[",close:"]",canBreak:!0},{open:"{",close:"}",canBreak:!0}]},s={_callHook:function(r,n){var a=t.get(r);if(n="boolean"!=typeof n||n!==!1,a)if(n){var i,c=o.textarea,l=c.value,u=s.cursor.get();for(i=0;i<a.length;i++)a[i].call(e,{editor:{element:c,text:l,levelsDeep:s.levelsDeep()},caret:{pos:u},lines:{current:s.cursor.getLine(l,u),total:s.editor.getLines(l)}})}else for(i=0;i<a.length;i++)a[i].call(e)},defineNewLine:function(){var e=document.createElement("textarea");e.value="\n",a=2==e.value.length?"\r\n":"\n"},defineTabSize:function(e){return"undefined"!=typeof o.textarea.style.OTabSize?void(o.textarea.style.OTabSize=e):"undefined"!=typeof o.textarea.style.MozTabSize?void(o.textarea.style.MozTabSize=e):"undefined"!=typeof o.textarea.style.tabSize?void(o.textarea.style.tabSize=e):void 0},cursor:{getLine:function(e,t){return e.substring(0,t).split("\n").length},get:function(){if("number"==typeof document.createElement("textarea").selectionStart)return o.textarea.selectionStart;if(document.selection){var e=0,t=o.textarea.createTextRange(),r=document.selection.createRange().duplicate(),n=r.getBookmark();for(t.moveToBookmark(n);0!==t.moveStart("character",-1);)e++;return e}},set:function(e,t){if(t||(t=e),o.textarea.setSelectionRange)o.textarea.focus(),o.textarea.setSelectionRange(e,t);else if(o.textarea.createTextRange){var r=o.textarea.createTextRange();r.collapse(!0),r.moveEnd("character",t),r.moveStart("character",e),r.select()}},selection:function(){var e,t,r,n,i,c=o.textarea,l=0,u=0;return"number"==typeof c.selectionStart&&"number"==typeof c.selectionEnd?(l=c.selectionStart,u=c.selectionEnd):(t=document.selection.createRange(),t&&t.parentElement()==c&&(e=s.editor.get(),n=e.length,r=c.createTextRange(),r.moveToBookmark(t.getBookmark()),i=c.createTextRange(),i.collapse(!1),r.compareEndPoints("StartToEnd",i)>-1?l=u=n:(l=-r.moveStart("character",-n),l+=e.slice(0,l).split(a).length-1,r.compareEndPoints("EndToEnd",i)>-1?u=n:(u=-r.moveEnd("character",-n),u+=e.slice(0,u).split(a).length-1)))),l!=u&&{start:l,end:u}}},editor:{getLines:function(e){return e.split("\n").length},get:function(){return o.textarea.value.replace(/\r/g,"")},set:function(e){o.textarea.value=e}},fenceRange:function(){if("string"==typeof o.fence){for(var e=s.editor.get(),t=s.cursor.get(),r=0,n=e.indexOf(o.fence),a=0;n>=0&&(a++,!(t<n+r));)r+=n+o.fence.length,e=e.substring(n+o.fence.length),n=e.indexOf(o.fence);return r<t&&n+r>t&&a%2===0}return!0},isEven:function(e,t){return t%2},levelsDeep:function(){var e,t,r=s.cursor.get(),n=s.editor.get(),a=n.substring(0,r),o=0;for(e=0;e<a.length;e++)for(t=0;t<i.keyMap.length;t++)i.keyMap[t].canBreak&&(i.keyMap[t].open==a.charAt(e)&&o++,i.keyMap[t].close==a.charAt(e)&&o--);var c=0,l=["'",'"'];for(e=0;e<i.keyMap.length;e++)if(i.keyMap[e].canBreak)for(t in l)c+=a.split(l[t]).filter(s.isEven).join("").split(i.keyMap[e].open).length-1;var u=o-c;return u>=0?u:0},deepExtend:function(e,t){for(var r in t)t[r]&&t[r].constructor&&t[r].constructor===Object?(e[r]=e[r]||{},s.deepExtend(e[r],t[r])):e[r]=t[r];return e},addEvent:function(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent&&e.attachEvent("on"+t,r)},removeEvent:function(e,t,r){e.addEventListener?e.removeEventListener(t,r,!1):e.attachEvent&&e.detachEvent("on"+t,r)},preventDefaultEvent:function(e){e.preventDefault?e.preventDefault():e.returnValue=!1}},c={tabKey:function(e){if(s.fenceRange()){if(9==e.keyCode){s.preventDefaultEvent(e);var t=!0;s._callHook("tab:before");var r=s.cursor.selection(),a=s.cursor.get(),o=s.editor.get();if(r){for(var i=r.start;i--;)if("\n"==o.charAt(i)){r.start=i+1;break}var c,l=o.substring(r.start,r.end),u=l.split("\n");if(e.shiftKey){for(c=0;c<u.length;c++)u[c].substring(0,n.length)==n&&(u[c]=u[c].substring(n.length));l=u.join("\n"),s.editor.set(o.substring(0,r.start)+l+o.substring(r.end)),s.cursor.set(r.start,r.start+l.length)}else{for(c in u)u[c]=n+u[c];l=u.join("\n"),s.editor.set(o.substring(0,r.start)+l+o.substring(r.end)),s.cursor.set(r.start,r.start+l.length)}}else{var f=o.substring(0,a),d=o.substring(a),p=f+n+d;e.shiftKey?o.substring(a-n.length,a)==n&&(p=o.substring(0,a-n.length)+d,s.editor.set(p),s.cursor.set(a-n.length)):(s.editor.set(p),s.cursor.set(a+n.length),t=!1)}s._callHook("tab:after")}return t}},enterKey:function(e){if(s.fenceRange()&&13==e.keyCode){s.preventDefaultEvent(e),s._callHook("enter:before");var t,r,o=s.cursor.get(),c=s.editor.get(),l=c.substring(0,o),u=c.substring(o),f=l.charAt(l.length-1),d=u.charAt(0),p=s.levelsDeep(),g="",v="";if(p){for(;p--;)g+=n;for(g=g,t=g.length+1,r=0;r<i.keyMap.length;r++)i.keyMap[r].open==f&&i.keyMap[r].close==d&&(v=a)}else t=1;var h=l+a+g+v+g.substring(0,g.length-n.length)+u;s.editor.set(h),s.cursor.set(o+t),s._callHook("enter:after")}},deleteKey:function(e){if(s.fenceRange()&&8==e.keyCode){s.preventDefaultEvent(e),s._callHook("delete:before");var t,r=s.cursor.get(),n=s.editor.get(),a=n.substring(0,r),o=n.substring(r),c=a.charAt(a.length-1),l=o.charAt(0);if(s.cursor.selection()===!1){for(t=0;t<i.keyMap.length;t++)if(i.keyMap[t].open==c&&i.keyMap[t].close==l){var u=n.substring(0,r-1)+n.substring(r+1);return s.editor.set(u),void s.cursor.set(r-1)}var u=n.substring(0,r-1)+n.substring(r);s.editor.set(u),s.cursor.set(r-1)}else{var f=s.cursor.selection(),u=n.substring(0,f.start)+n.substring(f.end);s.editor.set(u),s.cursor.set(r)}s._callHook("delete:after")}}},l={openedChar:function(e,t){s.preventDefaultEvent(t),s._callHook("openChar:before");var r=s.cursor.get(),n=s.editor.get(),a=n.substring(0,r),i=n.substring(r),c=a+e.open+e.close+i;o.textarea.value=c,s.cursor.set(r+1),s._callHook("openChar:after")},closedChar:function(e,t){var r=s.cursor.get(),n=s.editor.get(),a=n.substring(r,r+1);return a==e.close&&(s.preventDefaultEvent(t),s._callHook("closeChar:before"),s.cursor.set(s.cursor.get()+1),s._callHook("closeChar:after"),!0)}},u={filter:function(e){if(s.fenceRange()){var t=e.which||e.keyCode;if(39!=t&&(40!=t||0!==e.which)){var r,n=String.fromCharCode(t);for(r=0;r<i.keyMap.length;r++)if(i.keyMap[r].close==n){var a=o.overwrite&&l.closedChar(i.keyMap[r],e);!a&&i.keyMap[r].open==n&&o.autoOpen&&l.openedChar(i.keyMap[r],e)}else i.keyMap[r].open==n&&o.autoOpen&&l.openedChar(i.keyMap[r],e)}}},listen:function(){o.replaceTab&&s.addEvent(o.textarea,"keydown",c.tabKey),o.autoIndent&&s.addEvent(o.textarea,"keydown",c.enterKey),o.autoStrip&&s.addEvent(o.textarea,"keydown",c.deleteKey),s.addEvent(o.textarea,"keypress",u.filter),s.addEvent(o.textarea,"keydown",function(){s._callHook("keydown")}),s.addEvent(o.textarea,"keyup",function(){s._callHook("keyup")})}},f=function(e){e.textarea&&(s._callHook("init:before",!1),s.deepExtend(o,e),s.defineNewLine(),o.softTabs?n=" ".repeat(o.tabSize):(n="\t",s.defineTabSize(o.tabSize)),u.listen(),s._callHook("init:after",!1))};this.destroy=function(){s.removeEvent(o.textarea,"keydown",c.tabKey),s.removeEvent(o.textarea,"keydown",c.enterKey),s.removeEvent(o.textarea,"keydown",c.deleteKey),s.removeEvent(o.textarea,"keypress",u.filter)},f(r)};"undefined"!=typeof module&&module.exports&&(module.exports=r),"undefined"==typeof ender&&(this.Behave=r,this.BehaveHooks=t),"function"==typeof define&&define.amd&&define("behave",[],function(){return r})}).call(this),function(e){e(document).on("sowsetupformfield",".siteorigin-widget-field-type-code",function(t){var r=e(this);new Behave({textarea:r.find(".siteorigin-widget-code-input").get(0)})})}(jQuery);
1
+ (function(e){"use strict";var t=t||function(){var e={};return{add:function(t,r){if("object"==typeof t){var n;for(n=0;n<t.length;n++){var a=t[n];e[a]||(e[a]=[]),e[a].push(r)}}else e[t]||(e[t]=[]),e[t].push(r)},get:function(t){if(e[t])return e[t]}}}(),r=r||function(r){"function"!=typeof String.prototype.repeat&&(String.prototype.repeat=function(e){if(e<1)return"";if(e%2)return this.repeat(e-1)+this;var t=this.repeat(e/2);return t+t}),"function"!=typeof Array.prototype.filter&&(Array.prototype.filter=function(e){if(null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=[],a=arguments[1],o=0;o<r;o++)if(o in t){var i=t[o];e.call(a,i,o,t)&&n.push(i)}return n});var n,a,o={textarea:null,replaceTab:!0,softTabs:!0,tabSize:4,autoOpen:!0,overwrite:!0,autoStrip:!0,autoIndent:!0,fence:!1},i={keyMap:[{open:'"',close:'"',canBreak:!1},{open:"'",close:"'",canBreak:!1},{open:"(",close:")",canBreak:!1},{open:"[",close:"]",canBreak:!0},{open:"{",close:"}",canBreak:!0}]},s={_callHook:function(r,n){var a=t.get(r);if(n="boolean"!=typeof n||!1!==n,a)if(n){var i,c=o.textarea,l=c.value,u=s.cursor.get();for(i=0;i<a.length;i++)a[i].call(e,{editor:{element:c,text:l,levelsDeep:s.levelsDeep()},caret:{pos:u},lines:{current:s.cursor.getLine(l,u),total:s.editor.getLines(l)}})}else for(i=0;i<a.length;i++)a[i].call(e)},defineNewLine:function(){var e=document.createElement("textarea");e.value="\n",a=2==e.value.length?"\r\n":"\n"},defineTabSize:function(e){return void 0!==o.textarea.style.OTabSize?void(o.textarea.style.OTabSize=e):void 0!==o.textarea.style.MozTabSize?void(o.textarea.style.MozTabSize=e):void 0!==o.textarea.style.tabSize?void(o.textarea.style.tabSize=e):void 0},cursor:{getLine:function(e,t){return e.substring(0,t).split("\n").length},get:function(){if("number"==typeof document.createElement("textarea").selectionStart)return o.textarea.selectionStart;if(document.selection){var e=0,t=o.textarea.createTextRange(),r=document.selection.createRange().duplicate(),n=r.getBookmark();for(t.moveToBookmark(n);0!==t.moveStart("character",-1);)e++;return e}},set:function(e,t){if(t||(t=e),o.textarea.setSelectionRange)o.textarea.focus(),o.textarea.setSelectionRange(e,t);else if(o.textarea.createTextRange){var r=o.textarea.createTextRange();r.collapse(!0),r.moveEnd("character",t),r.moveStart("character",e),r.select()}},selection:function(){var e,t,r,n,i,c=o.textarea,l=0,u=0;return"number"==typeof c.selectionStart&&"number"==typeof c.selectionEnd?(l=c.selectionStart,u=c.selectionEnd):(t=document.selection.createRange())&&t.parentElement()==c&&(e=s.editor.get(),n=e.length,r=c.createTextRange(),r.moveToBookmark(t.getBookmark()),i=c.createTextRange(),i.collapse(!1),r.compareEndPoints("StartToEnd",i)>-1?l=u=n:(l=-r.moveStart("character",-n),l+=e.slice(0,l).split(a).length-1,r.compareEndPoints("EndToEnd",i)>-1?u=n:(u=-r.moveEnd("character",-n),u+=e.slice(0,u).split(a).length-1))),l!=u&&{start:l,end:u}}},editor:{getLines:function(e){return e.split("\n").length},get:function(){return o.textarea.value.replace(/\r/g,"")},set:function(e){o.textarea.value=e}},fenceRange:function(){if("string"==typeof o.fence){for(var e=s.editor.get(),t=s.cursor.get(),r=0,n=e.indexOf(o.fence),a=0;n>=0&&(a++,!(t<n+r));)r+=n+o.fence.length,e=e.substring(n+o.fence.length),n=e.indexOf(o.fence);return r<t&&n+r>t&&a%2==0}return!0},isEven:function(e,t){return t%2},levelsDeep:function(){var e,t,r=s.cursor.get(),n=s.editor.get(),a=n.substring(0,r),o=0;for(e=0;e<a.length;e++)for(t=0;t<i.keyMap.length;t++)i.keyMap[t].canBreak&&(i.keyMap[t].open==a.charAt(e)&&o++,i.keyMap[t].close==a.charAt(e)&&o--);var c=0,l=["'",'"'];for(e=0;e<i.keyMap.length;e++)if(i.keyMap[e].canBreak)for(t in l)c+=a.split(l[t]).filter(s.isEven).join("").split(i.keyMap[e].open).length-1;var u=o-c;return u>=0?u:0},deepExtend:function(e,t){for(var r in t)t[r]&&t[r].constructor&&t[r].constructor===Object?(e[r]=e[r]||{},s.deepExtend(e[r],t[r])):e[r]=t[r];return e},addEvent:function(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent&&e.attachEvent("on"+t,r)},removeEvent:function(e,t,r){e.addEventListener?e.removeEventListener(t,r,!1):e.attachEvent&&e.detachEvent("on"+t,r)},preventDefaultEvent:function(e){e.preventDefault?e.preventDefault():e.returnValue=!1}},c={tabKey:function(e){if(s.fenceRange()){if(9==e.keyCode){s.preventDefaultEvent(e);var t=!0;s._callHook("tab:before");var r=s.cursor.selection(),a=s.cursor.get(),o=s.editor.get();if(r){for(var i=r.start;i--;)if("\n"==o.charAt(i)){r.start=i+1;break}var c,l=o.substring(r.start,r.end),u=l.split("\n");if(e.shiftKey){for(c=0;c<u.length;c++)u[c].substring(0,n.length)==n&&(u[c]=u[c].substring(n.length));l=u.join("\n"),s.editor.set(o.substring(0,r.start)+l+o.substring(r.end)),s.cursor.set(r.start,r.start+l.length)}else{for(c in u)u[c]=n+u[c];l=u.join("\n"),s.editor.set(o.substring(0,r.start)+l+o.substring(r.end)),s.cursor.set(r.start,r.start+l.length)}}else{var f=o.substring(0,a),d=o.substring(a),p=f+n+d;e.shiftKey?o.substring(a-n.length,a)==n&&(p=o.substring(0,a-n.length)+d,s.editor.set(p),s.cursor.set(a-n.length)):(s.editor.set(p),s.cursor.set(a+n.length),t=!1)}s._callHook("tab:after")}return t}},enterKey:function(e){if(s.fenceRange()&&13==e.keyCode){s.preventDefaultEvent(e),s._callHook("enter:before");var t,r,o=s.cursor.get(),c=s.editor.get(),l=c.substring(0,o),u=c.substring(o),f=l.charAt(l.length-1),d=u.charAt(0),p=s.levelsDeep(),g="",v="";if(p){for(;p--;)g+=n;for(g=g,t=g.length+1,r=0;r<i.keyMap.length;r++)i.keyMap[r].open==f&&i.keyMap[r].close==d&&(v=a)}else t=1;var h=l+a+g+v+g.substring(0,g.length-n.length)+u;s.editor.set(h),s.cursor.set(o+t),s._callHook("enter:after")}},deleteKey:function(e){if(s.fenceRange()&&8==e.keyCode){s.preventDefaultEvent(e),s._callHook("delete:before");var t,r=s.cursor.get(),n=s.editor.get(),a=n.substring(0,r),o=n.substring(r),c=a.charAt(a.length-1),l=o.charAt(0);if(!1===s.cursor.selection()){for(t=0;t<i.keyMap.length;t++)if(i.keyMap[t].open==c&&i.keyMap[t].close==l){var u=n.substring(0,r-1)+n.substring(r+1);return s.editor.set(u),void s.cursor.set(r-1)}var u=n.substring(0,r-1)+n.substring(r);s.editor.set(u),s.cursor.set(r-1)}else{var f=s.cursor.selection(),u=n.substring(0,f.start)+n.substring(f.end);s.editor.set(u),s.cursor.set(r)}s._callHook("delete:after")}}},l={openedChar:function(e,t){s.preventDefaultEvent(t),s._callHook("openChar:before");var r=s.cursor.get(),n=s.editor.get(),a=n.substring(0,r),i=n.substring(r),c=a+e.open+e.close+i;o.textarea.value=c,s.cursor.set(r+1),s._callHook("openChar:after")},closedChar:function(e,t){var r=s.cursor.get();return s.editor.get().substring(r,r+1)==e.close&&(s.preventDefaultEvent(t),s._callHook("closeChar:before"),s.cursor.set(s.cursor.get()+1),s._callHook("closeChar:after"),!0)}},u={filter:function(e){if(s.fenceRange()){var t=e.which||e.keyCode;if(39!=t&&(40!=t||0!==e.which)){var r,n=String.fromCharCode(t);for(r=0;r<i.keyMap.length;r++)if(i.keyMap[r].close==n){var a=o.overwrite&&l.closedChar(i.keyMap[r],e);!a&&i.keyMap[r].open==n&&o.autoOpen&&l.openedChar(i.keyMap[r],e)}else i.keyMap[r].open==n&&o.autoOpen&&l.openedChar(i.keyMap[r],e)}}},listen:function(){o.replaceTab&&s.addEvent(o.textarea,"keydown",c.tabKey),o.autoIndent&&s.addEvent(o.textarea,"keydown",c.enterKey),o.autoStrip&&s.addEvent(o.textarea,"keydown",c.deleteKey),s.addEvent(o.textarea,"keypress",u.filter),s.addEvent(o.textarea,"keydown",function(){s._callHook("keydown")}),s.addEvent(o.textarea,"keyup",function(){s._callHook("keyup")})}};this.destroy=function(){s.removeEvent(o.textarea,"keydown",c.tabKey),s.removeEvent(o.textarea,"keydown",c.enterKey),s.removeEvent(o.textarea,"keydown",c.deleteKey),s.removeEvent(o.textarea,"keypress",u.filter)},function(e){e.textarea&&(s._callHook("init:before",!1),s.deepExtend(o,e),s.defineNewLine(),o.softTabs?n=" ".repeat(o.tabSize):(n="\t",s.defineTabSize(o.tabSize)),u.listen(),s._callHook("init:after",!1))}(r)};"undefined"!=typeof module&&module.exports&&(module.exports=r),"undefined"==typeof ender&&(this.Behave=r,this.BehaveHooks=t),"function"==typeof define&&define.amd&&define("behave",[],function(){return r})}).call(this),function(e){e(document).on("sowsetupformfield",".siteorigin-widget-field-type-code",function(t){var r=e(this);new Behave({textarea:r.find(".siteorigin-widget-code-input").get(0)})})}(jQuery);
base/inc/fields/js/icon-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(i){var e={};i(document).on("sowsetupformfield",".siteorigin-widget-field-type-icon",function(n){var t=i(this),o=t.find(".siteorigin-widget-icon-selector"),a=o.find(".siteorigin-widget-icon-icon"),s=t.find(".siteorigin-widget-icon-selector-current"),d=t.find(".so-icon-remove"),c=t.find(".siteorigin-widget-icon-search");if(!t.data("initialized")){s.click(function(){o.slideToggle(),c.val(""),r()}),d.click(function(i){i.preventDefault(),t.find(".siteorigin-widget-active").click()});var r=function(){var e=c.val().toLowerCase();""===e?o.find(".siteorigin-widget-icon-icons-icon").show():o.find(".siteorigin-widget-icon-icons-icon").each(function(){var n=i(this),t=n.attr("data-value");t=t.replace(/-/," "),t.indexOf(e)===-1?n.hide():n.show()})};c.keyup(r).change(r);var g=function(){var n=o.find("select.siteorigin-widget-icon-family").val(),t=o.find(".siteorigin-widget-icon-icons");if("undefined"!=typeof e[n]){t.empty(),0===i("#siteorigin-widget-font-"+n).length&&i("<link rel='stylesheet' type='text/css'>").attr("id","siteorigin-widget-font-"+n).attr("href",e[n].style_uri).appendTo("head");for(var c in e[n].icons){var g=i('<div data-sow-icon="'+e[n].icons[c]+'"/>').attr("data-value",n+"-"+c).addClass("sow-icon-"+n).addClass("siteorigin-widget-icon-icons-icon").click(function(){var e=i(this);e.hasClass("siteorigin-widget-active")?(e.removeClass("siteorigin-widget-active"),a.val(""),s.find("span").hide(),d.hide()):(t.find(".siteorigin-widget-icon-icons-icon").removeClass("siteorigin-widget-active"),e.addClass("siteorigin-widget-active"),a.val(e.data("value")),s.find("span").show().attr("data-sow-icon",e.attr("data-sow-icon")).attr("class","").addClass("sow-icon-"+n),d.show()),a.trigger("change",{isRendering:!0}),o.slideUp()});t.append(g),a.val()===n+"-"+c&&(s.find("span").show().attr("data-sow-icon",g.attr("data-sow-icon")).attr("class","").addClass("sow-icon-"+n),g.addClass("siteorigin-widget-active"))}t.prepend(t.find(".siteorigin-widget-active")),r()}},l=function(){var n=o.find("select.siteorigin-widget-icon-family").val(),t=o.find("select.siteorigin-widget-icon-family option:selected").data("icons");null!==t&&(e[n]=t),"undefined"!=typeof n&&""!==n&&("undefined"==typeof e[n]?i.getJSON(soWidgets.ajaxurl,{action:"siteorigin_widgets_get_icons",family:o.find("select.siteorigin-widget-icon-family").val()},function(i){e[n]=i,g()}):g())};l(),o.find("select.siteorigin-widget-icon-family").change(function(){o.find(".siteorigin-widget-icon-icons").empty(),l()}),a.change(function(i,e){e&&e.isRendering||g()}),t.data("initialized",!0)}})}(jQuery);
1
+ !function(i){var e={};i(document).on("sowsetupformfield",".siteorigin-widget-field-type-icon",function(n){var t=i(this),o=t.find(".siteorigin-widget-icon-selector"),a=o.find(".siteorigin-widget-icon-icon"),s=t.find(".siteorigin-widget-icon-selector-current"),d=t.find(".so-icon-remove"),c=t.find(".siteorigin-widget-icon-search");if(!t.data("initialized")){s.click(function(){o.slideToggle(),c.val(""),r()}),d.click(function(i){i.preventDefault(),t.find(".siteorigin-widget-active").click()});var r=function(){var e=c.val().toLowerCase();""===e?o.find(".siteorigin-widget-icon-icons-icon").show():o.find(".siteorigin-widget-icon-icons-icon").each(function(){var n=i(this),t=n.attr("data-value");t=t.replace(/-/," "),-1===t.indexOf(e)?n.hide():n.show()})};c.keyup(r).change(r);var g=function(){var n=o.find("select.siteorigin-widget-icon-family").val(),t=o.find(".siteorigin-widget-icon-icons");if(void 0!==e[n]){t.empty(),0===i("#siteorigin-widget-font-"+n).length&&i("<link rel='stylesheet' type='text/css'>").attr("id","siteorigin-widget-font-"+n).attr("href",e[n].style_uri).appendTo("head");for(var c in e[n].icons){var g=i('<div data-sow-icon="'+e[n].icons[c]+'"/>').attr("data-value",n+"-"+c).addClass("sow-icon-"+n).addClass("siteorigin-widget-icon-icons-icon").click(function(){var e=i(this);e.hasClass("siteorigin-widget-active")?(e.removeClass("siteorigin-widget-active"),a.val(""),s.find("span").hide(),d.hide()):(t.find(".siteorigin-widget-icon-icons-icon").removeClass("siteorigin-widget-active"),e.addClass("siteorigin-widget-active"),a.val(e.data("value")),s.find("span").show().attr("data-sow-icon",e.attr("data-sow-icon")).attr("class","").addClass("sow-icon-"+n),d.show()),a.trigger("change",{isRendering:!0}),o.slideUp()});t.append(g),a.val()===n+"-"+c&&(s.find("span").show().attr("data-sow-icon",g.attr("data-sow-icon")).attr("class","").addClass("sow-icon-"+n),g.addClass("siteorigin-widget-active"))}t.prepend(t.find(".siteorigin-widget-active")),r()}},l=function(){var n=o.find("select.siteorigin-widget-icon-family").val(),t=o.find("select.siteorigin-widget-icon-family option:selected").data("icons");null!==t&&(e[n]=t),void 0!==n&&""!==n&&(void 0===e[n]?i.getJSON(soWidgets.ajaxurl,{action:"siteorigin_widgets_get_icons",family:o.find("select.siteorigin-widget-icon-family").val()},function(i){e[n]=i,g()}):g())};l(),o.find("select.siteorigin-widget-icon-family").change(function(){o.find(".siteorigin-widget-icon-icons").empty(),l()}),a.change(function(i,e){e&&e.isRendering||g()}),t.data("initialized",!0)}})}(jQuery);
base/inc/fields/js/lib/pikaday/pikaday.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"use strict";var n;if("object"==typeof exports){try{n=require("moment")}catch(a){}module.exports=t(n)}else"function"==typeof define&&define.amd?define(function(e){var a="moment";try{n=e(a)}catch(i){}return t(n)}):e.Pikaday=t(e.moment)}(this,function(e){"use strict";var t="function"==typeof e,n=!!window.addEventListener,a=window.document,i=window.setTimeout,s=function(e,t,a,i){n?e.addEventListener(t,a,!!i):e.attachEvent("on"+t,a)},o=function(e,t,a,i){n?e.removeEventListener(t,a,!!i):e.detachEvent("on"+t,a)},r=function(e,t,n){var i;a.createEvent?(i=a.createEvent("HTMLEvents"),i.initEvent(t,!0,!1),i=_(i,n),e.dispatchEvent(i)):a.createEventObject&&(i=a.createEventObject(),i=_(i,n),e.fireEvent("on"+t,i))},h=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},l=function(e,t){return(" "+e.className+" ").indexOf(" "+t+" ")!==-1},d=function(e,t){l(e,t)||(e.className=""===e.className?t:e.className+" "+t)},u=function(e,t){e.className=h((" "+e.className+" ").replace(" "+t+" "," "))},c=function(e){return/Array/.test(Object.prototype.toString.call(e))},f=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},m=function(e){var t=e.getDay();return 0===t||6===t},g=function(e){return e%4===0&&e%100!==0||e%400===0},p=function(e,t){return[31,g(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},y=function(e){f(e)&&e.setHours(0,0,0,0)},D=function(e,t){return e.getTime()===t.getTime()},_=function(e,t,n){var a,i;for(a in t)i=void 0!==e[a],i&&"object"==typeof t[a]&&null!==t[a]&&void 0===t[a].nodeName?f(t[a])?n&&(e[a]=new Date(t[a].getTime())):c(t[a])?n&&(e[a]=t[a].slice(0)):e[a]=_({},t[a],n):!n&&i||(e[a]=t[a]);return e},v=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},b={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},w=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},M=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},k=function(e,t,n){var a=new Date(n,0,1),i=Math.ceil(((new Date(n,t,e)-a)/864e5+a.getDay()+1)/7);return'<td class="pika-week">'+i+"</td>"},x=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},R=function(e){return"<tbody>"+e.join("")+"</tbody>"},N=function(e){var t,n=[];for(e.showWeekNumber&&n.push("<th></th>"),t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+w(e,t)+'">'+w(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"},C=function(e,t,n,a,i,s){var o,r,h,l,d,u=e._o,f=n===u.minYear,m=n===u.maxYear,g='<div id="'+s+'" class="pika-title" role="heading" aria-live="assertive">',p=!0,y=!0;for(h=[],o=0;o<12;o++)h.push('<option value="'+(n===i?o-t:12+o-t)+'"'+(o===a?' selected="selected"':"")+(f&&o<u.minMonth||m&&o>u.maxMonth?'disabled="disabled"':"")+">"+u.i18n.months[o]+"</option>");for(l='<div class="pika-label">'+u.i18n.months[a]+'<select class="pika-select pika-select-month" tabindex="-1">'+h.join("")+"</select></div>",c(u.yearRange)?(o=u.yearRange[0],r=u.yearRange[1]+1):(o=n-u.yearRange,r=1+n+u.yearRange),h=[];o<r&&o<=u.maxYear;o++)o>=u.minYear&&h.push('<option value="'+o+'"'+(o===n?' selected="selected"':"")+">"+o+"</option>");return d='<div class="pika-label">'+n+u.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+h.join("")+"</select></div>",g+=u.showMonthAfterYear?d+l:l+d,f&&(0===a||u.minMonth>=a)&&(p=!1),m&&(11===a||u.maxMonth<=a)&&(y=!1),0===t&&(g+='<button class="pika-prev'+(p?"":" is-disabled")+'" type="button">'+u.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(g+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+u.i18n.nextMonth+"</button>"),g+="</div>"},T=function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+N(e)+R(t)+"</table>"},Y=function(o){var r=this,h=r.config(o);r._onMouseDown=function(e){if(r._v){e=e||window.event;var t=e.target||e.srcElement;if(t)if(l(t,"is-disabled")||(!l(t,"pika-button")||l(t,"is-empty")||l(t.parentNode,"is-disabled")?l(t,"pika-prev")?r.prevMonth():l(t,"pika-next")&&r.nextMonth():(r.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),h.bound&&i(function(){r.hide(),h.field&&h.field.blur()},100))),l(t,"pika-select"))r._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},r._onChange=function(e){e=e||window.event;var t=e.target||e.srcElement;t&&(l(t,"pika-select-month")?r.gotoMonth(t.value):l(t,"pika-select-year")&&r.gotoYear(t.value))},r._onKeyChange=function(e){if(e=e||window.event,r.isVisible())switch(e.keyCode){case 13:case 27:h.field.blur();break;case 37:e.preventDefault(),r.adjustDate("subtract",1);break;case 38:r.adjustDate("subtract",7);break;case 39:r.adjustDate("add",1);break;case 40:r.adjustDate("add",7)}},r._onInputChange=function(n){var a;n.firedBy!==r&&(t?(a=e(h.field.value,h.format,h.formatStrict),a=a&&a.isValid()?a.toDate():null):a=new Date(Date.parse(h.field.value)),f(a)&&r.setDate(a),r._v||r.show())},r._onInputFocus=function(){r.show()},r._onInputClick=function(){r.show()},r._onInputBlur=function(){var e=a.activeElement;do if(l(e,"pika-single"))return;while(e=e.parentNode);r._c||(r._b=i(function(){r.hide()},50)),r._c=!1},r._onClick=function(e){e=e||window.event;var t=e.target||e.srcElement,a=t;if(t){!n&&l(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),s(t,"change",r._onChange)));do if(l(a,"pika-single")||a===h.trigger)return;while(a=a.parentNode);r._v&&t!==h.trigger&&a!==h.trigger&&r.hide()}},r.el=a.createElement("div"),r.el.className="pika-single"+(h.isRTL?" is-rtl":"")+(h.theme?" "+h.theme:""),s(r.el,"mousedown",r._onMouseDown,!0),s(r.el,"touchend",r._onMouseDown,!0),s(r.el,"change",r._onChange),s(a,"keydown",r._onKeyChange),h.field&&(h.container?h.container.appendChild(r.el):h.bound?a.body.appendChild(r.el):h.field.parentNode.insertBefore(r.el,h.field.nextSibling),s(h.field,"change",r._onInputChange),h.defaultDate||(t&&h.field.value?h.defaultDate=e(h.field.value,h.format).toDate():h.defaultDate=new Date(Date.parse(h.field.value)),h.setDefaultDate=!0));var d=h.defaultDate;f(d)?h.setDefaultDate?r.setDate(d,!0):r.gotoDate(d):r.gotoDate(new Date),h.bound?(this.hide(),r.el.className+=" is-bound",s(h.trigger,"click",r._onInputClick),s(h.trigger,"focus",r._onInputFocus),s(h.trigger,"blur",r._onInputBlur)):this.show()};return Y.prototype={config:function(e){this._o||(this._o=_({},b,!0));var t=_(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,f(t.minDate)||(t.minDate=!1),f(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),c(t.yearRange)){var a=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||a,t.yearRange[1]=parseInt(t.yearRange[1],10)||a}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||b.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(n){return f(this._d)?t?e(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,a){t&&e.isMoment(n)&&this.setDate(n.toDate(),a)},getDate:function(){return f(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",r(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),f(e)){var n=this._o.minDate,a=this._o.maxDate;f(n)&&e<n?e=n:f(a)&&e>a&&(e=a),this._d=new Date(e.getTime()),y(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),r(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(f(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),a=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=e.getTime();a.setMonth(a.getMonth()+1),a.setDate(a.getDate()-1),t=i<n.getTime()||a.getTime()<i}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(n,a){var i,s=this.getDate(),o=24*parseInt(a)*60*60*1e3;"add"===n?i=new Date(s.valueOf()+o):"subtract"===n&&(i=new Date(s.valueOf()-o)),t&&("add"===n?i=e(s).add(a,"days").toDate():"subtract"===n&&(i=e(s).subtract(a,"days").toDate())),this.setDate(i)},adjustCalendars:function(){this.calendars[0]=v(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=v({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(y(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=b.minDate,this._o.minYear=b.minYear,this._o.minMonth=b.minMonth,this._o.startRange=b.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(y(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=b.maxDate,this._o.maxYear=b.maxYear,this._o.maxMonth=b.maxMonth,this._o.endRange=b.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t,n=this._o,a=n.minYear,s=n.maxYear,o=n.minMonth,r=n.maxMonth,h="";this._y<=a&&(this._y=a,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=s&&(this._y=s,!isNaN(r)&&this._m>r&&(this._m=r)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<n.numberOfMonths;l++)h+='<div class="pika-lendar">'+C(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t)+"</div>";this.el.innerHTML=h,n.bound&&"hidden"!==n.field.type&&i(function(){n.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,n,i,s,o,r,h,l,d;if(!this._o.container){if(this.el.style.position="absolute",e=this._o.trigger,t=e,n=this.el.offsetWidth,i=this.el.offsetHeight,s=window.innerWidth||a.documentElement.clientWidth,o=window.innerHeight||a.documentElement.clientHeight,r=window.pageYOffset||a.body.scrollTop||a.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)d=e.getBoundingClientRect(),h=d.left+window.pageXOffset,l=d.bottom+window.pageYOffset;else for(h=t.offsetLeft,l=t.offsetTop+t.offsetHeight;t=t.offsetParent;)h+=t.offsetLeft,l+=t.offsetTop;(this._o.reposition&&h+n>s||this._o.position.indexOf("right")>-1&&h-n+e.offsetWidth>0)&&(h=h-n+e.offsetWidth),(this._o.reposition&&l+i>o+r||this._o.position.indexOf("top")>-1&&l-i-e.offsetHeight>0)&&(l=l-i-e.offsetHeight),this.el.style.left=h+"px",this.el.style.top=l+"px"}},render:function(e,t,n){var a=this._o,i=new Date,s=p(e,t),o=new Date(e,t,1).getDay(),r=[],h=[];y(i),a.firstDay>0&&(o-=a.firstDay,o<0&&(o+=7));for(var l=0===t?11:t-1,d=11===t?0:t+1,u=0===t?e-1:e,c=11===t?e+1:e,g=p(u,l),_=s+o,v=_;v>7;)v-=7;_+=7-v;for(var b=0,w=0;b<_;b++){var R=new Date(e,t,1+(b-o)),N=!!f(this._d)&&D(R,this._d),C=D(R,i),Y=b<o||b>=s+o,E=1+(b-o),S=t,j=e,I=a.startRange&&D(a.startRange,R),O=a.endRange&&D(a.endRange,R),F=a.startRange&&a.endRange&&a.startRange<R&&R<a.endRange,A=a.minDate&&R<a.minDate||a.maxDate&&R>a.maxDate||a.disableWeekends&&m(R)||a.disableDayFn&&a.disableDayFn(R);Y&&(b<o?(E=g+E,S=l,j=u):(E-=s,S=d,j=c));var L={day:E,month:S,year:j,isSelected:N,isToday:C,isDisabled:A,isEmpty:Y,isStartRange:I,isEndRange:O,isInRange:F,showDaysInNextAndPreviousMonths:a.showDaysInNextAndPreviousMonths};h.push(M(L)),7===++w&&(a.showWeekNumber&&h.unshift(k(b-o,t,e)),r.push(x(h,a.isRTL)),h=[],w=0)}return T(a,r,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(u(this.el,"is-hidden"),this._v=!0,this.draw(),this._o.bound&&(s(a,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;e!==!1&&(this._o.bound&&o(a,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",d(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),o(this.el,"mousedown",this._onMouseDown,!0),o(this.el,"touchend",this._onMouseDown,!0),o(this.el,"change",this._onChange),this._o.field&&(o(this._o.field,"change",this._onInputChange),this._o.bound&&(o(this._o.trigger,"click",this._onInputClick),o(this._o.trigger,"focus",this._onInputFocus),o(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},Y});
1
+ !function(e,t){"use strict";var n;if("object"==typeof exports){try{n=require("moment")}catch(e){}module.exports=t(n)}else"function"==typeof define&&define.amd?define(function(e){try{n=e("moment")}catch(e){}return t(n)}):e.Pikaday=t(e.moment)}(this,function(e){"use strict";var t="function"==typeof e,n=!!window.addEventListener,a=window.document,i=window.setTimeout,s=function(e,t,a,i){n?e.addEventListener(t,a,!!i):e.attachEvent("on"+t,a)},o=function(e,t,a,i){n?e.removeEventListener(t,a,!!i):e.detachEvent("on"+t,a)},r=function(e,t,n){var i;a.createEvent?(i=a.createEvent("HTMLEvents"),i.initEvent(t,!0,!1),i=_(i,n),e.dispatchEvent(i)):a.createEventObject&&(i=a.createEventObject(),i=_(i,n),e.fireEvent("on"+t,i))},h=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},l=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},d=function(e,t){l(e,t)||(e.className=""===e.className?t:e.className+" "+t)},u=function(e,t){e.className=h((" "+e.className+" ").replace(" "+t+" "," "))},c=function(e){return/Array/.test(Object.prototype.toString.call(e))},f=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},m=function(e){var t=e.getDay();return 0===t||6===t},g=function(e){return e%4==0&&e%100!=0||e%400==0},p=function(e,t){return[31,g(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},y=function(e){f(e)&&e.setHours(0,0,0,0)},D=function(e,t){return e.getTime()===t.getTime()},_=function(e,t,n){var a,i;for(a in t)i=void 0!==e[a],i&&"object"==typeof t[a]&&null!==t[a]&&void 0===t[a].nodeName?f(t[a])?n&&(e[a]=new Date(t[a].getTime())):c(t[a])?n&&(e[a]=t[a].slice(0)):e[a]=_({},t[a],n):!n&&i||(e[a]=t[a]);return e},b=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},v={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},w=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},M=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},k=function(e,t,n){var a=new Date(n,0,1);return'<td class="pika-week">'+Math.ceil(((new Date(n,t,e)-a)/864e5+a.getDay()+1)/7)+"</td>"},x=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},R=function(e){return"<tbody>"+e.join("")+"</tbody>"},N=function(e){var t,n=[];for(e.showWeekNumber&&n.push("<th></th>"),t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+w(e,t)+'">'+w(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"},C=function(e,t,n,a,i,s){var o,r,h,l,d,u=e._o,f=n===u.minYear,m=n===u.maxYear,g='<div id="'+s+'" class="pika-title" role="heading" aria-live="assertive">',p=!0,y=!0;for(h=[],o=0;o<12;o++)h.push('<option value="'+(n===i?o-t:12+o-t)+'"'+(o===a?' selected="selected"':"")+(f&&o<u.minMonth||m&&o>u.maxMonth?'disabled="disabled"':"")+">"+u.i18n.months[o]+"</option>");for(l='<div class="pika-label">'+u.i18n.months[a]+'<select class="pika-select pika-select-month" tabindex="-1">'+h.join("")+"</select></div>",c(u.yearRange)?(o=u.yearRange[0],r=u.yearRange[1]+1):(o=n-u.yearRange,r=1+n+u.yearRange),h=[];o<r&&o<=u.maxYear;o++)o>=u.minYear&&h.push('<option value="'+o+'"'+(o===n?' selected="selected"':"")+">"+o+"</option>");return d='<div class="pika-label">'+n+u.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+h.join("")+"</select></div>",u.showMonthAfterYear?g+=d+l:g+=l+d,f&&(0===a||u.minMonth>=a)&&(p=!1),m&&(11===a||u.maxMonth<=a)&&(y=!1),0===t&&(g+='<button class="pika-prev'+(p?"":" is-disabled")+'" type="button">'+u.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(g+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+u.i18n.nextMonth+"</button>"),g+="</div>"},T=function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+N(e)+R(t)+"</table>"},Y=function(o){var r=this,h=r.config(o);r._onMouseDown=function(e){if(r._v){e=e||window.event;var t=e.target||e.srcElement;if(t)if(l(t,"is-disabled")||(!l(t,"pika-button")||l(t,"is-empty")||l(t.parentNode,"is-disabled")?l(t,"pika-prev")?r.prevMonth():l(t,"pika-next")&&r.nextMonth():(r.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),h.bound&&i(function(){r.hide(),h.field&&h.field.blur()},100))),l(t,"pika-select"))r._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},r._onChange=function(e){e=e||window.event;var t=e.target||e.srcElement;t&&(l(t,"pika-select-month")?r.gotoMonth(t.value):l(t,"pika-select-year")&&r.gotoYear(t.value))},r._onKeyChange=function(e){if(e=e||window.event,r.isVisible())switch(e.keyCode){case 13:case 27:h.field.blur();break;case 37:e.preventDefault(),r.adjustDate("subtract",1);break;case 38:r.adjustDate("subtract",7);break;case 39:r.adjustDate("add",1);break;case 40:r.adjustDate("add",7)}},r._onInputChange=function(n){var a;n.firedBy!==r&&(t?(a=e(h.field.value,h.format,h.formatStrict),a=a&&a.isValid()?a.toDate():null):a=new Date(Date.parse(h.field.value)),f(a)&&r.setDate(a),r._v||r.show())},r._onInputFocus=function(){r.show()},r._onInputClick=function(){r.show()},r._onInputBlur=function(){var e=a.activeElement;do{if(l(e,"pika-single"))return}while(e=e.parentNode);r._c||(r._b=i(function(){r.hide()},50)),r._c=!1},r._onClick=function(e){e=e||window.event;var t=e.target||e.srcElement,a=t;if(t){!n&&l(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),s(t,"change",r._onChange)));do{if(l(a,"pika-single")||a===h.trigger)return}while(a=a.parentNode);r._v&&t!==h.trigger&&a!==h.trigger&&r.hide()}},r.el=a.createElement("div"),r.el.className="pika-single"+(h.isRTL?" is-rtl":"")+(h.theme?" "+h.theme:""),s(r.el,"mousedown",r._onMouseDown,!0),s(r.el,"touchend",r._onMouseDown,!0),s(r.el,"change",r._onChange),s(a,"keydown",r._onKeyChange),h.field&&(h.container?h.container.appendChild(r.el):h.bound?a.body.appendChild(r.el):h.field.parentNode.insertBefore(r.el,h.field.nextSibling),s(h.field,"change",r._onInputChange),h.defaultDate||(t&&h.field.value?h.defaultDate=e(h.field.value,h.format).toDate():h.defaultDate=new Date(Date.parse(h.field.value)),h.setDefaultDate=!0));var d=h.defaultDate;f(d)?h.setDefaultDate?r.setDate(d,!0):r.gotoDate(d):r.gotoDate(new Date),h.bound?(this.hide(),r.el.className+=" is-bound",s(h.trigger,"click",r._onInputClick),s(h.trigger,"focus",r._onInputFocus),s(h.trigger,"blur",r._onInputBlur)):this.show()};return Y.prototype={config:function(e){this._o||(this._o=_({},v,!0));var t=_(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,f(t.minDate)||(t.minDate=!1),f(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),c(t.yearRange)){var a=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||a,t.yearRange[1]=parseInt(t.yearRange[1],10)||a}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||v.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(n){return f(this._d)?t?e(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,a){t&&e.isMoment(n)&&this.setDate(n.toDate(),a)},getDate:function(){return f(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",r(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),f(e)){var n=this._o.minDate,a=this._o.maxDate;f(n)&&e<n?e=n:f(a)&&e>a&&(e=a),this._d=new Date(e.getTime()),y(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),r(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(f(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),a=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=e.getTime();a.setMonth(a.getMonth()+1),a.setDate(a.getDate()-1),t=i<n.getTime()||a.getTime()<i}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(n,a){var i,s=this.getDate(),o=24*parseInt(a)*60*60*1e3;"add"===n?i=new Date(s.valueOf()+o):"subtract"===n&&(i=new Date(s.valueOf()-o)),t&&("add"===n?i=e(s).add(a,"days").toDate():"subtract"===n&&(i=e(s).subtract(a,"days").toDate())),this.setDate(i)},adjustCalendars:function(){this.calendars[0]=b(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=b({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(y(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=v.minDate,this._o.minYear=v.minYear,this._o.minMonth=v.minMonth,this._o.startRange=v.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(y(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=v.maxDate,this._o.maxYear=v.maxYear,this._o.maxMonth=v.maxMonth,this._o.endRange=v.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t,n=this._o,a=n.minYear,s=n.maxYear,o=n.minMonth,r=n.maxMonth,h="";this._y<=a&&(this._y=a,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=s&&(this._y=s,!isNaN(r)&&this._m>r&&(this._m=r)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<n.numberOfMonths;l++)h+='<div class="pika-lendar">'+C(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t)+"</div>";this.el.innerHTML=h,n.bound&&"hidden"!==n.field.type&&i(function(){n.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,n,i,s,o,r,h,l,d;if(!this._o.container){if(this.el.style.position="absolute",e=this._o.trigger,t=e,n=this.el.offsetWidth,i=this.el.offsetHeight,s=window.innerWidth||a.documentElement.clientWidth,o=window.innerHeight||a.documentElement.clientHeight,r=window.pageYOffset||a.body.scrollTop||a.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)d=e.getBoundingClientRect(),h=d.left+window.pageXOffset,l=d.bottom+window.pageYOffset;else for(h=t.offsetLeft,l=t.offsetTop+t.offsetHeight;t=t.offsetParent;)h+=t.offsetLeft,l+=t.offsetTop;(this._o.reposition&&h+n>s||this._o.position.indexOf("right")>-1&&h-n+e.offsetWidth>0)&&(h=h-n+e.offsetWidth),(this._o.reposition&&l+i>o+r||this._o.position.indexOf("top")>-1&&l-i-e.offsetHeight>0)&&(l=l-i-e.offsetHeight),this.el.style.left=h+"px",this.el.style.top=l+"px"}},render:function(e,t,n){var a=this._o,i=new Date,s=p(e,t),o=new Date(e,t,1).getDay(),r=[],h=[];y(i),a.firstDay>0&&(o-=a.firstDay)<0&&(o+=7);for(var l=0===t?11:t-1,d=11===t?0:t+1,u=0===t?e-1:e,c=11===t?e+1:e,g=p(u,l),_=s+o,b=_;b>7;)b-=7;_+=7-b;for(var v=0,w=0;v<_;v++){var R=new Date(e,t,v-o+1),N=!!f(this._d)&&D(R,this._d),C=D(R,i),Y=v<o||v>=s+o,E=v-o+1,S=t,j=e,I=a.startRange&&D(a.startRange,R),O=a.endRange&&D(a.endRange,R),F=a.startRange&&a.endRange&&a.startRange<R&&R<a.endRange,A=a.minDate&&R<a.minDate||a.maxDate&&R>a.maxDate||a.disableWeekends&&m(R)||a.disableDayFn&&a.disableDayFn(R);Y&&(v<o?(E=g+E,S=l,j=u):(E-=s,S=d,j=c));var L={day:E,month:S,year:j,isSelected:N,isToday:C,isDisabled:A,isEmpty:Y,isStartRange:I,isEndRange:O,isInRange:F,showDaysInNextAndPreviousMonths:a.showDaysInNextAndPreviousMonths};h.push(M(L)),7==++w&&(a.showWeekNumber&&h.unshift(k(v-o,t,e)),r.push(x(h,a.isRTL)),h=[],w=0)}return T(a,r,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(u(this.el,"is-hidden"),this._v=!0,this.draw(),this._o.bound&&(s(a,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&o(a,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",d(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),o(this.el,"mousedown",this._onMouseDown,!0),o(this.el,"touchend",this._onMouseDown,!0),o(this.el,"change",this._onChange),this._o.field&&(o(this._o.field,"change",this._onInputChange),this._o.bound&&(o(this._o.trigger,"click",this._onInputClick),o(this._o.trigger,"focus",this._onInputFocus),o(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},Y});
base/inc/fields/js/media-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e(document).on("sowsetupformfield",".siteorigin-widget-field-type-media",function(t){var i=e(this),s=i.find("> .media-field-wrapper"),n=i.find(".siteorigin-widget-input").not(".media-fallback-external");s.find(".media-upload-button").click(function(t){if(t.preventDefault(),"undefined"!=typeof wp.media){var s=e(this),a=e(this).data("frame");if(a)return a.open(),!1;a=wp.media({title:s.data("choose"),library:{type:s.data("library").split(",").map(function(e){return e.trim()})},button:{text:s.data("update"),close:!1}}),s.data("frame",a),a.on("select",function(){var e=a.state().get("selection").first().attributes;i.find(".current .title").html(e.title),n.val(e.id),n.trigger("change",{silent:!0});var t=i.find(".current .thumbnail");"undefined"!=typeof e.sizes?"undefined"!=typeof e.sizes.thumbnail?t.attr("src",e.sizes.thumbnail.url).fadeIn():t.attr("src",e.sizes.full.url).fadeIn():t.attr("src",e.icon).fadeIn(),i.find(".media-remove-button").removeClass("remove-hide"),a.close()}),a.open()}}),s.find(".current").mouseenter(function(){var t=e(this).find(".title");""!==t.html()&&t.fadeIn("fast")}).mouseleave(function(){e(this).find(".title").clearQueue().fadeOut("fast")}),i.find("a.media-remove-button").click(function(t){t.preventDefault(),i.find(".current .title").html(""),n.val(""),i.find(".current .thumbnail").fadeOut("fast"),e(this).addClass("remove-hide")});var a=!1,r=function(){if(a){var e=a.find(".so-widgets-image-results");if(0!==e.length){var t=e.width(),i=Math.floor(t/276),s=t-276*i,n=s/i+260;e.find(".so-widgets-result-image").css({width:n,height:n/1.4})}}};e(window).resize(r);var o=function(){if(!a){a=e(e("#so-widgets-bundle-tpl-image-search-dialog").html().trim()).appendTo("body"),a.find(".close").click(function(){a.hide()});var t=a.find(".so-widgets-image-results"),s=function(i,s){a.find(".so-widgets-results-loading").fadeIn("fast"),a.find(".so-widgets-results-loading strong").html(a.find(".so-widgets-results-loading strong").data("loading")),a.find(".so-widgets-results-more").hide(),e.get(ajaxurl,{action:"so_widgets_image_search",q:i,page:s,_sononce:a.find('input[name="_sononce"]').val()},function(n){return n.error?void alert(n.message):(t.removeClass("so-loading"),e.each(n.items,function(i,s){var n=e(e("#so-widgets-bundle-tpl-image-search-result").html().trim()).appendTo(t).addClass("source-"+s.source),a=n.find(".so-widgets-result-image");a.css("background-image","url("+s.thumbnail+")"),a.data("thumbnail",s.thumbnail),a.data("preview",s.preview),s.url&&a.attr({href:s.url,target:"_blank"}),s.full_url&&(a.data({full_url:s.full_url,import_signature:s.import_signature}),a.attr("href",s.full_url)),"shutterstock"===s.source&&a.append(e("#so-widgets-bundle-tpl-image-search-result-sponsored").html())}),1===s&&(a.find("#so-widgets-image-search-suggestions ul").empty(),e.each(n.keywords,function(t,i){a.find("#so-widgets-image-search-suggestions").show(),a.find("#so-widgets-image-search-suggestions ul").append(e("<li></li>").append(e('<a href="#"></a>').html(i).data("keyword",i)))})),a.find(".so-widgets-results-loading").fadeOut("fast"),r(),void a.find(".so-widgets-results-more").show().find("button").data({query:i,page:s+1}))})};a.find("#so-widgets-image-search-form").submit(function(e){e.preventDefault();var i=a.find(".so-widgets-search-input").val();t.empty(),""!==i&&s(i,1)}),a.on("click",".so-keywords-list a",function(t){t.preventDefault();var i=e(this).blur();a.find(".so-widgets-search-input").val(i.data("keyword")),a.find("#so-widgets-image-search-form").submit()}),a.find(".so-widgets-results-more button").click(function(){var t=e(this);s(t.data("query"),t.data("page"))});var o;a.on("click",".so-widgets-result-image",function(t){var s=e(this);if(s.data("full_url")&&(t.preventDefault(),confirm(a.data("confirm-import")))){a.addClass("so-widgets-importing");var r=e("#post_ID").val();null===r&&(r=""),e.get(ajaxurl,{action:"so_widgets_image_import",full_url:s.data("full_url"),import_signature:s.data("import_signature"),post_id:r,_sononce:a.find('input[name="_sononce"]').val()},function(e){a.find("#so-widgets-image-search-frame").removeClass("so-widgets-importing"),e.error===!1?(a.hide(),a.find(".so-widgets-results-loading").hide(),n.val(e.attachment_id).trigger("change",{silent:!0}),i.find(".current .thumbnail").attr("src",e.thumb).fadeIn(),i.find(".media-remove-button").removeClass("remove-hide")):(alert(e.message),a.find(".so-widgets-results-loading").hide())}),a.find(".so-widgets-results-loading").fadeIn("fast"),a.find(".so-widgets-results-loading strong").html(a.find(".so-widgets-results-loading strong").data("importing")),a.find(".so-widgets-results-more").hide(),a.find("#so-widgets-image-search-frame").addClass("so-widgets-importing")}});var d=a.find(".so-widgets-preview-window");a.on("mouseenter",".so-widgets-result-image",function(){var t=e(this),i=t.data("preview");clearTimeout(o),o=setTimeout(function(){var s=1,n=1;i[1]>.33*e(window).outerWidth()&&(s=.33*e(window).outerWidth()/i[1]),i[2]>.5*e(window).outerHeight()&&(n=.5*e(window).outerHeight()/i[2]);var r=Math.min(s,n);r>1&&(r=1),d.show().find(".so-widgets-preview-window-inside").css({"background-image":"url("+t.data("thumbnail")+")",width:i[1]*r,height:i[2]*r}).append(e("<img />").attr("src",i[0])),a.trigger("mousemove")},1e3)}).on("mouseleave",".so-widgets-result-image",function(){d.hide().find("img").remove(),clearTimeout(o)});var l,u;a.on("mousemove",function(t){if(t.clientX&&(l=t.clientX),t.clientY&&(u=t.clientY),d.is(":visible")){var i=d.outerHeight(),s=d.outerWidth(),n=e(window).outerHeight(),a=e(window).outerWidth(),r=u-i/2;r=Math.max(r,10),r=Math.min(r,n-10-i);var o=l<a/2?l+15:l-15-s;d.css({top:r,left:o})}})}a.show(),a.find(".so-widgets-search-input").focus()};s.find(".find-image-button").click(function(e){e.preventDefault(),o()}),n.change(function(e,t){if(!t||!t.silent){var s=n.val();if(s){var a=i.find(".current .thumbnail"),r=wp.media.attachment(s);r.fetch().done(function(){if(r.has("sizes")){var e=r.get("sizes");"undefined"!=typeof e.thumbnail?a.attr("src",e.thumbnail.url).fadeIn():a.attr("src",e.full.url).fadeIn()}else a.attr("src",r.get("icon")).fadeIn();i.find(".media-remove-button").removeClass("remove-hide")})}else i.find("a.media-remove-button").click()}})})}(jQuery);
1
+ !function(e){e(document).on("sowsetupformfield",".siteorigin-widget-field-type-media",function(t){var i=e(this),s=i.find("> .media-field-wrapper"),a=i.find(".siteorigin-widget-input").not(".media-fallback-external");s.find(".media-upload-button").click(function(t){if(t.preventDefault(),void 0!==wp.media){var s=e(this),n=e(this).data("frame");if(n)return n.open(),!1;n=wp.media({title:s.data("choose"),library:{type:s.data("library").split(",").map(function(e){return e.trim()})},button:{text:s.data("update"),close:!1}}),s.data("frame",n),n.on("select",function(){var e=n.state().get("selection").first().attributes;i.find(".current .title").html(e.title),a.val(e.id),a.trigger("change",{silent:!0});var t=i.find(".current .thumbnail");void 0!==e.sizes?void 0!==e.sizes.thumbnail?t.attr("src",e.sizes.thumbnail.url).fadeIn():t.attr("src",e.sizes.full.url).fadeIn():t.attr("src",e.icon).fadeIn(),i.find(".media-remove-button").removeClass("remove-hide"),n.close()}),n.open()}}),s.find(".current").mouseenter(function(){var t=e(this).find(".title");""!==t.html()&&t.fadeIn("fast")}).mouseleave(function(){e(this).find(".title").clearQueue().fadeOut("fast")}),i.find("a.media-remove-button").click(function(t){t.preventDefault(),i.find(".current .title").html(""),a.val(""),i.find(".current .thumbnail").fadeOut("fast"),e(this).addClass("remove-hide")});var n=!1,r=function(){if(n){var e=n.find(".so-widgets-image-results");if(0!==e.length){var t=e.width(),i=Math.floor(t/276),s=t-276*i,a=s/i+260;e.find(".so-widgets-result-image").css({width:a,height:a/1.4})}}};e(window).resize(r);var o=function(){if(!n){n=e(e("#so-widgets-bundle-tpl-image-search-dialog").html().trim()).appendTo("body"),n.find(".close").click(function(){n.hide()});var t=n.find(".so-widgets-image-results"),s=function(i,s){n.find(".so-widgets-results-loading").fadeIn("fast"),n.find(".so-widgets-results-loading strong").html(n.find(".so-widgets-results-loading strong").data("loading")),n.find(".so-widgets-results-more").hide(),e.get(ajaxurl,{action:"so_widgets_image_search",q:i,page:s,_sononce:n.find('input[name="_sononce"]').val()},function(a){if(a.error)return void alert(a.message);t.removeClass("so-loading"),e.each(a.items,function(i,s){var a=e(e("#so-widgets-bundle-tpl-image-search-result").html().trim()).appendTo(t).addClass("source-"+s.source),n=a.find(".so-widgets-result-image");n.css("background-image","url("+s.thumbnail+")"),n.data("thumbnail",s.thumbnail),n.data("preview",s.preview),s.url&&n.attr({href:s.url,target:"_blank"}),s.full_url&&(n.data({full_url:s.full_url,import_signature:s.import_signature}),n.attr("href",s.full_url)),"shutterstock"===s.source&&n.append(e("#so-widgets-bundle-tpl-image-search-result-sponsored").html())}),1===s&&(n.find("#so-widgets-image-search-suggestions ul").empty(),e.each(a.keywords,function(t,i){n.find("#so-widgets-image-search-suggestions").show(),n.find("#so-widgets-image-search-suggestions ul").append(e("<li></li>").append(e('<a href="#"></a>').html(i).data("keyword",i)))})),n.find(".so-widgets-results-loading").fadeOut("fast"),r(),n.find(".so-widgets-results-more").show().find("button").data({query:i,page:s+1})})};n.find("#so-widgets-image-search-form").submit(function(e){e.preventDefault();var i=n.find(".so-widgets-search-input").val();t.empty(),""!==i&&s(i,1)}),n.on("click",".so-keywords-list a",function(t){t.preventDefault();var i=e(this).blur();n.find(".so-widgets-search-input").val(i.data("keyword")),n.find("#so-widgets-image-search-form").submit()}),n.find(".so-widgets-results-more button").click(function(){var t=e(this);s(t.data("query"),t.data("page"))});var o;n.on("click",".so-widgets-result-image",function(t){var s=e(this);if(s.data("full_url")&&(t.preventDefault(),confirm(n.data("confirm-import")))){n.addClass("so-widgets-importing");var r=e("#post_ID").val();null===r&&(r=""),e.get(ajaxurl,{action:"so_widgets_image_import",full_url:s.data("full_url"),import_signature:s.data("import_signature"),post_id:r,_sononce:n.find('input[name="_sononce"]').val()},function(e){n.find("#so-widgets-image-search-frame").removeClass("so-widgets-importing"),!1===e.error?(n.hide(),n.find(".so-widgets-results-loading").hide(),a.val(e.attachment_id).trigger("change",{silent:!0}),i.find(".current .thumbnail").attr("src",e.thumb).fadeIn(),i.find(".media-remove-button").removeClass("remove-hide")):(alert(e.message),n.find(".so-widgets-results-loading").hide())}),n.find(".so-widgets-results-loading").fadeIn("fast"),n.find(".so-widgets-results-loading strong").html(n.find(".so-widgets-results-loading strong").data("importing")),n.find(".so-widgets-results-more").hide(),n.find("#so-widgets-image-search-frame").addClass("so-widgets-importing")}});var d=n.find(".so-widgets-preview-window");n.on("mouseenter",".so-widgets-result-image",function(){var t=e(this),i=t.data("preview");clearTimeout(o),o=setTimeout(function(){var s=1,a=1;i[1]>.33*e(window).outerWidth()&&(s=.33*e(window).outerWidth()/i[1]),i[2]>.5*e(window).outerHeight()&&(a=.5*e(window).outerHeight()/i[2]);var r=Math.min(s,a);r>1&&(r=1),d.show().find(".so-widgets-preview-window-inside").css({"background-image":"url("+t.data("thumbnail")+")",width:i[1]*r,height:i[2]*r}).append(e("<img />").attr("src",i[0])),n.trigger("mousemove")},1e3)}).on("mouseleave",".so-widgets-result-image",function(){d.hide().find("img").remove(),clearTimeout(o)});var l,u;n.on("mousemove",function(t){if(t.clientX&&(l=t.clientX),t.clientY&&(u=t.clientY),d.is(":visible")){var i=d.outerHeight(),s=d.outerWidth(),a=e(window).outerHeight(),n=e(window).outerWidth(),r=u-i/2;r=Math.max(r,10),r=Math.min(r,a-10-i);var o=l<n/2?l+15:l-15-s;d.css({top:r,left:o})}})}n.show(),n.find(".so-widgets-search-input").focus()};s.find(".find-image-button").click(function(e){e.preventDefault(),o()}),a.change(function(e,t){if(!t||!t.silent){var s=a.val();if(s){var n=i.find(".current .thumbnail"),r=wp.media.attachment(s);r.fetch().done(function(){if(r.has("sizes")){var e=r.get("sizes");void 0!==e.thumbnail?n.attr("src",e.thumbnail.url).fadeIn():n.attr("src",e.full.url).fadeIn()}else n.attr("src",r.get("icon")).fadeIn();i.find(".media-remove-button").removeClass("remove-hide")})}else i.find("a.media-remove-button").click()}})})}(jQuery);
base/inc/fields/js/order-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(i){i(document).on("sowsetupform",function(t){var e=i(t.target);e.find(".siteorigin-widget-field-type-order").each(function(){var t=i(this),e=t.find(".siteorigin-widget-input"),n=t.find(".siteorigin-widget-order-items");n.sortable({stop:function(){var t=i(this).sortable("toArray",{attribute:"data-value"});e.val(t.join(",")),e.trigger("change",{silent:!0})}}),t.change(function(i,r){if(!r||!r.silent){var a=""===e.val()?[]:e.val().split(",");if(a.length)for(var o=0;o<a.length;o++){var d=a[o],g=t.find(".siteorigin-widget-order-item[data-value="+d+"]");n.append(g)}}})})})}(jQuery);
1
+ !function(i){i(document).on("sowsetupform",function(t){i(t.target).find(".siteorigin-widget-field-type-order").each(function(){var t=i(this),e=t.find(".siteorigin-widget-input"),n=t.find(".siteorigin-widget-order-items");n.sortable({stop:function(){var t=i(this).sortable("toArray",{attribute:"data-value"});e.val(t.join(",")),e.trigger("change",{silent:!0})}}),t.change(function(i,r){if(!r||!r.silent){var a=""===e.val()?[]:e.val().split(",");if(a.length)for(var o=0;o<a.length;o++){var d=a[o],g=t.find(".siteorigin-widget-order-item[data-value="+d+"]");n.append(g)}}})})})}(jQuery);
base/inc/fields/js/tinymce-field-pre48.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t=function(i){"undefined"!=typeof tinyMCEPreInit?(tinyMCEPreInit.mceInit.hasOwnProperty("undefined")&&delete tinyMCEPreInit.mceInit.undefined,tinyMCEPreInit.qtInit.hasOwnProperty("undefined")&&delete tinyMCEPreInit.qtInit.undefined,QTags.instances.hasOwnProperty("undefined")&&delete QTags.instances.undefined,e(i).find("> .siteorigin-widget-field-type-tinymce > .siteorigin-widget-tinymce-container").each(function(t,i){var n=e(i),r=n.find("textarea"),a=r.attr("id");if("undefined"!=typeof tinymce){if(a.indexOf("__i__")>-1)return;var s=n.data("mceSettings"),o=n.data("widgetIdBase"),c=r.attr("name").replace(/\[\d*\]/g,""),d=/[a-zA-Z0-9\-]+(?:\[[a-zA-Z0-9]+\])?\[(.*)\]/.exec(c)[1],f=new RegExp("widget-"+o+"-?.*-"+d.replace(/\]\[/g,"-")+"[-d]*");for(var g in tinyMCEPreInit.mceInit)g.match(f)&&(s=e.extend({},tinyMCEPreInit.mceInit[g],s));var l,m=tinymce.get(a);null!==m&&("undefined"==typeof vc&&0===n.closest(".vc_active").length&&(l=m.getContent()),m.remove());var u=function(e){e.on("change",function(){tinymce.get(a).save(),r.trigger("change"),r.val(window.switchEditors.pre_wpautop(e.getContent()))}),e.on("init",function(){l&&e.setContent(l)})};s=e.extend({},s,{selector:"#"+a,setup:u}),tinyMCEPreInit.mceInit[a]=s;var v=n.find("div#wp-"+a+"-wrap");if(v.hasClass("tmce-active"))if(e("#"+a).is(":visible"))tinymce.init(tinyMCEPreInit.mceInit[a]);else var y=setInterval(function(){e("#"+a).is(":visible")&&(tinymce.init(tinyMCEPreInit.mceInit[a]),clearInterval(y))},500)}var p=n.data("qtSettings");p=e.extend({},tinyMCEPreInit.qtInit["siteorigin-widget-input-tinymce-field"],p,{id:a}),tinyMCEPreInit.qtInit[a]=p,n.find(".quicktags-toolbar").remove(),quicktags(tinyMCEPreInit.qtInit[a]),e(this).on("click",function(t){var i=e(t.target);if(i.hasClass("wp-switch-editor")){var n=i.hasClass("switch-tmce")?"tmce":"html";if("tmce"==n){var s=tinymce.get(a);if(null!=s){var o=r.val();o.search("<")!=-1&&o.search(">")==-1&&(o=o.replace(/</g,""),r.val(o)),s.setContent(window.switchEditors.wpautop(o))}}e(this).find("+ .siteorigin-widget-tinymce-selected-editor").val(n)}})}),QTags._buttonsInit()):setTimeout(function(){t(i)},500)};e(document).on("sowsetupform",function(i){var n=e(i.target);n.is(".siteorigin-widget-field-repeater-item-form")?n.is(":visible")?t(n):n.on("slideToggleOpenComplete",function(){n.is(":visible")&&(t(n),n.off("slideToggleOpenComplete"))}):t(n)}),e(document).on("sortstop",function(i,n){n.item.is(".siteorigin-widget-field-repeater-item")?n.item.find("> .siteorigin-widget-field-repeater-item-form").each(function(){t(e(this))}):t(n.item.find(".siteorigin-widget-form"))})}(jQuery);
1
+ !function(e){var t=function(i){"undefined"!=typeof tinyMCEPreInit?(tinyMCEPreInit.mceInit.hasOwnProperty("undefined")&&delete tinyMCEPreInit.mceInit.undefined,tinyMCEPreInit.qtInit.hasOwnProperty("undefined")&&delete tinyMCEPreInit.qtInit.undefined,QTags.instances.hasOwnProperty("undefined")&&delete QTags.instances.undefined,e(i).find("> .siteorigin-widget-field-type-tinymce > .siteorigin-widget-tinymce-container").each(function(t,i){var n=e(i),r=n.find("textarea"),a=r.attr("id");if("undefined"!=typeof tinymce){if(a.indexOf("__i__")>-1)return;var s=n.data("mceSettings"),o=n.data("widgetIdBase"),c=r.attr("name").replace(/\[\d*\]/g,""),d=/[a-zA-Z0-9\-]+(?:\[[a-zA-Z0-9]+\])?\[(.*)\]/.exec(c)[1],f=new RegExp("widget-"+o+"-?.*-"+d.replace(/\]\[/g,"-")+"[-d]*");for(var g in tinyMCEPreInit.mceInit)g.match(f)&&(s=e.extend({},tinyMCEPreInit.mceInit[g],s));var l,m=tinymce.get(a);null!==m&&("undefined"==typeof vc&&0===n.closest(".vc_active").length&&(l=m.getContent()),m.remove());var u=function(e){e.on("change",function(){tinymce.get(a).save(),r.trigger("change"),r.val(window.switchEditors.pre_wpautop(e.getContent()))}),e.on("init",function(){l&&e.setContent(l)})};s=e.extend({},s,{selector:"#"+a,setup:u}),tinyMCEPreInit.mceInit[a]=s;if(n.find("div#wp-"+a+"-wrap").hasClass("tmce-active"))if(e("#"+a).is(":visible"))tinymce.init(tinyMCEPreInit.mceInit[a]);else var v=setInterval(function(){e("#"+a).is(":visible")&&(tinymce.init(tinyMCEPreInit.mceInit[a]),clearInterval(v))},500)}var y=n.data("qtSettings");y=e.extend({},tinyMCEPreInit.qtInit["siteorigin-widget-input-tinymce-field"],y,{id:a}),tinyMCEPreInit.qtInit[a]=y,n.find(".quicktags-toolbar").remove(),quicktags(tinyMCEPreInit.qtInit[a]),e(this).on("click",function(t){var i=e(t.target);if(i.hasClass("wp-switch-editor")){var n=i.hasClass("switch-tmce")?"tmce":"html";if("tmce"==n){var s=tinymce.get(a);if(null!=s){var o=r.val();-1!=o.search("<")&&-1==o.search(">")&&(o=o.replace(/</g,""),r.val(o)),s.setContent(window.switchEditors.wpautop(o))}}e(this).find("+ .siteorigin-widget-tinymce-selected-editor").val(n)}})}),QTags._buttonsInit()):setTimeout(function(){t(i)},500)};e(document).on("sowsetupform",function(i){var n=e(i.target);n.is(".siteorigin-widget-field-repeater-item-form")?n.is(":visible")?t(n):n.on("slideToggleOpenComplete",function(){n.is(":visible")&&(t(n),n.off("slideToggleOpenComplete"))}):t(n)}),e(document).on("sortstop",function(i,n){n.item.is(".siteorigin-widget-field-repeater-item")?n.item.find("> .siteorigin-widget-field-repeater-item-form").each(function(){t(e(this))}):t(n.item.find(".siteorigin-widget-form"))})}(jQuery);
base/inc/fields/js/tinymce-field.js CHANGED
@@ -3,6 +3,10 @@
3
  (function ( $ ) {
4
  $( document ).on( 'sowsetupformfield', '.siteorigin-widget-field-type-tinymce', function ( e ) {
5
  var $$ = $( this );
 
 
 
 
6
  var $container = $$.find( '.siteorigin-widget-tinymce-container' );
7
  var settings = $container.data( 'editorSettings' );
8
  var $textarea = $container.find( 'textarea' );
@@ -62,13 +66,15 @@
62
  $textarea.val( content );
63
  }
64
  }
65
- editor.setContent(window.switchEditors.wpautop(content));
66
  }
67
  }
68
 
69
  $$.find( '.siteorigin-widget-tinymce-selected-editor' ).val( mode );
70
  }
71
  } );
 
 
72
  } );
73
 
74
  })( jQuery );
3
  (function ( $ ) {
4
  $( document ).on( 'sowsetupformfield', '.siteorigin-widget-field-type-tinymce', function ( e ) {
5
  var $$ = $( this );
6
+ if( $$.data( 'initialized' ) ) {
7
+ return;
8
+ }
9
+
10
  var $container = $$.find( '.siteorigin-widget-tinymce-container' );
11
  var settings = $container.data( 'editorSettings' );
12
  var $textarea = $container.find( 'textarea' );
66
  $textarea.val( content );
67
  }
68
  }
69
+ editor.setContent( window.switchEditors.wpautop( content ) );
70
  }
71
  }
72
 
73
  $$.find( '.siteorigin-widget-tinymce-selected-editor' ).val( mode );
74
  }
75
  } );
76
+
77
+ $$.data( 'initialized', true );
78
  } );
79
 
80
  })( jQuery );
base/inc/fields/js/tinymce-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e(document).on("sowsetupformfield",".siteorigin-widget-field-type-tinymce",function(t){var i=e(this),n=i.find(".siteorigin-widget-tinymce-container"),o=n.data("editorSettings"),c=n.find("textarea"),r=c.attr("id"),s=function(e){e.on("change",function(){window.tinymce.get(r).save(),c.trigger("change")})};if(o.tinymce=e.extend({},o.tinymce,{selector:"#"+r,setup:s}),e(document).one("wp-before-tinymce-init",function(e,t){if(t.selector===o.tinymce.selector){var c=n.data("mediaButtons");i.find(".wp-editor-tabs").before(c.html)}}),e(document).one("tinymce-editor-setup",function(){i.find(".wp-editor-wrap").hasClass(o.selectedEditor+"-active")||setTimeout(function(){window.switchEditors.go(r)},10)}),wp.editor.remove(r),c.is(":visible"))wp.editor.initialize(r,o);else var a=setInterval(function(){c.is(":visible")&&(wp.editor.initialize(r,o),clearInterval(a))},500);i.on("click",function(t){var n=e(t.target);if(n.hasClass("wp-switch-editor")){var o=n.hasClass("switch-tmce")?"tmce":"html";if("tmce"===o){var s=window.tinymce.get(r);if(null!==s){var a=c.val();a.search("<")!==-1&&a.search(">")===-1&&(a=a.replace(/</g,""),c.val(a)),s.setContent(window.switchEditors.wpautop(a))}}i.find(".siteorigin-widget-tinymce-selected-editor").val(o)}})})}(jQuery);
1
+ !function(i){i(document).on("sowsetupformfield",".siteorigin-widget-field-type-tinymce",function(t){var e=i(this);if(!e.data("initialized")){var n=e.find(".siteorigin-widget-tinymce-container"),o=n.data("editorSettings"),a=n.find("textarea"),c=a.attr("id"),r=function(i){i.on("change",function(){window.tinymce.get(c).save(),a.trigger("change")})};if(o.tinymce=i.extend({},o.tinymce,{selector:"#"+c,setup:r}),i(document).one("wp-before-tinymce-init",function(i,t){if(t.selector===o.tinymce.selector){var a=n.data("mediaButtons");e.find(".wp-editor-tabs").before(a.html)}}),i(document).one("tinymce-editor-setup",function(){e.find(".wp-editor-wrap").hasClass(o.selectedEditor+"-active")||setTimeout(function(){window.switchEditors.go(c)},10)}),wp.editor.remove(c),a.is(":visible"))wp.editor.initialize(c,o);else var s=setInterval(function(){a.is(":visible")&&(wp.editor.initialize(c,o),clearInterval(s))},500);e.on("click",function(t){var n=i(t.target);if(n.hasClass("wp-switch-editor")){var o=n.hasClass("switch-tmce")?"tmce":"html";if("tmce"===o){var r=window.tinymce.get(c);if(null!==r){var s=a.val();-1!==s.search("<")&&-1===s.search(">")&&(s=s.replace(/</g,""),a.val(s)),r.setContent(window.switchEditors.wpautop(s))}}e.find(".siteorigin-widget-tinymce-selected-editor").val(o)}}),e.data("initialized",!0)}})}(jQuery);
base/inc/fields/tinymce.class.php CHANGED
@@ -173,15 +173,15 @@ class SiteOrigin_Widget_Field_TinyMCE extends SiteOrigin_Widget_Field_Text_Input
173
  if ( ! empty( $this->wp_version_lt_4_8 ) ) {
174
  add_filter( 'mce_buttons', array( $this, 'mce_buttons_filter' ), 10, 2 );
175
  add_filter( 'quicktags_settings', array( $this, 'quicktags_settings' ), 10, 2 );
176
-
177
- if ( ! empty( $this->button_filters ) ) {
178
- foreach ( $this->button_filters as $filter_name => $filter ) {
179
- $is_valid_filter = preg_match(
180
- '/mce_buttons(?:_[1-4])?|quicktags_settings/', $filter_name
181
- ) && ! empty( $filter ) && is_callable( $filter );
182
- if ( $is_valid_filter ) {
183
- add_filter( $filter_name, array( $this, $filter_name ), 10, 2 );
184
- }
185
  }
186
  }
187
  }
@@ -358,6 +358,8 @@ class SiteOrigin_Widget_Field_TinyMCE extends SiteOrigin_Widget_Field_Text_Input
358
  ),
359
  );
360
 
 
 
361
  foreach ( $tmce_settings as $name => $setting ) {
362
  if ( ! empty( $tmce_settings[ $name ] ) ) {
363
  $settings['tinymce'][$name] = $setting;
@@ -385,7 +387,7 @@ class SiteOrigin_Widget_Field_TinyMCE extends SiteOrigin_Widget_Field_Text_Input
385
  <?php $this->render_data_attributes( $this->get_input_data_attributes() ) ?>
386
  <?php $this->render_CSS_classes( $this->get_input_classes() ) ?>
387
  <?php if ( ! empty( $this->placeholder ) ) echo 'placeholder="' . esc_attr( $this->placeholder ) . '"' ?>
388
- <?php if( ! empty( $this->readonly ) ) echo 'readonly' ?>><?php echo $value ?></textarea>
389
  </div>
390
  <input type="hidden"
391
  name="<?php echo esc_attr( $this->for_widget->so_get_field_name( $this->base_name . '_selected_editor', $this->parent_container) ) ?>"
173
  if ( ! empty( $this->wp_version_lt_4_8 ) ) {
174
  add_filter( 'mce_buttons', array( $this, 'mce_buttons_filter' ), 10, 2 );
175
  add_filter( 'quicktags_settings', array( $this, 'quicktags_settings' ), 10, 2 );
176
+ }
177
+
178
+ if ( ! empty( $this->button_filters ) ) {
179
+ foreach ( $this->button_filters as $filter_name => $filter ) {
180
+ $is_valid_filter = preg_match(
181
+ '/mce_buttons(?:_[1-4])?|quicktags_settings/', $filter_name
182
+ ) && ! empty( $filter ) && is_callable( $filter );
183
+ if ( $is_valid_filter ) {
184
+ add_filter( $filter_name, array( $this, $filter_name ), 10, 2 );
185
  }
186
  }
187
  }
358
  ),
359
  );
360
 
361
+ $tmce_settings = apply_filters( 'tiny_mce_before_init', $tmce_settings, $this->element_id );
362
+
363
  foreach ( $tmce_settings as $name => $setting ) {
364
  if ( ! empty( $tmce_settings[ $name ] ) ) {
365
  $settings['tinymce'][$name] = $setting;
387
  <?php $this->render_data_attributes( $this->get_input_data_attributes() ) ?>
388
  <?php $this->render_CSS_classes( $this->get_input_classes() ) ?>
389
  <?php if ( ! empty( $this->placeholder ) ) echo 'placeholder="' . esc_attr( $this->placeholder ) . '"' ?>
390
+ <?php if( ! empty( $this->readonly ) ) echo 'readonly' ?>><?php echo htmlentities( $value ) ?></textarea>
391
  </div>
392
  <input type="hidden"
393
  name="<?php echo esc_attr( $this->for_widget->so_get_field_name( $this->base_name . '_selected_editor', $this->parent_container) ) ?>"
base/inc/widgets/base-slider.class.php CHANGED
@@ -304,24 +304,33 @@ abstract class SiteOrigin_Widget_Base_Slider extends SiteOrigin_Widget {
304
  * @param array $classes
305
  */
306
  function video_code( $videos, $classes = array() ){
307
- if(empty($videos)) return;
308
- $video_element = '<video class="' . esc_attr( implode(',', $classes) ) . '" autoplay loop muted>';
309
 
310
- foreach($videos as $video) {
311
  if( empty( $video['file'] ) && empty ( $video['url'] ) ) continue;
312
-
313
- if( empty( $video['url'] ) ) {
314
- $video_file = wp_get_attachment_url($video['file']);
315
- $video_element .= '<source src="' . sow_esc_url( $video_file ) . '" type="' . esc_attr( $video['format'] ) . '">';
316
- }
317
- else {
318
- $args = '';
319
  if ( ! empty( $video['height'] ) ) {
320
  $args['height'] = $video['height'];
321
  }
 
 
 
 
 
 
 
 
 
 
322
 
323
- echo wp_oembed_get( $video['url'], $args );
 
 
324
  }
 
325
  }
326
  if ( strpos( $video_element, 'source' ) !== false ) {
327
  $video_element .= '</video>';
304
  * @param array $classes
305
  */
306
  function video_code( $videos, $classes = array() ){
307
+ if( empty( $videos ) ) return;
308
+ $video_element = '<video class="' . esc_attr( implode( ',', $classes ) ) . '" autoplay loop muted>';
309
 
310
+ foreach( $videos as $video ) {
311
  if( empty( $video['file'] ) && empty ( $video['url'] ) ) continue;
312
+ // If video is an external file, try and display it using oEmbed
313
+ if( !empty( $video['url'] ) ) {
314
+ $args = array();
 
 
 
 
315
  if ( ! empty( $video['height'] ) ) {
316
  $args['height'] = $video['height'];
317
  }
318
+ $embedded_video = wp_oembed_get( $video['url'], $args );
319
+
320
+ // Check if we can oEmbed the video or not
321
+ if( !$embedded_video ) {
322
+ $video_file = sow_esc_url( $video['url'] );
323
+ }else{
324
+ echo $embedded_video;
325
+ continue;
326
+ }
327
+ }
328
 
329
+ // If $video_file isn't set video is a local file
330
+ if( !isset( $video_file ) ) {
331
+ $video_file = wp_get_attachment_url( $video['file'] );
332
  }
333
+ $video_element .= '<source src="' . sow_esc_url( $video_file ) . '" type="' . esc_attr( $video['format'] ) . '">';
334
  }
335
  if ( strpos( $video_element, 'source' ) !== false ) {
336
  $video_element .= '</video>';
base/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- var sowbForms=window.sowbForms||{};!function(e){e.fn.sowSetupForm=function(){return e(this).each(function(i,t){var n,r,a=e(t),s=!0,o=e("body"),d=a.find("input[name]");if(d.length&&d.attr("name").indexOf("__i__")!==-1)return this;if(a.is(".siteorigin-widget-form-main")){if(a.data("sow-form-setup")===!0)return!0;if(o.hasClass("widgets-php")&&!a.is(":visible")&&0===a.closest(".panel-dialog").length)return!0;a.on("sowstatechange",function(i,t,n){a.find("[data-state-handler]").each(function(){var i=e(this),r=e.extend({},i.data("state-handler"),s?i.data("state-handler-initial"):{});if(0===Object.keys(r).length)return!0;var a,o,d,l,f,g,p={},c=sowbForms.getRepeaterId(i);if(c!==!1){var u={};for(var m in r)u[m.replace("{$repeater}",c)]=r[m];r=u}for(var m in r)if(f=!1,a=m.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?$/),null!==a){if(o={group:"default",name:"",multi:!1},void 0!==a[2]?(o.group=a[1],o.name=a[3]):o.name=a[0],o.multi=void 0!==a[4],"_else"===o.group)o.group=o.name,o.name="",f=o.group===t&&"undefined"==typeof p[o.group];else{g=o.name.split(",").map(function(e){return e.trim()});for(var w=0;w<g.length&&!(f=o.group===t&&g[w]===n);w++);}if(f){d=r[m],o.multi||(d=[d]);for(var w=0;w<d.length;w++)l="undefined"!=typeof d[w][1]&&Boolean(d[w][1])?i.find(d[w][1]):i,l[d[w][0]].apply(l,"undefined"!=typeof d[w][2]?d[w][2]:[]);p[o.group]=!0}}})}),a.sowSetupPreview(),n=a;var l=a.find(".siteorigin-widget-teaser");l.find(".dashicons-dismiss").click(function(){var i=e(this);e.get(i.data("dismiss-url")),l.slideUp("normal",function(){l.remove()})});var f=a.find("> .siteorigin-widgets-form-id").val(),g=a.find("> .siteorigin-widgets-form-timestamp"),p=parseInt(g.val()||0),c=JSON.parse(sessionStorage.getItem(f));if(c)if(c._sow_form_timestamp>p){var u=e('<div class="siteorigin-widget-form-notification"><span>'+soWidgets.backup.newerVersion+'</span><a class="button button-small so-backup-restore">'+soWidgets.backup.restore+'</a><a class="button button-small so-backup-dismiss">'+soWidgets.backup.dismiss+"</a><div><small>"+soWidgets.backup.replaceWarning+"</small></div></div>");a.prepend(u),u.find(".so-backup-restore").click(function(){sowbForms.setWidgetFormValues(n,c),u.slideUp("fast",function(){u.remove()})}),u.find(".so-backup-dismiss").click(function(){u.slideUp("fast",function(){sessionStorage.removeItem(f),u.remove()})})}else sessionStorage.removeItem(f);a.change(function(){g.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(a);sessionStorage.setItem(f,JSON.stringify(e))})}else n=a.closest(".siteorigin-widget-form-main");r=n.find("> .siteorigin-widgets-form-id").val();var m=a.find("> .siteorigin-widget-field");m.find("> .siteorigin-widget-section").sowSetupForm(),m.filter(".siteorigin-widget-field-type-widget:not(:has(> .siteorigin-widget-section))").sowSetupForm(),m.find(".siteorigin-widget-input").each(function(i,t){null===e(t).data("original-name")&&e(t).data("original-name",e(t).attr("name"))}),m.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),a.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),m.find("> .siteorigin-widget-input-color").each(function(){var i=e(this),t={change:function(i,t){setTimeout(function(){e(i.target).trigger("change")},100)}};i.data("defaultColor")&&(t.defaultColor=i.data("defaultColor")),i.wpColorPicker(t)});var w=function(){e(this).toggleClass("siteorigin-widget-section-visible"),e(this).siblings(".siteorigin-widget-section").slideToggle("fast",function(){if(e(window).resize(),e(this).find("> .siteorigin-widget-field-container-state").val(e(this).is(":visible")?"open":"closed"),e(this).is(":visible")){var i=e(this).find("> .siteorigin-widget-field");i.trigger("sowsetupformfield")}})};m.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").click(w),m.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").click(w),m.filter(".siteorigin-widget-field-type-slider").each(function(){var i=e(this),t=i.find('input[type="number"]'),n=i.find(".siteorigin-widget-value-slider");n.slider({max:parseInt(t.attr("max")),min:parseInt(t.attr("min")),value:parseInt(t.val()),slide:function(e,i){t.val(parseInt(i.value)),t.trigger("change")},change:function(e,t){i.find(".siteorigin-widget-slider-value").html(t.value)}}),t.change(function(e,i){i&&i.silent||n.slider("value",parseInt(t.val()))})}),m.filter(".siteorigin-widget-field-type-link").each(function(){var i=e(this),t=null,n=function(){null!==t&&t.abort();var n=i.find(".content-text-search"),r=n.val(),a=n.data("postTypes"),s=i.find("ul.posts").empty().addClass("loading");e.get(soWidgets.ajaxurl,{action:"so_widgets_search_posts",query:r,postTypes:a},function(i){for(var t=0;t<i.length;t++)""===i[t].label&&(i[t].label="&nbsp;"),s.append(e("<li>").addClass("post").html(i[t].label+"<span>("+i[t].type+")</span>").data(i[t]));s.removeClass("loading")})};i.find(".select-content-button, .button-close").click(function(t){t.preventDefault(),e(this).blur();var r=i.find(".existing-content-selector");r.toggle(),r.is(":visible")&&0===r.find("ul.posts li").length&&n()}),i.on("click",".posts li",function(t){t.preventDefault();var n=e(this);i.find("input.siteorigin-widget-input").val("post: "+n.data("value")),i.find(".existing-content-selector").toggle()});var r=null;i.find(".content-text-search").keyup(function(){null!==r&&clearTimeout(r),r=setTimeout(function(){n()},500)})}),"undefined"!=typeof jQuery.fn.soPanelsSetupBuilderWidget&&m.filter(".siteorigin-widget-field-type-builder").each(function(){var i=e(this);i.find("> .siteorigin-page-builder-field").soPanelsSetupBuilderWidget()});var v=function(){var i=e(this),t=i.closest("[data-state-emitter]").data("state-emitter");if("undefined"!=typeof t){var r=function(t,n){if("undefined"==typeof sowEmitters[t.callback]||"_"===t.callback.substr(0,1))return n;var r=sowbForms.getRepeaterId(i);r!==!1&&(t.args=t.args.map(function(e){return e.replace("{$repeater}",r)}));var a=i.is('[type="checkbox"]')?i.is(":checked"):i.val();return e.extend(n,sowEmitters[t.callback](a,t.args))},a={"default":""};"undefined"==typeof t.length&&(t=[t]);for(var s=0;s<t.length;s++)a=r(t[s],a);var o=n.data("states");"undefined"==typeof o&&(o={"default":""});for(var d in a)"undefined"!=typeof o[d]&&a[d]===o[d]||(o[d]=a[d],n.trigger("sowstatechange",[d,a[d]]));n.data("states",o)}};m.filter("[data-state-emitter]").each(function(){e(this).find(".siteorigin-widget-input").on("keyup change",v),e(this).find(".siteorigin-widget-input").each(function(){var i=e(this);i.is(":radio")?i.is(":checked")&&v.call(i[0]):v.call(i[0])})}),a.trigger("sowsetupform",m).data("sow-form-setup",!0),m.trigger("sowsetupformfield"),a.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(o.hasClass("wp-customizer")||o.hasClass("widgets-php"))&&a.closest(".ui-sortable").on("sortstop",function(e,i){var t=i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field");t.trigger("sowsetupformfield")}),s=!1})},e.fn.sowSetupPreview=function(){var i=e(this),t=i.siblings(".siteorigin-widget-preview");t.find("> a").click(function(t){t.preventDefault();var n=sowbForms.getWidgetFormValues(i),r=e(e("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");r.find('input[name="data"]').val(JSON.stringify(n)),r.find('input[name="class"]').val(i.data("class")),r.find("iframe").on("load",function(){e(this).css("visibility","visible")}),r.find("form").submit(),r.find(".close").click(function(){r.remove()})})},e.fn.sowSetupRepeater=function(){return e(this).each(function(i,t){var n=e(t),r=n.find(".siteorigin-widget-field-repeater-items"),a=n.data("repeater-name");r.bind("updateFieldPositions",function(){var i=e(this),t=i.find("> .siteorigin-widget-field-repeater-item");t.each(function(i,t){e(t).find(".siteorigin-widget-input").each(function(t,n){var r=e(n).data("repeater-positions");"undefined"==typeof r&&(r={}),r[a]=i,e(n).data("repeater-positions",r)})}),i.find(".siteorigin-widget-input").each(function(i,t){var n=e(t).data("repeater-positions"),r=e(t);if("undefined"!=typeof n){var a=r.attr("data-original-name");if(a||(r.attr("data-original-name",r.attr("name")),a=r.attr("name")),!a)return;if(n)for(var s in n)a=a.replace("#"+s+"#",n[s]);r.attr("name",a)}}),i.data("initialSetup")||(i.find(".siteorigin-widget-input").each(function(i,t){var n=e(t);n.prop("checked",n.prop("defaultChecked"))}),i.data("initialSetup",!0));var r=n.data("scroll-count")?parseInt(n.data("scroll-count")):0;if(r>0&&t.length>r){var s=t.first().outerHeight();i.css("max-height",s*r).css("overflow","auto")}else i.css("max-height","").css("overflow","")}),r.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){r.trigger("updateFieldPositions")},sortstop:function(i,t){if(t.item.is(".siteorigin-widget-field-repeater-item"))t.item.find("> .siteorigin-widget-field-repeater-item-form").each(function(){var i=e(this).find("> .siteorigin-widget-field");i.trigger("sowsetupformfield")});else{var n=t.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field");n.trigger("sowsetupformfield")}}}),r.trigger("updateFieldPositions"),n.find("> .siteorigin-widget-field-repeater-add").disableSelection().click(function(i){i.preventDefault(),n.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",function(){e(window).resize()})}),n.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").click(function(i){i.preventDefault(),n.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",function(){e(window).resize()})})})},e.fn.sowAddRepeaterItem=function(){return e(this).each(function(i,t){var n=e(t),r=n.find("> .siteorigin-widget-field-repeater-items").children().length+1,a=e("<div>"+n.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");a.find(".siteorigin-widget-input[data-name]").each(function(){var i=e(this);0===i.closest(".siteorigin-widget-field-repeater-item-html").length&&i.attr("name",e(this).data("name"))});var s=a.html().replace(/_id_/g,r),o="undefined"!=typeof n.attr("readonly"),d=e('<div class="siteorigin-widget-field-repeater-item ui-draggable" />').append(e('<div class="siteorigin-widget-field-repeater-item-top" />').append(e('<div class="siteorigin-widget-field-expand" />')).append(o?"":e('<div class="siteorigin-widget-field-copy" />')).append(o?"":e('<div class="siteorigin-widget-field-remove" />')).append(e("<h4 />").html(n.data("item-name")))).append(e('<div class="siteorigin-widget-field-repeater-item-form" />').html(s));n.find("> .siteorigin-widget-field-repeater-items").append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",function(){e(window).resize()})})},e.fn.sowRemoveRepeaterItem=function(){return e(this).each(function(i,t){var n=e(this).closest(".siteorigin-widget-field-repeater-items");e(this).remove(),n.sortable("refresh").trigger("updateFieldPositions")})},e.fn.sowSetupRepeaterItems=function(){return e(this).each(function(i,t){var n=e(t);if("undefined"==typeof n.data("sowrepeater-actions-setup")){var r=n.closest(".siteorigin-widget-field-repeater"),a=n.find("> .siteorigin-widget-field-repeater-item-top"),s=r.data("item-label");if(s&&s.selector){var o=function(){var e=s.hasOwnProperty("valueMethod")&&s.valueMethod?s.valueMethod:"val",i=n.find(s.selector)[e]();i&&(i.length>80&&(i=i.substr(0,79)+"..."),a.find("h4").text(i))};o();var d=s.hasOwnProperty("updateEvent")&&s.updateEvent?s.updateEvent:"change";n.bind(d,o)}a.click(function(i){"siteorigin-widget-field-remove"!==i.target.className&&"siteorigin-widget-field-copy"!==i.target.className&&(i.preventDefault(),e(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",function(){if(e(window).resize(),e(this).is(":visible")){e(this).trigger("slideToggleOpenComplete");var i=e(this).find("> .siteorigin-widget-field");i.trigger("sowsetupformfield")}else e(this).trigger("slideToggleCloseComplete")}))}),a.find(".siteorigin-widget-field-remove").click(function(i,t){i.preventDefault();var n=e(this).closest(".siteorigin-widget-field-repeater-items"),r=e(this).closest(".siteorigin-widget-field-repeater-item"),a=function(){r.remove(),n.sortable("refresh").trigger("updateFieldPositions"),e(window).resize()};t&&t.silent?a():confirm(soWidgets.sure)&&r.slideUp("fast",a)}),a.find(".siteorigin-widget-field-copy").click(function(i){i.preventDefault();var t=e(this).closest(".siteorigin-widget-form-main"),r=e(this).closest(".siteorigin-widget-field-repeater-item"),a=r.clone(),s=r.closest(".siteorigin-widget-field-repeater-items"),o=s.children().length,d={};a.find("*[name]").each(function(){var i=e(this),s=i.attr("id"),l=i.attr("name");if(i.is("textarea")&&i.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){i.parent().empty().append(i),i.css("display","");var f=tinymce.get(s);f&&i.val(f.getContent())}else if(i.is(".wp-color-picker")){var g=i.closest(".wp-picker-container"),p=i.closest(".siteorigin-widget-field");g.remove(),p.append(i.remove())}else{var c=r.find('[name="'+l+'"]');c.length&&null!=c.val()&&i.val(c.val())}if(s){var u,m,w;if(i.is('[type="radio"]')){m=s.replace(/-\d+-\d+$/,"");var v=s.replace(/-\d+$/,"");if(!d[m]){var h={};d[m]=t.find(".siteorigin-widget-input[id^="+m+"]").not("[id*=_id_]").filter(function(i,t){var n=e(t).attr("name");return!h[n]&&(h[n]=!0,!0)}).length+1}var b=m+"-"+d[m];w=b+s.match(/-\d+$/)[0],a.find("label[for="+v+"]").attr("for",b)}else u=new RegExp("-\\d+$"),m=s.replace(u,""),d[m]||(d[m]=t.find(".siteorigin-widget-input[id^="+m+"]").not("[id*=_id_]").length+1),w=m+"-"+d[m]++;i.attr("id",w),a.find("label[for="+s+"]").attr("for",w),a.find("[id*="+s+"]").each(function(){var i=e(this).attr("id"),t=i.replace(s,w);e(this).attr("id",t)}),"undefined"!=typeof tinymce&&tinymce.get(w)&&tinymce.get(w).remove()}var y=r.parents(".siteorigin-widget-field-repeater").length,k=e("body");(k.hasClass("wp-customizer")||k.hasClass("widgets-php"))&&0===n.closest(".panel-dialog").length&&(y+=1);var _=l.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(y-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+o.toString()+"$3");i.attr("name",_),i.data("original-name",_)}),s.append(a).sortable("refresh").trigger("updateFieldPositions"),a.sowSetupRepeaterItems(),a.hide().slideDown("fast",function(){e(window).resize()})}),n.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),n.data("sowrepeater-actions-setup",!0)}})},sowbForms.getRepeaterId=function(e){"undefined"==typeof this.id&&(this.id=1);var i=e.closest(".siteorigin-widget-field-repeater-item");if(i.length){var t=i.data("item-id");return void 0===t&&(t=this.id++),i.data("item-id",t),t}return!1},sowbForms.getWidgetFieldVariable=function(e,i,t){var n=window.sow_field_javascript_variables[e];i=i.replace(/\[#.*?#\]/g,"");for(var r=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(i)[1],a=r.split("]["),s=a.length?n:null;a.length;)s=s[a.shift()];return s[t]},sowbForms.fetchWidgetVariable=function(i,t,n){window.sowVars=window.sowVars||{},"undefined"==typeof window.sowVars[t]?e.post(soWidgets.ajaxurl,{action:"sow_get_javascript_variables",widget:t,key:i},function(e){window.sowVars[t]=e,n(window.sowVars[t][i])}):n(window.sowVars[t][i])},sowbForms.getWidgetFormValues=function(i){if(_.isUndefined(i))return null;var t={};return i.find("*[name]").each(function(){var i=e(this);try{var n=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(n))return!0;n=n[1];var r=n.split("][");r=r.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var a=t,s=null,o=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===o)s=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===o){if(!i.is(":checked"))return;s=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),s=null===d||"function"!=typeof d.getContent||d.isHidden()?i.val():d.getContent()}else if("SELECT"===i.prop("tagName")){var l=i.find("option:selected");1===l.length?s=i.find("option:selected").val():l.length>1&&(s=_.map(i.find("option:selected"),function(i,t){return e(i).val()}))}else s=i.val();for(var f=0;f<r.length;f++)f===r.length-1?""===r[f]?a.push(s):a[r[f]]=s:(_.isUndefined(a[r[f]])&&(_.isNumber(r[f+1])||""===r[f+1]?a[r[f]]=[]:a[r[f]]={}),a=a[r[f]])}catch(g){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+g.message)}}),t},sowbForms.setWidgetFormValues=function(i,t){var n=0,r=function(i,t){10!==++n&&i.find("> .siteorigin-widget-field-type-repeater").each(function(){var i=e(this).find("> .siteorigin-widget-field-repeater"),n=i.data("repeaterName"),a=t.hasOwnProperty(n)?t[n]:null;if(a&&Array.isArray(a)&&0!==a.length){var s=i.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),o=a.length,d=s.length;if(o>d)for(var l=0;l<o-d;l++)i.find("> .siteorigin-widget-field-repeater-add").click();else if(o<d)for(var f=o;f<d;f++){var g=e(s.eq(f));g.find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}s=i.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var p=0;p<s.length;p++)s.eq(p).find("> .siteorigin-widget-field-repeater-item-form"),r(s.eq(p).find("> .siteorigin-widget-field-repeater-item-form"),a[p])}})};r(i,t),i.find("*[name]").each(function(){var i=e(this),n=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(void 0===n)return!0;n=n[1];var r=n.split("][");r=r.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});for(var a,s=t,o=0;o<r.length;o++)o===r.length-1?a=s[r[o]]:s=s[r[o]];if("checkbox"===i.attr("type"))i.prop("checked",a);else if("radio"===i.attr("type"))i.prop("checked",a===i.val());else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),null===d||"function"!=typeof d.getContent||d.isHidden()?i.val(a):d.setContent(a)}else i.val(a);i.trigger("change")})},e(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",function(){var i=e(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout(function(){i.sowSetupForm()},200)}),e("body").hasClass("wp-customizer")&&e(document).on("widget-added",function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()}),e(document).on("open_dialog",function(i,t){if(t.$el.find(".so-panels-dialog").is(".so-panels-dialog-edit-widget")){var n=e(i.target).find(".siteorigin-widget-form-main").find("> .siteorigin-widget-field");n.trigger("sowsetupformfield")}}),e(function(){e(document).trigger("sowadminloaded")})}(jQuery);var sowEmitters={_match:function(e,i){"undefined"==typeof i&&(i=".*");var t=new RegExp("^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *("+i+") *$"),n=t.exec(e);if(null===n)return!1;var r="",a="default";return void 0!==n[3]?(a=n[1],r=n[3]):r=n[1],{match:n[4].trim(),group:a,state:r}},_checker:function(e,i,t,n){var r={};"undefined"==typeof i.length&&(i=[i]);for(var a,s=0;s<i.length;s++)a=sowEmitters._match(i[s],t),a!==!1&&("_true"===a.match||n(e,i,a.match))&&(r[a.group]=a.state);return r},select:function(e,i){"undefined"==typeof i.length&&(i=[i]);for(var t={},n=0;n<i.length;n++)""===i[n]&&(i[n]="default"),t[i[n]]=e;return t},conditional:function(val,args){return sowEmitters._checker(val,args,"[^;{}]*",function(val,args,match){return eval(match)})},"in":function(e,i){return sowEmitters._checker(e,i,"[^;{}]*",function(e,i,t){return t.split(",").map(function(e){return e.trim()}).indexOf(e)!==-1})}};window.sowbForms=sowbForms;
1
+ var sowbForms=window.sowbForms||{};!function(e){e.fn.sowSetupForm=function(){return e(this).each(function(i,t){var n,r=e(t),a=!0,s=e("body"),o=r.find("input[name]");if(o.length&&-1!==o.attr("name").indexOf("__i__"))return this;if(r.is(".siteorigin-widget-form-main")){if(!0===r.data("sow-form-setup"))return!0;if(s.hasClass("widgets-php")&&!r.is(":visible")&&0===r.closest(".panel-dialog").length)return!0;r.on("sowstatechange",function(i,t,n){r.find("[data-state-handler]").each(function(){var i=e(this),r=e.extend({},i.data("state-handler"),a?i.data("state-handler-initial"):{});if(0===Object.keys(r).length)return!0;var s,o,d,l,f,g,c={},p=sowbForms.getRepeaterId(i);if(!1!==p){var u={};for(var m in r)u[m.replace("{$repeater}",p)]=r[m];r=u}for(var m in r)if(f=!1,null!==(s=m.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?$/))){if(o={group:"default",name:"",multi:!1},void 0!==s[2]?(o.group=s[1],o.name=s[3]):o.name=s[0],o.multi=void 0!==s[4],"_else"===o.group)o.group=o.name,o.name="",f=o.group===t&&void 0===c[o.group];else{g=o.name.split(",").map(function(e){return e.trim()});for(var w=0;w<g.length&&!(f=o.group===t&&g[w]===n);w++);}if(f){d=r[m],o.multi||(d=[d]);for(var w=0;w<d.length;w++)l=void 0!==d[w][1]&&Boolean(d[w][1])?i.find(d[w][1]):i,l[d[w][0]].apply(l,void 0!==d[w][2]?d[w][2]:[]);c[o.group]=!0}}})}),r.sowSetupPreview(),n=r;var d=r.find(".siteorigin-widget-teaser");d.find(".dashicons-dismiss").click(function(){var i=e(this);e.get(i.data("dismiss-url")),d.slideUp("normal",function(){d.remove()})});var l=r.find("> .siteorigin-widgets-form-id").val(),f=r.find("> .siteorigin-widgets-form-timestamp"),g=parseInt(f.val()||0),c=JSON.parse(sessionStorage.getItem(l));if(c)if(c._sow_form_timestamp>g){var p=e('<div class="siteorigin-widget-form-notification"><span>'+soWidgets.backup.newerVersion+'</span><a class="button button-small so-backup-restore">'+soWidgets.backup.restore+'</a><a class="button button-small so-backup-dismiss">'+soWidgets.backup.dismiss+"</a><div><small>"+soWidgets.backup.replaceWarning+"</small></div></div>");r.prepend(p),p.find(".so-backup-restore").click(function(){sowbForms.setWidgetFormValues(n,c),p.slideUp("fast",function(){p.remove()})}),p.find(".so-backup-dismiss").click(function(){p.slideUp("fast",function(){sessionStorage.removeItem(l),p.remove()})})}else sessionStorage.removeItem(l);r.change(function(){f.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(r);sessionStorage.setItem(l,JSON.stringify(e))})}else n=r.closest(".siteorigin-widget-form-main");n.find("> .siteorigin-widgets-form-id").val();var u=r.find("> .siteorigin-widget-field");u.find("> .siteorigin-widget-section").sowSetupForm(),u.filter(".siteorigin-widget-field-type-widget:not(:has(> .siteorigin-widget-section))").sowSetupForm(),u.find(".siteorigin-widget-input").each(function(i,t){null===e(t).data("original-name")&&e(t).data("original-name",e(t).attr("name"))}),u.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),r.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),u.find("> .siteorigin-widget-input-color").each(function(){var i=e(this),t={change:function(i,t){setTimeout(function(){e(i.target).trigger("change")},100)}};i.data("defaultColor")&&(t.defaultColor=i.data("defaultColor")),i.wpColorPicker(t)});var m=function(){e(this).toggleClass("siteorigin-widget-section-visible"),e(this).siblings(".siteorigin-widget-section").slideToggle("fast",function(){if(e(window).resize(),e(this).find("> .siteorigin-widget-field-container-state").val(e(this).is(":visible")?"open":"closed"),e(this).is(":visible")){e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")}})};u.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").click(m),u.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").click(m),u.filter(".siteorigin-widget-field-type-slider").each(function(){var i=e(this),t=i.find('input[type="number"]'),n=i.find(".siteorigin-widget-value-slider");n.slider({max:parseInt(t.attr("max")),min:parseInt(t.attr("min")),value:parseInt(t.val()),slide:function(e,i){t.val(parseInt(i.value)),t.trigger("change")},change:function(e,t){i.find(".siteorigin-widget-slider-value").html(t.value)}}),t.change(function(e,i){i&&i.silent||n.slider("value",parseInt(t.val()))})}),u.filter(".siteorigin-widget-field-type-link").each(function(){var i=e(this),t=null,n=function(){null!==t&&t.abort();var n=i.find(".content-text-search"),r=n.val(),a=n.data("postTypes"),s=i.find("ul.posts").empty().addClass("loading");e.get(soWidgets.ajaxurl,{action:"so_widgets_search_posts",query:r,postTypes:a},function(i){for(var t=0;t<i.length;t++)""===i[t].label&&(i[t].label="&nbsp;"),s.append(e("<li>").addClass("post").html(i[t].label+"<span>("+i[t].type+")</span>").data(i[t]));s.removeClass("loading")})};i.find(".select-content-button, .button-close").click(function(t){t.preventDefault(),e(this).blur();var r=i.find(".existing-content-selector");r.toggle(),r.is(":visible")&&0===r.find("ul.posts li").length&&n()}),i.on("click",".posts li",function(t){t.preventDefault();var n=e(this);i.find("input.siteorigin-widget-input").val("post: "+n.data("value")),i.find(".existing-content-selector").toggle()});var r=null;i.find(".content-text-search").keyup(function(){null!==r&&clearTimeout(r),r=setTimeout(function(){n()},500)})}),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&u.filter(".siteorigin-widget-field-type-builder").each(function(){e(this).find("> .siteorigin-page-builder-field").soPanelsSetupBuilderWidget()});var w=function(){var i=e(this),t=i.closest("[data-state-emitter]").data("state-emitter");if(void 0!==t){var r={default:""};void 0===t.length&&(t=[t]);for(var a=0;a<t.length;a++)r=function(t,n){if(void 0===sowEmitters[t.callback]||"_"===t.callback.substr(0,1))return n;var r=sowbForms.getRepeaterId(i);!1!==r&&(t.args=t.args.map(function(e){return e.replace("{$repeater}",r)}));var a=i.is('[type="checkbox"]')?i.is(":checked"):i.val();return e.extend(n,sowEmitters[t.callback](a,t.args))}(t[a],r);var s=n.data("states");void 0===s&&(s={default:""});for(var o in r)void 0!==s[o]&&r[o]===s[o]||(s[o]=r[o],n.trigger("sowstatechange",[o,r[o]]));n.data("states",s)}};u.filter("[data-state-emitter]").each(function(){e(this).find(".siteorigin-widget-input").on("keyup change",w),e(this).find(".siteorigin-widget-input").each(function(){var i=e(this);i.is(":radio")?i.is(":checked")&&w.call(i[0]):w.call(i[0])})}),r.trigger("sowsetupform",u).data("sow-form-setup",!0),u.trigger("sowsetupformfield"),r.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(s.hasClass("wp-customizer")||s.hasClass("widgets-php"))&&r.closest(".ui-sortable").on("sortstop",function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}),a=!1})},e.fn.sowSetupPreview=function(){var i=e(this);i.siblings(".siteorigin-widget-preview").find("> a").click(function(t){t.preventDefault();var n=sowbForms.getWidgetFormValues(i),r=e(e("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");r.find('input[name="data"]').val(JSON.stringify(n)),r.find('input[name="class"]').val(i.data("class")),r.find("iframe").on("load",function(){e(this).css("visibility","visible")}),r.find("form").submit(),r.find(".close").click(function(){r.remove()})})},e.fn.sowSetupRepeater=function(){return e(this).each(function(i,t){var n=e(t),r=n.find(".siteorigin-widget-field-repeater-items"),a=n.data("repeater-name");r.bind("updateFieldPositions",function(){var i=e(this),t=i.find("> .siteorigin-widget-field-repeater-item");t.each(function(i,t){e(t).find(".siteorigin-widget-input").each(function(t,n){var r=e(n).data("repeater-positions");void 0===r&&(r={}),r[a]=i,e(n).data("repeater-positions",r)})}),i.find(".siteorigin-widget-input").each(function(i,t){var n=e(t).data("repeater-positions"),r=e(t);if(void 0!==n){var a=r.attr("data-original-name");if(a||(r.attr("data-original-name",r.attr("name")),a=r.attr("name")),!a)return;if(n)for(var s in n)a=a.replace("#"+s+"#",n[s]);r.attr("name",a)}}),i.data("initialSetup")||(i.find(".siteorigin-widget-input").each(function(i,t){var n=e(t);n.prop("checked",n.prop("defaultChecked"))}),i.data("initialSetup",!0));var r=n.data("scroll-count")?parseInt(n.data("scroll-count")):0;if(r>0&&t.length>r){var s=t.first().outerHeight();i.css("max-height",s*r).css("overflow","auto")}else i.css("max-height","").css("overflow","")}),r.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){r.trigger("updateFieldPositions")},sortstop:function(i,t){if(t.item.is(".siteorigin-widget-field-repeater-item"))t.item.find("> .siteorigin-widget-field-repeater-item-form").each(function(){e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")});else{t.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}}}),r.trigger("updateFieldPositions"),n.find("> .siteorigin-widget-field-repeater-add").disableSelection().click(function(i){i.preventDefault(),n.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",function(){e(window).resize()})}),n.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").click(function(i){i.preventDefault(),n.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",function(){e(window).resize()})})})},e.fn.sowAddRepeaterItem=function(){return e(this).each(function(i,t){var n=e(t),r=n.find("> .siteorigin-widget-field-repeater-items").children().length+1,a=e("<div>"+n.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");a.find(".siteorigin-widget-input[data-name]").each(function(){var i=e(this);0===i.closest(".siteorigin-widget-field-repeater-item-html").length&&i.attr("name",e(this).data("name"))});var s=a.html().replace(/_id_/g,r),o=void 0!==n.attr("readonly"),d=e('<div class="siteorigin-widget-field-repeater-item ui-draggable" />').append(e('<div class="siteorigin-widget-field-repeater-item-top" />').append(e('<div class="siteorigin-widget-field-expand" />')).append(o?"":e('<div class="siteorigin-widget-field-copy" />')).append(o?"":e('<div class="siteorigin-widget-field-remove" />')).append(e("<h4 />").html(n.data("item-name")))).append(e('<div class="siteorigin-widget-field-repeater-item-form" />').html(s));n.find("> .siteorigin-widget-field-repeater-items").append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",function(){e(window).resize()})})},e.fn.sowRemoveRepeaterItem=function(){return e(this).each(function(i,t){var n=e(this).closest(".siteorigin-widget-field-repeater-items");e(this).remove(),n.sortable("refresh").trigger("updateFieldPositions")})},e.fn.sowSetupRepeaterItems=function(){return e(this).each(function(i,t){var n=e(t);if(void 0===n.data("sowrepeater-actions-setup")){var r=n.closest(".siteorigin-widget-field-repeater"),a=n.find("> .siteorigin-widget-field-repeater-item-top"),s=r.data("item-label");if(s&&s.selector){var o=function(){var e=s.hasOwnProperty("valueMethod")&&s.valueMethod?s.valueMethod:"val",i=n.find(s.selector)[e]();i&&(i.length>80&&(i=i.substr(0,79)+"..."),a.find("h4").text(i))};o();var d=s.hasOwnProperty("updateEvent")&&s.updateEvent?s.updateEvent:"change";n.bind(d,o)}a.click(function(i){"siteorigin-widget-field-remove"!==i.target.className&&"siteorigin-widget-field-copy"!==i.target.className&&(i.preventDefault(),e(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",function(){if(e(window).resize(),e(this).is(":visible")){e(this).trigger("slideToggleOpenComplete");e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")}else e(this).trigger("slideToggleCloseComplete")}))}),a.find(".siteorigin-widget-field-remove").click(function(i,t){i.preventDefault();var n=e(this).closest(".siteorigin-widget-field-repeater-items"),r=e(this).closest(".siteorigin-widget-field-repeater-item"),a=function(){r.remove(),n.sortable("refresh").trigger("updateFieldPositions"),e(window).resize()};t&&t.silent?a():confirm(soWidgets.sure)&&r.slideUp("fast",a)}),a.find(".siteorigin-widget-field-copy").click(function(i){i.preventDefault();var t=e(this).closest(".siteorigin-widget-form-main"),r=e(this).closest(".siteorigin-widget-field-repeater-item"),a=r.clone(),s=r.closest(".siteorigin-widget-field-repeater-items"),o=s.children().length,d={};a.find("*[name]").each(function(){var i=e(this),s=i.attr("id"),l=i.attr("name");if(i.is("textarea")&&i.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){i.parent().empty().append(i),i.css("display","");var f=tinymce.get(s);f&&i.val(f.getContent())}else if(i.is(".wp-color-picker")){var g=i.closest(".wp-picker-container"),c=i.closest(".siteorigin-widget-field");g.remove(),c.append(i.remove())}else{var p=r.find('[name="'+l+'"]');p.length&&null!=p.val()&&i.val(p.val())}if(s){var u,m,w;if(i.is('[type="radio"]')){m=s.replace(/-\d+-\d+$/,"");var v=s.replace(/-\d+$/,"");if(!d[m]){var h={};d[m]=t.find(".siteorigin-widget-input[id^="+m+"]").not("[id*=_id_]").filter(function(i,t){var n=e(t).attr("name");return!h[n]&&(h[n]=!0,!0)}).length+1}var b=m+"-"+d[m];w=b+s.match(/-\d+$/)[0],a.find("label[for="+v+"]").attr("for",b)}else u=new RegExp("-\\d+$"),m=s.replace(u,""),d[m]||(d[m]=t.find(".siteorigin-widget-input[id^="+m+"]").not("[id*=_id_]").length+1),w=m+"-"+d[m]++;i.attr("id",w),a.find("label[for="+s+"]").attr("for",w),a.find("[id*="+s+"]").each(function(){var i=e(this).attr("id"),t=i.replace(s,w);e(this).attr("id",t)}),"undefined"!=typeof tinymce&&tinymce.get(w)&&tinymce.get(w).remove()}var y=r.parents(".siteorigin-widget-field-repeater").length,k=e("body");(k.hasClass("wp-customizer")||k.hasClass("widgets-php"))&&0===n.closest(".panel-dialog").length&&(y+=1);var _=l.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(y-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+o.toString()+"$3");i.attr("name",_),i.data("original-name",_)}),s.append(a).sortable("refresh").trigger("updateFieldPositions"),a.sowSetupRepeaterItems(),a.hide().slideDown("fast",function(){e(window).resize()})}),n.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),n.data("sowrepeater-actions-setup",!0)}})},sowbForms.getRepeaterId=function(e){void 0===this.id&&(this.id=1);var i=e.closest(".siteorigin-widget-field-repeater-item");if(i.length){var t=i.data("item-id");return void 0===t&&(t=this.id++),i.data("item-id",t),t}return!1},sowbForms.getWidgetFieldVariable=function(e,i,t){var n=window.sow_field_javascript_variables[e];i=i.replace(/\[#.*?#\]/g,"");for(var r=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(i)[1],a=r.split("]["),s=a.length?n:null;a.length;)s=s[a.shift()];return s[t]},sowbForms.fetchWidgetVariable=function(i,t,n){window.sowVars=window.sowVars||{},void 0===window.sowVars[t]?e.post(soWidgets.ajaxurl,{action:"sow_get_javascript_variables",widget:t,key:i},function(e){window.sowVars[t]=e,n(window.sowVars[t][i])}):n(window.sowVars[t][i])},sowbForms.getWidgetFormValues=function(i){if(_.isUndefined(i))return null;var t={};return i.find("*[name]").each(function(){var i=e(this);try{var n=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(n))return!0;n=n[1];var r=n.split("][");r=r.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var a=t,s=null,o=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===o)s=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===o){if(!i.is(":checked"))return;s=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),s=null===d||"function"!=typeof d.getContent||d.isHidden()?i.val():d.getContent()}else if("SELECT"===i.prop("tagName")){var l=i.find("option:selected");1===l.length?s=i.find("option:selected").val():l.length>1&&(s=_.map(i.find("option:selected"),function(i,t){return e(i).val()}))}else s=i.val();for(var f=0;f<r.length;f++)f===r.length-1?""===r[f]?a.push(s):a[r[f]]=s:(_.isUndefined(a[r[f]])&&(_.isNumber(r[f+1])||""===r[f+1]?a[r[f]]=[]:a[r[f]]={}),a=a[r[f]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}}),t},sowbForms.setWidgetFormValues=function(i,t){var n=0,r=function(i,t){10!=++n&&i.find("> .siteorigin-widget-field-type-repeater").each(function(){var i=e(this).find("> .siteorigin-widget-field-repeater"),n=i.data("repeaterName"),a=t.hasOwnProperty(n)?t[n]:null;if(a&&Array.isArray(a)&&0!==a.length){var s=i.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),o=a.length,d=s.length;if(o>d)for(var l=0;l<o-d;l++)i.find("> .siteorigin-widget-field-repeater-add").click();else if(o<d)for(var f=o;f<d;f++){var g=e(s.eq(f));g.find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}s=i.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var c=0;c<s.length;c++)s.eq(c).find("> .siteorigin-widget-field-repeater-item-form"),r(s.eq(c).find("> .siteorigin-widget-field-repeater-item-form"),a[c])}})};r(i,t),i.find("*[name]").each(function(){var i=e(this),n=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(void 0===n)return!0;n=n[1];var r=n.split("][");r=r.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});for(var a,s=t,o=0;o<r.length;o++)o===r.length-1?a=s[r[o]]:s=s[r[o]];if("checkbox"===i.attr("type"))i.prop("checked",a);else if("radio"===i.attr("type"))i.prop("checked",a===i.val());else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),null===d||"function"!=typeof d.getContent||d.isHidden()?i.val(a):d.setContent(a)}else i.val(a);i.trigger("change")})},e(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",function(){var i=e(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout(function(){i.sowSetupForm()},200)}),e("body").hasClass("wp-customizer")&&e(document).on("widget-added",function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()}),e(document).on("open_dialog",function(i,t){if(t.$el.find(".so-panels-dialog").is(".so-panels-dialog-edit-widget")){e(i.target).find(".siteorigin-widget-form-main").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}}),e(function(){e(document).trigger("sowadminloaded")})}(jQuery);var sowEmitters={_match:function(e,i){void 0===i&&(i=".*");var t=new RegExp("^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *("+i+") *$"),n=t.exec(e);if(null===n)return!1;var r="",a="default";return void 0!==n[3]?(a=n[1],r=n[3]):r=n[1],{match:n[4].trim(),group:a,state:r}},_checker:function(e,i,t,n){var r={};void 0===i.length&&(i=[i]);for(var a,s=0;s<i.length;s++)!1!==(a=sowEmitters._match(i[s],t))&&("_true"===a.match||n(e,i,a.match))&&(r[a.group]=a.state);return r},select:function(e,i){void 0===i.length&&(i=[i]);for(var t={},n=0;n<i.length;n++)""===i[n]&&(i[n]="default"),t[i[n]]=e;return t},conditional:function(val,args){return sowEmitters._checker(val,args,"[^;{}]*",function(val,args,match){return eval(match)})},in:function(e,i){return sowEmitters._checker(e,i,"[^;{}]*",function(e,i,t){return-1!==t.split(",").map(function(e){return e.trim()}).indexOf(e)})}};window.sowbForms=sowbForms;
base/js/meta-box-manager.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){t("#publish").click(function(e){var a={},i=t("#siteorigin-widgets-meta-box");i.find("*[name]").each(function(){var e=t(this),i=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(e.attr("name"));if(i){i=i[1];var n=i.split("][");n=n.map(function(t){return!isNaN(parseFloat(t))&&isFinite(t)?parseInt(t):t});for(var r=a,c=0;c<n.length;c++)c===n.length-1?"checkbox"===e.attr("type")?e.is(":checked")?r[n[c]]=""===e.val()||e.val():r[n[c]]=!1:"radio"===e.attr("type")?e.is(":checked")&&(r[n[c]]=""===e.val()||e.val()):r[n[c]]=e.val():("undefined"==typeof r[n[c]]&&(r[n[c]]={}),r=r[n[c]])}}),i.find('input[name="widget_post_meta"]').val(JSON.stringify(a))})}(jQuery);
1
+ !function(t){t("#publish").click(function(a){var i={},e=t("#siteorigin-widgets-meta-box");e.find("*[name]").each(function(){var a=t(this),e=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(a.attr("name"));if(e){e=e[1];var n=e.split("][");n=n.map(function(t){return!isNaN(parseFloat(t))&&isFinite(t)?parseInt(t):t});for(var r=i,c=0;c<n.length;c++)c===n.length-1?"checkbox"===a.attr("type")?a.is(":checked")?r[n[c]]=""===a.val()||a.val():r[n[c]]=!1:"radio"===a.attr("type")?a.is(":checked")&&(r[n[c]]=""===a.val()||a.val()):r[n[c]]=a.val():(void 0===r[n[c]]&&(r[n[c]]={}),r=r[n[c]])}}),e.find('input[name="widget_post_meta"]').val(JSON.stringify(i))})}(jQuery);
compat/beaver-builder/sowb-beaver-builder.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};!function(e){"undefined"!=typeof FLBuilder&&(sowb.orig_FLBuilder_getSettings=FLBuilder._getSettings,FLBuilder._getSettings=function(i){FLBuilder._updateEditorFields(),i.find(".siteorigin-widget-input");var n=i.serializeArray(),t=0,r=0,d="",l="",u="",f=[],a=[],o={};for(t=0;t<n.length;t++)if(d=n[t].value.replace(/\r/gm,""),!(n[t].name.indexOf("flrich")>-1))if(n[t].name.indexOf("[")>-1){for(l=n[t].name.replace(/\[(.*)\]/,""),u=n[t].name.replace(l,""),f=[],a=u.match(/\[[^\]]*\]/g),r=0;r<a.length;r++)"[]"!=a[r]&&f.push(a[r].replace(/\[|\]/g,""));var s=function(e,i,n,t){0==t.length?e[n]=i:("undefined"==typeof e[n]&&(e[n]={}),s(e[n],i,t.shift(),t))};if(f.length>0){var g=f.slice();"undefined"==typeof o[l]&&(o[l]={}),s(o[l],d,g.shift(),g)}else"undefined"==typeof o[l]&&(o[l]=[]),o[l].push(d)}else o[n[t].name]=d;for(u in o)if("undefined"!=typeof o["as_values_"+u]){o[u]=e.grep(o["as_values_"+u].split(","),function(e){return""!==e}).join(",");try{delete o["as_values_"+u]}catch(p){}}return o}),e(document).on("fl-builder.preview-rendered fl-builder.layout-rendered",".fl-builder-content",function(){e(sowb).trigger("setup_widgets")})}(jQuery);
1
+ var sowb=window.sowb||{};!function(e){"undefined"!=typeof FLBuilder&&(sowb.orig_FLBuilder_getSettings=FLBuilder._getSettings,FLBuilder._getSettings=function(i){FLBuilder._updateEditorFields(),i.find(".siteorigin-widget-input");var r=i.serializeArray(),n=0,t=0,l="",d="",u="",a=[],o=[],s={};for(n=0;n<r.length;n++)if(l=r[n].value.replace(/\r/gm,""),!(r[n].name.indexOf("flrich")>-1))if(r[n].name.indexOf("[")>-1){for(d=r[n].name.replace(/\[(.*)\]/,""),u=r[n].name.replace(d,""),a=[],o=u.match(/\[[^\]]*\]/g),t=0;t<o.length;t++)"[]"!=o[t]&&a.push(o[t].replace(/\[|\]/g,""));var f=function(e,i,r,n){0==n.length?e[r]=i:(void 0===e[r]&&(e[r]={}),f(e[r],i,n.shift(),n))};if(a.length>0){var g=a.slice();void 0===s[d]&&(s[d]={}),f(s[d],l,g.shift(),g)}else void 0===s[d]&&(s[d]=[]),s[d].push(l)}else s[r[n].name]=l;for(u in s)if(void 0!==s["as_values_"+u]){s[u]=e.grep(s["as_values_"+u].split(","),function(e){return""!==e}).join(",");try{delete s["as_values_"+u]}catch(e){}}return s}),e(document).on("fl-builder.preview-rendered fl-builder.layout-rendered",".fl-builder-content",function(){e(sowb).trigger("setup_widgets")})}(jQuery);
compat/visual-composer/sowb-vc-widget.min.js CHANGED
@@ -1 +1 @@
1
- var sowbForms=window.sowbForms||{};sowbForms.setupVcWidgetForm=function(){var e=jQuery,o=e('[name="so_widget_class"]'),n=e(".siteorigin_widget_form_container"),t=!1;n.on("change",".siteorigin-widget-field",function(){t=!0;var i=sowbForms.getWidgetFormValues(n),r=o.val(),a=JSON.stringify({widget_class:r,widget_data:i});a=a.replace(/\\/g,"\\\\"),e('[name="so_widget_data"]').val(a)});var i;o.mousedown(function(){i=o.find("option:selected")}),o.on("change",function(r){if(t&&!confirm(soWidgetsVC.confirmChangeWidget))return void i.attr("selected",!0);t=!1;var a=o.val(),s={action:"sowb_vc_widget_render_form",widget:a};e.post(soWidgetsVC.ajaxUrl,s,function(e){n.html(e),n.trigger("change")},"html")}),vc.atts.sowb_json_escaped={parse:function(e){var o=this.content().find(".wpb_vc_param_value[name="+e.param_name+"]");return _.escape(_.escape(o.val().toString()).replace(/\[/g,"&#91;").replace(/\]/g,"&#93;"))},render:function(e,o){return _.unescape(_.unescape(o)).replace(/&#91;/g,"[").replace(/&#93;/g,"]")}},vc.events.on("shortcodeView:updated:siteorigin_widget_vc",function(){if("undefined"!=typeof vc.frame_window&&"undefined"!=typeof vc.frame_window.sowb){var e=vc.frame_window.jQuery,o=vc.frame_window.sowb;e(o).trigger("setup_widgets")}})},jQuery(function(e){sowbForms.setupVcWidgetForm()}),window.sowbForms=sowbForms;
1
+ var sowbForms=window.sowbForms||{};sowbForms.setupVcWidgetForm=function(){var e=jQuery,o=e('[name="so_widget_class"]'),i=e(".siteorigin_widget_form_container"),n=!1;i.on("change",".siteorigin-widget-field",function(){n=!0;var t=sowbForms.getWidgetFormValues(i),r=o.val(),a=JSON.stringify({widget_class:r,widget_data:t});a=a.replace(/\\/g,"\\\\"),e('[name="so_widget_data"]').val(a)});var t;o.mousedown(function(){t=o.find("option:selected")}),o.on("change",function(r){if(n&&!confirm(soWidgetsVC.confirmChangeWidget))return void t.attr("selected",!0);n=!1;var a=o.val(),s={action:"sowb_vc_widget_render_form",widget:a};e.post(soWidgetsVC.ajaxUrl,s,function(e){i.html(e),i.trigger("change")},"html")}),vc.atts.sowb_json_escaped={parse:function(e){var o=this.content().find(".wpb_vc_param_value[name="+e.param_name+"]");return _.escape(_.escape(o.val().toString()).replace(/\[/g,"&#91;").replace(/\]/g,"&#93;"))},render:function(e,o){return _.unescape(_.unescape(o)).replace(/&#91;/g,"[").replace(/&#93;/g,"]")}},vc.events.on("shortcodeView:updated:siteorigin_widget_vc",function(){if(void 0!==vc.frame_window&&void 0!==vc.frame_window.sowb){(0,vc.frame_window.jQuery)(vc.frame_window.sowb).trigger("setup_widgets")}})},jQuery(function(e){sowbForms.setupVcWidgetForm()}),window.sowbForms=sowbForms;
js/jquery.cycle.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";function t(e){return(e||"").toLowerCase()}var i="2.1.6";e.fn.cycle=function(i){var n;return 0!==this.length||e.isReady?this.each(function(){var n,s,o,c,l=e(this),r=e.fn.cycle.log;if(!l.data("cycle.opts")){(l.data("cycle-log")===!1||i&&i.log===!1||s&&s.log===!1)&&(r=e.noop),r("--c2 init--"),n=l.data();for(var a in n)n.hasOwnProperty(a)&&/^cycle[A-Z]+/.test(a)&&(c=n[a],o=a.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,t),r(o+":",c,"("+typeof c+")"),n[o]=c);s=e.extend({},e.fn.cycle.defaults,n,i||{}),s.timeoutId=0,s.paused=s.paused||!1,s.container=l,s._maxZ=s.maxZ,s.API=e.extend({_container:l},e.fn.cycle.API),s.API.log=r,s.API.trigger=function(e,t){return s.container.trigger(e,t),s.API},l.data("cycle.opts",s),l.data("cycle.API",s.API),s.API.trigger("cycle-bootstrap",[s,s.API]),s.API.addInitialSlides(),s.API.preInitSlideshow(),s.slides.length&&s.API.initSlideshow()}}):(n={s:this.selector,c:this.context},e.fn.cycle.log("requeuing slideshow (dom not ready)"),e(function(){e(n.s,n.c).cycle(i)}),this)},e.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var t=this.opts(),i=t.slides;t.slideCount=0,t.slides=e(),i=i.jquery?i:t.container.find(i),t.random&&i.sort(function(){return Math.random()-.5}),t.API.add(i)},preInitSlideshow:function(){var t=this.opts();t.API.trigger("cycle-pre-initialize",[t]);var i=e.fn.cycle.transitions[t.fx];i&&e.isFunction(i.preInit)&&i.preInit(t),t._preInitialized=!0},postInitSlideshow:function(){var t=this.opts();t.API.trigger("cycle-post-initialize",[t]);var i=e.fn.cycle.transitions[t.fx];i&&e.isFunction(i.postInit)&&i.postInit(t)},initSlideshow:function(){var t,i=this.opts(),n=i.container;i.API.calcFirstSlide(),"static"==i.container.css("position")&&i.container.css("position","relative"),e(i.slides[i.currSlide]).css({opacity:1,display:"block",visibility:"visible"}),i.API.stackSlides(i.slides[i.currSlide],i.slides[i.nextSlide],!i.reverse),i.pauseOnHover&&(i.pauseOnHover!==!0&&(n=e(i.pauseOnHover)),n.hover(function(){i.API.pause(!0)},function(){i.API.resume(!0)})),i.timeout&&(t=i.API.getSlideOpts(i.currSlide),i.API.queueTransition(t,t.timeout+i.delay)),i._initialized=!0,i.API.updateView(!0),i.API.trigger("cycle-initialized",[i]),i.API.postInitSlideshow()},pause:function(t){var i=this.opts(),n=i.API.getSlideOpts(),s=i.hoverPaused||i.paused;t?i.hoverPaused=!0:i.paused=!0,s||(i.container.addClass("cycle-paused"),i.API.trigger("cycle-paused",[i]).log("cycle-paused"),n.timeout&&(clearTimeout(i.timeoutId),i.timeoutId=0,i._remainingTimeout-=e.now()-i._lastQueue,(i._remainingTimeout<0||isNaN(i._remainingTimeout))&&(i._remainingTimeout=void 0)))},resume:function(e){var t=this.opts(),i=!t.hoverPaused&&!t.paused;e?t.hoverPaused=!1:t.paused=!1,i||(t.container.removeClass("cycle-paused"),0===t.slides.filter(":animated").length&&t.API.queueTransition(t.API.getSlideOpts(),t._remainingTimeout),t.API.trigger("cycle-resumed",[t,t._remainingTimeout]).log("cycle-resumed"))},add:function(t,i){var n,s=this.opts(),o=s.slideCount,c=!1;"string"==e.type(t)&&(t=e.trim(t)),e(t).each(function(t){var n,o=e(this);i?s.container.prepend(o):s.container.append(o),s.slideCount++,n=s.API.buildSlideOpts(o),i?s.slides=e(o).add(s.slides):s.slides=s.slides.add(o),s.API.initSlide(n,o,--s._maxZ),o.data("cycle.opts",n),s.API.trigger("cycle-slide-added",[s,n,o])}),s.API.updateView(!0),c=s._preInitialized&&o<2&&s.slideCount>=1,c&&(s._initialized?s.timeout&&(n=s.slides.length,s.nextSlide=s.reverse?n-1:1,s.timeoutId||s.API.queueTransition(s)):s.API.initSlideshow())},calcFirstSlide:function(){var e,t=this.opts();e=parseInt(t.startingSlide||0,10),(e>=t.slides.length||e<0)&&(e=0),t.currSlide=e,t.reverse?(t.nextSlide=e-1,t.nextSlide<0&&(t.nextSlide=t.slides.length-1)):(t.nextSlide=e+1,t.nextSlide==t.slides.length&&(t.nextSlide=0))},calcNextSlide:function(){var e,t=this.opts();t.reverse?(e=t.nextSlide-1<0,t.nextSlide=e?t.slideCount-1:t.nextSlide-1,t.currSlide=e?0:t.nextSlide+1):(e=t.nextSlide+1==t.slides.length,t.nextSlide=e?0:t.nextSlide+1,t.currSlide=e?t.slides.length-1:t.nextSlide-1)},calcTx:function(t,i){var n,s=t;return s._tempFx?n=e.fn.cycle.transitions[s._tempFx]:i&&s.manualFx&&(n=e.fn.cycle.transitions[s.manualFx]),n||(n=e.fn.cycle.transitions[s.fx]),s._tempFx=null,this.opts()._tempFx=null,n||(n=e.fn.cycle.transitions.fade,s.API.log('Transition "'+s.fx+'" not found. Using fade.')),n},prepareTx:function(e,t){var i,n,s,o,c,l=this.opts();return l.slideCount<2?void(l.timeoutId=0):(!e||l.busy&&!l.manualTrump||(l.API.stopTransition(),l.busy=!1,clearTimeout(l.timeoutId),l.timeoutId=0),void(l.busy||(0!==l.timeoutId||e)&&(n=l.slides[l.currSlide],s=l.slides[l.nextSlide],o=l.API.getSlideOpts(l.nextSlide),c=l.API.calcTx(o,e),l._tx=c,e&&void 0!==o.manualSpeed&&(o.speed=o.manualSpeed),l.nextSlide!=l.currSlide&&(e||!l.paused&&!l.hoverPaused&&l.timeout)?(l.API.trigger("cycle-before",[o,n,s,t]),c.before&&c.before(o,n,s,t),i=function(){l.busy=!1,l.container.data("cycle.opts")&&(c.after&&c.after(o,n,s,t),l.API.trigger("cycle-after",[o,n,s,t]),l.API.queueTransition(o),l.API.updateView(!0))},l.busy=!0,c.transition?c.transition(o,n,s,t,i):l.API.doTransition(o,n,s,t,i),l.API.calcNextSlide(),l.API.updateView()):l.API.queueTransition(o))))},doTransition:function(t,i,n,s,o){var c=t,l=e(i),r=e(n),a=function(){r.animate(c.animIn||{opacity:1},c.speed,c.easeIn||c.easing,o)};r.css(c.cssBefore||{}),l.animate(c.animOut||{},c.speed,c.easeOut||c.easing,function(){l.css(c.cssAfter||{}),c.sync||a()}),c.sync&&a()},queueTransition:function(t,i){var n=this.opts(),s=void 0!==i?i:t.timeout;return 0===n.nextSlide&&0===--n.loop?(n.API.log("terminating; loop=0"),n.timeout=0,s?setTimeout(function(){n.API.trigger("cycle-finished",[n])},s):n.API.trigger("cycle-finished",[n]),void(n.nextSlide=n.currSlide)):void 0!==n.continueAuto&&(n.continueAuto===!1||e.isFunction(n.continueAuto)&&n.continueAuto()===!1)?(n.API.log("terminating automatic transitions"),n.timeout=0,void(n.timeoutId&&clearTimeout(n.timeoutId))):void(s&&(n._lastQueue=e.now(),void 0===i&&(n._remainingTimeout=t.timeout),n.paused||n.hoverPaused||(n.timeoutId=setTimeout(function(){n.API.prepareTx(!1,!n.reverse)},s))))},stopTransition:function(){var e=this.opts();e.slides.filter(":animated").length&&(e.slides.stop(!1,!0),e.API.trigger("cycle-transition-stopped",[e])),e._tx&&e._tx.stopTransition&&e._tx.stopTransition(e)},advanceSlide:function(e){var t=this.opts();return clearTimeout(t.timeoutId),t.timeoutId=0,t.nextSlide=t.currSlide+e,t.nextSlide<0?t.nextSlide=t.slides.length-1:t.nextSlide>=t.slides.length&&(t.nextSlide=0),t.API.prepareTx(!0,e>=0),!1},buildSlideOpts:function(i){var n,s,o=this.opts(),c=i.data()||{};for(var l in c)c.hasOwnProperty(l)&&/^cycle[A-Z]+/.test(l)&&(n=c[l],s=l.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,t),o.API.log("["+(o.slideCount-1)+"]",s+":",n,"("+typeof n+")"),c[s]=n);c=e.extend({},e.fn.cycle.defaults,o,c),c.slideNum=o.slideCount;try{delete c.API,delete c.slideCount,delete c.currSlide,delete c.nextSlide,delete c.slides}catch(r){}return c},getSlideOpts:function(t){var i=this.opts();void 0===t&&(t=i.currSlide);var n=i.slides[t],s=e(n).data("cycle.opts");return e.extend({},i,s)},initSlide:function(t,i,n){var s=this.opts();i.css(t.slideCss||{}),n>0&&i.css("zIndex",n),isNaN(t.speed)&&(t.speed=e.fx.speeds[t.speed]||e.fx.speeds._default),t.sync||(t.speed=t.speed/2),i.addClass(s.slideClass)},updateView:function(e,t,i){var n=this.opts();if(n._initialized){var s=n.API.getSlideOpts(),o=n.slides[n.currSlide];!e&&t!==!0&&(n.API.trigger("cycle-update-view-before",[n,s,o]),n.updateView<0)||(n.slideActiveClass&&n.slides.removeClass(n.slideActiveClass).eq(n.currSlide).addClass(n.slideActiveClass),e&&n.hideNonActive&&n.slides.filter(":not(."+n.slideActiveClass+")").css("visibility","hidden"),0===n.updateView&&setTimeout(function(){n.API.trigger("cycle-update-view",[n,s,o,e])},s.speed/(n.sync?2:1)),0!==n.updateView&&n.API.trigger("cycle-update-view",[n,s,o,e]),e&&n.API.trigger("cycle-update-view-after",[n,s,o]))}},getComponent:function(t){var i=this.opts(),n=i[t];return"string"==typeof n?/^\s*[\>|\+|~]/.test(n)?i.container.find(n):e(n):n.jquery?n:e(n)},stackSlides:function(t,i,n){var s=this.opts();t||(t=s.slides[s.currSlide],i=s.slides[s.nextSlide],n=!s.reverse),e(t).css("zIndex",s.maxZ);var o,c=s.maxZ-2,l=s.slideCount;if(n){for(o=s.currSlide+1;o<l;o++)e(s.slides[o]).css("zIndex",c--);for(o=0;o<s.currSlide;o++)e(s.slides[o]).css("zIndex",c--)}else{for(o=s.currSlide-1;o>=0;o--)e(s.slides[o]).css("zIndex",c--);for(o=l-1;o>s.currSlide;o--)e(s.slides[o]).css("zIndex",c--)}e(i).css("zIndex",s.maxZ-1)},getSlideIndex:function(e){return this.opts().slides.index(e)}},e.fn.cycle.log=function(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))},e.fn.cycle.version=function(){return"Cycle2: "+i},e.fn.cycle.transitions={custom:{},none:{before:function(e,t,i,n){e.API.stackSlides(i,t,n),e.cssBefore={opacity:1,visibility:"visible",display:"block"}}},fade:{before:function(t,i,n,s){var o=t.API.getSlideOpts(t.nextSlide).slideCss||{};t.API.stackSlides(i,n,s),t.cssBefore=e.extend(o,{opacity:0,visibility:"visible",display:"block"}),t.animIn={opacity:1},t.animOut={opacity:0}}},fadeout:{before:function(t,i,n,s){var o=t.API.getSlideOpts(t.nextSlide).slideCss||{};t.API.stackSlides(i,n,s),t.cssBefore=e.extend(o,{opacity:1,visibility:"visible",display:"block"}),t.animOut={opacity:0}}},scrollHorz:{before:function(e,t,i,n){e.API.stackSlides(t,i,n);var s=e.container.css("overflow","hidden").width();e.cssBefore={left:n?s:-s,top:0,opacity:1,visibility:"visible",display:"block"},e.cssAfter={zIndex:e._maxZ-2,left:0},e.animIn={left:0},e.animOut={left:n?-s:s}}}},e.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:void 0,manualSpeed:void 0,manualTrump:!0,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:0},e(document).ready(function(){e(e.fn.cycle.defaults.autoSelector).cycle()})}(jQuery),function(e){"use strict";function t(t,n){var s,o,c,l=n.autoHeight;if("container"==l)o=e(n.slides[n.currSlide]).outerHeight(),n.container.height(o);else if(n._autoHeightRatio)n.container.height(n.container.width()/n._autoHeightRatio);else if("calc"===l||"number"==e.type(l)&&l>=0){if(c="calc"===l?i(t,n):l>=n.slides.length?0:l,c==n._sentinelIndex)return;n._sentinelIndex=c,n._sentinel&&n._sentinel.remove(),s=e(n.slides[c].cloneNode(!0)),s.removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"),s.css({position:"static",visibility:"hidden",display:"block"}).prependTo(n.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"),s.find("*").css("visibility","hidden"),n._sentinel=s}}function i(t,i){var n=0,s=-1;return i.slides.each(function(t){var i=e(this).height();i>s&&(s=i,n=t)}),n}function n(t,i,n,s,o){var c=e(s).outerHeight();i.container.animate({height:c},i.autoHeightSpeed,i.autoHeightEasing)}function s(i,o){o._autoHeightOnResize&&(e(window).off("resize orientationchange",o._autoHeightOnResize),o._autoHeightOnResize=null),o.container.off("cycle-slide-added cycle-slide-removed",t),o.container.off("cycle-destroyed",s),o.container.off("cycle-before",n),o._sentinel&&(o._sentinel.remove(),o._sentinel=null)}e.extend(e.fn.cycle.defaults,{autoHeight:0,autoHeightSpeed:250,autoHeightEasing:null}),e(document).on("cycle-initialized",function(i,o){function c(){t(i,o)}var l,r=o.autoHeight,a=e.type(r),d=null;"string"!==a&&"number"!==a||(o.container.on("cycle-slide-added cycle-slide-removed",t),o.container.on("cycle-destroyed",s),"container"==r?o.container.on("cycle-before",n):"string"===a&&/\d+\:\d+/.test(r)&&(l=r.match(/(\d+)\:(\d+)/),l=l[1]/l[2],o._autoHeightRatio=l),"number"!==a&&(o._autoHeightOnResize=function(){clearTimeout(d),d=setTimeout(c,50)},e(window).on("resize orientationchange",o._autoHeightOnResize)),setTimeout(c,30))})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"<div>{{title}}</div><div>{{desc}}</div>",captionModule:"caption"}),e(document).on("cycle-update-view",function(t,i,n,s){if("caption"===i.captionModule){e.each(["caption","overlay"],function(){var e=this,t=n[e+"Template"],o=i.API.getComponent(e);o.length&&t?(o.html(i.API.tmpl(t,n,i,s)),o.show()):o.hide()})}}),e(document).on("cycle-destroyed",function(t,i){var n;e.each(["caption","overlay"],function(){var e=this,t=i[e+"Template"];i[e]&&t&&(n=i.API.getComponent("caption"),n.empty())})})}(jQuery),function(e){"use strict";var t=e.fn.cycle;e.fn.cycle=function(i){var n,s,o,c=e.makeArray(arguments);return"number"==e.type(i)?this.cycle("goto",i):"string"==e.type(i)?this.each(function(){var l;return n=i,o=e(this).data("cycle.opts"),void 0===o?void t.log('slideshow must be initialized before sending commands; "'+n+'" ignored'):(n="goto"==n?"jump":n,s=o.API[n],e.isFunction(s)?(l=e.makeArray(c),l.shift(),s.apply(o.API,l)):void t.log("unknown command: ",n))}):t.apply(this,arguments)},e.extend(e.fn.cycle,t),e.extend(t.API,{next:function(){var e=this.opts();if(!e.busy||e.manualTrump){var t=e.reverse?-1:1;e.allowWrap===!1&&e.currSlide+t>=e.slideCount||(e.API.advanceSlide(t),e.API.trigger("cycle-next",[e]).log("cycle-next"))}},prev:function(){var e=this.opts();if(!e.busy||e.manualTrump){var t=e.reverse?1:-1;e.allowWrap===!1&&e.currSlide+t<0||(e.API.advanceSlide(t),e.API.trigger("cycle-prev",[e]).log("cycle-prev"))}},destroy:function(){this.stop();var t=this.opts(),i=e.isFunction(e._data)?e._data:e.noop;clearTimeout(t.timeoutId),t.timeoutId=0,t.API.stop(),t.API.trigger("cycle-destroyed",[t]).log("cycle-destroyed"),t.container.removeData(),i(t.container[0],"parsedAttrs",!1),t.retainStylesOnDestroy||(t.container.removeAttr("style"),t.slides.removeAttr("style"),t.slides.removeClass(t.slideActiveClass)),t.slides.each(function(){var n=e(this);n.removeData(),n.removeClass(t.slideClass),i(this,"parsedAttrs",!1)})},jump:function(e,t){var i,n=this.opts();if(!n.busy||n.manualTrump){var s=parseInt(e,10);if(isNaN(s)||s<0||s>=n.slides.length)return void n.API.log("goto: invalid slide index: "+s);if(s==n.currSlide)return void n.API.log("goto: skipping, already on slide",s);n.nextSlide=s,clearTimeout(n.timeoutId),n.timeoutId=0,n.API.log("goto: ",s," (zero-index)"),i=n.currSlide<n.nextSlide,n._tempFx=t,n.API.prepareTx(!0,i)}},stop:function(){var t=this.opts(),i=t.container;clearTimeout(t.timeoutId),t.timeoutId=0,t.API.stopTransition(),t.pauseOnHover&&(t.pauseOnHover!==!0&&(i=e(t.pauseOnHover)),i.off("mouseenter mouseleave")),t.API.trigger("cycle-stopped",[t]).log("cycle-stopped")},reinit:function(){var e=this.opts();e.API.destroy(),e.container.cycle()},remove:function(t){for(var i,n,s=this.opts(),o=[],c=1,l=0;l<s.slides.length;l++)i=s.slides[l],l==t?n=i:(o.push(i),e(i).data("cycle.opts").slideNum=c,c++);n&&(s.slides=e(o),s.slideCount--,e(n).remove(),t==s.currSlide?s.API.advanceSlide(1):t<s.currSlide?s.currSlide--:s.currSlide++,s.API.trigger("cycle-slide-removed",[s,t,n]).log("cycle-slide-removed"),s.API.updateView())}}),e(document).on("click.cycle","[data-cycle-cmd]",function(t){t.preventDefault();var i=e(this),n=i.data("cycle-cmd"),s=i.data("cycle-context")||".cycle-slideshow";e(s).cycle(n,i.data("cycle-arg"))})}(jQuery),function(e){"use strict";function t(t,i){var n;return t._hashFence?void(t._hashFence=!1):(n=window.location.hash.substring(1),void t.slides.each(function(s){if(e(this).data("cycle-hash")==n){if(i===!0)t.startingSlide=s;else{var o=t.currSlide<s;t.nextSlide=s,t.API.prepareTx(!0,o)}return!1}}))}e(document).on("cycle-pre-initialize",function(i,n){t(n,!0),n._onHashChange=function(){t(n,!1)},e(window).on("hashchange",n._onHashChange)}),e(document).on("cycle-update-view",function(e,t,i){i.hash&&"#"+i.hash!=window.location.hash&&(t._hashFence=!0,window.location.hash=i.hash)}),e(document).on("cycle-destroyed",function(t,i){i._onHashChange&&e(window).off("hashchange",i._onHashChange)})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{loader:!1}),e(document).on("cycle-bootstrap",function(t,i){function n(t,n){function o(t){var o;"wait"==i.loader?(l.push(t),0===a&&(l.sort(c),s.apply(i.API,[l,n]),i.container.removeClass("cycle-loading"))):(o=e(i.slides[i.currSlide]),s.apply(i.API,[t,n]),o.show(),i.container.removeClass("cycle-loading"))}function c(e,t){return e.data("index")-t.data("index")}var l=[];if("string"==e.type(t))t=e.trim(t);else if("array"===e.type(t))for(var r=0;r<t.length;r++)t[r]=e(t[r])[0];t=e(t);var a=t.length;a&&(t.css("visibility","hidden").appendTo("body").each(function(t){function c(){0===--r&&(--a,o(d))}var r=0,d=e(this),u=d.is("img")?d:d.find("img");return d.data("index",t),u=u.filter(":not(.cycle-loader-ignore)").filter(':not([src=""])'),u.length?(r=u.length,void u.each(function(){this.complete?c():e(this).load(function(){c()}).on("error",function(){0===--r&&(i.API.log("slide skipped; img not loaded:",this.src),0===--a&&"wait"==i.loader&&s.apply(i.API,[l,n]))})})):(--a,void l.push(d))}),a&&i.container.addClass("cycle-loading"))}var s;i.loader&&(s=i.API.add,i.API.add=n)})}(jQuery),function(e){"use strict";function t(t,i,n){var s,o=t.API.getComponent("pager");o.each(function(){var o=e(this);if(i.pagerTemplate){var c=t.API.tmpl(i.pagerTemplate,i,t,n[0]);s=e(c).appendTo(o)}else s=o.children().eq(t.slideCount-1);s.on(t.pagerEvent,function(e){t.pagerEventBubble||e.preventDefault(),t.API.page(o,e.currentTarget)})})}function i(e,t){var i=this.opts();if(!i.busy||i.manualTrump){var n=e.children().index(t),s=n,o=i.currSlide<s;i.currSlide!=s&&(i.nextSlide=s,i._tempFx=i.pagerFx,i.API.prepareTx(!0,o),i.API.trigger("cycle-pager-activated",[i,e,t]))}}e.extend(e.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerEventBubble:void 0,pagerTemplate:"<span>&bull;</span>"}),e(document).on("cycle-bootstrap",function(e,i,n){n.buildPagerLink=t}),e(document).on("cycle-slide-added",function(e,t,n,s){t.pager&&(t.API.buildPagerLink(t,n,s),t.API.page=i)}),e(document).on("cycle-slide-removed",function(t,i,n,s){if(i.pager){var o=i.API.getComponent("pager");o.each(function(){var t=e(this);e(t.children()[n]).remove()})}}),e(document).on("cycle-update-view",function(t,i,n){var s;i.pager&&(s=i.API.getComponent("pager"),s.each(function(){e(this).children().removeClass(i.pagerActiveClass).eq(i.currSlide).addClass(i.pagerActiveClass)}))}),e(document).on("cycle-destroyed",function(e,t){var i=t.API.getComponent("pager");i&&(i.children().off(t.pagerEvent),t.pagerTemplate&&i.empty())})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),e(document).on("cycle-initialized",function(e,t){if(t.API.getComponent("next").on(t.nextEvent,function(e){e.preventDefault(),t.API.next()}),t.API.getComponent("prev").on(t.prevEvent,function(e){e.preventDefault(),t.API.prev()}),t.swipe){var i=t.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",n=t.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";t.container.on(i,function(e){t._tempFx=t.swipeFx,t.API.next()}),t.container.on(n,function(){t._tempFx=t.swipeFx,t.API.prev()})}}),e(document).on("cycle-update-view",function(e,t,i,n){if(!t.allowWrap){var s=t.disabledClass,o=t.API.getComponent("next"),c=t.API.getComponent("prev"),l=t._prevBoundry||0,r=void 0!==t._nextBoundry?t._nextBoundry:t.slideCount-1;t.currSlide==r?o.addClass(s).prop("disabled",!0):o.removeClass(s).prop("disabled",!1),t.currSlide===l?c.addClass(s).prop("disabled",!0):c.removeClass(s).prop("disabled",!1)}}),e(document).on("cycle-destroyed",function(e,t){t.API.getComponent("prev").off(t.nextEvent),t.API.getComponent("next").off(t.prevEvent),t.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{progressive:!1}),e(document).on("cycle-pre-initialize",function(t,i){if(i.progressive){var n,s,o=i.API,c=o.next,l=o.prev,r=o.prepareTx,a=e.type(i.progressive);if("array"==a)n=i.progressive;else if(e.isFunction(i.progressive))n=i.progressive(i);else if("string"==a){if(s=e(i.progressive),n=e.trim(s.html()),!n)return;if(/^(\[)/.test(n))try{n=e.parseJSON(n)}catch(d){return void o.log("error parsing progressive slides",d)}else n=n.split(new RegExp(s.data("cycle-split")||"\n")),n[n.length-1]||n.pop()}r&&(o.prepareTx=function(e,t){var s,o;return e||0===n.length?void r.apply(i.API,[e,t]):void(t&&i.currSlide==i.slideCount-1?(o=n[0],n=n.slice(1),i.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.API.advanceSlide(1)},50)}),i.API.add(o)):t||0!==i.currSlide?r.apply(i.API,[e,t]):(s=n.length-1,o=n[s],n=n.slice(0,s),i.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.currSlide=1,t.API.advanceSlide(-1)},50)}),i.API.add(o,!0)))}),c&&(o.next=function(){var e=this.opts();if(n.length&&e.currSlide==e.slideCount-1){var t=n[0];n=n.slice(1),e.container.one("cycle-slide-added",function(e,t){c.apply(t.API),t.container.removeClass("cycle-loading")}),e.container.addClass("cycle-loading"),e.API.add(t)}else c.apply(e.API)}),l&&(o.prev=function(){var e=this.opts();if(n.length&&0===e.currSlide){var t=n.length-1,i=n[t];n=n.slice(0,t),e.container.one("cycle-slide-added",function(e,t){t.currSlide=1,t.API.advanceSlide(-1),t.container.removeClass("cycle-loading")}),e.container.addClass("cycle-loading"),e.API.add(i,!0)}else l.apply(e.API)})}})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),e.extend(e.fn.cycle.API,{tmpl:function(t,i){var n=new RegExp(i.tmplRegex||e.fn.cycle.defaults.tmplRegex,"g"),s=e.makeArray(arguments);return s.shift(),t.replace(n,function(t,i){var n,o,c,l,r=i.split(".");for(n=0;n<s.length;n++)if(c=s[n]){if(r.length>1)for(l=c,o=0;o<r.length;o++)c=l,l=l[r[o]]||i;else l=c[i];if(e.isFunction(l))return l.apply(c,s);if(void 0!==l&&null!==l&&l!=i)return l}return i})}})}(jQuery);
1
+ !function(e){"use strict";function t(e){return(e||"").toLowerCase()}e.fn.cycle=function(i){var n;return 0!==this.length||e.isReady?this.each(function(){var n,s,o,c,l=e(this),r=e.fn.cycle.log;if(!l.data("cycle.opts")){(!1===l.data("cycle-log")||i&&!1===i.log||s&&!1===s.log)&&(r=e.noop),r("--c2 init--"),n=l.data();for(var a in n)n.hasOwnProperty(a)&&/^cycle[A-Z]+/.test(a)&&(c=n[a],o=a.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,t),r(o+":",c,"("+typeof c+")"),n[o]=c);s=e.extend({},e.fn.cycle.defaults,n,i||{}),s.timeoutId=0,s.paused=s.paused||!1,s.container=l,s._maxZ=s.maxZ,s.API=e.extend({_container:l},e.fn.cycle.API),s.API.log=r,s.API.trigger=function(e,t){return s.container.trigger(e,t),s.API},l.data("cycle.opts",s),l.data("cycle.API",s.API),s.API.trigger("cycle-bootstrap",[s,s.API]),s.API.addInitialSlides(),s.API.preInitSlideshow(),s.slides.length&&s.API.initSlideshow()}}):(n={s:this.selector,c:this.context},e.fn.cycle.log("requeuing slideshow (dom not ready)"),e(function(){e(n.s,n.c).cycle(i)}),this)},e.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var t=this.opts(),i=t.slides;t.slideCount=0,t.slides=e(),i=i.jquery?i:t.container.find(i),t.random&&i.sort(function(){return Math.random()-.5}),t.API.add(i)},preInitSlideshow:function(){var t=this.opts();t.API.trigger("cycle-pre-initialize",[t]);var i=e.fn.cycle.transitions[t.fx];i&&e.isFunction(i.preInit)&&i.preInit(t),t._preInitialized=!0},postInitSlideshow:function(){var t=this.opts();t.API.trigger("cycle-post-initialize",[t]);var i=e.fn.cycle.transitions[t.fx];i&&e.isFunction(i.postInit)&&i.postInit(t)},initSlideshow:function(){var t,i=this.opts(),n=i.container;i.API.calcFirstSlide(),"static"==i.container.css("position")&&i.container.css("position","relative"),e(i.slides[i.currSlide]).css({opacity:1,display:"block",visibility:"visible"}),i.API.stackSlides(i.slides[i.currSlide],i.slides[i.nextSlide],!i.reverse),i.pauseOnHover&&(!0!==i.pauseOnHover&&(n=e(i.pauseOnHover)),n.hover(function(){i.API.pause(!0)},function(){i.API.resume(!0)})),i.timeout&&(t=i.API.getSlideOpts(i.currSlide),i.API.queueTransition(t,t.timeout+i.delay)),i._initialized=!0,i.API.updateView(!0),i.API.trigger("cycle-initialized",[i]),i.API.postInitSlideshow()},pause:function(t){var i=this.opts(),n=i.API.getSlideOpts(),s=i.hoverPaused||i.paused;t?i.hoverPaused=!0:i.paused=!0,s||(i.container.addClass("cycle-paused"),i.API.trigger("cycle-paused",[i]).log("cycle-paused"),n.timeout&&(clearTimeout(i.timeoutId),i.timeoutId=0,i._remainingTimeout-=e.now()-i._lastQueue,(i._remainingTimeout<0||isNaN(i._remainingTimeout))&&(i._remainingTimeout=void 0)))},resume:function(e){var t=this.opts(),i=!t.hoverPaused&&!t.paused;e?t.hoverPaused=!1:t.paused=!1,i||(t.container.removeClass("cycle-paused"),0===t.slides.filter(":animated").length&&t.API.queueTransition(t.API.getSlideOpts(),t._remainingTimeout),t.API.trigger("cycle-resumed",[t,t._remainingTimeout]).log("cycle-resumed"))},add:function(t,i){var n,s=this.opts(),o=s.slideCount,c=!1;"string"==e.type(t)&&(t=e.trim(t)),e(t).each(function(t){var n,o=e(this);i?s.container.prepend(o):s.container.append(o),s.slideCount++,n=s.API.buildSlideOpts(o),s.slides=i?e(o).add(s.slides):s.slides.add(o),s.API.initSlide(n,o,--s._maxZ),o.data("cycle.opts",n),s.API.trigger("cycle-slide-added",[s,n,o])}),s.API.updateView(!0),(c=s._preInitialized&&o<2&&s.slideCount>=1)&&(s._initialized?s.timeout&&(n=s.slides.length,s.nextSlide=s.reverse?n-1:1,s.timeoutId||s.API.queueTransition(s)):s.API.initSlideshow())},calcFirstSlide:function(){var e,t=this.opts();e=parseInt(t.startingSlide||0,10),(e>=t.slides.length||e<0)&&(e=0),t.currSlide=e,t.reverse?(t.nextSlide=e-1,t.nextSlide<0&&(t.nextSlide=t.slides.length-1)):(t.nextSlide=e+1,t.nextSlide==t.slides.length&&(t.nextSlide=0))},calcNextSlide:function(){var e,t=this.opts();t.reverse?(e=t.nextSlide-1<0,t.nextSlide=e?t.slideCount-1:t.nextSlide-1,t.currSlide=e?0:t.nextSlide+1):(e=t.nextSlide+1==t.slides.length,t.nextSlide=e?0:t.nextSlide+1,t.currSlide=e?t.slides.length-1:t.nextSlide-1)},calcTx:function(t,i){var n,s=t;return s._tempFx?n=e.fn.cycle.transitions[s._tempFx]:i&&s.manualFx&&(n=e.fn.cycle.transitions[s.manualFx]),n||(n=e.fn.cycle.transitions[s.fx]),s._tempFx=null,this.opts()._tempFx=null,n||(n=e.fn.cycle.transitions.fade,s.API.log('Transition "'+s.fx+'" not found. Using fade.')),n},prepareTx:function(e,t){var i,n,s,o,c,l=this.opts();if(l.slideCount<2)return void(l.timeoutId=0);!e||l.busy&&!l.manualTrump||(l.API.stopTransition(),l.busy=!1,clearTimeout(l.timeoutId),l.timeoutId=0),l.busy||(0!==l.timeoutId||e)&&(n=l.slides[l.currSlide],s=l.slides[l.nextSlide],o=l.API.getSlideOpts(l.nextSlide),c=l.API.calcTx(o,e),l._tx=c,e&&void 0!==o.manualSpeed&&(o.speed=o.manualSpeed),l.nextSlide!=l.currSlide&&(e||!l.paused&&!l.hoverPaused&&l.timeout)?(l.API.trigger("cycle-before",[o,n,s,t]),c.before&&c.before(o,n,s,t),i=function(){l.busy=!1,l.container.data("cycle.opts")&&(c.after&&c.after(o,n,s,t),l.API.trigger("cycle-after",[o,n,s,t]),l.API.queueTransition(o),l.API.updateView(!0))},l.busy=!0,c.transition?c.transition(o,n,s,t,i):l.API.doTransition(o,n,s,t,i),l.API.calcNextSlide(),l.API.updateView()):l.API.queueTransition(o))},doTransition:function(t,i,n,s,o){var c=t,l=e(i),r=e(n),a=function(){r.animate(c.animIn||{opacity:1},c.speed,c.easeIn||c.easing,o)};r.css(c.cssBefore||{}),l.animate(c.animOut||{},c.speed,c.easeOut||c.easing,function(){l.css(c.cssAfter||{}),c.sync||a()}),c.sync&&a()},queueTransition:function(t,i){var n=this.opts(),s=void 0!==i?i:t.timeout;return 0===n.nextSlide&&0==--n.loop?(n.API.log("terminating; loop=0"),n.timeout=0,s?setTimeout(function(){n.API.trigger("cycle-finished",[n])},s):n.API.trigger("cycle-finished",[n]),void(n.nextSlide=n.currSlide)):void 0!==n.continueAuto&&(!1===n.continueAuto||e.isFunction(n.continueAuto)&&!1===n.continueAuto())?(n.API.log("terminating automatic transitions"),n.timeout=0,void(n.timeoutId&&clearTimeout(n.timeoutId))):void(s&&(n._lastQueue=e.now(),void 0===i&&(n._remainingTimeout=t.timeout),n.paused||n.hoverPaused||(n.timeoutId=setTimeout(function(){n.API.prepareTx(!1,!n.reverse)},s))))},stopTransition:function(){var e=this.opts();e.slides.filter(":animated").length&&(e.slides.stop(!1,!0),e.API.trigger("cycle-transition-stopped",[e])),e._tx&&e._tx.stopTransition&&e._tx.stopTransition(e)},advanceSlide:function(e){var t=this.opts();return clearTimeout(t.timeoutId),t.timeoutId=0,t.nextSlide=t.currSlide+e,t.nextSlide<0?t.nextSlide=t.slides.length-1:t.nextSlide>=t.slides.length&&(t.nextSlide=0),t.API.prepareTx(!0,e>=0),!1},buildSlideOpts:function(i){var n,s,o=this.opts(),c=i.data()||{};for(var l in c)c.hasOwnProperty(l)&&/^cycle[A-Z]+/.test(l)&&(n=c[l],s=l.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,t),o.API.log("["+(o.slideCount-1)+"]",s+":",n,"("+typeof n+")"),c[s]=n);c=e.extend({},e.fn.cycle.defaults,o,c),c.slideNum=o.slideCount;try{delete c.API,delete c.slideCount,delete c.currSlide,delete c.nextSlide,delete c.slides}catch(e){}return c},getSlideOpts:function(t){var i=this.opts();void 0===t&&(t=i.currSlide);var n=i.slides[t],s=e(n).data("cycle.opts");return e.extend({},i,s)},initSlide:function(t,i,n){var s=this.opts();i.css(t.slideCss||{}),n>0&&i.css("zIndex",n),isNaN(t.speed)&&(t.speed=e.fx.speeds[t.speed]||e.fx.speeds._default),t.sync||(t.speed=t.speed/2),i.addClass(s.slideClass)},updateView:function(e,t,i){var n=this.opts();if(n._initialized){var s=n.API.getSlideOpts(),o=n.slides[n.currSlide];!e&&!0!==t&&(n.API.trigger("cycle-update-view-before",[n,s,o]),n.updateView<0)||(n.slideActiveClass&&n.slides.removeClass(n.slideActiveClass).eq(n.currSlide).addClass(n.slideActiveClass),e&&n.hideNonActive&&n.slides.filter(":not(."+n.slideActiveClass+")").css("visibility","hidden"),0===n.updateView&&setTimeout(function(){n.API.trigger("cycle-update-view",[n,s,o,e])},s.speed/(n.sync?2:1)),0!==n.updateView&&n.API.trigger("cycle-update-view",[n,s,o,e]),e&&n.API.trigger("cycle-update-view-after",[n,s,o]))}},getComponent:function(t){var i=this.opts(),n=i[t];return"string"==typeof n?/^\s*[\>|\+|~]/.test(n)?i.container.find(n):e(n):n.jquery?n:e(n)},stackSlides:function(t,i,n){var s=this.opts();t||(t=s.slides[s.currSlide],i=s.slides[s.nextSlide],n=!s.reverse),e(t).css("zIndex",s.maxZ);var o,c=s.maxZ-2,l=s.slideCount;if(n){for(o=s.currSlide+1;o<l;o++)e(s.slides[o]).css("zIndex",c--);for(o=0;o<s.currSlide;o++)e(s.slides[o]).css("zIndex",c--)}else{for(o=s.currSlide-1;o>=0;o--)e(s.slides[o]).css("zIndex",c--);for(o=l-1;o>s.currSlide;o--)e(s.slides[o]).css("zIndex",c--)}e(i).css("zIndex",s.maxZ-1)},getSlideIndex:function(e){return this.opts().slides.index(e)}},e.fn.cycle.log=function(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))},e.fn.cycle.version=function(){return"Cycle2: 2.1.6"},e.fn.cycle.transitions={custom:{},none:{before:function(e,t,i,n){e.API.stackSlides(i,t,n),e.cssBefore={opacity:1,visibility:"visible",display:"block"}}},fade:{before:function(t,i,n,s){var o=t.API.getSlideOpts(t.nextSlide).slideCss||{};t.API.stackSlides(i,n,s),t.cssBefore=e.extend(o,{opacity:0,visibility:"visible",display:"block"}),t.animIn={opacity:1},t.animOut={opacity:0}}},fadeout:{before:function(t,i,n,s){var o=t.API.getSlideOpts(t.nextSlide).slideCss||{};t.API.stackSlides(i,n,s),t.cssBefore=e.extend(o,{opacity:1,visibility:"visible",display:"block"}),t.animOut={opacity:0}}},scrollHorz:{before:function(e,t,i,n){e.API.stackSlides(t,i,n);var s=e.container.css("overflow","hidden").width();e.cssBefore={left:n?s:-s,top:0,opacity:1,visibility:"visible",display:"block"},e.cssAfter={zIndex:e._maxZ-2,left:0},e.animIn={left:0},e.animOut={left:n?-s:s}}}},e.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:void 0,manualSpeed:void 0,manualTrump:!0,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:0},e(document).ready(function(){e(e.fn.cycle.defaults.autoSelector).cycle()})}(jQuery),function(e){"use strict";function t(t,n){var s,o,c,l=n.autoHeight;if("container"==l)o=e(n.slides[n.currSlide]).outerHeight(),n.container.height(o);else if(n._autoHeightRatio)n.container.height(n.container.width()/n._autoHeightRatio);else if("calc"===l||"number"==e.type(l)&&l>=0){if((c="calc"===l?i(t,n):l>=n.slides.length?0:l)==n._sentinelIndex)return;n._sentinelIndex=c,n._sentinel&&n._sentinel.remove(),s=e(n.slides[c].cloneNode(!0)),s.removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"),s.css({position:"static",visibility:"hidden",display:"block"}).prependTo(n.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"),s.find("*").css("visibility","hidden"),n._sentinel=s}}function i(t,i){var n=0,s=-1;return i.slides.each(function(t){var i=e(this).height();i>s&&(s=i,n=t)}),n}function n(t,i,n,s,o){var c=e(s).outerHeight();i.container.animate({height:c},i.autoHeightSpeed,i.autoHeightEasing)}function s(i,o){o._autoHeightOnResize&&(e(window).off("resize orientationchange",o._autoHeightOnResize),o._autoHeightOnResize=null),o.container.off("cycle-slide-added cycle-slide-removed",t),o.container.off("cycle-destroyed",s),o.container.off("cycle-before",n),o._sentinel&&(o._sentinel.remove(),o._sentinel=null)}e.extend(e.fn.cycle.defaults,{autoHeight:0,autoHeightSpeed:250,autoHeightEasing:null}),e(document).on("cycle-initialized",function(i,o){function c(){t(i,o)}var l,r=o.autoHeight,a=e.type(r),d=null;"string"!==a&&"number"!==a||(o.container.on("cycle-slide-added cycle-slide-removed",t),o.container.on("cycle-destroyed",s),"container"==r?o.container.on("cycle-before",n):"string"===a&&/\d+\:\d+/.test(r)&&(l=r.match(/(\d+)\:(\d+)/),l=l[1]/l[2],o._autoHeightRatio=l),"number"!==a&&(o._autoHeightOnResize=function(){clearTimeout(d),d=setTimeout(c,50)},e(window).on("resize orientationchange",o._autoHeightOnResize)),setTimeout(c,30))})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"<div>{{title}}</div><div>{{desc}}</div>",captionModule:"caption"}),e(document).on("cycle-update-view",function(t,i,n,s){if("caption"===i.captionModule){e.each(["caption","overlay"],function(){var e=this,t=n[e+"Template"],o=i.API.getComponent(e);o.length&&t?(o.html(i.API.tmpl(t,n,i,s)),o.show()):o.hide()})}}),e(document).on("cycle-destroyed",function(t,i){var n;e.each(["caption","overlay"],function(){var e=this,t=i[e+"Template"];i[e]&&t&&(n=i.API.getComponent("caption"),n.empty())})})}(jQuery),function(e){"use strict";var t=e.fn.cycle;e.fn.cycle=function(i){var n,s,o,c=e.makeArray(arguments);return"number"==e.type(i)?this.cycle("goto",i):"string"==e.type(i)?this.each(function(){var l;return n=i,void 0===(o=e(this).data("cycle.opts"))?void t.log('slideshow must be initialized before sending commands; "'+n+'" ignored'):(n="goto"==n?"jump":n,s=o.API[n],e.isFunction(s)?(l=e.makeArray(c),l.shift(),s.apply(o.API,l)):void t.log("unknown command: ",n))}):t.apply(this,arguments)},e.extend(e.fn.cycle,t),e.extend(t.API,{next:function(){var e=this.opts();if(!e.busy||e.manualTrump){var t=e.reverse?-1:1;!1===e.allowWrap&&e.currSlide+t>=e.slideCount||(e.API.advanceSlide(t),e.API.trigger("cycle-next",[e]).log("cycle-next"))}},prev:function(){var e=this.opts();if(!e.busy||e.manualTrump){var t=e.reverse?1:-1;!1===e.allowWrap&&e.currSlide+t<0||(e.API.advanceSlide(t),e.API.trigger("cycle-prev",[e]).log("cycle-prev"))}},destroy:function(){this.stop();var t=this.opts(),i=e.isFunction(e._data)?e._data:e.noop;clearTimeout(t.timeoutId),t.timeoutId=0,t.API.stop(),t.API.trigger("cycle-destroyed",[t]).log("cycle-destroyed"),t.container.removeData(),i(t.container[0],"parsedAttrs",!1),t.retainStylesOnDestroy||(t.container.removeAttr("style"),t.slides.removeAttr("style"),t.slides.removeClass(t.slideActiveClass)),t.slides.each(function(){var n=e(this);n.removeData(),n.removeClass(t.slideClass),i(this,"parsedAttrs",!1)})},jump:function(e,t){var i,n=this.opts();if(!n.busy||n.manualTrump){var s=parseInt(e,10);if(isNaN(s)||s<0||s>=n.slides.length)return void n.API.log("goto: invalid slide index: "+s);if(s==n.currSlide)return void n.API.log("goto: skipping, already on slide",s);n.nextSlide=s,clearTimeout(n.timeoutId),n.timeoutId=0,n.API.log("goto: ",s," (zero-index)"),i=n.currSlide<n.nextSlide,n._tempFx=t,n.API.prepareTx(!0,i)}},stop:function(){var t=this.opts(),i=t.container;clearTimeout(t.timeoutId),t.timeoutId=0,t.API.stopTransition(),t.pauseOnHover&&(!0!==t.pauseOnHover&&(i=e(t.pauseOnHover)),i.off("mouseenter mouseleave")),t.API.trigger("cycle-stopped",[t]).log("cycle-stopped")},reinit:function(){var e=this.opts();e.API.destroy(),e.container.cycle()},remove:function(t){for(var i,n,s=this.opts(),o=[],c=1,l=0;l<s.slides.length;l++)i=s.slides[l],l==t?n=i:(o.push(i),e(i).data("cycle.opts").slideNum=c,c++);n&&(s.slides=e(o),s.slideCount--,e(n).remove(),t==s.currSlide?s.API.advanceSlide(1):t<s.currSlide?s.currSlide--:s.currSlide++,s.API.trigger("cycle-slide-removed",[s,t,n]).log("cycle-slide-removed"),s.API.updateView())}}),e(document).on("click.cycle","[data-cycle-cmd]",function(t){t.preventDefault();var i=e(this),n=i.data("cycle-cmd"),s=i.data("cycle-context")||".cycle-slideshow";e(s).cycle(n,i.data("cycle-arg"))})}(jQuery),function(e){"use strict";function t(t,i){var n;if(t._hashFence)return void(t._hashFence=!1);n=window.location.hash.substring(1),t.slides.each(function(s){if(e(this).data("cycle-hash")==n){if(!0===i)t.startingSlide=s;else{var o=t.currSlide<s;t.nextSlide=s,t.API.prepareTx(!0,o)}return!1}})}e(document).on("cycle-pre-initialize",function(i,n){t(n,!0),n._onHashChange=function(){t(n,!1)},e(window).on("hashchange",n._onHashChange)}),e(document).on("cycle-update-view",function(e,t,i){i.hash&&"#"+i.hash!=window.location.hash&&(t._hashFence=!0,window.location.hash=i.hash)}),e(document).on("cycle-destroyed",function(t,i){i._onHashChange&&e(window).off("hashchange",i._onHashChange)})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{loader:!1}),e(document).on("cycle-bootstrap",function(t,i){function n(t,n){function o(t){var o;"wait"==i.loader?(l.push(t),0===a&&(l.sort(c),s.apply(i.API,[l,n]),i.container.removeClass("cycle-loading"))):(o=e(i.slides[i.currSlide]),s.apply(i.API,[t,n]),o.show(),i.container.removeClass("cycle-loading"))}function c(e,t){return e.data("index")-t.data("index")}var l=[];if("string"==e.type(t))t=e.trim(t);else if("array"===e.type(t))for(var r=0;r<t.length;r++)t[r]=e(t[r])[0];t=e(t);var a=t.length;a&&(t.css("visibility","hidden").appendTo("body").each(function(t){function c(){0==--r&&(--a,o(d))}var r=0,d=e(this),u=d.is("img")?d:d.find("img");if(d.data("index",t),u=u.filter(":not(.cycle-loader-ignore)").filter(':not([src=""])'),!u.length)return--a,void l.push(d);r=u.length,u.each(function(){this.complete?c():e(this).load(function(){c()}).on("error",function(){0==--r&&(i.API.log("slide skipped; img not loaded:",this.src),0==--a&&"wait"==i.loader&&s.apply(i.API,[l,n]))})})}),a&&i.container.addClass("cycle-loading"))}var s;i.loader&&(s=i.API.add,i.API.add=n)})}(jQuery),function(e){"use strict";function t(t,i,n){var s;t.API.getComponent("pager").each(function(){var o=e(this);if(i.pagerTemplate){var c=t.API.tmpl(i.pagerTemplate,i,t,n[0]);s=e(c).appendTo(o)}else s=o.children().eq(t.slideCount-1);s.on(t.pagerEvent,function(e){t.pagerEventBubble||e.preventDefault(),t.API.page(o,e.currentTarget)})})}function i(e,t){var i=this.opts();if(!i.busy||i.manualTrump){var n=e.children().index(t),s=n,o=i.currSlide<s;i.currSlide!=s&&(i.nextSlide=s,i._tempFx=i.pagerFx,i.API.prepareTx(!0,o),i.API.trigger("cycle-pager-activated",[i,e,t]))}}e.extend(e.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerEventBubble:void 0,pagerTemplate:"<span>&bull;</span>"}),e(document).on("cycle-bootstrap",function(e,i,n){n.buildPagerLink=t}),e(document).on("cycle-slide-added",function(e,t,n,s){t.pager&&(t.API.buildPagerLink(t,n,s),t.API.page=i)}),e(document).on("cycle-slide-removed",function(t,i,n,s){if(i.pager){i.API.getComponent("pager").each(function(){var t=e(this);e(t.children()[n]).remove()})}}),e(document).on("cycle-update-view",function(t,i,n){var s;i.pager&&(s=i.API.getComponent("pager"),s.each(function(){e(this).children().removeClass(i.pagerActiveClass).eq(i.currSlide).addClass(i.pagerActiveClass)}))}),e(document).on("cycle-destroyed",function(e,t){var i=t.API.getComponent("pager");i&&(i.children().off(t.pagerEvent),t.pagerTemplate&&i.empty())})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),e(document).on("cycle-initialized",function(e,t){if(t.API.getComponent("next").on(t.nextEvent,function(e){e.preventDefault(),t.API.next()}),t.API.getComponent("prev").on(t.prevEvent,function(e){e.preventDefault(),t.API.prev()}),t.swipe){var i=t.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",n=t.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";t.container.on(i,function(e){t._tempFx=t.swipeFx,t.API.next()}),t.container.on(n,function(){t._tempFx=t.swipeFx,t.API.prev()})}}),e(document).on("cycle-update-view",function(e,t,i,n){if(!t.allowWrap){var s=t.disabledClass,o=t.API.getComponent("next"),c=t.API.getComponent("prev"),l=t._prevBoundry||0,r=void 0!==t._nextBoundry?t._nextBoundry:t.slideCount-1;t.currSlide==r?o.addClass(s).prop("disabled",!0):o.removeClass(s).prop("disabled",!1),t.currSlide===l?c.addClass(s).prop("disabled",!0):c.removeClass(s).prop("disabled",!1)}}),e(document).on("cycle-destroyed",function(e,t){t.API.getComponent("prev").off(t.nextEvent),t.API.getComponent("next").off(t.prevEvent),t.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{progressive:!1}),e(document).on("cycle-pre-initialize",function(t,i){if(i.progressive){var n,s,o=i.API,c=o.next,l=o.prev,r=o.prepareTx,a=e.type(i.progressive);if("array"==a)n=i.progressive;else if(e.isFunction(i.progressive))n=i.progressive(i);else if("string"==a){if(s=e(i.progressive),!(n=e.trim(s.html())))return;if(/^(\[)/.test(n))try{n=e.parseJSON(n)}catch(e){return void o.log("error parsing progressive slides",e)}else n=n.split(new RegExp(s.data("cycle-split")||"\n")),n[n.length-1]||n.pop()}r&&(o.prepareTx=function(e,t){var s,o;if(e||0===n.length)return void r.apply(i.API,[e,t]);t&&i.currSlide==i.slideCount-1?(o=n[0],n=n.slice(1),i.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.API.advanceSlide(1)},50)}),i.API.add(o)):t||0!==i.currSlide?r.apply(i.API,[e,t]):(s=n.length-1,o=n[s],n=n.slice(0,s),i.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.currSlide=1,t.API.advanceSlide(-1)},50)}),i.API.add(o,!0))}),c&&(o.next=function(){var e=this.opts();if(n.length&&e.currSlide==e.slideCount-1){var t=n[0];n=n.slice(1),e.container.one("cycle-slide-added",function(e,t){c.apply(t.API),t.container.removeClass("cycle-loading")}),e.container.addClass("cycle-loading"),e.API.add(t)}else c.apply(e.API)}),l&&(o.prev=function(){var e=this.opts();if(n.length&&0===e.currSlide){var t=n.length-1,i=n[t];n=n.slice(0,t),e.container.one("cycle-slide-added",function(e,t){t.currSlide=1,t.API.advanceSlide(-1),t.container.removeClass("cycle-loading")}),e.container.addClass("cycle-loading"),e.API.add(i,!0)}else l.apply(e.API)})}})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),e.extend(e.fn.cycle.API,{tmpl:function(t,i){var n=new RegExp(i.tmplRegex||e.fn.cycle.defaults.tmplRegex,"g"),s=e.makeArray(arguments);return s.shift(),t.replace(n,function(t,i){var n,o,c,l,r=i.split(".");for(n=0;n<s.length;n++)if(c=s[n]){if(r.length>1)for(l=c,o=0;o<r.length;o++)c=l,l=l[r[o]]||i;else l=c[i];if(e.isFunction(l))return l.apply(c,s);if(void 0!==l&&null!==l&&l!=i)return l}return i})}})}(jQuery);
js/jquery.cycle.swipe.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";"ontouchend"in document;e.event.special.swipe=e.event.special.swipe||{scrollSupressionThreshold:10,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var i=e(this);i.bind("touchstart",function(t){function s(i){if(r){var t=i.originalEvent.touches?i.originalEvent.touches[0]:i;o={time:(new Date).getTime(),coords:[t.pageX,t.pageY]},Math.abs(r.coords[0]-o.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&i.preventDefault()}}var o,n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r={time:(new Date).getTime(),coords:[n.pageX,n.pageY],origin:e(t.target)};i.bind("touchmove",s).one("touchend",function(t){i.unbind("touchmove",s),r&&o&&o.time-r.time<e.event.special.swipe.durationThreshold&&Math.abs(r.coords[0]-o.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(r.coords[1]-o.coords[1])<e.event.special.swipe.verticalDistanceThreshold&&r.origin.trigger("swipe").trigger(r.coords[0]>o.coords[0]?"swipeleft":"swiperight"),r=o=void 0})})}},e.event.special.swipeleft=e.event.special.swipeleft||{setup:function(){e(this).bind("swipe",e.noop)}},e.event.special.swiperight=e.event.special.swiperight||e.event.special.swipeleft}(jQuery);
1
+ !function(e){"use strict";document;e.event.special.swipe=e.event.special.swipe||{scrollSupressionThreshold:10,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var i=e(this);i.bind("touchstart",function(t){function s(i){if(r){var t=i.originalEvent.touches?i.originalEvent.touches[0]:i;o={time:(new Date).getTime(),coords:[t.pageX,t.pageY]},Math.abs(r.coords[0]-o.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&i.preventDefault()}}var o,n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r={time:(new Date).getTime(),coords:[n.pageX,n.pageY],origin:e(t.target)};i.bind("touchmove",s).one("touchend",function(t){i.unbind("touchmove",s),r&&o&&o.time-r.time<e.event.special.swipe.durationThreshold&&Math.abs(r.coords[0]-o.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(r.coords[1]-o.coords[1])<e.event.special.swipe.verticalDistanceThreshold&&r.origin.trigger("swipe").trigger(r.coords[0]>o.coords[0]?"swipeleft":"swiperight"),r=o=void 0})})}},e.event.special.swipeleft=e.event.special.swipeleft||{setup:function(){e(this).bind("swipe",e.noop)}},e.event.special.swiperight=e.event.special.swiperight||e.event.special.swipeleft}(jQuery);
js/jquery.touchSwipe.min.js CHANGED
@@ -1 +1 @@
1
- !function(n){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery.touchSwipe.js"],n):n(jQuery)}(function(n){"use strict";function e(e){return!e||void 0!==e.allowPageScroll||void 0===e.swipe&&void 0===e.swipeStatus||(e.allowPageScroll=c),void 0!==e.click&&void 0===e.tap&&(e.tap=e.click),e||(e={}),e=n.extend({},n.fn.swipe.defaults,e),this.each(function(){var r=n(this),i=r.data(P);i||(i=new t(this,e),r.data(P,i))})}function t(e,t){function D(e){if(!(sn()||n(e.target).closest(t.excludedElements,Fn).length>0)){var r,i=e.originalEvent?e.originalEvent:e,o=O?i.touches[0]:i;return Vn=S,O?zn=i.touches.length:e.preventDefault(),jn=0,Hn=null,qn=null,_n=0,Qn=0,Cn=0,Xn=1,Yn=0,Gn=gn(),Wn=Tn(),an(),!O||zn===t.fingers||t.fingers===T||q()?(hn(0,o),Zn=Pn(),2==zn&&(hn(1,i.touches[1]),Qn=Cn=En(Gn[0].start,Gn[1].start)),(t.swipeStatus||t.pinchStatus)&&(r=U(i,Vn))):r=!1,r===!1?(Vn=y,U(i,Vn),r):(t.hold&&(ee=setTimeout(n.proxy(function(){Fn.trigger("hold",[i.target]),t.hold&&(r=t.hold.call(Fn,i,i.target))},this),t.longTapThreshold)),pn(!0),null)}}function L(n){var e=n.originalEvent?n.originalEvent:n;if(Vn!==m&&Vn!==y&&!cn()){var r,i=O?e.touches[0]:e,o=fn(i);if(Bn=Pn(),O&&(zn=e.touches.length),t.hold&&clearTimeout(ee),Vn=E,2==zn&&(0==Qn?(hn(1,e.touches[1]),Qn=Cn=En(Gn[0].start,Gn[1].start)):(fn(e.touches[1]),Cn=En(Gn[0].end,Gn[1].end),qn=yn(Gn[0].end,Gn[1].end)),Xn=mn(Qn,Cn),Yn=Math.abs(Qn-Cn)),zn===t.fingers||t.fingers===T||!O||q()){if(Hn=Mn(o.start,o.end),X(n,Hn),jn=On(o.start,o.end),_n=Sn(),wn(Hn,jn),(t.swipeStatus||t.pinchStatus)&&(r=U(e,Vn)),!t.triggerOnTouchEnd||t.triggerOnTouchLeave){var u=!0;if(t.triggerOnTouchLeave){var l=Dn(this);u=Ln(o.end,l)}!t.triggerOnTouchEnd&&u?Vn=N(E):t.triggerOnTouchLeave&&!u&&(Vn=N(m)),Vn!=y&&Vn!=m||U(e,Vn)}}else Vn=y,U(e,Vn);r===!1&&(Vn=y,U(e,Vn))}}function R(n){var e=n.originalEvent;return O&&e.touches.length>0?(ln(),!0):(cn()&&(zn=Kn),Bn=Pn(),_n=Sn(),_()||!H()?(Vn=y,U(e,Vn)):t.triggerOnTouchEnd||0==t.triggerOnTouchEnd&&Vn===E?(n.preventDefault(),Vn=m,U(e,Vn)):!t.triggerOnTouchEnd&&B()?(Vn=m,j(e,Vn,f)):Vn===E&&(Vn=y,U(e,Vn)),pn(!1),null)}function k(){zn=0,Bn=0,Zn=0,Qn=0,Cn=0,Xn=1,an(),pn(!1)}function A(n){var e=n.originalEvent;t.triggerOnTouchLeave&&(Vn=N(m),U(e,Vn))}function I(){Fn.unbind(kn,D),Fn.unbind(Un,k),Fn.unbind(An,L),Fn.unbind(In,R),Nn&&Fn.unbind(Nn,A),pn(!1)}function N(n){var e=n,r=C(),i=H(),o=_();return!r||o?e=y:!i||n!=E||t.triggerOnTouchEnd&&!t.triggerOnTouchLeave?!i&&n==m&&t.triggerOnTouchLeave&&(e=y):e=m,e}function U(n,e){var t=void 0;return z()||V()||W()||q()?((z()||V())&&(t=j(n,e,p)),(W()||q())&&t!==!1&&(t=j(n,e,h))):on()&&t!==!1?t=j(n,e,d):un()&&t!==!1?t=j(n,e,g):rn()&&t!==!1&&(t=j(n,e,f)),e===y&&k(n),e===m&&(O?0==n.touches.length&&k(n):k(n)),t}function j(e,c,s){var w=void 0;if(s==p){if(Fn.trigger("swipeStatus",[c,Hn||null,jn||0,_n||0,zn,Gn]),t.swipeStatus&&(w=t.swipeStatus.call(Fn,e,c,Hn||null,jn||0,_n||0,zn,Gn),w===!1))return!1;if(c==m&&F()){if(Fn.trigger("swipe",[Hn,jn,_n,zn,Gn]),t.swipe&&(w=t.swipe.call(Fn,e,Hn,jn,_n,zn,Gn),w===!1))return!1;switch(Hn){case r:Fn.trigger("swipeLeft",[Hn,jn,_n,zn,Gn]),t.swipeLeft&&(w=t.swipeLeft.call(Fn,e,Hn,jn,_n,zn,Gn));break;case i:Fn.trigger("swipeRight",[Hn,jn,_n,zn,Gn]),t.swipeRight&&(w=t.swipeRight.call(Fn,e,Hn,jn,_n,zn,Gn));break;case o:Fn.trigger("swipeUp",[Hn,jn,_n,zn,Gn]),t.swipeUp&&(w=t.swipeUp.call(Fn,e,Hn,jn,_n,zn,Gn));break;case u:Fn.trigger("swipeDown",[Hn,jn,_n,zn,Gn]),t.swipeDown&&(w=t.swipeDown.call(Fn,e,Hn,jn,_n,zn,Gn))}}}if(s==h){if(Fn.trigger("pinchStatus",[c,qn||null,Yn||0,_n||0,zn,Xn,Gn]),t.pinchStatus&&(w=t.pinchStatus.call(Fn,e,c,qn||null,Yn||0,_n||0,zn,Xn,Gn),w===!1))return!1;if(c==m&&Y())switch(qn){case l:Fn.trigger("pinchIn",[qn||null,Yn||0,_n||0,zn,Xn,Gn]),t.pinchIn&&(w=t.pinchIn.call(Fn,e,qn||null,Yn||0,_n||0,zn,Xn,Gn));break;case a:Fn.trigger("pinchOut",[qn||null,Yn||0,_n||0,zn,Xn,Gn]),t.pinchOut&&(w=t.pinchOut.call(Fn,e,qn||null,Yn||0,_n||0,zn,Xn,Gn))}}return s==f?c!==y&&c!==m||(clearTimeout(ne),clearTimeout(ee),J()&&!nn()?($n=Pn(),ne=setTimeout(n.proxy(function(){$n=null,Fn.trigger("tap",[e.target]),t.tap&&(w=t.tap.call(Fn,e,e.target))},this),t.doubleTapThreshold)):($n=null,Fn.trigger("tap",[e.target]),t.tap&&(w=t.tap.call(Fn,e,e.target)))):s==d?c!==y&&c!==m||(clearTimeout(ne),$n=null,Fn.trigger("doubletap",[e.target]),t.doubleTap&&(w=t.doubleTap.call(Fn,e,e.target))):s==g&&(c!==y&&c!==m||(clearTimeout(ne),$n=null,Fn.trigger("longtap",[e.target]),t.longTap&&(w=t.longTap.call(Fn,e,e.target)))),w}function H(){var n=!0;return null!==t.threshold&&(n=jn>=t.threshold),n}function _(){var n=!1;return null!==t.cancelThreshold&&null!==Hn&&(n=vn(Hn)-jn>=t.cancelThreshold),n}function Q(){return null===t.pinchThreshold||Yn>=t.pinchThreshold}function C(){var n;return n=!t.maxTimeThreshold||!(_n>=t.maxTimeThreshold)}function X(n,e){if(t.preventDefaultEvents!==!1)if(t.allowPageScroll===c)n.preventDefault();else{var l=t.allowPageScroll===s;switch(e){case r:(t.swipeLeft&&l||!l&&t.allowPageScroll!=w)&&n.preventDefault();break;case i:(t.swipeRight&&l||!l&&t.allowPageScroll!=w)&&n.preventDefault();break;case o:(t.swipeUp&&l||!l&&t.allowPageScroll!=v)&&n.preventDefault();break;case u:(t.swipeDown&&l||!l&&t.allowPageScroll!=v)&&n.preventDefault()}}}function Y(){var n=G(),e=Z(),t=Q();return n&&e&&t}function q(){return!!(t.pinchStatus||t.pinchIn||t.pinchOut)}function W(){return!(!Y()||!q())}function F(){var n=C(),e=H(),t=G(),r=Z(),i=_(),o=!i&&r&&t&&e&&n;return o}function V(){return!!(t.swipe||t.swipeStatus||t.swipeLeft||t.swipeRight||t.swipeUp||t.swipeDown)}function z(){return!(!F()||!V())}function G(){return zn===t.fingers||t.fingers===T||!O}function Z(){return 0!==Gn[0].end.x}function B(){return!!t.tap}function J(){return!!t.doubleTap}function K(){return!!t.longTap}function $(){if(null==$n)return!1;var n=Pn();return J()&&n-$n<=t.doubleTapThreshold}function nn(){return $()}function en(){return(1===zn||!O)&&(isNaN(jn)||jn<t.threshold)}function tn(){return _n>t.longTapThreshold&&jn<b}function rn(){return!(!en()||!B())}function on(){return!(!$()||!J())}function un(){return!(!tn()||!K())}function ln(){Jn=Pn(),Kn=event.touches.length+1}function an(){Jn=0,Kn=0}function cn(){var n=!1;if(Jn){var e=Pn()-Jn;e<=t.fingerReleaseThreshold&&(n=!0)}return n}function sn(){return!(Fn.data(P+"_intouch")!==!0)}function pn(n){n===!0?(Fn.bind(An,L),Fn.bind(In,R),Nn&&Fn.bind(Nn,A)):(Fn.unbind(An,L,!1),Fn.unbind(In,R,!1),Nn&&Fn.unbind(Nn,A,!1)),Fn.data(P+"_intouch",n===!0)}function hn(n,e){var t=void 0!==e.identifier?e.identifier:0;return Gn[n].identifier=t,Gn[n].start.x=Gn[n].end.x=e.pageX||e.clientX,Gn[n].start.y=Gn[n].end.y=e.pageY||e.clientY,Gn[n]}function fn(n){var e=void 0!==n.identifier?n.identifier:0,t=dn(e);return t.end.x=n.pageX||n.clientX,t.end.y=n.pageY||n.clientY,t}function dn(n){for(var e=0;e<Gn.length;e++)if(Gn[e].identifier==n)return Gn[e]}function gn(){for(var n=[],e=0;e<=5;e++)n.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return n}function wn(n,e){e=Math.max(e,vn(n)),Wn[n].distance=e}function vn(n){if(Wn[n])return Wn[n].distance}function Tn(){var n={};return n[r]=bn(r),n[i]=bn(i),n[o]=bn(o),n[u]=bn(u),n}function bn(n){return{direction:n,distance:0}}function Sn(){return Bn-Zn}function En(n,e){var t=Math.abs(n.x-e.x),r=Math.abs(n.y-e.y);return Math.round(Math.sqrt(t*t+r*r))}function mn(n,e){var t=e/n*1;return t.toFixed(2)}function yn(){return Xn<1?a:l}function On(n,e){return Math.round(Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)))}function xn(n,e){var t=n.x-e.x,r=e.y-n.y,i=Math.atan2(r,t),o=Math.round(180*i/Math.PI);return o<0&&(o=360-Math.abs(o)),o}function Mn(n,e){var t=xn(n,e);return t<=45&&t>=0?r:t<=360&&t>=315?r:t>=135&&t<=225?i:t>45&&t<135?u:o}function Pn(){var n=new Date;return n.getTime()}function Dn(e){e=n(e);var t=e.offset(),r={left:t.left,right:t.left+e.outerWidth(),top:t.top,bottom:t.top+e.outerHeight()};return r}function Ln(n,e){return n.x>e.left&&n.x<e.right&&n.y>e.top&&n.y<e.bottom}var Rn=O||M||!t.fallbackToMouseEvents,kn=Rn?M?x?"MSPointerDown":"pointerdown":"touchstart":"mousedown",An=Rn?M?x?"MSPointerMove":"pointermove":"touchmove":"mousemove",In=Rn?M?x?"MSPointerUp":"pointerup":"touchend":"mouseup",Nn=Rn?null:"mouseleave",Un=M?x?"MSPointerCancel":"pointercancel":"touchcancel",jn=0,Hn=null,_n=0,Qn=0,Cn=0,Xn=1,Yn=0,qn=0,Wn=null,Fn=n(e),Vn="start",zn=0,Gn=null,Zn=0,Bn=0,Jn=0,Kn=0,$n=0,ne=null,ee=null;try{Fn.bind(kn,D),Fn.bind(Un,k)}catch(te){n.error("events not supported "+kn+","+Un+" on jQuery.swipe")}this.enable=function(){return Fn.bind(kn,D),Fn.bind(Un,k),Fn},this.disable=function(){return I(),Fn},this.destroy=function(){I(),Fn.data(P,null),Fn=null},this.option=function(e,r){if(void 0!==t[e]){if(void 0===r)return t[e];t[e]=r}else n.error("Option "+e+" does not exist on jQuery.swipe.options");return null}}var r="left",i="right",o="up",u="down",l="in",a="out",c="none",s="auto",p="swipe",h="pinch",f="tap",d="doubletap",g="longtap",w="horizontal",v="vertical",T="all",b=10,S="start",E="move",m="end",y="cancel",O="ontouchstart"in window,x=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,M=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,P="TouchSwipe",D={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:!0};n.fn.swipe=function(t){var r=n(this),i=r.data(P);if(i&&"string"==typeof t){if(i[t])return i[t].apply(this,Array.prototype.slice.call(arguments,1));n.error("Method "+t+" does not exist on jQuery.swipe")}else if(!(i||"object"!=typeof t&&t))return e.apply(this,arguments);return r},n.fn.swipe.defaults=D,n.fn.swipe.phases={PHASE_START:S,PHASE_MOVE:E,PHASE_END:m,PHASE_CANCEL:y},n.fn.swipe.directions={LEFT:r,RIGHT:i,UP:o,DOWN:u,IN:l,OUT:a},n.fn.swipe.pageScroll={NONE:c,HORIZONTAL:w,VERTICAL:v,AUTO:s},n.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:T}});
1
+ !function(n){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery.touchSwipe.js"],n):n(jQuery)}(function(n){"use strict";function e(e){return!e||void 0!==e.allowPageScroll||void 0===e.swipe&&void 0===e.swipeStatus||(e.allowPageScroll=c),void 0!==e.click&&void 0===e.tap&&(e.tap=e.click),e||(e={}),e=n.extend({},n.fn.swipe.defaults,e),this.each(function(){var r=n(this),i=r.data(P);i||(i=new t(this,e),r.data(P,i))})}function t(e,t){function D(e){if(!(sn()||n(e.target).closest(t.excludedElements,Fn).length>0)){var r,i=e.originalEvent?e.originalEvent:e,o=O?i.touches[0]:i;return Vn=S,(O?zn=i.touches.length:e.preventDefault(),jn=0,Hn=null,qn=null,_n=0,Qn=0,Cn=0,Xn=1,Yn=0,Gn=gn(),Wn=Tn(),an(),!O||zn===t.fingers||t.fingers===T||q()?(hn(0,o),Zn=Pn(),2==zn&&(hn(1,i.touches[1]),Qn=Cn=En(Gn[0].start,Gn[1].start)),(t.swipeStatus||t.pinchStatus)&&(r=U(i,Vn))):r=!1,!1===r)?(Vn=y,U(i,Vn),r):(t.hold&&(ee=setTimeout(n.proxy(function(){Fn.trigger("hold",[i.target]),t.hold&&(r=t.hold.call(Fn,i,i.target))},this),t.longTapThreshold)),pn(!0),null)}}function L(n){var e=n.originalEvent?n.originalEvent:n;if(Vn!==m&&Vn!==y&&!cn()){var r,i=O?e.touches[0]:e,o=fn(i);if(Bn=Pn(),O&&(zn=e.touches.length),t.hold&&clearTimeout(ee),Vn=E,2==zn&&(0==Qn?(hn(1,e.touches[1]),Qn=Cn=En(Gn[0].start,Gn[1].start)):(fn(e.touches[1]),Cn=En(Gn[0].end,Gn[1].end),qn=yn(Gn[0].end,Gn[1].end)),Xn=mn(Qn,Cn),Yn=Math.abs(Qn-Cn)),zn===t.fingers||t.fingers===T||!O||q()){if(Hn=Mn(o.start,o.end),X(n,Hn),jn=On(o.start,o.end),_n=Sn(),wn(Hn,jn),(t.swipeStatus||t.pinchStatus)&&(r=U(e,Vn)),!t.triggerOnTouchEnd||t.triggerOnTouchLeave){var u=!0;if(t.triggerOnTouchLeave){var l=Dn(this);u=Ln(o.end,l)}!t.triggerOnTouchEnd&&u?Vn=N(E):t.triggerOnTouchLeave&&!u&&(Vn=N(m)),Vn!=y&&Vn!=m||U(e,Vn)}}else Vn=y,U(e,Vn);!1===r&&(Vn=y,U(e,Vn))}}function R(n){var e=n.originalEvent;return O&&e.touches.length>0?(ln(),!0):(cn()&&(zn=Kn),Bn=Pn(),_n=Sn(),_()||!H()?(Vn=y,U(e,Vn)):t.triggerOnTouchEnd||0==t.triggerOnTouchEnd&&Vn===E?(n.preventDefault(),Vn=m,U(e,Vn)):!t.triggerOnTouchEnd&&B()?(Vn=m,j(e,Vn,f)):Vn===E&&(Vn=y,U(e,Vn)),pn(!1),null)}function k(){zn=0,Bn=0,Zn=0,Qn=0,Cn=0,Xn=1,an(),pn(!1)}function A(n){var e=n.originalEvent;t.triggerOnTouchLeave&&(Vn=N(m),U(e,Vn))}function I(){Fn.unbind(kn,D),Fn.unbind(Un,k),Fn.unbind(An,L),Fn.unbind(In,R),Nn&&Fn.unbind(Nn,A),pn(!1)}function N(n){var e=n,r=C(),i=H(),o=_();return!r||o?e=y:!i||n!=E||t.triggerOnTouchEnd&&!t.triggerOnTouchLeave?!i&&n==m&&t.triggerOnTouchLeave&&(e=y):e=m,e}function U(n,e){var t=void 0;return z()||V()||W()||q()?((z()||V())&&(t=j(n,e,p)),(W()||q())&&!1!==t&&(t=j(n,e,h))):on()&&!1!==t?t=j(n,e,d):un()&&!1!==t?t=j(n,e,g):rn()&&!1!==t&&(t=j(n,e,f)),e===y&&k(n),e===m&&(O?0==n.touches.length&&k(n):k(n)),t}function j(e,c,s){var w=void 0;if(s==p){if(Fn.trigger("swipeStatus",[c,Hn||null,jn||0,_n||0,zn,Gn]),t.swipeStatus&&!1===(w=t.swipeStatus.call(Fn,e,c,Hn||null,jn||0,_n||0,zn,Gn)))return!1;if(c==m&&F()){if(Fn.trigger("swipe",[Hn,jn,_n,zn,Gn]),t.swipe&&!1===(w=t.swipe.call(Fn,e,Hn,jn,_n,zn,Gn)))return!1;switch(Hn){case r:Fn.trigger("swipeLeft",[Hn,jn,_n,zn,Gn]),t.swipeLeft&&(w=t.swipeLeft.call(Fn,e,Hn,jn,_n,zn,Gn));break;case i:Fn.trigger("swipeRight",[Hn,jn,_n,zn,Gn]),t.swipeRight&&(w=t.swipeRight.call(Fn,e,Hn,jn,_n,zn,Gn));break;case o:Fn.trigger("swipeUp",[Hn,jn,_n,zn,Gn]),t.swipeUp&&(w=t.swipeUp.call(Fn,e,Hn,jn,_n,zn,Gn));break;case u:Fn.trigger("swipeDown",[Hn,jn,_n,zn,Gn]),t.swipeDown&&(w=t.swipeDown.call(Fn,e,Hn,jn,_n,zn,Gn))}}}if(s==h){if(Fn.trigger("pinchStatus",[c,qn||null,Yn||0,_n||0,zn,Xn,Gn]),t.pinchStatus&&!1===(w=t.pinchStatus.call(Fn,e,c,qn||null,Yn||0,_n||0,zn,Xn,Gn)))return!1;if(c==m&&Y())switch(qn){case l:Fn.trigger("pinchIn",[qn||null,Yn||0,_n||0,zn,Xn,Gn]),t.pinchIn&&(w=t.pinchIn.call(Fn,e,qn||null,Yn||0,_n||0,zn,Xn,Gn));break;case a:Fn.trigger("pinchOut",[qn||null,Yn||0,_n||0,zn,Xn,Gn]),t.pinchOut&&(w=t.pinchOut.call(Fn,e,qn||null,Yn||0,_n||0,zn,Xn,Gn))}}return s==f?c!==y&&c!==m||(clearTimeout(ne),clearTimeout(ee),J()&&!nn()?($n=Pn(),ne=setTimeout(n.proxy(function(){$n=null,Fn.trigger("tap",[e.target]),t.tap&&(w=t.tap.call(Fn,e,e.target))},this),t.doubleTapThreshold)):($n=null,Fn.trigger("tap",[e.target]),t.tap&&(w=t.tap.call(Fn,e,e.target)))):s==d?c!==y&&c!==m||(clearTimeout(ne),$n=null,Fn.trigger("doubletap",[e.target]),t.doubleTap&&(w=t.doubleTap.call(Fn,e,e.target))):s==g&&(c!==y&&c!==m||(clearTimeout(ne),$n=null,Fn.trigger("longtap",[e.target]),t.longTap&&(w=t.longTap.call(Fn,e,e.target)))),w}function H(){var n=!0;return null!==t.threshold&&(n=jn>=t.threshold),n}function _(){var n=!1;return null!==t.cancelThreshold&&null!==Hn&&(n=vn(Hn)-jn>=t.cancelThreshold),n}function Q(){return null===t.pinchThreshold||Yn>=t.pinchThreshold}function C(){return!t.maxTimeThreshold||!(_n>=t.maxTimeThreshold)}function X(n,e){if(!1!==t.preventDefaultEvents)if(t.allowPageScroll===c)n.preventDefault();else{var l=t.allowPageScroll===s;switch(e){case r:(t.swipeLeft&&l||!l&&t.allowPageScroll!=w)&&n.preventDefault();break;case i:(t.swipeRight&&l||!l&&t.allowPageScroll!=w)&&n.preventDefault();break;case o:(t.swipeUp&&l||!l&&t.allowPageScroll!=v)&&n.preventDefault();break;case u:(t.swipeDown&&l||!l&&t.allowPageScroll!=v)&&n.preventDefault()}}}function Y(){var n=G(),e=Z(),t=Q();return n&&e&&t}function q(){return!!(t.pinchStatus||t.pinchIn||t.pinchOut)}function W(){return!(!Y()||!q())}function F(){var n=C(),e=H(),t=G(),r=Z();return!_()&&r&&t&&e&&n}function V(){return!!(t.swipe||t.swipeStatus||t.swipeLeft||t.swipeRight||t.swipeUp||t.swipeDown)}function z(){return!(!F()||!V())}function G(){return zn===t.fingers||t.fingers===T||!O}function Z(){return 0!==Gn[0].end.x}function B(){return!!t.tap}function J(){return!!t.doubleTap}function K(){return!!t.longTap}function $(){if(null==$n)return!1;var n=Pn();return J()&&n-$n<=t.doubleTapThreshold}function nn(){return $()}function en(){return(1===zn||!O)&&(isNaN(jn)||jn<t.threshold)}function tn(){return _n>t.longTapThreshold&&jn<b}function rn(){return!(!en()||!B())}function on(){return!(!$()||!J())}function un(){return!(!tn()||!K())}function ln(){Jn=Pn(),Kn=event.touches.length+1}function an(){Jn=0,Kn=0}function cn(){var n=!1;if(Jn){Pn()-Jn<=t.fingerReleaseThreshold&&(n=!0)}return n}function sn(){return!(!0!==Fn.data(P+"_intouch"))}function pn(n){!0===n?(Fn.bind(An,L),Fn.bind(In,R),Nn&&Fn.bind(Nn,A)):(Fn.unbind(An,L,!1),Fn.unbind(In,R,!1),Nn&&Fn.unbind(Nn,A,!1)),Fn.data(P+"_intouch",!0===n)}function hn(n,e){var t=void 0!==e.identifier?e.identifier:0;return Gn[n].identifier=t,Gn[n].start.x=Gn[n].end.x=e.pageX||e.clientX,Gn[n].start.y=Gn[n].end.y=e.pageY||e.clientY,Gn[n]}function fn(n){var e=void 0!==n.identifier?n.identifier:0,t=dn(e);return t.end.x=n.pageX||n.clientX,t.end.y=n.pageY||n.clientY,t}function dn(n){for(var e=0;e<Gn.length;e++)if(Gn[e].identifier==n)return Gn[e]}function gn(){for(var n=[],e=0;e<=5;e++)n.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return n}function wn(n,e){e=Math.max(e,vn(n)),Wn[n].distance=e}function vn(n){if(Wn[n])return Wn[n].distance}function Tn(){var n={};return n[r]=bn(r),n[i]=bn(i),n[o]=bn(o),n[u]=bn(u),n}function bn(n){return{direction:n,distance:0}}function Sn(){return Bn-Zn}function En(n,e){var t=Math.abs(n.x-e.x),r=Math.abs(n.y-e.y);return Math.round(Math.sqrt(t*t+r*r))}function mn(n,e){return(e/n*1).toFixed(2)}function yn(){return Xn<1?a:l}function On(n,e){return Math.round(Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)))}function xn(n,e){var t=n.x-e.x,r=e.y-n.y,i=Math.atan2(r,t),o=Math.round(180*i/Math.PI);return o<0&&(o=360-Math.abs(o)),o}function Mn(n,e){var t=xn(n,e);return t<=45&&t>=0?r:t<=360&&t>=315?r:t>=135&&t<=225?i:t>45&&t<135?u:o}function Pn(){return(new Date).getTime()}function Dn(e){e=n(e);var t=e.offset();return{left:t.left,right:t.left+e.outerWidth(),top:t.top,bottom:t.top+e.outerHeight()}}function Ln(n,e){return n.x>e.left&&n.x<e.right&&n.y>e.top&&n.y<e.bottom}var Rn=O||M||!t.fallbackToMouseEvents,kn=Rn?M?x?"MSPointerDown":"pointerdown":"touchstart":"mousedown",An=Rn?M?x?"MSPointerMove":"pointermove":"touchmove":"mousemove",In=Rn?M?x?"MSPointerUp":"pointerup":"touchend":"mouseup",Nn=Rn?null:"mouseleave",Un=M?x?"MSPointerCancel":"pointercancel":"touchcancel",jn=0,Hn=null,_n=0,Qn=0,Cn=0,Xn=1,Yn=0,qn=0,Wn=null,Fn=n(e),Vn="start",zn=0,Gn=null,Zn=0,Bn=0,Jn=0,Kn=0,$n=0,ne=null,ee=null;try{Fn.bind(kn,D),Fn.bind(Un,k)}catch(e){n.error("events not supported "+kn+","+Un+" on jQuery.swipe")}this.enable=function(){return Fn.bind(kn,D),Fn.bind(Un,k),Fn},this.disable=function(){return I(),Fn},this.destroy=function(){I(),Fn.data(P,null),Fn=null},this.option=function(e,r){if(void 0!==t[e]){if(void 0===r)return t[e];t[e]=r}else n.error("Option "+e+" does not exist on jQuery.swipe.options");return null}}var r="left",i="right",o="up",u="down",l="in",a="out",c="none",s="auto",p="swipe",h="pinch",f="tap",d="doubletap",g="longtap",w="horizontal",v="vertical",T="all",b=10,S="start",E="move",m="end",y="cancel",O="ontouchstart"in window,x=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,M=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,P="TouchSwipe",D={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:!0};n.fn.swipe=function(t){var r=n(this),i=r.data(P);if(i&&"string"==typeof t){if(i[t])return i[t].apply(this,Array.prototype.slice.call(arguments,1));n.error("Method "+t+" does not exist on jQuery.swipe")}else if(!(i||"object"!=typeof t&&t))return e.apply(this,arguments);return r},n.fn.swipe.defaults=D,n.fn.swipe.phases={PHASE_START:S,PHASE_MOVE:E,PHASE_END:m,PHASE_CANCEL:y},n.fn.swipe.directions={LEFT:r,RIGHT:i,UP:o,DOWN:u,IN:l,OUT:a},n.fn.swipe.pageScroll={NONE:c,HORIZONTAL:w,VERTICAL:v,AUTO:s},n.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:T}});
js/lib/imagesloaded.pkgd.min.js CHANGED
@@ -1 +1 @@
1
- (function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),s="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&t(r[i],n)===-1&&r[i].push(s?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,s=this.getListenersAsObject(e);for(r in s)s.hasOwnProperty(r)&&(i=t(s[r],n),i!==-1&&s[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,s=e?this.removeListener:this.addListener,o=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)s.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?s.call(this,i,r):o.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,s,o=this.getListenersAsObject(e);for(r in o)if(o.hasOwnProperty(r))for(i=o[r].length;i--;)n=o[r][i],n.once===!0&&this.removeListener(e,n.listener),s=n.listener.apply(this,t||[]),s===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=s,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var s={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",s):e.eventie=s}(this),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"==f.call(e)}function s(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0;n<e.length;n++)t.push(e[n]);else t.push(e);return t}function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=s(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),u&&(this.jqDeferred=new u.Deferred);var r=this;setTimeout(function(){r.check()})}function h(e){this.img=e}function a(e,t){this.url=e,this.element=t,this.img=new Image}var u=e.jQuery,c=e.console,f=Object.prototype.toString;o.prototype=new t,o.prototype.options={},o.prototype.getImages=function(){this.images=[];for(var e=0;e<this.elements.length;e++){var t=this.elements[e];this.addElementImages(t)}},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&d[t]){for(var n=e.querySelectorAll("img"),i=0;i<n.length;i++){var r=n[i];this.addImage(r)}if("string"==typeof this.options.background){var s=e.querySelectorAll(this.options.background);for(i=0;i<s.length;i++){var o=s[i];this.addElementBackgroundImages(o)}}}};var d={1:!0,9:!0,11:!0};o.prototype.addElementBackgroundImages=function(e){for(var t=l(e),n=/url\(['"]*([^'"\)]+)['"]*\)/gi,i=n.exec(t.backgroundImage);null!==i;){var r=i&&i[1];r&&this.addBackground(r,e),i=n.exec(t.backgroundImage)}};var l=e.getComputedStyle||function(e){return e.currentStyle};return o.prototype.addImage=function(e){var t=new h(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var n=new a(e,t);this.images.push(n)},o.prototype.check=function(){function e(e,n,i){setTimeout(function(){t.progress(e,n,i)})}var t=this;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();for(var n=0;n<this.images.length;n++){var i=this.images[n];i.once("progress",e),i.check()}},o.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emit("progress",this,e,t),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&c&&c.log("progress: "+n,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emit(e,this),this.emit("always",this),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=new t,h.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,n.bind(this.proxyImage,"load",this),n.bind(this.proxyImage,"error",this),n.bind(this.img,"load",this),n.bind(this.img,"error",this),void(this.proxyImage.src=this.img.src))},h.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},h.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("progress",this,this.img,t)},h.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){n.unbind(this.proxyImage,"load",this),n.unbind(this.proxyImage,"error",this),n.unbind(this.img,"load",this),n.unbind(this.img,"error",this)},a.prototype=new h,a.prototype.check=function(){n.bind(this.img,"load",this),n.bind(this.img,"error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},a.prototype.unbindEvents=function(){n.unbind(this.img,"load",this),n.unbind(this.img,"error",this)},a.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("progress",this,this.element,t)},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(u=t,u.fn.imagesLoaded=function(e,t){var n=new o(this,e,t);return n.jqDeferred.promise(u(this))})},o.makeJQueryPlugin(),o});
1
+ (function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),s="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(s?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,s=this.getListenersAsObject(e);for(r in s)s.hasOwnProperty(r)&&-1!==(i=t(s[r],n))&&s[r].splice(i,1);return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,s=e?this.removeListener:this.addListener,o=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)s.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?s.call(this,i,r):o.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],!0===n.once&&this.removeListener(e,n.listener),n.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=s,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var s={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",s):e.eventie=s}(this),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"==f.call(e)}function s(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0;n<e.length;n++)t.push(e[n]);else t.push(e);return t}function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=s(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),u&&(this.jqDeferred=new u.Deferred);var r=this;setTimeout(function(){r.check()})}function h(e){this.img=e}function a(e,t){this.url=e,this.element=t,this.img=new Image}var u=e.jQuery,c=e.console,f=Object.prototype.toString;o.prototype=new t,o.prototype.options={},o.prototype.getImages=function(){this.images=[];for(var e=0;e<this.elements.length;e++){var t=this.elements[e];this.addElementImages(t)}},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),!0===this.options.background&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&d[t]){for(var n=e.querySelectorAll("img"),i=0;i<n.length;i++){var r=n[i];this.addImage(r)}if("string"==typeof this.options.background){var s=e.querySelectorAll(this.options.background);for(i=0;i<s.length;i++){var o=s[i];this.addElementBackgroundImages(o)}}}};var d={1:!0,9:!0,11:!0};o.prototype.addElementBackgroundImages=function(e){for(var t=l(e),n=/url\(['"]*([^'"\)]+)['"]*\)/gi,i=n.exec(t.backgroundImage);null!==i;){var r=i&&i[1];r&&this.addBackground(r,e),i=n.exec(t.backgroundImage)}};var l=e.getComputedStyle||function(e){return e.currentStyle};return o.prototype.addImage=function(e){var t=new h(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var n=new a(e,t);this.images.push(n)},o.prototype.check=function(){function e(e,n,i){setTimeout(function(){t.progress(e,n,i)})}var t=this;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();for(var n=0;n<this.images.length;n++){var i=this.images[n];i.once("progress",e),i.check()}},o.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emit("progress",this,e,t),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&c&&c.log("progress: "+n,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emit(e,this),this.emit("always",this),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=new t,h.prototype.check=function(){if(this.getIsImageComplete())return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");this.proxyImage=new Image,n.bind(this.proxyImage,"load",this),n.bind(this.proxyImage,"error",this),n.bind(this.img,"load",this),n.bind(this.img,"error",this),this.proxyImage.src=this.img.src},h.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},h.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("progress",this,this.img,t)},h.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){n.unbind(this.proxyImage,"load",this),n.unbind(this.proxyImage,"error",this),n.unbind(this.img,"load",this),n.unbind(this.img,"error",this)},a.prototype=new h,a.prototype.check=function(){n.bind(this.img,"load",this),n.bind(this.img,"error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},a.prototype.unbindEvents=function(){n.unbind(this.img,"load",this),n.unbind(this.img,"error",this)},a.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("progress",this,this.element,t)},o.makeJQueryPlugin=function(t){(t=t||e.jQuery)&&(u=t,u.fn.imagesLoaded=function(e,t){return new o(this,e,t).jqDeferred.promise(u(this))})},o.makeJQueryPlugin(),o});
js/lib/packery.pkgd.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function o(e,i){t.fn[e]=function(o){if("string"==typeof o){for(var s=n.call(arguments,1),a=0,h=this.length;a<h;a++){var p=this[a],u=t.data(p,e);if(u)if(t.isFunction(u[o])&&"_"!==o.charAt(0)){var c=u[o].apply(u,s);if(void 0!==c)return c}else r("no such method '"+o+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; attempted to call '"+o+"'")}return this}return this.each(function(){var n=t.data(this,e);n?(n.option(o),n._init()):(n=new i(this,o),t.data(this,e,n))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),o(t,e)},t.bridget}}var n=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i("object"==typeof exports?require("jquery"):t.jQuery)}(window),function(t){function e(t){return new RegExp("(^|\\s+)"+t+"(\\s+|$)")}function i(t,e){var i=n(t,e)?r:o;i(t,e)}var n,o,r;"classList"in document.documentElement?(n=function(t,e){return t.classList.contains(e)},o=function(t,e){t.classList.add(e)},r=function(t,e){t.classList.remove(e)}):(n=function(t,i){return e(i).test(t.className)},o=function(t,e){n(t,e)||(t.className=t.className+" "+e)},r=function(t,i){t.className=t.className.replace(e(i)," ")});var s={hasClass:n,addClass:o,removeClass:r,toggleClass:i,has:n,add:o,remove:r,toggle:i};"function"==typeof define&&define.amd?define("classie/classie",s):"object"==typeof exports?module.exports=s:t.classie=s}(window),function(t){function e(t){if(t){if("string"==typeof n[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,o=0,r=i.length;o<r;o++)if(e=i[o]+t,"string"==typeof n[e])return e}}var i="Webkit Moz ms Ms O".split(" "),n=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t,e){function i(t){var e=parseFloat(t),i=t.indexOf("%")===-1&&!isNaN(e);return i&&e}function n(){}function o(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=a.length;e<i;e++){var n=a[e];t[n]=0}return t}function r(e){function n(){if(!d){d=!0;var n=t.getComputedStyle;if(p=function(){var t=n?function(t){return n(t,null)}:function(t){return t.currentStyle};return function(e){var i=t(e);return i||s("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),i}}(),u=e("boxSizing")){var o=document.createElement("div");o.style.width="200px",o.style.padding="1px 2px 3px 4px",o.style.borderStyle="solid",o.style.borderWidth="1px 2px 3px 4px",o.style[u]="border-box";var r=document.body||document.documentElement;r.appendChild(o);var a=p(o);c=200===i(a.width),r.removeChild(o)}}}function r(t){if(n(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var e=p(t);if("none"===e.display)return o();var r={};r.width=t.offsetWidth,r.height=t.offsetHeight;for(var s=r.isBorderBox=!(!u||!e[u]||"border-box"!==e[u]),d=0,l=a.length;d<l;d++){var f=a[d],y=e[f];y=h(t,y);var m=parseFloat(y);r[f]=isNaN(m)?0:m}var g=r.paddingLeft+r.paddingRight,v=r.paddingTop+r.paddingBottom,x=r.marginLeft+r.marginRight,E=r.marginTop+r.marginBottom,b=r.borderLeftWidth+r.borderRightWidth,w=r.borderTopWidth+r.borderBottomWidth,_=s&&c,T=i(e.width);T!==!1&&(r.width=T+(_?0:g+b));var z=i(e.height);return z!==!1&&(r.height=z+(_?0:v+w)),r.innerWidth=r.width-(g+b),r.innerHeight=r.height-(v+w),r.outerWidth=r.width+x,r.outerHeight=r.height+E,r}}function h(e,i){if(t.getComputedStyle||i.indexOf("%")===-1)return i;var n=e.style,o=n.left,r=e.runtimeStyle,s=r&&r.left;return s&&(r.left=e.currentStyle.left),n.left=i,i=n.pixelLeft,n.left=o,s&&(r.left=s),i}var p,u,c,d=!1;return r}var s="undefined"==typeof console?n:function(t){console.error(t)},a=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],r):"object"==typeof exports?module.exports=r(require("desandro-get-style-property")):t.getSize=r(t.getStyleProperty)}(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,n=function(){};i.addEventListener?n=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(n=function(t,i,n){t[i+n]=n.handleEvent?function(){var i=e(t);n.handleEvent.call(n,i)}:function(){var i=e(t);n.call(t,i)},t.attachEvent("on"+i,t[i+n])});var o=function(){};i.removeEventListener?o=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(o=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(n){t[e+i]=void 0}});var r={bind:n,unbind:o};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(window),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var n=t.prototype,o=this,r=o.EventEmitter;n.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp){e={};for(i in n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i])}else e=n[t]||(n[t]=[]);return e},n.flattenListeners=function(t){var e,i=[];for(e=0;e<t.length;e+=1)i.push(t[e].listener);return i},n.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},n.addListener=function(t,i){var n,o=this.getListenersAsObject(t),r="object"==typeof i;for(n in o)o.hasOwnProperty(n)&&e(o[n],i)===-1&&o[n].push(r?i:{listener:i,once:!1});return this},n.on=i("addListener"),n.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},n.once=i("addOnceListener"),n.defineEvent=function(t){return this.getListeners(t),this},n.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},n.removeListener=function(t,i){var n,o,r=this.getListenersAsObject(t);for(o in r)r.hasOwnProperty(o)&&(n=e(r[o],i),n!==-1&&r[o].splice(n,1));return this},n.off=i("removeListener"),n.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},n.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},n.manipulateListeners=function(t,e,i){var n,o,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(n=i.length;n--;)r.call(this,e,i[n]);else for(n in e)e.hasOwnProperty(n)&&(o=e[n])&&("function"==typeof o?r.call(this,n,o):s.call(this,n,o));return this},n.removeEvent=function(t){var e,i=typeof t,n=this._getEvents();if("string"===i)delete n[t];else if(t instanceof RegExp)for(e in n)n.hasOwnProperty(e)&&t.test(e)&&delete n[e];else delete this._events;return this},n.removeAllListeners=i("removeEvent"),n.emitEvent=function(t,e){var i,n,o,r,s=this.getListenersAsObject(t);for(o in s)if(s.hasOwnProperty(o))for(n=s[o].length;n--;)i=s[o][n],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},n.trigger=i("emitEvent"),n.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},n.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return o.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:o.EventEmitter=t}.call(this),function(t){function e(t){"function"==typeof t&&(e.isReady?t():s.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==r.readyState;e.isReady||i||n()}function n(){e.isReady=!0;for(var t=0,i=s.length;t<i;t++){var n=s[t];n()}}function o(o){return"complete"===r.readyState?n():(o.bind(r,"DOMContentLoaded",i),o.bind(r,"readystatechange",i),o.bind(t,"load",i)),e}var r=t.document,s=[];e.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],o):"object"==typeof exports?module.exports=o(require("eventie")):t.docReady=o(t.eventie)}(window),function(t){function e(t,e){return t[s](e)}function i(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function n(t,e){i(t);for(var n=t.parentNode.querySelectorAll(e),o=0,r=n.length;o<r;o++)if(n[o]===t)return!0;return!1}function o(t,n){return i(t),e(t,n)}var r,s=function(){if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0,n=e.length;i<n;i++){var o=e[i],r=o+"MatchesSelector";if(t[r])return r}}();if(s){var a=document.createElement("div"),h=e(a,"div");r=h?e:o}else r=n;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return r}):"object"==typeof exports?module.exports=r:window.matchesSelector=r}(Element.prototype),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("doc-ready"),require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.docReady,t.matchesSelector)}(window,function(t,e,i){var n={};n.extend=function(t,e){for(var i in e)t[i]=e[i];return t},n.modulo=function(t,e){return(t%e+e)%e};var o=Object.prototype.toString;n.isArray=function(t){return"[object Array]"==o.call(t)},n.makeArray=function(t){var e=[];if(n.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var i=0,o=t.length;i<o;i++)e.push(t[i]);else e.push(t);return e},n.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},n.removeFrom=function(t,e){var i=n.indexOf(t,e);i!=-1&&t.splice(i,1)},n.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1==t.nodeType&&"string"==typeof t.nodeName},n.setText=function(){function t(t,i){e=e||(void 0!==document.documentElement.textContent?"textContent":"innerText"),t[e]=i}var e;return t}(),n.getParent=function(t,e){for(;t!=document.body;)if(t=t.parentNode,i(t,e))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,e){t=n.makeArray(t);for(var o=[],r=0,s=t.length;r<s;r++){var a=t[r];if(n.isElement(a))if(e){i(a,e)&&o.push(a);for(var h=a.querySelectorAll(e),p=0,u=h.length;p<u;p++)o.push(h[p])}else o.push(a)}return o},n.debounceMethod=function(t,e,i){var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];t&&clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i||100)}},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var r=t.console;return n.htmlInit=function(i,o){e(function(){for(var e=n.toDashed(o),s=document.querySelectorAll(".js-"+e),a="data-"+e+"-options",h=0,p=s.length;h<p;h++){var u,c=s[h],d=c.getAttribute(a);try{u=d&&JSON.parse(d)}catch(l){r&&r.error("Error parsing "+a+" on "+c.nodeName.toLowerCase()+(c.id?"#"+c.id:"")+": "+l);continue}var f=new i(c,u),y=t.jQuery;y&&y.data(c,o,f)}})},n}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(t.Outlayer={},t.Outlayer.Item=e(t,t.EventEmitter,t.getSize,t.getStyleProperty,t.fizzyUIUtils))}(window,function(t,e,i,n,o){function r(t){for(var e in t)return!1;return e=null,!0}function s(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function a(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var h=t.getComputedStyle,p=h?function(t){return h(t,null)}:function(t){return t.currentStyle},u=n("transition"),c=n("transform"),d=u&&c,l=!!n("perspective"),f={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],y=["transform","transition","transitionDuration","transitionProperty"],m=function(){for(var t={},e=0,i=y.length;e<i;e++){var o=y[e],r=n(o);r&&r!==o&&(t[o]=r)}return t}();o.extend(s.prototype,e.prototype),s.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},s.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},s.prototype.getSize=function(){this.size=i(this.element)},s.prototype.css=function(t){var e=this.element.style;for(var i in t){var n=m[i]||i;e[n]=t[i]}},s.prototype.getPosition=function(){var t=p(this.element),e=this.layout.options,i=e.isOriginLeft,n=e.isOriginTop,o=t[i?"left":"right"],r=t[n?"top":"bottom"],s=this.layout.size,a=o.indexOf("%")!=-1?parseFloat(o)/100*s.width:parseInt(o,10),h=r.indexOf("%")!=-1?parseFloat(r)/100*s.height:parseInt(r,10);a=isNaN(a)?0:a,h=isNaN(h)?0:h,a-=i?s.paddingLeft:s.paddingRight,h-=n?s.paddingTop:s.paddingBottom,this.position.x=a,this.position.y=h},s.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={},n=e.isOriginLeft?"paddingLeft":"paddingRight",o=e.isOriginLeft?"left":"right",r=e.isOriginLeft?"right":"left",s=this.position.x+t[n];i[o]=this.getXValue(s),i[r]="";var a=e.isOriginTop?"paddingTop":"paddingBottom",h=e.isOriginTop?"top":"bottom",p=e.isOriginTop?"bottom":"top",u=this.position.y+t[a];i[h]=this.getYValue(u),i[p]="",this.css(i),this.emitEvent("layout",[this])},s.prototype.getXValue=function(t){var e=this.layout.options;return e.percentPosition&&!e.isHorizontal?t/this.layout.size.width*100+"%":t+"px"},s.prototype.getYValue=function(t){var e=this.layout.options;return e.percentPosition&&e.isHorizontal?t/this.layout.size.height*100+"%":t+"px"},s.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=parseInt(t,10),r=parseInt(e,10),s=o===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return void this.layoutPosition();var a=t-i,h=e-n,p={};p.transform=this.getTranslate(a,h),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},s.prototype.getTranslate=function(t,e){var i=this.layout.options;return t=i.isOriginLeft?t:-t,e=i.isOriginTop?e:-e,l?"translate3d("+t+"px, "+e+"px, 0)":"translate("+t+"px, "+e+"px)"},s.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},s.prototype.moveTo=d?s.prototype._transitionTo:s.prototype.goTo,s.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},s.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},s.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var g="opacity,"+a(m.transform||"transform");s.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:g,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(f,this,!1))},s.prototype.transition=s.prototype[u?"_transition":"_nonTransition"],s.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},s.prototype.onotransitionend=function(t){this.ontransitionend(t)};var v={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};s.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,i=v[t.propertyName]||t.propertyName;if(delete e.ingProperties[i],r(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd){var n=e.onEnd[i];n.call(this),delete e.onEnd[i]}this.emitEvent("transitionEnd",[this])}},s.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(f,this,!1),this.isTransitioning=!1},s.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var x={transitionProperty:"",transitionDuration:""};return s.prototype.removeTransitionStyles=function(){this.css(x)},s.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},s.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var t=this;this.once("transitionEnd",function(){t.removeElem()}),this.hide()},s.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},s.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},s.prototype.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},s.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},s.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},s.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r,s){return e(t,i,n,o,r,s)}):"object"==typeof exports?module.exports=e(t,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.eventie,t.EventEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o,r){function s(t,e){var i=o.getQueryElement(t);if(!i)return void(a&&a.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,h&&(this.$element=h(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++u;this.element.outlayerGUID=n,c[n]=this,this._create(),this.options.isInitLayout&&this.layout()}var a=t.console,h=t.jQuery,p=function(){},u=0,c={};return s.namespace="outlayer",s.Item=r,s.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},o.extend(s.prototype,i.prototype),s.prototype.option=function(t){o.extend(this.options,t)},s.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},s.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},s.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0,r=e.length;o<r;o++){var s=e[o],a=new i(s,this);n.push(a)}return n},s.prototype._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},s.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;e<i;e++)t.push(this.items[e].element);return t},s.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},s.prototype._init=s.prototype.layout,s.prototype._resetLayout=function(){this.getSize()},s.prototype.getSize=function(){this.size=n(this.element)},s.prototype._getMeasurement=function(t,e){var i,r=this.options[t];r?("string"==typeof r?i=this.element.querySelector(r):o.isElement(r)&&(i=r),this[t]=i?n(i)[e]:r):this[t]=0},s.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},s.prototype._getItemsForLayout=function(t){for(var e=[],i=0,n=t.length;i<n;i++){var o=t[i];o.isIgnored||e.push(o)}return e},s.prototype._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){for(var i=[],n=0,o=t.length;n<o;n++){var r=t[n],s=this._getItemLayoutPosition(r);s.item=r,s.isInstant=e||r.isLayoutInstant,i.push(s)}this._processLayoutQueue(i)}},s.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},s.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e];this._positionItem(n.item,n.x,n.y,n.isInstant)}},s.prototype._positionItem=function(t,e,i,n){n?t.goTo(e,i):t.moveTo(e,i)},s.prototype._postLayout=function(){this.resizeContainer()},s.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},s.prototype._getContainerSize=p,s.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},s.prototype._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s===r&&i()}var o=this,r=e.length;if(!e||!r)return void i();for(var s=0,a=0,h=e.length;a<h;a++){var p=e[a];p.once(t,n)}},s.prototype.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),h)if(this.$element=this.$element||h(this.element),e){var o=h.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},s.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},s.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},s.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;e<i;e++){var n=t[e];this.ignore(n)}}},s.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;e<i;e++){var n=t[e];o.removeFrom(this.stamps,n),this.unignore(n)}},s.prototype._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},s.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;t<e;t++){var i=this.stamps[t];this._manageStamp(i)}}},s.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},s.prototype._manageStamp=p,s.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=n(t),r={left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom};return r},s.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},s.prototype.bindResize=function(){this.isResizeBound||(e.bind(t,"resize",this),this.isResizeBound=!0)},s.prototype.unbindResize=function(){this.isResizeBound&&e.unbind(t,"resize",this),this.isResizeBound=!1},s.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},s.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},s.prototype.needsResizeLayout=function(){var t=n(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},s.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},s.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},s.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},s.prototype.reveal=function(t){this._emitCompleteOnItems("reveal",t);for(var e=t&&t.length,i=0;e&&i<e;i++){var n=t[i];n.reveal()}},s.prototype.hide=function(t){this._emitCompleteOnItems("hide",t);for(var e=t&&t.length,i=0;e&&i<e;i++){var n=t[i];n.hide()}},s.prototype.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},s.prototype.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},s.prototype.getItem=function(t){for(var e=0,i=this.items.length;e<i;e++){var n=this.items[e];if(n.element===t)return n}},s.prototype.getItems=function(t){t=o.makeArray(t);for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i],s=this.getItem(r);s&&e.push(s)}return e},s.prototype.remove=function(t){var e=this.getItems(t);if(this._emitCompleteOnItems("remove",e),e&&e.length)for(var i=0,n=e.length;i<n;i++){var r=e[i];r.remove(),o.removeFrom(this.items,r)}},s.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;e<i;e++){var n=this.items[e];n.destroy()}this.unbindResize();var o=this.element.outlayerGUID;delete c[o],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},s.create=function(t,e){function i(){s.apply(this,arguments)}return Object.create?i.prototype=Object.create(s.prototype):o.extend(i.prototype,s.prototype),i.prototype.constructor=i,i.defaults=o.extend({},s.defaults),o.extend(i.defaults,e),i.prototype.settings={},i.namespace=t,i.data=s.data,i.Item=function(){r.apply(this,arguments)},i.Item.prototype=new r,o.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i},s.Item=r,s}),function(t,e){"function"==typeof define&&define.amd?define("packery/js/rect",e):"object"==typeof exports?module.exports=e():(t.Packery=t.Packery||{},t.Packery.Rect=e())}(window,function(){function t(e){for(var i in t.defaults)this[i]=t.defaults[i];for(i in e)this[i]=e[i]}var e=window.Packery=function(){};return e.Rect=t,t.defaults={x:0,y:0,width:0,height:0},t.prototype.contains=function(t){var e=t.width||0,i=t.height||0;return this.x<=t.x&&this.y<=t.y&&this.x+this.width>=t.x+e&&this.y+this.height>=t.y+i},t.prototype.overlaps=function(t){var e=this.x+this.width,i=this.y+this.height,n=t.x+t.width,o=t.y+t.height;return this.x<n&&e>t.x&&this.y<o&&i>t.y},t.prototype.getMaximalFreeRects=function(e){if(!this.overlaps(e))return!1;var i,n=[],o=this.x+this.width,r=this.y+this.height,s=e.x+e.width,a=e.y+e.height;return this.y<e.y&&(i=new t({x:this.x,y:this.y,width:this.width,height:e.y-this.y}),n.push(i)),o>s&&(i=new t({x:s,y:this.y,width:o-s,height:this.height}),n.push(i)),r>a&&(i=new t({x:this.x,y:a,width:this.width,height:r-a}),n.push(i)),this.x<e.x&&(i=new t({x:this.x,y:this.y,width:e.x-this.x,height:this.height}),n.push(i)),n},t.prototype.canFit=function(t){return this.width>=t.width&&this.height>=t.height},t}),function(t,e){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],e);else if("object"==typeof exports)module.exports=e(require("./rect"));else{var i=t.Packery=t.Packery||{};i.Packer=e(i.Rect)}}(window,function(t){function e(t,e,i){this.width=t||0,this.height=e||0,this.sortDirection=i||"downwardLeftToRight",this.reset()}e.prototype.reset=function(){this.spaces=[],this.newSpaces=[];var e=new t({x:0,y:0,width:this.width,height:this.height});this.spaces.push(e),this.sorter=i[this.sortDirection]||i.downwardLeftToRight},e.prototype.pack=function(t){for(var e=0,i=this.spaces.length;e<i;e++){var n=this.spaces[e];if(n.canFit(t)){this.placeInSpace(t,n);break}}},e.prototype.placeInSpace=function(t,e){t.x=e.x,t.y=e.y,this.placed(t)},e.prototype.placed=function(t){for(var e=[],i=0,n=this.spaces.length;i<n;i++){var o=this.spaces[i],r=o.getMaximalFreeRects(t);r?e.push.apply(e,r):e.push(o)}this.spaces=e,this.mergeSortSpaces()},e.prototype.mergeSortSpaces=function(){e.mergeRects(this.spaces),this.spaces.sort(this.sorter)},e.prototype.addSpace=function(t){this.spaces.push(t),this.mergeSortSpaces()},e.mergeRects=function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e];if(n){var o=t.slice(0);o.splice(e,1);for(var r=0,s=0,a=o.length;s<a;s++){var h=o[s],p=e>s?0:1;n.contains(h)&&(t.splice(s+p-r,1),r++)}}}return t};var i={downwardLeftToRight:function(t,e){return t.y-e.y||t.x-e.x},rightwardTopToBottom:function(t,e){return t.x-e.x||t.y-e.y}};return e}),function(t,e){"function"==typeof define&&define.amd?define("packery/js/item",["get-style-property/get-style-property","outlayer/outlayer","./rect"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property"),require("outlayer"),require("./rect")):t.Packery.Item=e(t.getStyleProperty,t.Outlayer,t.Packery.Rect)}(window,function(t,e,i){var n=t("transform"),o=function(){e.Item.apply(this,arguments)};o.prototype=new e.Item;var r=o.prototype._create;return o.prototype._create=function(){r.call(this),this.rect=new i,this.placeRect=new i},o.prototype.dragStart=function(){this.getPosition(),this.removeTransitionStyles(),this.isTransitioning&&n&&(this.element.style[n]="none"),this.getSize(),this.isPlacing=!0,this.needsPositioning=!1,this.positionPlaceRect(this.position.x,this.position.y),this.isTransitioning=!1,this.didDrag=!1},o.prototype.dragMove=function(t,e){this.didDrag=!0;var i=this.layout.size;t-=i.paddingLeft,e-=i.paddingTop,this.positionPlaceRect(t,e)},o.prototype.dragStop=function(){this.getPosition();var t=this.position.x!=this.placeRect.x,e=this.position.y!=this.placeRect.y;this.needsPositioning=t||e,this.didDrag=!1},o.prototype.positionPlaceRect=function(t,e,i){this.placeRect.x=this.getPlaceRectCoord(t,!0),this.placeRect.y=this.getPlaceRectCoord(e,!1,i)},o.prototype.getPlaceRectCoord=function(t,e,i){var n=e?"Width":"Height",o=this.size["outer"+n],r=this.layout[e?"columnWidth":"rowHeight"],s=this.layout.size["inner"+n];e||(s=Math.max(s,this.layout.maxY),this.layout.rowHeight||(s-=this.layout.gutter));var a;if(r){r+=this.layout.gutter,s+=e?this.layout.gutter:0,t=Math.round(t/r);var h;h=this.layout.options.isHorizontal?e?"ceil":"floor":e?"floor":"ceil";var p=Math[h](s/r);p-=Math.ceil(o/r),a=p}else a=s-o;return t=i?t:Math.min(t,a),t*=r||1,Math.max(0,t)},o.prototype.copyPlaceRectPosition=function(){this.rect.x=this.placeRect.x,this.rect.y=this.placeRect.y},o.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},o}),function(t,e){"function"==typeof define&&define.amd?define(["classie/classie","get-size/get-size","outlayer/outlayer","packery/js/rect","packery/js/packer","packery/js/item"],e):"object"==typeof exports?module.exports=e(require("desandro-classie"),require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):t.Packery=e(t.classie,t.getSize,t.Outlayer,t.Packery.Rect,t.Packery.Packer,t.Packery.Item);
2
- }(window,function(t,e,i,n,o,r){function s(t,e){return t.position.y-e.position.y||t.position.x-e.position.x}function a(t,e){return t.position.x-e.position.x||t.position.y-e.position.y}n.prototype.canFit=function(t){return this.width>=t.width-1&&this.height>=t.height-1};var h=i.create("packery");return h.Item=r,h.prototype._create=function(){i.prototype._create.call(this),this.packer=new o,this.stamp(this.options.stamped);var t=this;this.handleDraggabilly={dragStart:function(){t.itemDragStart(this.element)},dragMove:function(){t.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){t.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(e,i){i&&t.itemDragStart(e.currentTarget)},drag:function(e,i){i&&t.itemDragMove(e.currentTarget,i.position.left,i.position.top)},stop:function(e,i){i&&t.itemDragEnd(e.currentTarget)}}},h.prototype._resetLayout=function(){this.getSize(),this._getMeasurements();var t=this.packer;this.options.isHorizontal?(t.width=Number.POSITIVE_INFINITY,t.height=this.size.innerHeight+this.gutter,t.sortDirection="rightwardTopToBottom"):(t.width=this.size.innerWidth+this.gutter,t.height=Number.POSITIVE_INFINITY,t.sortDirection="downwardLeftToRight"),t.reset(),this.maxY=0,this.maxX=0},h.prototype._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},h.prototype._getItemLayoutPosition=function(t){return this._packItem(t),t.rect},h.prototype._packItem=function(t){this._setRectSize(t.element,t.rect),this.packer.pack(t.rect),this._setMaxXY(t.rect)},h.prototype._setMaxXY=function(t){this.maxX=Math.max(t.x+t.width,this.maxX),this.maxY=Math.max(t.y+t.height,this.maxY)},h.prototype._setRectSize=function(t,i){var n=e(t),o=n.outerWidth,r=n.outerHeight;(o||r)&&(o=this._applyGridGutter(o,this.columnWidth),r=this._applyGridGutter(r,this.rowHeight)),i.width=Math.min(o,this.packer.width),i.height=Math.min(r,this.packer.height)},h.prototype._applyGridGutter=function(t,e){if(!e)return t+this.gutter;e+=this.gutter;var i=t%e,n=i&&i<1?"round":"ceil";return t=Math[n](t/e)*e},h.prototype._getContainerSize=function(){return this.options.isHorizontal?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},h.prototype._manageStamp=function(t){var e,i=this.getItem(t);if(i&&i.isPlacing)e=i.placeRect;else{var o=this._getElementOffset(t);e=new n({x:this.options.isOriginLeft?o.left:o.right,y:this.options.isOriginTop?o.top:o.bottom})}this._setRectSize(t,e),this.packer.placed(e),this._setMaxXY(e)},h.prototype.sortItemsByPosition=function(){var t=this.options.isHorizontal?a:s;this.items.sort(t)},h.prototype.fit=function(t,e,i){var n=this.getItem(t);n&&(this._getMeasurements(),this.stamp(n.element),n.getSize(),n.isPlacing=!0,e=void 0===e?n.rect.x:e,i=void 0===i?n.rect.y:i,n.positionPlaceRect(e,i,!0),this._bindFitEvents(n),n.moveTo(n.placeRect.x,n.placeRect.y),this.layout(),this.unstamp(n.element),this.sortItemsByPosition(),n.isPlacing=!1,n.copyPlaceRectPosition())},h.prototype._bindFitEvents=function(t){function e(){n++,2==n&&i.dispatchEvent("fitComplete",null,[t])}var i=this,n=0;t.on("layout",function(){return e(),!0}),this.on("layoutComplete",function(){return e(),!0})},h.prototype.resize=function(){var t=e(this.element),i=this.size&&t,n=this.options.isHorizontal?"innerHeight":"innerWidth";i&&t[n]==this.size[n]||this.layout()},h.prototype.itemDragStart=function(t){this.stamp(t);var e=this.getItem(t);e&&e.dragStart()},h.prototype.itemDragMove=function(t,e,i){function n(){r.layout(),delete r.dragTimeout}var o=this.getItem(t);o&&o.dragMove(e,i);var r=this;this.clearDragTimeout(),this.dragTimeout=setTimeout(n,40)},h.prototype.clearDragTimeout=function(){this.dragTimeout&&clearTimeout(this.dragTimeout)},h.prototype.itemDragEnd=function(e){var i,n=this.getItem(e);if(n&&(i=n.didDrag,n.dragStop()),!n||!i&&!n.needsPositioning)return void this.unstamp(e);t.add(n.element,"is-positioning-post-drag");var o=this._getDragEndLayoutComplete(e,n);n.needsPositioning?(n.on("layout",o),n.moveTo(n.placeRect.x,n.placeRect.y)):n&&n.copyPlaceRectPosition(),this.clearDragTimeout(),this.on("layoutComplete",o),this.layout()},h.prototype._getDragEndLayoutComplete=function(e,i){var n=i&&i.needsPositioning,o=0,r=n?2:1,s=this;return function(){return o++,o!=r||(i&&(t.remove(i.element,"is-positioning-post-drag"),i.isPlacing=!1,i.copyPlaceRectPosition()),s.unstamp(e),s.sortItemsByPosition(),n&&s.dispatchEvent("dragItemPositioned",null,[i]),!0)}},h.prototype.bindDraggabillyEvents=function(t){t.on("dragStart",this.handleDraggabilly.dragStart),t.on("dragMove",this.handleDraggabilly.dragMove),t.on("dragEnd",this.handleDraggabilly.dragEnd)},h.prototype.bindUIDraggableEvents=function(t){t.on("dragstart",this.handleUIDraggable.start).on("drag",this.handleUIDraggable.drag).on("dragstop",this.handleUIDraggable.stop)},h.Rect=n,h.Packer=o,h});
1
+ !function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function o(e,i){t.fn[e]=function(o){if("string"==typeof o){for(var s=n.call(arguments,1),a=0,h=this.length;a<h;a++){var p=this[a],u=t.data(p,e);if(u)if(t.isFunction(u[o])&&"_"!==o.charAt(0)){var c=u[o].apply(u,s);if(void 0!==c)return c}else r("no such method '"+o+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; attempted to call '"+o+"'")}return this}return this.each(function(){var n=t.data(this,e);n?(n.option(o),n._init()):(n=new i(this,o),t.data(this,e,n))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),o(t,e)},t.bridget}}var n=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i("object"==typeof exports?require("jquery"):t.jQuery)}(window),function(t){function e(t){return new RegExp("(^|\\s+)"+t+"(\\s+|$)")}function i(t,e){(n(t,e)?r:o)(t,e)}var n,o,r;"classList"in document.documentElement?(n=function(t,e){return t.classList.contains(e)},o=function(t,e){t.classList.add(e)},r=function(t,e){t.classList.remove(e)}):(n=function(t,i){return e(i).test(t.className)},o=function(t,e){n(t,e)||(t.className=t.className+" "+e)},r=function(t,i){t.className=t.className.replace(e(i)," ")});var s={hasClass:n,addClass:o,removeClass:r,toggleClass:i,has:n,add:o,remove:r,toggle:i};"function"==typeof define&&define.amd?define("classie/classie",s):"object"==typeof exports?module.exports=s:t.classie=s}(window),function(t){function e(t){if(t){if("string"==typeof n[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,o=0,r=i.length;o<r;o++)if(e=i[o]+t,"string"==typeof n[e])return e}}var i="Webkit Moz ms Ms O".split(" "),n=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t,e){function i(t){var e=parseFloat(t);return-1===t.indexOf("%")&&!isNaN(e)&&e}function n(){}function o(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=a.length;e<i;e++){t[a[e]]=0}return t}function r(e){function n(){if(!d){d=!0;var n=t.getComputedStyle;if(p=function(){var t=n?function(t){return n(t,null)}:function(t){return t.currentStyle};return function(e){var i=t(e);return i||s("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),i}}(),u=e("boxSizing")){var o=document.createElement("div");o.style.width="200px",o.style.padding="1px 2px 3px 4px",o.style.borderStyle="solid",o.style.borderWidth="1px 2px 3px 4px",o.style[u]="border-box";var r=document.body||document.documentElement;r.appendChild(o);var a=p(o);c=200===i(a.width),r.removeChild(o)}}}function r(t){if(n(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var e=p(t);if("none"===e.display)return o();var r={};r.width=t.offsetWidth,r.height=t.offsetHeight;for(var s=r.isBorderBox=!(!u||!e[u]||"border-box"!==e[u]),d=0,l=a.length;d<l;d++){var f=a[d],y=e[f];y=h(t,y);var m=parseFloat(y);r[f]=isNaN(m)?0:m}var g=r.paddingLeft+r.paddingRight,v=r.paddingTop+r.paddingBottom,x=r.marginLeft+r.marginRight,E=r.marginTop+r.marginBottom,b=r.borderLeftWidth+r.borderRightWidth,w=r.borderTopWidth+r.borderBottomWidth,_=s&&c,T=i(e.width);!1!==T&&(r.width=T+(_?0:g+b));var z=i(e.height);return!1!==z&&(r.height=z+(_?0:v+w)),r.innerWidth=r.width-(g+b),r.innerHeight=r.height-(v+w),r.outerWidth=r.width+x,r.outerHeight=r.height+E,r}}function h(e,i){if(t.getComputedStyle||-1===i.indexOf("%"))return i;var n=e.style,o=n.left,r=e.runtimeStyle,s=r&&r.left;return s&&(r.left=e.currentStyle.left),n.left=i,i=n.pixelLeft,n.left=o,s&&(r.left=s),i}var p,u,c,d=!1;return r}var s="undefined"==typeof console?n:function(t){console.error(t)},a=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],r):"object"==typeof exports?module.exports=r(require("desandro-get-style-property")):t.getSize=r(t.getStyleProperty)}(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,n=function(){};i.addEventListener?n=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(n=function(t,i,n){t[i+n]=n.handleEvent?function(){var i=e(t);n.handleEvent.call(n,i)}:function(){var i=e(t);n.call(t,i)},t.attachEvent("on"+i,t[i+n])});var o=function(){};i.removeEventListener?o=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(o=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(n){t[e+i]=void 0}});var r={bind:n,unbind:o};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(window),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var n=t.prototype,o=this,r=o.EventEmitter;n.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp){e={};for(i in n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i])}else e=n[t]||(n[t]=[]);return e},n.flattenListeners=function(t){var e,i=[];for(e=0;e<t.length;e+=1)i.push(t[e].listener);return i},n.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},n.addListener=function(t,i){var n,o=this.getListenersAsObject(t),r="object"==typeof i;for(n in o)o.hasOwnProperty(n)&&-1===e(o[n],i)&&o[n].push(r?i:{listener:i,once:!1});return this},n.on=i("addListener"),n.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},n.once=i("addOnceListener"),n.defineEvent=function(t){return this.getListeners(t),this},n.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},n.removeListener=function(t,i){var n,o,r=this.getListenersAsObject(t);for(o in r)r.hasOwnProperty(o)&&-1!==(n=e(r[o],i))&&r[o].splice(n,1);return this},n.off=i("removeListener"),n.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},n.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},n.manipulateListeners=function(t,e,i){var n,o,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(n=i.length;n--;)r.call(this,e,i[n]);else for(n in e)e.hasOwnProperty(n)&&(o=e[n])&&("function"==typeof o?r.call(this,n,o):s.call(this,n,o));return this},n.removeEvent=function(t){var e,i=typeof t,n=this._getEvents();if("string"===i)delete n[t];else if(t instanceof RegExp)for(e in n)n.hasOwnProperty(e)&&t.test(e)&&delete n[e];else delete this._events;return this},n.removeAllListeners=i("removeEvent"),n.emitEvent=function(t,e){var i,n,o,r=this.getListenersAsObject(t);for(o in r)if(r.hasOwnProperty(o))for(n=r[o].length;n--;)i=r[o][n],!0===i.once&&this.removeListener(t,i.listener),i.listener.apply(this,e||[])===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},n.trigger=i("emitEvent"),n.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},n.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return o.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:o.EventEmitter=t}.call(this),function(t){function e(t){"function"==typeof t&&(e.isReady?t():s.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==r.readyState;e.isReady||i||n()}function n(){e.isReady=!0;for(var t=0,i=s.length;t<i;t++){(0,s[t])()}}function o(o){return"complete"===r.readyState?n():(o.bind(r,"DOMContentLoaded",i),o.bind(r,"readystatechange",i),o.bind(t,"load",i)),e}var r=t.document,s=[];e.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],o):"object"==typeof exports?module.exports=o(require("eventie")):t.docReady=o(t.eventie)}(window),function(t){function e(t,e){return t[s](e)}function i(t){if(!t.parentNode){document.createDocumentFragment().appendChild(t)}}function n(t,e){i(t);for(var n=t.parentNode.querySelectorAll(e),o=0,r=n.length;o<r;o++)if(n[o]===t)return!0;return!1}function o(t,n){return i(t),e(t,n)}var r,s=function(){if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0,n=e.length;i<n;i++){var o=e[i],r=o+"MatchesSelector";if(t[r])return r}}();if(s){var a=document.createElement("div"),h=e(a,"div");r=h?e:o}else r=n;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return r}):"object"==typeof exports?module.exports=r:window.matchesSelector=r}(Element.prototype),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("doc-ready"),require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.docReady,t.matchesSelector)}(window,function(t,e,i){var n={};n.extend=function(t,e){for(var i in e)t[i]=e[i];return t},n.modulo=function(t,e){return(t%e+e)%e};var o=Object.prototype.toString;n.isArray=function(t){return"[object Array]"==o.call(t)},n.makeArray=function(t){var e=[];if(n.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var i=0,o=t.length;i<o;i++)e.push(t[i]);else e.push(t);return e},n.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},n.removeFrom=function(t,e){var i=n.indexOf(t,e);-1!=i&&t.splice(i,1)},n.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1==t.nodeType&&"string"==typeof t.nodeName},n.setText=function(){function t(t,i){e=e||(void 0!==document.documentElement.textContent?"textContent":"innerText"),t[e]=i}var e;return t}(),n.getParent=function(t,e){for(;t!=document.body;)if(t=t.parentNode,i(t,e))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,e){t=n.makeArray(t);for(var o=[],r=0,s=t.length;r<s;r++){var a=t[r];if(n.isElement(a))if(e){i(a,e)&&o.push(a);for(var h=a.querySelectorAll(e),p=0,u=h.length;p<u;p++)o.push(h[p])}else o.push(a)}return o},n.debounceMethod=function(t,e,i){var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];t&&clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i||100)}},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var r=t.console;return n.htmlInit=function(i,o){e(function(){for(var e=n.toDashed(o),s=document.querySelectorAll(".js-"+e),a="data-"+e+"-options",h=0,p=s.length;h<p;h++){var u,c=s[h],d=c.getAttribute(a);try{u=d&&JSON.parse(d)}catch(t){r&&r.error("Error parsing "+a+" on "+c.nodeName.toLowerCase()+(c.id?"#"+c.id:"")+": "+t);continue}var l=new i(c,u),f=t.jQuery;f&&f.data(c,o,l)}})},n}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(t.Outlayer={},t.Outlayer.Item=e(t,t.EventEmitter,t.getSize,t.getStyleProperty,t.fizzyUIUtils))}(window,function(t,e,i,n,o){function r(t){for(var e in t)return!1;return null,!0}function s(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var a=t.getComputedStyle,h=a?function(t){return a(t,null)}:function(t){return t.currentStyle},p=n("transition"),u=n("transform"),c=p&&u,d=!!n("perspective"),l={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[p],f=["transform","transition","transitionDuration","transitionProperty"],y=function(){for(var t={},e=0,i=f.length;e<i;e++){var o=f[e],r=n(o);r&&r!==o&&(t[o]=r)}return t}();o.extend(s.prototype,e.prototype),s.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},s.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},s.prototype.getSize=function(){this.size=i(this.element)},s.prototype.css=function(t){var e=this.element.style;for(var i in t){e[y[i]||i]=t[i]}},s.prototype.getPosition=function(){var t=h(this.element),e=this.layout.options,i=e.isOriginLeft,n=e.isOriginTop,o=t[i?"left":"right"],r=t[n?"top":"bottom"],s=this.layout.size,a=-1!=o.indexOf("%")?parseFloat(o)/100*s.width:parseInt(o,10),p=-1!=r.indexOf("%")?parseFloat(r)/100*s.height:parseInt(r,10);a=isNaN(a)?0:a,p=isNaN(p)?0:p,a-=i?s.paddingLeft:s.paddingRight,p-=n?s.paddingTop:s.paddingBottom,this.position.x=a,this.position.y=p},s.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={},n=e.isOriginLeft?"paddingLeft":"paddingRight",o=e.isOriginLeft?"left":"right",r=e.isOriginLeft?"right":"left",s=this.position.x+t[n];i[o]=this.getXValue(s),i[r]="";var a=e.isOriginTop?"paddingTop":"paddingBottom",h=e.isOriginTop?"top":"bottom",p=e.isOriginTop?"bottom":"top",u=this.position.y+t[a];i[h]=this.getYValue(u),i[p]="",this.css(i),this.emitEvent("layout",[this])},s.prototype.getXValue=function(t){var e=this.layout.options;return e.percentPosition&&!e.isHorizontal?t/this.layout.size.width*100+"%":t+"px"},s.prototype.getYValue=function(t){var e=this.layout.options;return e.percentPosition&&e.isHorizontal?t/this.layout.size.height*100+"%":t+"px"},s.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=parseInt(t,10),r=parseInt(e,10),s=o===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return void this.layoutPosition();var a=t-i,h=e-n,p={};p.transform=this.getTranslate(a,h),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},s.prototype.getTranslate=function(t,e){var i=this.layout.options;return t=i.isOriginLeft?t:-t,e=i.isOriginTop?e:-e,d?"translate3d("+t+"px, "+e+"px, 0)":"translate("+t+"px, "+e+"px)"},s.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},s.prototype.moveTo=c?s.prototype._transitionTo:s.prototype.goTo,s.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},s.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},s.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);this.element.offsetHeight;null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var m="opacity,"+function(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}(y.transform||"transform");s.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(l,this,!1))},s.prototype.transition=s.prototype[p?"_transition":"_nonTransition"],s.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},s.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};s.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,i=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[i],r(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd){e.onEnd[i].call(this),delete e.onEnd[i]}this.emitEvent("transitionEnd",[this])}},s.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(l,this,!1),this.isTransitioning=!1},s.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return s.prototype.removeTransitionStyles=function(){this.css(v)},s.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},s.prototype.remove=function(){if(!p||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var t=this;this.once("transitionEnd",function(){t.removeElem()}),this.hide()},s.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},s.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},s.prototype.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},s.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},s.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},s.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r,s){return e(t,i,n,o,r,s)}):"object"==typeof exports?module.exports=e(t,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.eventie,t.EventEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o,r){function s(t,e){var i=o.getQueryElement(t);if(!i)return void(a&&a.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,h&&(this.$element=h(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++u;this.element.outlayerGUID=n,c[n]=this,this._create(),this.options.isInitLayout&&this.layout()}var a=t.console,h=t.jQuery,p=function(){},u=0,c={};return s.namespace="outlayer",s.Item=r,s.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},o.extend(s.prototype,i.prototype),s.prototype.option=function(t){o.extend(this.options,t)},s.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},s.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},s.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0,r=e.length;o<r;o++){var s=e[o],a=new i(s,this);n.push(a)}return n},s.prototype._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},s.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;e<i;e++)t.push(this.items[e].element);return t},s.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},s.prototype._init=s.prototype.layout,s.prototype._resetLayout=function(){this.getSize()},s.prototype.getSize=function(){this.size=n(this.element)},s.prototype._getMeasurement=function(t,e){var i,r=this.options[t];r?("string"==typeof r?i=this.element.querySelector(r):o.isElement(r)&&(i=r),this[t]=i?n(i)[e]:r):this[t]=0},s.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},s.prototype._getItemsForLayout=function(t){for(var e=[],i=0,n=t.length;i<n;i++){var o=t[i];o.isIgnored||e.push(o)}return e},s.prototype._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){for(var i=[],n=0,o=t.length;n<o;n++){var r=t[n],s=this._getItemLayoutPosition(r);s.item=r,s.isInstant=e||r.isLayoutInstant,i.push(s)}this._processLayoutQueue(i)}},s.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},s.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e];this._positionItem(n.item,n.x,n.y,n.isInstant)}},s.prototype._positionItem=function(t,e,i,n){n?t.goTo(e,i):t.moveTo(e,i)},s.prototype._postLayout=function(){this.resizeContainer()},s.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},s.prototype._getContainerSize=p,s.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},s.prototype._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){++s===r&&i()}var o=this,r=e.length;if(!e||!r)return void i();for(var s=0,a=0,h=e.length;a<h;a++){e[a].once(t,n)}},s.prototype.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),h)if(this.$element=this.$element||h(this.element),e){var o=h.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},s.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},s.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},s.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;e<i;e++){var n=t[e];this.ignore(n)}}},s.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;e<i;e++){var n=t[e];o.removeFrom(this.stamps,n),this.unignore(n)}},s.prototype._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},s.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;t<e;t++){var i=this.stamps[t];this._manageStamp(i)}}},s.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},s.prototype._manageStamp=p,s.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=n(t);return{left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom}},s.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},s.prototype.bindResize=function(){this.isResizeBound||(e.bind(t,"resize",this),this.isResizeBound=!0)},s.prototype.unbindResize=function(){this.isResizeBound&&e.unbind(t,"resize",this),this.isResizeBound=!1},s.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},s.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},s.prototype.needsResizeLayout=function(){var t=n(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},s.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},s.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},s.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},s.prototype.reveal=function(t){this._emitCompleteOnItems("reveal",t);for(var e=t&&t.length,i=0;e&&i<e;i++){t[i].reveal()}},s.prototype.hide=function(t){this._emitCompleteOnItems("hide",t);for(var e=t&&t.length,i=0;e&&i<e;i++){t[i].hide()}},s.prototype.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},s.prototype.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},s.prototype.getItem=function(t){for(var e=0,i=this.items.length;e<i;e++){var n=this.items[e];if(n.element===t)return n}},s.prototype.getItems=function(t){t=o.makeArray(t);for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i],s=this.getItem(r);s&&e.push(s)}return e},s.prototype.remove=function(t){var e=this.getItems(t);if(this._emitCompleteOnItems("remove",e),e&&e.length)for(var i=0,n=e.length;i<n;i++){var r=e[i];r.remove(),o.removeFrom(this.items,r)}},s.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;e<i;e++){this.items[e].destroy()}this.unbindResize();var n=this.element.outlayerGUID;delete c[n],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},s.create=function(t,e){function i(){s.apply(this,arguments)}return Object.create?i.prototype=Object.create(s.prototype):o.extend(i.prototype,s.prototype),i.prototype.constructor=i,i.defaults=o.extend({},s.defaults),o.extend(i.defaults,e),i.prototype.settings={},i.namespace=t,i.data=s.data,i.Item=function(){r.apply(this,arguments)},i.Item.prototype=new r,o.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i},s.Item=r,s}),function(t,e){"function"==typeof define&&define.amd?define("packery/js/rect",e):"object"==typeof exports?module.exports=e():(t.Packery=t.Packery||{},t.Packery.Rect=e())}(window,function(){function t(e){for(var i in t.defaults)this[i]=t.defaults[i];for(i in e)this[i]=e[i]}return(window.Packery=function(){}).Rect=t,t.defaults={x:0,y:0,width:0,height:0},t.prototype.contains=function(t){var e=t.width||0,i=t.height||0;return this.x<=t.x&&this.y<=t.y&&this.x+this.width>=t.x+e&&this.y+this.height>=t.y+i},t.prototype.overlaps=function(t){var e=this.x+this.width,i=this.y+this.height,n=t.x+t.width,o=t.y+t.height;return this.x<n&&e>t.x&&this.y<o&&i>t.y},t.prototype.getMaximalFreeRects=function(e){if(!this.overlaps(e))return!1;var i,n=[],o=this.x+this.width,r=this.y+this.height,s=e.x+e.width,a=e.y+e.height;return this.y<e.y&&(i=new t({x:this.x,y:this.y,width:this.width,height:e.y-this.y}),n.push(i)),o>s&&(i=new t({x:s,y:this.y,width:o-s,height:this.height}),n.push(i)),r>a&&(i=new t({x:this.x,y:a,width:this.width,height:r-a}),n.push(i)),this.x<e.x&&(i=new t({x:this.x,y:this.y,width:e.x-this.x,height:this.height}),n.push(i)),n},t.prototype.canFit=function(t){return this.width>=t.width&&this.height>=t.height},t}),function(t,e){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],e);else if("object"==typeof exports)module.exports=e(require("./rect"));else{var i=t.Packery=t.Packery||{};i.Packer=e(i.Rect)}}(window,function(t){function e(t,e,i){this.width=t||0,this.height=e||0,this.sortDirection=i||"downwardLeftToRight",this.reset()}e.prototype.reset=function(){this.spaces=[],this.newSpaces=[];var e=new t({x:0,y:0,width:this.width,height:this.height});this.spaces.push(e),this.sorter=i[this.sortDirection]||i.downwardLeftToRight},e.prototype.pack=function(t){for(var e=0,i=this.spaces.length;e<i;e++){var n=this.spaces[e];if(n.canFit(t)){this.placeInSpace(t,n);break}}},e.prototype.placeInSpace=function(t,e){t.x=e.x,t.y=e.y,this.placed(t)},e.prototype.placed=function(t){for(var e=[],i=0,n=this.spaces.length;i<n;i++){var o=this.spaces[i],r=o.getMaximalFreeRects(t);r?e.push.apply(e,r):e.push(o)}this.spaces=e,this.mergeSortSpaces()},e.prototype.mergeSortSpaces=function(){e.mergeRects(this.spaces),this.spaces.sort(this.sorter)},e.prototype.addSpace=function(t){this.spaces.push(t),this.mergeSortSpaces()},e.mergeRects=function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e];if(n){var o=t.slice(0);o.splice(e,1);for(var r=0,s=0,a=o.length;s<a;s++){var h=o[s],p=e>s?0:1;n.contains(h)&&(t.splice(s+p-r,1),r++)}}}return t};var i={downwardLeftToRight:function(t,e){return t.y-e.y||t.x-e.x},rightwardTopToBottom:function(t,e){return t.x-e.x||t.y-e.y}};return e}),function(t,e){"function"==typeof define&&define.amd?define("packery/js/item",["get-style-property/get-style-property","outlayer/outlayer","./rect"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property"),require("outlayer"),require("./rect")):t.Packery.Item=e(t.getStyleProperty,t.Outlayer,t.Packery.Rect)}(window,function(t,e,i){var n=t("transform"),o=function(){e.Item.apply(this,arguments)};o.prototype=new e.Item;var r=o.prototype._create;return o.prototype._create=function(){r.call(this),this.rect=new i,this.placeRect=new i},o.prototype.dragStart=function(){this.getPosition(),this.removeTransitionStyles(),this.isTransitioning&&n&&(this.element.style[n]="none"),this.getSize(),this.isPlacing=!0,this.needsPositioning=!1,this.positionPlaceRect(this.position.x,this.position.y),this.isTransitioning=!1,this.didDrag=!1},o.prototype.dragMove=function(t,e){this.didDrag=!0;var i=this.layout.size;t-=i.paddingLeft,e-=i.paddingTop,this.positionPlaceRect(t,e)},o.prototype.dragStop=function(){this.getPosition();var t=this.position.x!=this.placeRect.x,e=this.position.y!=this.placeRect.y;this.needsPositioning=t||e,this.didDrag=!1},o.prototype.positionPlaceRect=function(t,e,i){this.placeRect.x=this.getPlaceRectCoord(t,!0),this.placeRect.y=this.getPlaceRectCoord(e,!1,i)},o.prototype.getPlaceRectCoord=function(t,e,i){var n=e?"Width":"Height",o=this.size["outer"+n],r=this.layout[e?"columnWidth":"rowHeight"],s=this.layout.size["inner"+n];e||(s=Math.max(s,this.layout.maxY),this.layout.rowHeight||(s-=this.layout.gutter));var a;if(r){r+=this.layout.gutter,s+=e?this.layout.gutter:0,t=Math.round(t/r);var h;h=this.layout.options.isHorizontal?e?"ceil":"floor":e?"floor":"ceil";var p=Math[h](s/r);p-=Math.ceil(o/r),a=p}else a=s-o;return t=i?t:Math.min(t,a),t*=r||1,Math.max(0,t)},o.prototype.copyPlaceRectPosition=function(){this.rect.x=this.placeRect.x,this.rect.y=this.placeRect.y},o.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},o}),function(t,e){
2
+ "function"==typeof define&&define.amd?define(["classie/classie","get-size/get-size","outlayer/outlayer","packery/js/rect","packery/js/packer","packery/js/item"],e):"object"==typeof exports?module.exports=e(require("desandro-classie"),require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):t.Packery=e(t.classie,t.getSize,t.Outlayer,t.Packery.Rect,t.Packery.Packer,t.Packery.Item)}(window,function(t,e,i,n,o,r){function s(t,e){return t.position.y-e.position.y||t.position.x-e.position.x}function a(t,e){return t.position.x-e.position.x||t.position.y-e.position.y}n.prototype.canFit=function(t){return this.width>=t.width-1&&this.height>=t.height-1};var h=i.create("packery");return h.Item=r,h.prototype._create=function(){i.prototype._create.call(this),this.packer=new o,this.stamp(this.options.stamped);var t=this;this.handleDraggabilly={dragStart:function(){t.itemDragStart(this.element)},dragMove:function(){t.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){t.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(e,i){i&&t.itemDragStart(e.currentTarget)},drag:function(e,i){i&&t.itemDragMove(e.currentTarget,i.position.left,i.position.top)},stop:function(e,i){i&&t.itemDragEnd(e.currentTarget)}}},h.prototype._resetLayout=function(){this.getSize(),this._getMeasurements();var t=this.packer;this.options.isHorizontal?(t.width=Number.POSITIVE_INFINITY,t.height=this.size.innerHeight+this.gutter,t.sortDirection="rightwardTopToBottom"):(t.width=this.size.innerWidth+this.gutter,t.height=Number.POSITIVE_INFINITY,t.sortDirection="downwardLeftToRight"),t.reset(),this.maxY=0,this.maxX=0},h.prototype._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},h.prototype._getItemLayoutPosition=function(t){return this._packItem(t),t.rect},h.prototype._packItem=function(t){this._setRectSize(t.element,t.rect),this.packer.pack(t.rect),this._setMaxXY(t.rect)},h.prototype._setMaxXY=function(t){this.maxX=Math.max(t.x+t.width,this.maxX),this.maxY=Math.max(t.y+t.height,this.maxY)},h.prototype._setRectSize=function(t,i){var n=e(t),o=n.outerWidth,r=n.outerHeight;(o||r)&&(o=this._applyGridGutter(o,this.columnWidth),r=this._applyGridGutter(r,this.rowHeight)),i.width=Math.min(o,this.packer.width),i.height=Math.min(r,this.packer.height)},h.prototype._applyGridGutter=function(t,e){if(!e)return t+this.gutter;e+=this.gutter;var i=t%e,n=i&&i<1?"round":"ceil";return t=Math[n](t/e)*e},h.prototype._getContainerSize=function(){return this.options.isHorizontal?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},h.prototype._manageStamp=function(t){var e,i=this.getItem(t);if(i&&i.isPlacing)e=i.placeRect;else{var o=this._getElementOffset(t);e=new n({x:this.options.isOriginLeft?o.left:o.right,y:this.options.isOriginTop?o.top:o.bottom})}this._setRectSize(t,e),this.packer.placed(e),this._setMaxXY(e)},h.prototype.sortItemsByPosition=function(){var t=this.options.isHorizontal?a:s;this.items.sort(t)},h.prototype.fit=function(t,e,i){var n=this.getItem(t);n&&(this._getMeasurements(),this.stamp(n.element),n.getSize(),n.isPlacing=!0,e=void 0===e?n.rect.x:e,i=void 0===i?n.rect.y:i,n.positionPlaceRect(e,i,!0),this._bindFitEvents(n),n.moveTo(n.placeRect.x,n.placeRect.y),this.layout(),this.unstamp(n.element),this.sortItemsByPosition(),n.isPlacing=!1,n.copyPlaceRectPosition())},h.prototype._bindFitEvents=function(t){function e(){2==++n&&i.dispatchEvent("fitComplete",null,[t])}var i=this,n=0;t.on("layout",function(){return e(),!0}),this.on("layoutComplete",function(){return e(),!0})},h.prototype.resize=function(){var t=e(this.element),i=this.size&&t,n=this.options.isHorizontal?"innerHeight":"innerWidth";i&&t[n]==this.size[n]||this.layout()},h.prototype.itemDragStart=function(t){this.stamp(t);var e=this.getItem(t);e&&e.dragStart()},h.prototype.itemDragMove=function(t,e,i){function n(){r.layout(),delete r.dragTimeout}var o=this.getItem(t);o&&o.dragMove(e,i);var r=this;this.clearDragTimeout(),this.dragTimeout=setTimeout(n,40)},h.prototype.clearDragTimeout=function(){this.dragTimeout&&clearTimeout(this.dragTimeout)},h.prototype.itemDragEnd=function(e){var i,n=this.getItem(e);if(n&&(i=n.didDrag,n.dragStop()),!n||!i&&!n.needsPositioning)return void this.unstamp(e);t.add(n.element,"is-positioning-post-drag");var o=this._getDragEndLayoutComplete(e,n);n.needsPositioning?(n.on("layout",o),n.moveTo(n.placeRect.x,n.placeRect.y)):n&&n.copyPlaceRectPosition(),this.clearDragTimeout(),this.on("layoutComplete",o),this.layout()},h.prototype._getDragEndLayoutComplete=function(e,i){var n=i&&i.needsPositioning,o=0,r=n?2:1,s=this;return function(){return++o!=r||(i&&(t.remove(i.element,"is-positioning-post-drag"),i.isPlacing=!1,i.copyPlaceRectPosition()),s.unstamp(e),s.sortItemsByPosition(),n&&s.dispatchEvent("dragItemPositioned",null,[i]),!0)}},h.prototype.bindDraggabillyEvents=function(t){t.on("dragStart",this.handleDraggabilly.dragStart),t.on("dragMove",this.handleDraggabilly.dragMove),t.on("dragEnd",this.handleDraggabilly.dragEnd)},h.prototype.bindUIDraggableEvents=function(t){t.on("dragstart",this.handleUIDraggable.start).on("drag",this.handleUIDraggable.drag).on("dragstop",this.handleUIDraggable.stop)},h.Rect=n,h.Packer=o,h});
js/slider/jquery.slider.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};sowb.SiteOriginSlider=function(e){return{playSlideVideo:function(i){e(i).find("video").each(function(){"undefined"!=typeof this.play&&this.play()})},pauseSlideVideo:function(i){e(i).find("video").each(function(){"undefined"!=typeof this.pause&&this.pause()})},setupActiveSlide:function(i,t,s){var n=e(i).find(".cycle-sentinel"),o=e(t),d=o.find("video.sow-background-element");if(void 0==s?n.css("height",o.outerHeight()):n.animate({height:o.outerHeight()},s),d.length){var c=o.outerWidth()/o.outerHeight(),l=d.outerWidth()/d.outerHeight();c>l?d.css({width:"100%",height:"auto"}):d.css({width:"auto",height:"100%"}),d.css({"margin-left":-Math.ceil(d.width()/2),"margin-top":-Math.ceil(d.height()/2)})}}}},jQuery(function(e){sowb.setupSliders=sowb.setupSlider=function(){var i=new sowb.SiteOriginSlider(e);e(".sow-slider-images").each(function(){var t=e(this),s=t.siblings(".sow-slider-pagination"),n=t.closest(".sow-slider-base"),o=n.find(".sow-slide-nav"),d=t.find(".sow-slider-image"),c=t.data("settings");d.each(function(i,t){var s=e(t),n=s.data("url");s.click(function(i){if(void 0!==n){var t=e(i.target);"A"!==t.prop("tagName")&&(i.preventDefault(),window.open(n.url,n.new_window?"_blank":"_self"))}})});var l=function(){var a=t.closest(".so-widget-fittext-wrapper");if(a.length>0&&!a.data("fitTextDone"))return void a.on("fitTextDone",function(){l()});if(n.show(),t.find(".sow-slider-image").each(function(){var i=e(this);e(window).on("resize panelsStretchRows",function(){i.css("height",i.find(".sow-slider-image-wrapper").outerHeight())}).resize()}),t.on({"cycle-after":function(t,s,n,o,d){var c=e(this);i.playSlideVideo(o),i.setupActiveSlide(c,o),e(o).trigger("sowSlideCycleAfter")},"cycle-before":function(t,n,o,d,c){var l=e(this);s.find("> li").removeClass("sow-active").eq(n.slideNum-1).addClass("sow-active"),i.pauseSlideVideo(o),i.setupActiveSlide(l,d,n.speed),e(d).trigger("sowSlideCycleBefore")},"cycle-initialized":function(n,d){i.playSlideVideo(e(this).find(".cycle-slide-active")),i.setupActiveSlide(t,d.slides[0]),s.find(">li").removeClass("sow-active").eq(0).addClass("sow-active"),e(this).find(".cycle-slide-active").trigger("sowSlideInitial"),d.slideCount<=1&&(s.hide(),o.hide()),e(window).resize(),setTimeout(function(){i.setupActiveSlide(t,d.slides[0]),t.find(".cycle-sentinel").empty()},200)}}).cycle({slides:"> .sow-slider-image",speed:c.speed,timeout:c.timeout,swipe:c.swipe,"swipe-fx":"scrollHorz"}),t.find("video.sow-background-element").on("loadeddata",function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))}),s.add(o).hide(),!n.hasClass("sow-slider-is-mobile")&&d.length>1){var r=!1;n.mouseenter(function(){s.add(o).clearQueue().fadeIn(150),r=!1}).mouseleave(function(){r=!0,setTimeout(function(){r&&s.add(o).clearQueue().fadeOut(150),r=!1},750)})}e(window).resize(function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))}),s.find("> li > a").click(function(i){i.preventDefault(),t.cycle("goto",e(this).data("goto"))}),o.find("> a").click(function(i){i.preventDefault(),t.cycle(e(this).data("action"))}),n.keydown(function(e){37===e.which?t.cycle("prev"):39===e.which&&t.cycle("next")})},a=t.find("img"),r=0,u=!1;a.each(function(){e(this);this.complete?r++:e(this).one("load",function(){r++,r!==a.length||u||(l(),u=!0)}).attr("src",e(this).attr("src")),r!==a.length||u||(l(),u=!0)}),0===a.length&&l()})},sowb.setupSliders(),e(sowb).on("setup_widgets",sowb.setupSliders)}),window.sowb=sowb;
1
+ var sowb=window.sowb||{};sowb.SiteOriginSlider=function(e){return{playSlideVideo:function(i){e(i).find("video").each(function(){void 0!==this.play&&this.play()})},pauseSlideVideo:function(i){e(i).find("video").each(function(){void 0!==this.pause&&this.pause()})},setupActiveSlide:function(i,t,s){var n=e(i).find(".cycle-sentinel"),o=e(t),d=o.find("video.sow-background-element");if(void 0==s?n.css("height",o.outerHeight()):n.animate({height:o.outerHeight()},s),d.length){o.outerWidth()/o.outerHeight()>d.outerWidth()/d.outerHeight()?d.css({width:"100%",height:"auto"}):d.css({width:"auto",height:"100%"}),d.css({"margin-left":-Math.ceil(d.width()/2),"margin-top":-Math.ceil(d.height()/2)})}}}},jQuery(function(e){sowb.setupSliders=sowb.setupSlider=function(){var i=new sowb.SiteOriginSlider(e);e(".sow-slider-images").each(function(){var t=e(this),s=t.siblings(".sow-slider-pagination"),n=t.closest(".sow-slider-base"),o=n.find(".sow-slide-nav"),d=t.find(".sow-slider-image"),c=t.data("settings");d.each(function(i,t){var s=e(t),n=s.data("url");s.click(function(i){if(void 0!==n){"A"!==e(i.target).prop("tagName")&&(i.preventDefault(),window.open(n.url,n.new_window?"_blank":"_self"))}})});var l=function(){var a=t.closest(".so-widget-fittext-wrapper");if(a.length>0&&!a.data("fitTextDone"))return void a.on("fitTextDone",function(){l()});if(n.show(),t.find(".sow-slider-image").each(function(){var i=e(this);e(window).on("resize panelsStretchRows",function(){i.css("height",i.find(".sow-slider-image-wrapper").outerHeight())}).resize()}),t.on({"cycle-after":function(t,s,n,o,d){var c=e(this);i.playSlideVideo(o),i.setupActiveSlide(c,o),e(o).trigger("sowSlideCycleAfter")},"cycle-before":function(t,n,o,d,c){var l=e(this);s.find("> li").removeClass("sow-active").eq(n.slideNum-1).addClass("sow-active"),i.pauseSlideVideo(o),i.setupActiveSlide(l,d,n.speed),e(d).trigger("sowSlideCycleBefore")},"cycle-initialized":function(n,d){i.playSlideVideo(e(this).find(".cycle-slide-active")),i.setupActiveSlide(t,d.slides[0]),s.find(">li").removeClass("sow-active").eq(0).addClass("sow-active"),e(this).find(".cycle-slide-active").trigger("sowSlideInitial"),d.slideCount<=1&&(s.hide(),o.hide()),e(window).resize(),setTimeout(function(){i.setupActiveSlide(t,d.slides[0]),t.find(".cycle-sentinel").empty()},200)}}).cycle({slides:"> .sow-slider-image",speed:c.speed,timeout:c.timeout,swipe:c.swipe,"swipe-fx":"scrollHorz"}),t.find("video.sow-background-element").on("loadeddata",function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))}),s.add(o).hide(),!n.hasClass("sow-slider-is-mobile")&&d.length>1){var r=!1;n.mouseenter(function(){s.add(o).clearQueue().fadeIn(150),r=!1}).mouseleave(function(){r=!0,setTimeout(function(){r&&s.add(o).clearQueue().fadeOut(150),r=!1},750)})}e(window).resize(function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))}),s.find("> li > a").click(function(i){i.preventDefault(),t.cycle("goto",e(this).data("goto"))}),o.find("> a").click(function(i){i.preventDefault(),t.cycle(e(this).data("action"))}),n.keydown(function(e){37===e.which?t.cycle("prev"):39===e.which&&t.cycle("next")})},a=t.find("img"),r=0,u=!1;a.each(function(){e(this);this.complete?r++:e(this).one("load",function(){++r!==a.length||u||(l(),u=!0)}).attr("src",e(this).attr("src")),r!==a.length||u||(l(),u=!0)}),0===a.length&&l()})},sowb.setupSliders(),e(sowb).on("setup_widgets",sowb.setupSliders)}),window.sowb=sowb;
lang/so-widgets-bundle.pot CHANGED
@@ -109,7 +109,7 @@ msgstr ""
109
  msgid "SiteOrigin Page Builder"
110
  msgstr ""
111
 
112
- #: tmp/base/inc/fields/date-range.class.php:31, tmp/base/inc/fields/date-range.class.php:45, tmp/widgets/contact/contact.php:1134
113
  msgid "From"
114
  msgstr ""
115
 
@@ -917,7 +917,7 @@ msgstr ""
917
  msgid "Required Field"
918
  msgstr ""
919
 
920
- #: tmp/widgets/contact/contact.php:158, tmp/widgets/contact/contact.php:950
921
  msgid "Required field"
922
  msgstr ""
923
 
@@ -1245,31 +1245,31 @@ msgstr ""
1245
  msgid "Please write something"
1246
  msgstr ""
1247
 
1248
- #: tmp/widgets/contact/contact.php:962
1249
  msgid "Invalid email address."
1250
  msgstr ""
1251
 
1252
- #: tmp/widgets/contact/contact.php:1036
1253
  msgid "Error sending email, please try again later."
1254
  msgstr ""
1255
 
1256
- #: tmp/widgets/contact/contact.php:1054
1257
  msgid "A valid email is required"
1258
  msgstr ""
1259
 
1260
- #: tmp/widgets/contact/contact.php:1056
1261
  msgid "The email address is invalid"
1262
  msgstr ""
1263
 
1264
- #: tmp/widgets/contact/contact.php:1060
1265
  msgid "Missing subject"
1266
  msgstr ""
1267
 
1268
- #: tmp/widgets/contact/contact.php:1094
1269
  msgid "Error validating your Captcha response."
1270
  msgstr ""
1271
 
1272
- #: tmp/widgets/contact/contact.php:1126
1273
  msgid "Unfortunately our system identified your message as spam."
1274
  msgstr ""
1275
 
109
  msgid "SiteOrigin Page Builder"
110
  msgstr ""
111
 
112
+ #: tmp/base/inc/fields/date-range.class.php:31, tmp/base/inc/fields/date-range.class.php:45, tmp/widgets/contact/contact.php:1137
113
  msgid "From"
114
  msgstr ""
115
 
917
  msgid "Required Field"
918
  msgstr ""
919
 
920
+ #: tmp/widgets/contact/contact.php:158, tmp/widgets/contact/contact.php:953
921
  msgid "Required field"
922
  msgstr ""
923
 
1245
  msgid "Please write something"
1246
  msgstr ""
1247
 
1248
+ #: tmp/widgets/contact/contact.php:965
1249
  msgid "Invalid email address."
1250
  msgstr ""
1251
 
1252
+ #: tmp/widgets/contact/contact.php:1039
1253
  msgid "Error sending email, please try again later."
1254
  msgstr ""
1255
 
1256
+ #: tmp/widgets/contact/contact.php:1057
1257
  msgid "A valid email is required"
1258
  msgstr ""
1259
 
1260
+ #: tmp/widgets/contact/contact.php:1059
1261
  msgid "The email address is invalid"
1262
  msgstr ""
1263
 
1264
+ #: tmp/widgets/contact/contact.php:1063
1265
  msgid "Missing subject"
1266
  msgstr ""
1267
 
1268
+ #: tmp/widgets/contact/contact.php:1097
1269
  msgid "Error validating your Captcha response."
1270
  msgstr ""
1271
 
1272
+ #: tmp/widgets/contact/contact.php:1129
1273
  msgid "Unfortunately our system identified your message as spam."
1274
  msgstr ""
1275
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Tags: bundle, widget, button, slider, image, carousel, price table, google maps, tinymce, social links
3
  Requires at least: 4.2
4
  Tested up to: 4.8
5
- Stable tag: 1.9.5
6
- Build time: 2017-07-25T10:31:10+02:00
7
  License: GPLv3 or later
8
  Contributors: gpriday, braam-genis
9
  Donate link: https://siteorigin.com/downloads/contribution/
@@ -54,6 +54,15 @@ The SiteOrigin Widgets Bundle is the perfect platform to build widgets for your
54
 
55
  == Changelog ==
56
 
 
 
 
 
 
 
 
 
 
57
  = 1.9.5 - 25 July 2017 =
58
  * Fixed icon field selection.
59
  * TinyMCE field is initialized when quicktags is selected.
2
  Tags: bundle, widget, button, slider, image, carousel, price table, google maps, tinymce, social links
3
  Requires at least: 4.2
4
  Tested up to: 4.8
5
+ Stable tag: 1.9.6
6
+ Build time: 2017-08-04T09:20:19+02:00
7
  License: GPLv3 or later
8
  Contributors: gpriday, braam-genis
9
  Donate link: https://siteorigin.com/downloads/contribution/
54
 
55
  == Changelog ==
56
 
57
+ = 1.9.6 - 4 August 2017 =
58
+ * Slider: Background Video: Try embedding the video if oEmbed fails.
59
+ * Contact: Added some nonce checks.
60
+ * Contact: add reply-to header.
61
+ * Remove elementor panel width override.
62
+ * Editor: Fix TinyMCE editor button filters in WP >= 4.8.
63
+ * Editor: Preserve encoded HTML entities in TinyMCE field.
64
+ * TinyMCE field: Added missing `tiny_mce_before_init` filter.
65
+
66
  = 1.9.5 - 25 July 2017 =
67
  * Fixed icon field selection.
68
  * TinyMCE field is initialized when quicktags is selected.
so-widgets-bundle.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
- Version: 1.9.5
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
@@ -12,7 +12,7 @@ License: GPL3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
- define('SOW_BUNDLE_VERSION', '1.9.5');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
+ Version: 1.9.6
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
+ define('SOW_BUNDLE_VERSION', '1.9.6');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
widgets/contact/contact.php CHANGED
@@ -831,7 +831,7 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
831
  $field_id = 'sow-contact-form-field-' . $field_name;
832
 
833
  $value = '';
834
- if ( ! empty( $_POST[ $field_name ] ) ) {
835
  $value = stripslashes_deep( $_POST[ $field_name ] );
836
  }
837
 
@@ -913,6 +913,9 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
913
  * Ajax action handler to send the form
914
  */
915
  function contact_form_action( $instance, $storage_hash ) {
 
 
 
916
  if ( empty( $_POST['instance_hash'] ) || $_POST['instance_hash'] != $storage_hash ) {
917
  return false;
918
  }
@@ -1148,7 +1151,8 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
1148
 
1149
  $headers = array(
1150
  'Content-Type: text/html; charset=UTF-8',
1151
- 'From: ' . $this->sanitize_header( $email_fields['name'] ) . ' <' . sanitize_email( $email_fields['email'] ) . '>',
 
1152
  );
1153
 
1154
  // Check if this is a duplicated send
831
  $field_id = 'sow-contact-form-field-' . $field_name;
832
 
833
  $value = '';
834
+ if ( ! empty( $_POST[ $field_name ] ) && wp_verify_nonce( $_POST['_wpnonce'] ) ) {
835
  $value = stripslashes_deep( $_POST[ $field_name ] );
836
  }
837
 
913
  * Ajax action handler to send the form
914
  */
915
  function contact_form_action( $instance, $storage_hash ) {
916
+ if ( ! wp_verify_nonce( $_POST['_wpnonce'] ) ) {
917
+ return false;
918
+ }
919
  if ( empty( $_POST['instance_hash'] ) || $_POST['instance_hash'] != $storage_hash ) {
920
  return false;
921
  }
1151
 
1152
  $headers = array(
1153
  'Content-Type: text/html; charset=UTF-8',
1154
+ 'From: ' . $this->sanitize_header( $email_fields['name'] ) . ' <' . get_option( 'admin_email' ) . '>',
1155
+ 'Reply-To: ' . $this->sanitize_header( $email_fields['name'] ) . ' <' . sanitize_email( $email_fields['email'] ) . '>',
1156
  );
1157
 
1158
  // Check if this is a duplicated send
widgets/contact/js/contact.min.js CHANGED
@@ -1 +1 @@
1
- function soContactFormInitialize(){SiteOriginContactForm.init(window.jQuery,!0)}var SiteOriginContactForm={init:function(t,i){var e=t("form.sow-contact-form");e.each(function(){var o=t(this),n=t(this).find(".sow-submit-wrapper > input.sow-submit");if(i){var a=o.find(".sow-recaptcha");if(a.length){var r=a.data("config");n.prop("disabled",!0),grecaptcha.render(a.get(0),{sitekey:r.sitekey,theme:r.theme,type:r.type,size:r.size,callback:function(t){n.prop("disabled",!1)}})}}e.submit(function(){n.prop("disabled",!0)})})}};jQuery(function(t){var i=t("form.sow-contact-form"),e=i.toArray().some(function(i){return t(i).find("div").hasClass("sow-recaptcha")});if(e)if(window.recaptcha)SiteOriginContactForm.init(t,e);else{var o="https://www.google.com/recaptcha/api.js?onload=soContactFormInitialize&render=explicit",n=t('<script type="text/javascript" src="'+o+'" async defer>');t("body").append(n)}else SiteOriginContactForm.init(t,e)});
1
+ function soContactFormInitialize(){SiteOriginContactForm.init(window.jQuery,!0)}var SiteOriginContactForm={init:function(t,i){var e=t("form.sow-contact-form");e.each(function(){var o=t(this),n=t(this).find(".sow-submit-wrapper > input.sow-submit");if(i){var a=o.find(".sow-recaptcha");if(a.length){var r=a.data("config");n.prop("disabled",!0),grecaptcha.render(a.get(0),{sitekey:r.sitekey,theme:r.theme,type:r.type,size:r.size,callback:function(t){n.prop("disabled",!1)}})}}e.submit(function(){n.prop("disabled",!0)})})}};jQuery(function(t){var i=t("form.sow-contact-form"),e=i.toArray().some(function(i){return t(i).find("div").hasClass("sow-recaptcha")});if(e)if(window.recaptcha)SiteOriginContactForm.init(t,e);else{var o=t('<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?onload=soContactFormInitialize&render=explicit" async defer>');t("body").append(o)}else SiteOriginContactForm.init(t,e)});
widgets/contact/tpl/default.php CHANGED
@@ -39,7 +39,8 @@ else {
39
  <?php endif ?>
40
 
41
  <?php $this->render_form_fields( $instance['fields'], $result['errors'], $instance ) ?>
42
- <input type="hidden" name="instance_hash" value="<?php echo esc_attr($instance_hash) ?>" />
 
43
 
44
  <?php if( $use_recaptcha ) : ?>
45
  <div class="sow-recaptcha"
39
  <?php endif ?>
40
 
41
  <?php $this->render_form_fields( $instance['fields'], $result['errors'], $instance ) ?>
42
+ <input type="hidden" name="instance_hash" value="<?php echo esc_attr( $instance_hash ) ?>" />
43
+ <?php echo wp_nonce_field() ?>
44
 
45
  <?php if( $use_recaptcha ) : ?>
46
  <div class="sow-recaptcha"
widgets/google-map/js/js-map.min.js CHANGED
@@ -1 +1 @@
1
- function soGoogleMapInitialize(){new sowb.SiteOriginGoogleMap(jQuery).initMaps()}var sowb=window.sowb||{};sowb.SiteOriginGoogleMap=function(e){return{DEFAULT_LOCATIONS:["Addo Elephant National Park, R335, Addo","Cape Town, Western Cape, South Africa","San Francisco Bay Area, CA, United States","New York, NY, United States"],showMap:function(e,o,t){var i=Number(t.zoom);i||(i=14);var n="user_map_style",a={zoom:i,scrollwheel:t.scrollZoom,draggable:t.draggable,disableDefaultUI:t.disableUi,zoomControl:t.zoomControl,panControl:t.panControl,center:o,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,n]}},s=new google.maps.Map(e,a),r={name:t.mapName},l=t.mapStyles;if(l){var d=new google.maps.StyledMapType(l,r);s.mapTypes.set(n,d),s.setMapTypeId(n)}if(t.markerAtCenter&&(this.centerMarker=new google.maps.Marker({position:o,map:s,draggable:t.markersDraggable,icon:t.markerIcon,title:""})),t.keepCentered){var c;google.maps.event.addDomListener(s,"idle",function(){c=s.getCenter()}),google.maps.event.addDomListener(window,"resize",function(){s.setCenter(c)})}this.linkAutocompleteField(t.autocomplete,t.autocompleteElement,s,t),this.showMarkers(t.markerPositions,s,t),this.showDirections(t.directions,s,t)},linkAutocompleteField:function(o,t,i,n){if(o&&t){var a=function(e){this.inputAddress!==e&&(this.inputAddress=e,this.getLocation(this.inputAddress).done(function(e){i.setZoom(15),i.setCenter(e),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(this.inputAddress))}.bind(this)))}.bind(this),s=e(t);o.addListener("place_changed",function(){var e=o.getPlace();i.setZoom(15),e.geometry&&(i.setCenter(e.geometry.location),this.centerMarker&&this.centerMarker.setPosition(e.geometry.location))}.bind(this)),google.maps.event.addDomListener(t,"keypress",function(e){var o=e.keyCode||e.which;"13"===o&&e.preventDefault()}),s.focusin(function(){if(!this.resultsObserver){var o=document.querySelector(".pac-container");this.resultsObserver=new MutationObserver(function(){var o=e(e(".pac-item").get(0)),t=o.find(".pac-item-query").text(),i=o.find("span").not("[class]").text(),n=t+(i?", "+i:"");n&&a(n)});var t={attributes:!0,childList:!0,characterData:!0};this.resultsObserver.observe(o,t)}}.bind(this));var r=function(e){this.getGeocoder().geocode({location:e},function(o,t){if(t===google.maps.GeocoderStatus.OK&&o.length>0){var i=o[0].formatted_address;s.val(i),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(i))}}.bind(this))}.bind(this);i.addListener("click",function(e){r(e.latLng)}),this.centerMarker.addListener("dragend",function(e){r(e.latLng)})}},showMarkers:function(e,o,t){if(e&&e.length){this.infoWindows=[];for(var i=[],n=10,a=0;a<e.length;a++){var s=parseInt(a/n);i.length===s&&(i[s]=[]),i[s][a%n]=e[a]}var r=function(e,i){var n=0;e.forEach(function(a){this.getLocation(a.place).done(function(s){var l=t.markerIcon;a.custom_marker_icon&&(l=a.custom_marker_icon);var d=new google.maps.Marker({position:s,map:o,draggable:t.markersDraggable,icon:l,title:""});if(a.hasOwnProperty("info")&&a.info){var c={content:a.info};a.hasOwnProperty("info_max_width")&&a.info_max_width&&(c.maxWidth=a.info_max_width);var p=t.markerInfoDisplay;c.disableAutoPan="always"===p;var g=new google.maps.InfoWindow(c);this.infoWindows.push(g);var h=p;"always"===p&&(h="click",g.open(o,d)),d.addListener(h,function(){g.open(o,d),"always"===p||t.markerInfoMultiple||this.infoWindows.forEach(function(e){e!==g&&e.close()})}.bind(this)),"mouseover"===p&&d.addListener("mouseout",function(){setTimeout(function(){g.close()},100)})}++n===e.length&&i.length&&r(i.shift(),i)}.bind(this))}.bind(this))}.bind(this);r(i.shift(),i)}},showDirections:function(e,o){if(e){e.waypoints&&e.waypoints.length&&e.waypoints.map(function(e){e.stopover=Boolean(e.stopover)});var t=new google.maps.DirectionsRenderer;t.setMap(o);var i=new google.maps.DirectionsService;i.route({origin:e.origin,destination:e.destination,travelMode:e.travelMode.toUpperCase(),avoidHighways:e.avoidHighways,avoidTolls:e.avoidTolls,waypoints:e.waypoints,optimizeWaypoints:e.optimizeWaypoints},function(e,o){o===google.maps.DirectionsStatus.OK&&t.setDirections(e)})}},initMaps:function(){var o=e(".sow-google-map-autocomplete"),t=new e.Deferred;0===o.length?t.resolve():o.each(function(o,i){if("undefined"==typeof google.maps.places)return void t.reject('Sorry, we couldn\'t load the "places" library due to another plugin, so the autocomplete feature is not available.');var n=new google.maps.places.Autocomplete(i,{types:["address"]}),a=e(i).siblings(".sow-google-map-canvas");if(a.length>0){var s=a.data("options");s.autocomplete=n,s.autocompleteElement=i,this.getLocation(s.address).done(function(e){this.showMap(a.get(0),e,s),a.data("initialized",!0),t.resolve()}.bind(this)).fail(function(){a.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>"),t.reject()})}}.bind(this)),t.always(function(){e(".sow-google-map-canvas").each(function(o,t){var i=e(t);if(i.data("initialized"))return!0;var n=i.data("options"),a=n.address;if(!a){var s=n.markerPositions;s&&s.length&&(a=s[0].place)}this.getLocation(a).done(function(e){this.showMap(i.get(0),e,n),i.data("initialized")}.bind(this)).fail(function(){i.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>")})}.bind(this))}.bind(this)).fail(function(e){console.log(e)})},getGeocoder:function(){return this._geocoder||(this._geocoder=new google.maps.Geocoder),this._geocoder},getLocation:function(o){var t,i=new e.Deferred,n={address:o};if(o&&o.indexOf(",")>-1){var a=o.split(",");a&&2===a.length&&(t=new google.maps.LatLng(a[0],a[1]),isNaN(t.lat())||isNaN(t.lng())||(n={location:{lat:t.lat(),lng:t.lng()}}))}if(n.hasOwnProperty("location"))i.resolve(n.location);else if(n.hasOwnProperty("address")){if(!n.address){var s=parseInt(Math.random()*this.DEFAULT_LOCATIONS.length);n.address=this.DEFAULT_LOCATIONS[s]}var r=function(e,o){o===google.maps.GeocoderStatus.OK?i.resolve(e[0].geometry.location):o===google.maps.GeocoderStatus.OVER_QUERY_LIMIT?setTimeout(function(){this.getGeocoder().geocode.call(this,n,r)}.bind(this),100):o===google.maps.GeocoderStatus.ZERO_RESULTS&&i.reject(o)}.bind(this);this.getGeocoder().geocode(n,r)}return i}}},jQuery(function(e){sowb.setupGoogleMaps=function(){var o,t=[];e(".sow-google-map-canvas").each(function(i,n){var a=e(n),s=a.data("options");s&&("undefined"!=typeof s.libraries&&null!==s.libraries&&(t=t.concat(s.libraries)),!o&&s.apiKey&&(o=s.apiKey))});var i="undefined"!=typeof window.google&&"undefined"!=typeof window.google.maps;if(i)soGoogleMapInitialize();else{var n="https://maps.googleapis.com/maps/api/js?callback=soGoogleMapInitialize";if(t&&t.length&&(n+="&libraries="+t.join(",")),o&&(n+="&key="+o),window.console&&window.console.error){var a=window.console.error;sowb.onLoadMapsApiError=function(o){var t=o.match(/^Google Maps API (error|warning): ([^\s]*)\s([^\s]*)(?:\s(.*))?/);t&&t.length&&t[0]&&e(".sow-google-map-canvas").each(function(o,t){var i=e(t);if(i.data("fallbackImage")){var n=i.data("fallbackImage");n.hasOwnProperty("img")&&i.append(n.img)}}),a.apply(window.console,arguments)},window.console.error=sowb.onLoadMapsApiError}e("body").append('<script async type="text/javascript" src="'+n+'">')}},sowb.setupGoogleMaps(),e(sowb).on("setup_widgets",sowb.setupGoogleMaps)}),window.sowb=sowb;
1
+ function soGoogleMapInitialize(){new sowb.SiteOriginGoogleMap(jQuery).initMaps()}var sowb=window.sowb||{};sowb.SiteOriginGoogleMap=function(e){return{DEFAULT_LOCATIONS:["Addo Elephant National Park, R335, Addo","Cape Town, Western Cape, South Africa","San Francisco Bay Area, CA, United States","New York, NY, United States"],showMap:function(e,o,t){var i=Number(t.zoom);i||(i=14);var a={zoom:i,scrollwheel:t.scrollZoom,draggable:t.draggable,disableDefaultUI:t.disableUi,zoomControl:t.zoomControl,panControl:t.panControl,center:o,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,"user_map_style"]}},n=new google.maps.Map(e,a),s={name:t.mapName},r=t.mapStyles;if(r){var l=new google.maps.StyledMapType(r,s);n.mapTypes.set("user_map_style",l),n.setMapTypeId("user_map_style")}if(t.markerAtCenter&&(this.centerMarker=new google.maps.Marker({position:o,map:n,draggable:t.markersDraggable,icon:t.markerIcon,title:""})),t.keepCentered){var c;google.maps.event.addDomListener(n,"idle",function(){c=n.getCenter()}),google.maps.event.addDomListener(window,"resize",function(){n.setCenter(c)})}this.linkAutocompleteField(t.autocomplete,t.autocompleteElement,n,t),this.showMarkers(t.markerPositions,n,t),this.showDirections(t.directions,n,t)},linkAutocompleteField:function(o,t,i,a){if(o&&t){var n=function(e){this.inputAddress!==e&&(this.inputAddress=e,this.getLocation(this.inputAddress).done(function(e){i.setZoom(15),i.setCenter(e),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(this.inputAddress))}.bind(this)))}.bind(this),s=e(t);o.addListener("place_changed",function(){var e=o.getPlace();i.setZoom(15),e.geometry&&(i.setCenter(e.geometry.location),this.centerMarker&&this.centerMarker.setPosition(e.geometry.location))}.bind(this)),google.maps.event.addDomListener(t,"keypress",function(e){"13"===(e.keyCode||e.which)&&e.preventDefault()}),s.focusin(function(){if(!this.resultsObserver){var o=document.querySelector(".pac-container");this.resultsObserver=new MutationObserver(function(){var o=e(e(".pac-item").get(0)),t=o.find(".pac-item-query").text(),i=o.find("span").not("[class]").text(),a=t+(i?", "+i:"");a&&n(a)});var t={attributes:!0,childList:!0,characterData:!0};this.resultsObserver.observe(o,t)}}.bind(this));var r=function(e){this.getGeocoder().geocode({location:e},function(o,t){if(t===google.maps.GeocoderStatus.OK&&o.length>0){var i=o[0].formatted_address;s.val(i),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(i))}}.bind(this))}.bind(this);i.addListener("click",function(e){r(e.latLng)}),this.centerMarker.addListener("dragend",function(e){r(e.latLng)})}},showMarkers:function(e,o,t){if(e&&e.length){this.infoWindows=[];for(var i=[],a=0;a<e.length;a++){var n=parseInt(a/10);i.length===n&&(i[n]=[]),i[n][a%10]=e[a]}var s=function(e,i){var a=0;e.forEach(function(n){this.getLocation(n.place).done(function(r){var l=t.markerIcon;n.custom_marker_icon&&(l=n.custom_marker_icon);var c=new google.maps.Marker({position:r,map:o,draggable:t.markersDraggable,icon:l,title:""});if(n.hasOwnProperty("info")&&n.info){var d={content:n.info};n.hasOwnProperty("info_max_width")&&n.info_max_width&&(d.maxWidth=n.info_max_width);var p=t.markerInfoDisplay;d.disableAutoPan="always"===p;var g=new google.maps.InfoWindow(d);this.infoWindows.push(g);var h=p;"always"===p&&(h="click",g.open(o,c)),c.addListener(h,function(){g.open(o,c),"always"===p||t.markerInfoMultiple||this.infoWindows.forEach(function(e){e!==g&&e.close()})}.bind(this)),"mouseover"===p&&c.addListener("mouseout",function(){setTimeout(function(){g.close()},100)})}++a===e.length&&i.length&&s(i.shift(),i)}.bind(this))}.bind(this))}.bind(this);s(i.shift(),i)}},showDirections:function(e,o){if(e){e.waypoints&&e.waypoints.length&&e.waypoints.map(function(e){e.stopover=Boolean(e.stopover)});var t=new google.maps.DirectionsRenderer;t.setMap(o);(new google.maps.DirectionsService).route({origin:e.origin,destination:e.destination,travelMode:e.travelMode.toUpperCase(),avoidHighways:e.avoidHighways,avoidTolls:e.avoidTolls,waypoints:e.waypoints,optimizeWaypoints:e.optimizeWaypoints},function(e,o){o===google.maps.DirectionsStatus.OK&&t.setDirections(e)})}},initMaps:function(){var o=e(".sow-google-map-autocomplete"),t=new e.Deferred;0===o.length?t.resolve():o.each(function(o,i){if(void 0===google.maps.places)return void t.reject('Sorry, we couldn\'t load the "places" library due to another plugin, so the autocomplete feature is not available.');var a=new google.maps.places.Autocomplete(i,{types:["address"]}),n=e(i).siblings(".sow-google-map-canvas");if(n.length>0){var s=n.data("options");s.autocomplete=a,s.autocompleteElement=i,this.getLocation(s.address).done(function(e){this.showMap(n.get(0),e,s),n.data("initialized",!0),t.resolve()}.bind(this)).fail(function(){n.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>"),t.reject()})}}.bind(this)),t.always(function(){e(".sow-google-map-canvas").each(function(o,t){var i=e(t);if(i.data("initialized"))return!0;var a=i.data("options"),n=a.address;if(!n){var s=a.markerPositions;s&&s.length&&(n=s[0].place)}this.getLocation(n).done(function(e){this.showMap(i.get(0),e,a),i.data("initialized")}.bind(this)).fail(function(){i.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>")})}.bind(this))}.bind(this)).fail(function(e){console.log(e)})},getGeocoder:function(){return this._geocoder||(this._geocoder=new google.maps.Geocoder),this._geocoder},getLocation:function(o){var t,i=new e.Deferred,a={address:o};if(o&&o.indexOf(",")>-1){var n=o.split(",");n&&2===n.length&&(t=new google.maps.LatLng(n[0],n[1]),isNaN(t.lat())||isNaN(t.lng())||(a={location:{lat:t.lat(),lng:t.lng()}}))}if(a.hasOwnProperty("location"))i.resolve(a.location);else if(a.hasOwnProperty("address")){if(!a.address){var s=parseInt(Math.random()*this.DEFAULT_LOCATIONS.length);a.address=this.DEFAULT_LOCATIONS[s]}var r=function(e,o){o===google.maps.GeocoderStatus.OK?i.resolve(e[0].geometry.location):o===google.maps.GeocoderStatus.OVER_QUERY_LIMIT?setTimeout(function(){this.getGeocoder().geocode.call(this,a,r)}.bind(this),100):o===google.maps.GeocoderStatus.ZERO_RESULTS&&i.reject(o)}.bind(this);this.getGeocoder().geocode(a,r)}return i}}},jQuery(function(e){sowb.setupGoogleMaps=function(){var o,t=[];if(e(".sow-google-map-canvas").each(function(i,a){var n=e(a),s=n.data("options");s&&(void 0!==s.libraries&&null!==s.libraries&&(t=t.concat(s.libraries)),!o&&s.apiKey&&(o=s.apiKey))}),void 0!==window.google&&void 0!==window.google.maps)soGoogleMapInitialize();else{var i="https://maps.googleapis.com/maps/api/js?callback=soGoogleMapInitialize";if(t&&t.length&&(i+="&libraries="+t.join(",")),o&&(i+="&key="+o),window.console&&window.console.error){var a=window.console.error;sowb.onLoadMapsApiError=function(o){var t=o.match(/^Google Maps API (error|warning): ([^\s]*)\s([^\s]*)(?:\s(.*))?/);t&&t.length&&t[0]&&e(".sow-google-map-canvas").each(function(o,t){var i=e(t);if(i.data("fallbackImage")){var a=i.data("fallbackImage");a.hasOwnProperty("img")&&i.append(a.img)}}),a.apply(window.console,arguments)},window.console.error=sowb.onLoadMapsApiError}e("body").append('<script async type="text/javascript" src="'+i+'">')}},sowb.setupGoogleMaps(),e(sowb).on("setup_widgets",sowb.setupGoogleMaps)}),window.sowb=sowb;
widgets/google-map/js/static-map.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery(function(a){var o=function(){a(".sowb-google-map-static").each(function(){var o=a(this),r=function(){if(o.data("fallbackImage")){var a=o.data("fallbackImage");a.hasOwnProperty("img")&&(o.parent().append(a.img),o.remove())}};this.sowbLoadError?r():this.complete||o.error(r)})};o()}),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery(function(a){!function(){a(".sowb-google-map-static").each(function(){var o=a(this),r=function(){if(o.data("fallbackImage")){var a=o.data("fallbackImage");a.hasOwnProperty("img")&&(o.parent().append(a.img),o.remove())}};this.sowbLoadError?r():this.complete||o.error(r)})}()}),window.sowb=sowb;
widgets/image-grid/js/image-grid.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery(function(i){sowb.setupImageGrids=function(){i(".sow-image-grid-wrapper").each(function(){var s=i(this);s.imagesLoaded(function(){var a=s.data("max-width"),o=s.data("max-height");void 0!==a||void 0!==o?s.find("img").each(function(){var s=i(this).css("display","block"),t=s.width()/s.height(),d=[];void 0!==a&&s.width()>a&&d.push(a),void 0!==o&&s.height()>o&&d.push(Math.round(o*t)),d.length&&(d=Math.min.apply(Math,d),s.css("max-width",d))}):s.find("img").css("display","block");var t=function(){};t(),i(window).resize(t)})})},sowb.setupImageGrids(),i(sowb).on("setup_widgets",sowb.setupImageGrids)}),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery(function(i){sowb.setupImageGrids=function(){i(".sow-image-grid-wrapper").each(function(){var s=i(this);s.imagesLoaded(function(){var a=s.data("max-width"),o=s.data("max-height");void 0!==a||void 0!==o?s.find("img").each(function(){var s=i(this).css("display","block"),t=s.width()/s.height(),d=[];void 0!==a&&s.width()>a&&d.push(a),void 0!==o&&s.height()>o&&d.push(Math.round(o*t)),d.length&&(d=Math.min.apply(Math,d),s.css("max-width",d))}):s.find("img").css("display","block");var t=function(){};i(window).resize(t)})})},sowb.setupImageGrids(),i(sowb).on("setup_widgets",sowb.setupImageGrids)}),window.sowb=sowb;
widgets/post-carousel/css/style.css CHANGED
@@ -122,6 +122,7 @@
122
  height: 100%;
123
  background: #3279BB;
124
  opacity: 0;
 
125
  }
126
  .sow-carousel-wrapper ul.sow-carousel-items li.sow-carousel-item .sow-carousel-thumbnail a:hover span {
127
  opacity: 0.5;
122
  height: 100%;
123
  background: #3279BB;
124
  opacity: 0;
125
+ position: static;
126
  }
127
  .sow-carousel-wrapper ul.sow-carousel-items li.sow-carousel-item .sow-carousel-thumbnail a:hover span {
128
  opacity: 0.5;
widgets/post-carousel/js/carousel.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){e(".sow-carousel-wrapper").each(function(){var a=e(this),t=a.closest(".sow-carousel-container"),n=a.closest(".sow-carousel-container").parent(),s=a.find(".sow-carousel-items"),i=a.find(".sow-carousel-item"),o=i.eq(0),r=0,c=1,l=!1,u=i.length,f=a.data("found-posts"),d=u==f,h=o.width()+parseInt(o.css("margin-right")),w=t.hasClass("js-rtl"),p=w?"margin-right":"margin-left",g=function(){if(r<0&&(r=0),r>=a.find(".sow-carousel-item").length-1&&(r=a.find(".sow-carousel-item").length-1,!l&&!d)){l=!0,c++,s.append('<li class="sow-carousel-item sow-carousel-loading"></li>');var t=n.find('input[name="instance_hash"]').val();e.get(a.data("ajax-url"),{query:a.data("query"),action:"sow_carousel_load",paged:c,instance_hash:t},function(t,n){var i=e(t.html);i.appendTo(s).hide().fadeIn(),a.find(".sow-carousel-loading").remove(),u=a.find(".sow-carousel-item").length,d=u==f,l=!1})}s.css("transition-duration","0.45s"),s.css(p,-(h*r)+"px")};n.on("click","a.sow-carousel-previous",function(e){e.preventDefault(),r-=w?-1:1,g()}),n.on("click","a.sow-carousel-next",function(e){e.preventDefault(),r+=w?-1:1,g()});var v,m=!1,D=0,I=0,T=0,x=0,y=w?"right":"left";"function"==typeof a.swipe&&a.swipe({excludedElements:"",triggerOnTouchEnd:!0,threshold:75,swipeStatus:function(e,a,t,n,s,i,o){if("start"==a)I=-(h*r),x=(new Date).getTime(),clearInterval(v);else if("move"==a){t==y&&(n*=-1),M(I+n);var c=(new Date).getTime(),l=(c-x)/1e3;T=(n-D)/l,x=c,D=n}else if("end"==a)if(m=!0,t==y&&(n*=-1),Math.abs(T)>400){T*=.1;var u=(new Date).getTime(),f=0;v=setInterval(function(){var e=((new Date).getTime()-u)/1e3;f+=T*e;var a=I+n+f,s=30,i=Math.abs(T)-s<0;t==y?T+=s:T-=s,!i&&M(a)||(clearInterval(v),_())},20)}else _();else"cancel"==a&&g()}});var M=function(e){return e<50&&e>-(h*u)&&(s.css("transition-duration","0s"),s.css(p,e+"px"),!0)},_=function(){var e=parseInt(s.css(p));r=Math.abs(Math.round(e/h)),g()};a.on("click",".sow-carousel-item a",function(e){m&&(e.preventDefault(),m=!1)})})});
1
+ jQuery(function(e){e(".sow-carousel-wrapper").each(function(){var a=e(this),t=a.closest(".sow-carousel-container"),n=a.closest(".sow-carousel-container").parent(),s=a.find(".sow-carousel-items"),i=a.find(".sow-carousel-item"),o=i.eq(0),r=0,c=1,l=!1,u=i.length,f=a.data("found-posts"),d=u==f,h=o.width()+parseInt(o.css("margin-right")),w=t.hasClass("js-rtl"),p=w?"margin-right":"margin-left",g=function(){if(r<0&&(r=0),r>=a.find(".sow-carousel-item").length-1&&(r=a.find(".sow-carousel-item").length-1,!l&&!d)){l=!0,c++,s.append('<li class="sow-carousel-item sow-carousel-loading"></li>');var t=n.find('input[name="instance_hash"]').val();e.get(a.data("ajax-url"),{query:a.data("query"),action:"sow_carousel_load",paged:c,instance_hash:t},function(t,n){e(t.html).appendTo(s).hide().fadeIn(),a.find(".sow-carousel-loading").remove(),u=a.find(".sow-carousel-item").length,d=u==f,l=!1})}s.css("transition-duration","0.45s"),s.css(p,-h*r+"px")};n.on("click","a.sow-carousel-previous",function(e){e.preventDefault(),r-=w?-1:1,g()}),n.on("click","a.sow-carousel-next",function(e){e.preventDefault(),r+=w?-1:1,g()});var m,v=!1,D=0,I=0,T=0,x=0,y=w?"right":"left";"function"==typeof a.swipe&&a.swipe({excludedElements:"",triggerOnTouchEnd:!0,threshold:75,swipeStatus:function(e,a,t,n,s,i,o){if("start"==a)I=-h*r,x=(new Date).getTime(),clearInterval(m);else if("move"==a){t==y&&(n*=-1),M(I+n);var c=(new Date).getTime(),l=(c-x)/1e3;T=(n-D)/l,x=c,D=n}else if("end"==a)if(v=!0,t==y&&(n*=-1),Math.abs(T)>400){T*=.1;var u=(new Date).getTime(),f=0;m=setInterval(function(){var e=((new Date).getTime()-u)/1e3;f+=T*e;var a=I+n+f,s=Math.abs(T)-30<0;t==y?T+=30:T-=30,!s&&M(a)||(clearInterval(m),_())},20)}else _();else"cancel"==a&&g()}});var M=function(e){return e<50&&e>-h*u&&(s.css("transition-duration","0s"),s.css(p,e+"px"),!0)},_=function(){var e=parseInt(s.css(p));r=Math.abs(Math.round(e/h)),g()};a.on("click",".sow-carousel-item a",function(e){v&&(e.preventDefault(),v=!1)})})});
widgets/price-table/js/pricetable.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(t){t(".so-widget-sow-price-table .sow-equalize-row-heights").each(function(){var i=t(this),a=function(a){var o=0,e=i.find(a);e.each(function(){o=Math.max(o,t(this).height())}),e.height(o)},o=0;i.find(".ow-pt-features").each(function(){o=Math.max(o,t(this).find(".ow-pt-feature").length)});for(var e=0;e<o;e++)a(".ow-pt-feature-index-"+e);var n=[".ow-pt-title",".ow-pt-details",".ow-pt-image",".ow-pt-features",".ow-pt-button"];n.forEach(a)}),t(".ow-pt-icon[data-icon]").each(function(){var i=t(this),a=i.data("icon");if(t("#so-pt-icon-"+a).length){var o=t("#so-pt-icon-"+a+" svg").clone().css({"max-width":24,"max-height":24});""!==i.data("icon-color")?o.find("path").css("fill",i.data("icon-color")):o.find("path").css("fill","#333333"),i.append(o)}})});
1
+ jQuery(function(t){t(".so-widget-sow-price-table .sow-equalize-row-heights").each(function(){var i=t(this),o=function(o){var a=0,e=i.find(o);e.each(function(){a=Math.max(a,t(this).height())}),e.height(a)},a=0;i.find(".ow-pt-features").each(function(){a=Math.max(a,t(this).find(".ow-pt-feature").length)});for(var e=0;e<a;e++)o(".ow-pt-feature-index-"+e);[".ow-pt-title",".ow-pt-details",".ow-pt-image",".ow-pt-features",".ow-pt-button"].forEach(o)}),t(".ow-pt-icon[data-icon]").each(function(){var i=t(this),o=i.data("icon");if(t("#so-pt-icon-"+o).length){var a=t("#so-pt-icon-"+o+" svg").clone().css({"max-width":24,"max-height":24});""!==i.data("icon-color")?a.find("path").css("fill",i.data("icon-color")):a.find("path").css("fill","#333333"),i.append(a)}})});
widgets/simple-masonry/js/simple-masonry.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery(function(t){sowb.setupSimpleMasonries=function(){var i=t(".sow-masonry-grid"),a=function(){i.each(function(){var i=t(this),a=i.data("layouts"),e=window.matchMedia("(max-width: "+a.tablet.breakPoint+"px)"),s=window.matchMedia("(max-width: "+a.mobile.breakPoint+"px)"),o=a.desktop;s.matches?o=a.mobile:e.matches&&(o=a.tablet);var n=o.numColumns;i.css("width","auto");var h=o.gutter*(n-1),r=Math.floor((i.width()-h)/n);i.width(r*n+h),i.imagesLoaded(function(){i.find("> .sow-masonry-grid-item").each(function(){var i=t(this),a=i.data("colSpan");a=Math.max(Math.min(a,o.numColumns),1),i.width(r*a+o.gutter*(a-1));var e=i.data("rowSpan");e=Math.max(Math.min(e,o.numColumns),1);var s=o.rowHeight||r;i.css("height",s*e+o.gutter*(e-1));var n=i.find("> img,> a > img"),h=n.attr("height")>0?n.attr("width")/n.attr("height"):1,w=i.height()>0?i.width()/i.height():1;if(h=parseFloat(h.toFixed(3)),w=parseFloat(w.toFixed(3)),h>w){n.css("width","auto"),n.css("height","100%"),n.css("margin-top","");var m=(n.width()-i.width())*-.5;n.css("margin-left",m+"px")}else{n.css("height","auto"),n.css("width","100%"),n.css("margin-left","");var d=(n.height()-i.height())*-.5;n.css("margin-top",d+"px")}}),i.packery({itemSelector:".sow-masonry-grid-item",columnWidth:r,gutter:o.gutter})})})};t(window).on("resize panelsStretchRows",a),setTimeout(function(){a()},100)},sowb.setupSimpleMasonries(),t(sowb).on("setup_widgets",sowb.setupSimpleMasonries)}),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery(function(t){sowb.setupSimpleMasonries=function(){var i=t(".sow-masonry-grid"),a=function(){i.each(function(){var i=t(this),a=i.data("layouts"),e=window.matchMedia("(max-width: "+a.tablet.breakPoint+"px)"),s=window.matchMedia("(max-width: "+a.mobile.breakPoint+"px)"),o=a.desktop;s.matches?o=a.mobile:e.matches&&(o=a.tablet);var n=o.numColumns;i.css("width","auto");var h=o.gutter*(n-1),r=Math.floor((i.width()-h)/n);i.width(r*n+h),i.imagesLoaded(function(){i.find("> .sow-masonry-grid-item").each(function(){var i=t(this),a=i.data("colSpan");a=Math.max(Math.min(a,o.numColumns),1),i.width(r*a+o.gutter*(a-1));var e=i.data("rowSpan");e=Math.max(Math.min(e,o.numColumns),1);var s=o.rowHeight||r;i.css("height",s*e+o.gutter*(e-1));var n=i.find("> img,> a > img"),h=n.attr("height")>0?n.attr("width")/n.attr("height"):1,w=i.height()>0?i.width()/i.height():1;if(h=parseFloat(h.toFixed(3)),w=parseFloat(w.toFixed(3)),h>w){n.css("width","auto"),n.css("height","100%"),n.css("margin-top","");var m=-.5*(n.width()-i.width());n.css("margin-left",m+"px")}else{n.css("height","auto"),n.css("width","100%"),n.css("margin-left","");var d=-.5*(n.height()-i.height());n.css("margin-top",d+"px")}}),i.packery({itemSelector:".sow-masonry-grid-item",columnWidth:r,gutter:o.gutter})})})};t(window).on("resize panelsStretchRows",a),setTimeout(function(){a()},100)},sowb.setupSimpleMasonries(),t(sowb).on("setup_widgets",sowb.setupSimpleMasonries)}),window.sowb=sowb;
widgets/social-media-buttons/js/social-media-buttons-admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(i){i(document).on("sowsetupform",'.siteorigin-widget-form[data-class="SiteOrigin_Widget_SocialMediaButtons_Widget"]',function(){var o=i(this),t=function(i){window.sowbForms.fetchWidgetVariable("networks","SiteOrigin_Widget_SocialMediaButtons_Widget",function(o){var t=o[i.find(":selected").val()];if(t){var e=i.closest(".siteorigin-widget-field-repeater-item-form"),n=e.find('[id*="networks-url"]');n.val(t.base_url);var r=e.find('[id*="networks-icon_color"]');r.wpColorPicker("color",t.icon_color);var d=e.find('[id*="networks-button_color"]');d.wpColorPicker("color",t.button_color)}})};"undefined"==typeof o.data("initialised")&&(o.on("change",'[id*="networks-name"]',function(o){t(i(o.target))}),o.data("initialised",!0))})}(jQuery);
1
+ !function(i){i(document).on("sowsetupform",'.siteorigin-widget-form[data-class="SiteOrigin_Widget_SocialMediaButtons_Widget"]',function(){var o=i(this),t=function(i){window.sowbForms.fetchWidgetVariable("networks","SiteOrigin_Widget_SocialMediaButtons_Widget",function(o){var t=o[i.find(":selected").val()];if(t){var e=i.closest(".siteorigin-widget-field-repeater-item-form");e.find('[id*="networks-url"]').val(t.base_url);e.find('[id*="networks-icon_color"]').wpColorPicker("color",t.icon_color);e.find('[id*="networks-button_color"]').wpColorPicker("color",t.button_color)}})};void 0===o.data("initialised")&&(o.on("change",'[id*="networks-name"]',function(o){t(i(o.target))}),o.data("initialised",!0))})}(jQuery);
widgets/video/js/so-video-widget.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery(function(e){sowb.setupVideoPlayers=function(){var e=jQuery;e("video.sow-video-widget").mediaelementplayer()},sowb.setupVideoPlayers(),e(sowb).on("setup_widgets",sowb.setupVideoPlayers)}),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery(function(e){sowb.setupVideoPlayers=function(){jQuery("video.sow-video-widget").mediaelementplayer()},sowb.setupVideoPlayers(),e(sowb).on("setup_widgets",sowb.setupVideoPlayers)}),window.sowb=sowb;