03502832[1].js

var Chevrons;(function(n){function f(n,t,i){return new u(n,t,i)}var i=”disabled”,r=”hidden”,t=”darkchv”,u=function(){function n(n,t,i){var r=this;this.controlId=n;this.prevSlideBtn=t;this.nextSlideBtn=i;this.onPrevClick(function(){sj_evt.fire(“slideexp_slideprev”,r.controlId);Log.Log(“Prev”,”SlideExp”,”Chevron”)});this.onNextClick(function(){sj_evt.fire(“slideexp_slidenext”,r.controlId);Log.Log(“Next”,”SlideExp”,”Chevron”)});this.onMouseOver(function(){sj_evt.fire(“slideexp_pauseautoslide”,r.controlId)});this.onMouseOut(function(){sj_evt.fire(“slideexp_resumeautoslide”,r.controlId)});sj_evt.bind(“slideexp_leftmost”,function(n){r.isForMe(n)&&(r.disablePrev(!0),r.disableNext(!1))});sj_evt.bind(“slideexp_rightmost”,function(n){r.isForMe(n)&&(r.disablePrev(!1),r.disableNext(!0))});sj_evt.bind(“slideexp_middle”,function(n){r.isForMe(n)&&(r.disablePrev(!1),r.disableNext(!1))});sj_evt.bind(“slideexp_leftrightmost”,function(n){r.isForMe(n)&&(r.disablePrev(!0),r.disableNext(!0))});sj_evt.bind(“slideexp_mouseover_show”,function(n){r.isForMe(n)&&r.show()});sj_evt.bind(“slideexp_mouseout_hide”,function(n){r.isForMe(n)&&r.hide()});sj_evt.bind(“slideexp_mouseover_dark”,function(n){r.isForMe(n)&&r.changToDark()});sj_evt.bind(“slideexp_mouseout_light”,function(n){r.isForMe(n)&&r.changToLight()})}return n.prototype.onPrevClick=function(n){this.prevSlideBtn!=null&&this.nextSlideBtn!=null&&n&&sj_be(this.prevSlideBtn,”click”,n)},n.prototype.onNextClick=function(n){this.prevSlideBtn!=null&&this.nextSlideBtn!=null&&n&&sj_be(this.nextSlideBtn,”click”,n)},n.prototype.onMouseOver=function(n){this.prevSlideBtn!=null&&this.nextSlideBtn!=null&&n&&(sj_be(this.prevSlideBtn,”mouseover”,n),sj_be(this.nextSlideBtn,”mouseover”,n))},n.prototype.onMouseOut=function(n){this.prevSlideBtn!=null&&this.nextSlideBtn!=null&&n&&(sj_be(this.prevSlideBtn,”mouseout”,n),sj_be(this.nextSlideBtn,”mouseout”,n))},n.prototype.show=function(){this.setHidden(!1)},n.prototype.changToDark=function(){this.prevSlideBtn!=null&&this.nextSlideBtn!=null&&(Lib.CssClass.add(this.prevSlideBtn,t),Lib.CssClass.add(this.nextSlideBtn,t))},n.prototype.hide=function(){this.setHidden(!0)},n.prototype.changToLight=function(){this.prevSlideBtn!=null&&this.nextSlideBtn!=null&&(Lib.CssClass.remove(this.prevSlideBtn,t),Lib.CssClass.remove(this.nextSlideBtn,t))},n.prototype.disablePrev=function(n){this.prevSlideBtn!=null&&this.updateClassIf(this.prevSlideBtn,n,i)},n.prototype.disableNext=function(n){this.nextSlideBtn!=null&&this.updateClassIf(this.nextSlideBtn,n,i)},n.prototype.setHidden=function(n){this.prevSlideBtn!=null&&this.nextSlideBtn!=null&&(this.updateClassIf(this.prevSlideBtn,n,r),this.updateClassIf(this.nextSlideBtn,n,r))},n.prototype.updateClassIf=function(n,t,i){t?Lib.CssClass.add(n,i):Lib.CssClass.remove(n,i)},n.prototype.isForMe=function(n){return n[1]===this.controlId},n}();n.init=f;sj_evt.fire(“chevrons_init”,u)})(Chevrons||(Chevrons={}))

jquery.blockui.min[1].js

/*!
* jQuery blockUI plugin
* Version 2.70.0-2014.11.23
* Requires jQuery v1.7 or later
*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007-2013 * Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Thanks for some excellent contributions!
*/
!function(){“use strict”;function e(e){function t(t,n){var s,h,k=t==window,y=n&&void 0!==n.message?n.message:void 0;if(n=e.extend({},e.blockUI.defaults,n||{}),!n.ignoreIfBlocked||!e(t).data(“blockUI.isBlocked”)){if(n.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,n.overlayCSS||{}),s=e.extend({},e.blockUI.defaults.css,n.css||{}),n.onOverlayClick&&(n.overlayCSS.cursor=”pointer”),h=e.extend({},e.blockUI.defaults.themedCSS,n.themedCSS||{}),y=void 0===y?n.message:y,k&&p&&o(window,{fadeOut:0}),y&&”string”!=typeof y&&(y.parentNode||y.jquery)){var m=y.jquery?y[0]:y,v={};e(t).data(“blockUI.history”,v),v.el=m,v.parent=m.parentNode,v.display=m.style.display,v.position=m.style.position,v.parent&&v.parent.removeChild(m)}e(t).data(“blockUI.onUnblock”,n.onUnblock);var g,I,w,U,x=n.baseZ;g=e(r||n.forceIframe?’

‘:’

‘),I=e(n.theme?’

‘:’

‘),n.theme&&k?(U=’

“):n.theme?(U=’

“):U=k?’

‘:’

‘,w=e(U),y&&(n.theme?(w.css(h),w.addClass(“ui-widget-content”)):w.css(s)),n.theme||I.css(n.overlayCSS),I.css(“position”,k?”fixed”:”absolute”),(r||n.forceIframe)&&g.css(“opacity”,0);var C=[g,I,w],S=e(k?”body”:t);e.each(C,function(){this.appendTo(S)}),n.theme&&n.draggable&&e.fn.draggable&&w.draggable({handle:”.ui-dialog-titlebar”,cancel:”li”});var O=f&&(!e.support.boxModel||e(“object,embed”,k?null:t).length>0);if(u||O){if(k&&n.allowBodyStretch&&e.support.boxModel&&e(“html,body”).css(“height”,”100%”),(u||!e.support.boxModel)&&!k)var E=d(t,”borderTopWidth”),T=d(t,”borderLeftWidth”),M=E?”(0 – “+E+”)”:0,B=T?”(0 – “+T+”)”:0;e.each(C,function(e,t){var o=t[0].style;if(o.position=”absolute”,2>e)k?o.setExpression(“height”,”Math.max(document.body.scrollHeight, document.body.offsetHeight) – (jQuery.support.boxModel?0:”+n.quirksmodeOffsetHack+’) + “px”‘):o.setExpression(“height”,’this.parentNode.offsetHeight + “px”‘),k?o.setExpression(“width”,’jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + “px”‘):o.setExpression(“width”,’this.parentNode.offsetWidth + “px”‘),B&&o.setExpression(“left”,B),M&&o.setExpression(“top”,M);else if(n.centerY)k&&o.setExpression(“top”,'(document.documentElement.clientHeight || document.body.clientHeight) / 2 – (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + “px”‘),o.marginTop=0;else if(!n.centerY&&k){var i=n.css&&n.css.top?parseInt(n.css.top,10):0,s=”((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + “+i+’) + “px”‘;o.setExpression(“top”,s)}})}if(y&&(n.theme?w.find(“.ui-widget-content”).append(y):w.append(y),(y.jquery||y.nodeType)&&e(y).show()),(r||n.forceIframe)&&n.showOverlay&&g.show(),n.fadeIn){var j=n.onBlock?n.onBlock:c,H=n.showOverlay&&!y?j:c,z=y?j:c;n.showOverlay&&I._fadeIn(n.fadeIn,H),y&&w._fadeIn(n.fadeIn,z)}else n.showOverlay&&I.show(),y&&w.show(),n.onBlock&&n.onBlock.bind(w)();if(i(1,t,n),k?(p=w[0],b=e(n.focusableElements,p),n.focusInput&&setTimeout(l,20)):a(w[0],n.centerX,n.centerY),n.timeout){var W=setTimeout(function(){k?e.unblockUI(n):e(t).unblock(n)},n.timeout);e(t).data(“blockUI.timeout”,W)}}}function o(t,o){var s,l=t==window,a=e(t),d=a.data(“blockUI.history”),c=a.data(“blockUI.timeout”);c&&(clearTimeout(c),a.removeData(“blockUI.timeout”)),o=e.extend({},e.blockUI.defaults,o||{}),i(0,t,o),null===o.onUnblock&&(o.onUnblock=a.data(“blockUI.onUnblock”),a.removeData(“blockUI.onUnblock”));var r;r=l?e(“body”).children().filter(“.blockUI”).add(“body > .blockUI”):a.find(“>.blockUI”),o.cursorReset&&(r.length>1&&(r[1].style.cursor=o.cursorReset),r.length>2&&(r[2].style.cursor=o.cursorReset)),l&&(p=b=null),o.fadeOut?(s=r.length,r.stop().fadeOut(o.fadeOut,function(){0===–s&&n(r,d,o,t)})):n(r,d,o,t)}function n(t,o,n,i){var s=e(i);if(!s.data(“blockUI.isBlocked”)){t.each(function(){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor=”default”,o.parent&&o.parent.appendChild(o.el),s.removeData(“blockUI.history”)),s.data(“blockUI.static”)&&s.css(“position”,”static”),”function”==typeof n.onUnblock&&n.onUnblock(i,n);var l=e(document.body),a=l.width(),d=l[0].style.width;l.width(a-1).width(a),l[0].style.width=d}}function i(t,o,n){var i=o==window,l=e(o);if((t||(!i||p)&&(i||l.data(“blockUI.isBlocked”)))&&(l.data(“blockUI.isBlocked”,t),i&&n.bindEvents&&(!t||n.showOverlay))){var a=”mousedown mouseup keydown keypress keyup touchstart touchend touchmove”;t?e(document).bind(a,n,s):e(document).unbind(a,s)}}function s(t){if(“keydown”===t.type&&t.keyCode&&9==t.keyCode&&p&&t.data.constrainTabKey){var o=b,n=!t.shiftKey&&t.target===o[o.length-1],i=t.shiftKey&&t.target===o[0];if(n||i)return setTimeout(function(){l(i)},10),!1}var s=t.data,a=e(t.target);return a.hasClass(“blockOverlay”)&&s.onOverlayClick&&s.onOverlayClick(t),a.parents(“div.”+s.blockMsgClass).length>0?!0:0===a.parents().children().filter(“div.blockUI”).length}function l(e){if(b){var t=b[e===!0?b.length-1:0];t&&t.focus()}}function a(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-d(n,”borderLeftWidth”),l=(n.offsetHeight-e.offsetHeight)/2-d(n,”borderTopWidth”);t&&(i.left=s>0?s+”px”:”0″),o&&(i.top=l>0?l+”px”:”0″)}function d(t,o){return parseInt(e.css(t,o),10)||0}e.fn._fadeIn=e.fn.fadeIn;var c=e.noop||function(){},r=/MSIE/.test(navigator.userAgent),u=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),f=(document.documentMode||0,e.isFunction(document.createElement(“div”).style.setExpression));e.blockUI=function(e){t(window,e)},e.unblockUI=function(e){o(window,e)},e.growlUI=function(t,o,n,i){var s=e(‘

‘);t&&s.append(”

“+t+”

“),o&&s.append(”

“+o+”

“),void 0===n&&(n=3e3);var l=function(t){t=t||{},e.blockUI({message:s,fadeIn:”undefined”!=typeof t.fadeIn?t.fadeIn:700,fadeOut:”undefined”!=typeof t.fadeOut?t.fadeOut:1e3,timeout:”undefined”!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};l();s.css(“opacity”);s.mouseover(function(){l({fadeIn:0,timeout:3e4});var t=e(“.blockMsg”);t.stop(),t.fadeTo(300,1)}).mouseout(function(){e(“.blockMsg”).fadeOut(1e3)})},e.fn.block=function(o){if(this[0]===window)return e.blockUI(o),this;var n=e.extend({},e.blockUI.defaults,o||{});return this.each(function(){var t=e(this);n.ignoreIfBlocked&&t.data(“blockUI.isBlocked”)||t.unblock({fadeOut:0})}),this.each(function(){“static”==e.css(this,”position”)&&(this.style.position=”relative”,e(this).data(“blockUI.static”,!0)),this.style.zoom=1,t(this,o)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){o(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:”

Please wait…

“,title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:”30%”,top:”40%”,left:”35%”,textAlign:”center”,color:”#000″,border:”3px solid #aaa”,backgroundColor:”#fff”,cursor:”wait”},themedCSS:{width:”30%”,top:”40%”,left:”35%”},overlayCSS:{backgroundColor:”#000″,opacity:.6,cursor:”wait”},cursorReset:”default”,growlCSS:{width:”350px”,top:”10px”,left:””,right:”10px”,border:”none”,padding:”5px”,opacity:.6,cursor:”default”,color:”#fff”,backgroundColor:”#000″,”-webkit-border-radius”:”10px”,”-moz-border-radius”:”10px”,”border-radius”:”10px”},iframeSrc:/^https/i.test(window.location.href||””)?”javascript:false”:”about:blank”,forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:”:input:enabled:visible”,onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:”blockMsg”,ignoreIfBlocked:!1};var p=null,b=[]}”function”==typeof define&&define.amd&&define.amd.jQuery?define([“jquery”],e):e(jQuery)}();

ctEmailModal[1].js

/* |!| Uglify |!| : Date 25-09-2018 /
!function(){var a=function(a){var b=a.gtmParams||{},c=a.cookieParams||{},d=a.actionParams||use”,and:e.and||”and”,endterms:e.endterms||”private policy”,placeholder:e.placeholder||”Enter Your Email”,signme:e.signme||”Sign me up >”,brandColor:e.brandColor||”#F9AE39″,termslink:e.termslink||”http://www.purch.com/terms-of-use/”,policylink:e.policylink||”http://www.purch.com/privacy-policy/”},this.init()};a.prototype={createCookie:function(a,b,c){c||(c=1095);var d=new Date;d.setTime(d.getTime()+24
c6060*1e3),document.cookie=a+”=”+b+”; expires=”+d.toGMTString()+”; path=/”},readCookie:function(a){var b=document.cookie;if(b.length>0){var c=b.indexOf(a+”=”);if(-1!==c){c=c+a.length+1;var d=b.indexOf(“;”,c);return-1===d&&(d=b.length),!0}}return!1},trackingGtm:function(a){var b=window.gtmDataLayer||window.dataLayer||[];b.push({event:this.gtmTracking.event,action:a||”pop-up”,location:this.gtmTracking.location})},submit_by_id:function(a){this.submitCondition(a)!==!1&&this.submitCondition(a),this.trackingGtm(this.gtmTracking.submit);var b=this.actionConf.onSubmitRedirect,c=document.forms.emailForm,d=this;if(void 0!==c.email.value&&””!==c.email.value){document.getElementById(“form-submit”).style.display=”none”,document.getElementById(“form-spinner”).style.display=””;var e=”email=”+c.email.value+”&nlPlacement=”+c.nlPlacement.value,f=new XMLHttpRequest;f.onreadystatechange=function(){4===this.readyState&&200===this.status&&(d.createCookie(d.cookieConf.name,d.cookieConf.value),document.getElementById(“ec-popup-modal”).setAttribute(“style”,”display:none”),b===!0&&(window.document.location.href=document.getElementById(“redirectUrl”).value),document.getElementById(“form-spinner”).style.display=”none”,document.getElementById(“form-submit”).style.display=””)},f.open(“POST”,c.action,!0),f.timeout=6e3,f.ontimeout=function(){document.getElementById(“ec-popup-modal”).setAttribute(“style”,”display:none”),b===!0&&(window.document.location.href=document.getElementById(“redirectUrl”).value),document.getElementById(“form-spinner”).style.display=”none”,document.getElementById(“form-submit”).style.display=””},f.setRequestHeader(“Content-type”,”application/x-www-form-urlencoded”),f.send(e)}else a.preventDefault(),document.getElementById(“form-spinner”).style.display=”none”},close_email:function(){var a=(document.forms.emailForm,document.getElementById(“ec-popup-modal”));a.setAttribute(“style”,”display:none”),document.body.style.overflow=””,this.trackingGtm(this.gtmTracking.close),this.actionConf.onCloseRedirect===!0&&(window.document.location.href=document.getElementById(“redirectUrl”).value)},closeModal:function(a){document.forms.emailForm;a===!0&&document.addEventListener(“click”,function(a){“ec-popup-modal”===a.target.id&&(document.getElementById(“ec-popup-modal”).setAttribute(“style”,”display:none”),window.document.location.href=document.getElementById(“redirectUrl”).value)})},init:function(){this.modalDisplay(),this.firstAction(this.actionConf.firstActionEnabled),this.secondAction(this.actionConf.secondActionEnabled),this.closeModal(this.actionConf.closeModalOnClick)},openModal:function(){document.getElementById(“ec-popup-modal”).setAttribute(“style”,”display:block”),this.createCookie(this.cookieConf.name,this.cookieConf.value,this.cookieConf.days),this.trackingGtm(this.gtmTracking.display)},modalDisplay:function(){var a=this,b=document.createElement(“div”);b.id=”ec-popup-modal”,b.setAttribute(“class”,”ec-popup-modal”),b.setAttribute(“style”,”display:none”);var c=window.location.href,d=”.ec-popup-modal {position: fixed; width: 100%; height: 100%; z-index: 2147483648; background-color: rgba(0,0,0,.6); top: 0; left: 0; } .ec-popup-modal-content {width: 600px; background-color: #fff; position: absolute; top: 150px; left: 50%; margin-left: -300px; text-align: center; border-top:7px solid “+a.textModal.brandColor+’; } .ec-popup-modal-content .top-text {background-color: white; color: black; font-family: “Open Sans”,Arial,sans-serif; } .ec-popup-modal-content .top-text h3 {font-size:16px; } .ec-popup-modal-content .top-text h2 {font-size:24px; font-weight:bold; } .ec-popup-modal-content .email-submit {padding: 10px 30px; background: ‘+a.textModal.brandColor+”; color:white; border: none; font-size: 16px; margin-top: 15px; } .ec-popup-modal-content .close-btn {position: absolute; right: 0; padding: 5px 7px; color: #777; font-size: 150%; cursor:pointer; } .close-btn:hover {color: #808080; } .ec-popup-modal-content #email {margin: 15px 0 0; padding: 5px; font-family: Arial, sans-serif; font-size: 16px; width: 80%; } .ec-popup-modal-content .modal-fineprint {font-size: 12px; margin-bottom: 15px; margin-top: 35px; color: #767676 } .ec-popup-modal-content .modal-fineprint a {text-decoration:underline; } @media screen and (max-width:414px){.ec-popup-modal-content{width: 300px;margin-left: -150px;}.ec-popup-modal-content #email {margin: 10px auto;text-align: center;}}”,e=document.createElement(“style”);e.type=”text/css”,e.innerHTML=d,document.querySelector(“head”).appendChild(e);var f=’

‘+a.textModal.upperText+’

‘+a.textModal.lowerText+’


“;b.innerHTML=f,document.body.appendChild(b);var g=document.querySelectorAll(“.ec-popup-modal-content”),h=g[0].childNodes[0],i=document.getElementById(“ec-popup-privacypolicy”),j=document.getElementById(“ec-popup-termsofuse”);h.addEventListener(“click”,function(b){a.close_email()}),i.addEventListener(“click”,function(b){a.trackingGtm(a.gtmTracking.privacyPolicy)}),j.addEventListener(“click”,function(b){a.trackingGtm(a.gtmTracking.termsOfUse)}),document.querySelectorAll(“.email-submit”)[0].addEventListener(“click”,function(b){b.preventDefault(),a.submit_by_id(b)})},firstAction:function(a){var b=this;return a!==!0?null:void document.addEventListener(b.actionConf.onFirstEventListener,function(a){b.customCondition.call(b,a)},!0)},secondAction:function(a){var b=this;return a!==!0?null:void document.addEventListener(b.actionConf.onSecondEventListener,function(a){b.customEndCondition.call(b,a)},!0)}},window.Purch=window.Purch||{},window.Purch.ctEmailModal=a}();

transform.h

/* Affine transforms.
*/

/*

Copyright (C) 1991-2003 The National Gallery

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA

*/

/*

These files are distributed with VIPS – http://www.vips.ecs.soton.ac.uk

*/

#ifndef VIPS_TRANSFORM_H
#define VIPS_TRANSFORM_H

#ifdef __cplusplus
extern “C” {
#endif /__cplusplus/

/* Params for an affine transformation.
/
typedef struct {
/
Area of input we can use. This can be smaller than the real input
* image: we expand the input to add extra pixels for interpolation.
*/
VipsRect iarea;

/* The area of the output we’ve been asked to generate. left/top can
* be negative.
*/
VipsRect oarea;

/* The transform.
*/
double a, b, c, d;
double idx, idy;
double odx, ody;

double ia, ib, ic, id; /* Inverse of matrix abcd */
} VipsTransformation;

void vips__transform_init( VipsTransformation *trn );
int vips__transform_calc_inverse( VipsTransformation *trn );
int vips__transform_isidentity( const VipsTransformation *trn );
int vips__transform_add( const VipsTransformation *in1,
const VipsTransformation *in2,
VipsTransformation *out );
void vips__transform_print( const VipsTransformation *trn );

void vips__transform_forward_point( const VipsTransformation *trn,
const double x, const double y, double *ox, double *oy );
void vips__transform_invert_point( const VipsTransformation *trn,
const double x, const double y, double *ox, double *oy );
void vips__transform_forward_rect( const VipsTransformation *trn,
const VipsRect *in, VipsRect *out );
void vips__transform_invert_rect( const VipsTransformation *trn,
const VipsRect *in, VipsRect *out );

void vips__transform_set_area( VipsTransformation * );

int vips__affine( VipsImage *in, VipsImage *out, VipsTransformation *trn );

#ifdef __cplusplus
}
#endif /__cplusplus/

#endif /VIPS_TRANSFORM_H/

reversion-history-20160413

/**
* Attempt to re-color SVG icons used in the admin menu or the toolbar
*
*/

window.wp = window.wp || {};

wp.svgPainter = ( function( $, window, document, undefined ) {
‘use strict’;
var selector, base64, painter,
colorscheme = {},
elements = [];

$(document).ready( function() {
// detection for browser SVG capability
if ( document.implementation.hasFeature( ‘http://www.w3.org/TR/SVG11/feature#Image’, ‘1.1’ ) ) {
$( document.body ).removeClass( ‘no-svg’ ).addClass( ‘svg’ );
wp.svgPainter.init();
}
});

/**
* Needed only for IE9
*
* Based on jquery.base64.js 0.0.3
*
*
* Copyright (c) 2012 Micheal Jones (http://plainwareblog.com)
* Licensed under the MIT license
* http://www.opensource.org/licenses/mit-license.php
*/
base64 = ( function() {
var c,
b64 = ‘ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/’,
a256 = ”,
r64 = [256],
r256 = [256],
i = 0;

function init() {
while( i < 256 ) {
c = String.fromCharCode(i);
a256 += c;
r256[i] = i;
r64[i] = b64.indexOf(c);
++i;
}
}

    function code( s, discard, alpha, beta, w1, w2 ) {
        var tmp, length,
            buffer = 0,
            i = 0,
            result = '',
            bitsInBuffer = 0;

        s = String(s);
        length = s.length;

        while( i &lt; length ) {
            c = s.charCodeAt(i);
            c = c &lt; 256 ? alpha[c] : -1;

            buffer = ( buffer &lt;&lt; w1 ) + c;
            bitsInBuffer += w1;

            while( bitsInBuffer &gt;= w2 ) {

bitsInBuffer -= w2;
tmp = buffer >> bitsInBuffer;
result += beta.charAt(tmp);
buffer ^= tmp << bitsInBuffer;
}
++i;
}

        if ( ! discard &amp;&amp; bitsInBuffer &gt; 0 ) {

result += beta.charAt( buffer << ( w2 – bitsInBuffer ) );
}

        return result;
    }

    function btoa( plain ) {
        if ( ! c ) {
            init();
        }

        plain = code( plain, false, r256, b64, 8, 6 );
        return plain + '===='.slice( ( plain.length % 4 ) || 4 );
    }

    function atob( coded ) {
        var i;

        if ( ! c ) {
            init();
        }

        coded = coded.replace( /[^A-Za-z0-9\+\/\=]/g, '' );
        coded = String(coded).split('=');
        i = coded.length;

        do {
            --i;
            coded[i] = code( coded[i], true, r64, a256, 6, 8 );
        } while ( i &gt; 0 );

coded = coded.join(”);
return coded;
}

return {
atob: atob,
btoa: btoa
};
})();

return {
init: function() {
painter = this;
selector = $( ‘#adminmenu .wp-menu-image, #wpadminbar .ab-item’ );

this.setColors();
this.findElements();
this.paint();
},

setColors: function( colors ) {
if ( typeof colors === ‘undefined’ && typeof window._wpColorScheme !== ‘undefined’ ) {
colors = window._wpColorScheme;
}

if ( colors && colors.icons && colors.icons.base && colors.icons.current && colors.icons.focus ) {
colorscheme = colors.icons;
}
},

findElements: function() {
selector.each( function() {
var $this = $(this), bgImage = $this.css( ‘background-image’ );

if ( bgImage && bgImage.indexOf( ‘data:image/svg+xml;base64’ ) != -1 ) {
elements.push( $this );
}
});
},

paint: function() {
// loop through all elements
$.each( elements, function( index, $element ) {
var $menuitem = $element.parent().parent();

if ( $menuitem.hasClass( ‘current’ ) || $menuitem.hasClass( ‘wp-has-current-submenu’ ) ) {
// paint icon in ‘current’ color
painter.paintElement( $element, ‘current’ );
} else {
// paint icon in base color
painter.paintElement( $element, ‘base’ );

// set hover callbacks
$menuitem.hover(
function() {
painter.paintElement( $element, ‘focus’ );
},
function() {
// Match the delay from hoverIntent
window.setTimeout( function() {
painter.paintElement( $element, ‘base’ );
}, 100 );
}
);
}
});
},

paintElement: function( $element, colorType ) {
var xml, encoded, color;

if ( ! colorType || ! colorscheme.hasOwnProperty( colorType ) ) {
return;
}

color = colorscheme[ colorType ];

// only accept hex colors: #101 or #101010
if ( ! color.match( /^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i ) ) {
return;
}

xml = $element.data( ‘wp-ui-svg-‘ + color );

if ( xml === ‘none’ ) {
return;
}

if ( ! xml ) {
encoded = $element.css( ‘background-image’ ).match( /.+data:image\/svg+xml;base64,([A-Za-z0-9+\/\=]+)/ );

if ( ! encoded || ! encoded[1] ) {
$element.data( ‘wp-ui-svg-‘ + color, ‘none’ );
return;
}

try {
if ( ‘atob’ in window ) {
xml = window.atob( encoded[1] );
} else {
xml = base64.atob( encoded[1] );
}
} catch ( error ) {}

if ( xml ) {
// replace fill attributes
xml = xml.replace( /fill=”(.+?)”/g, ‘fill=”‘ + color + ‘”‘);

// replace style attributes
xml = xml.replace( /style=”(.+?)”/g, ‘style=”fill:’ + color + ‘”‘);

// replace fill properties in `