0?".".concat(t):e},s=u.slice();s.push((function(e){e.type===ke&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Tn,n).replace(r,c))})),a.prefix&&s.push(pt),s.push(st);var f=function(e,o,i,l){void 0===o&&(o=""),void 0===i&&(i=""),void 0===l&&(l="&"),t=l,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var u=e.replace(An,""),c=dt(i||o?"".concat(i," ").concat(o," { ").concat(u," }"):u);a.namespace&&(c=Rn(c,a.namespace));var f,p,d,y=[];return ct(c,(f=s.concat((d=function(e){return y.push(e)},function(e){e.root||(e=e.return)&&d(e)})),p=Be(f),function(e,t,n,r){for(var o="",i=0;i="A"&&e<="Z"};function Un(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,i)){var a=n(o,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,a)}r=on(r,i),this.staticRulesId=i}else{for(var l=zt(this.baseHash,n.hash),u="",c=0;c>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,n(u,".".concat(p),void 0,this.componentId)),r=on(r,p)}}return r},e}(),Yn=e.createContext(void 0);Yn.Consumer;var Zn={};function Jn(t,n,r){var o=rn(t),i=t,a=!Ft(t),l=n.attrs,u=void 0===l?xt:l,c=n.componentId,s=void 0===c?function(e,t){var n="string"!=typeof e?"sc":Rt(e);Zn[n]=(Zn[n]||0)+1;var r="".concat(n,"-").concat(function(e){return Mt(Bt(e)>>>0)}(Ot+n+Zn[n]));return t?"".concat(t,"-").concat(r):r}(n.displayName,n.parentComponentId):c,f=n.displayName,p=void 0===f?function(e){return Ft(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(t):f,d=n.displayName&&n.componentId?"".concat(Rt(n.displayName),"-").concat(n.componentId):n.componentId||s,y=o&&i.attrs?i.attrs.concat(u).filter(Boolean):u,h=n.shouldForwardProp;if(o&&i.shouldForwardProp){var m=i.shouldForwardProp;if(n.shouldForwardProp){var b=n.shouldForwardProp;h=function(e,t){return m(e,t)&&b(e,t)}}else h=m}var v=new Qn(r,d,o?i.componentStyle:void 0);function g(t,n){return function(t,n,r){var o=t.attrs,i=t.componentStyle,a=t.defaultProps,l=t.foldedComponentIds,u=t.styledComponentId,c=t.target,s=e.useContext(Yn),f=Ln(),p=t.shouldForwardProp||f.shouldForwardProp,d=function(e,t,n){for(var r,o=me(me({},t),{className:void 0,theme:n}),i=0;i2&&Cn.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}(),function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=Sn(),r=an([n&&'nonce="'.concat(n,'"'),"".concat(gt,'="true"'),"".concat(St,'="').concat(Ot,'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(t.sealed)throw sn(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw sn(2);var r=((n={})[gt]="",n[St]=Ot,n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=Sn();return o&&(r.nonce=o),[e.createElement("style",me({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new Cn({isServer:!0}),this.sealed=!1}t.prototype.collectStyles=function(t){if(this.sealed)throw sn(2);return e.createElement(zn,{sheet:this.instance},t)},t.prototype.interleaveWithNodeStream=function(e){throw sn(3)}}(),"__sc-".concat(gt,"__");var rr,or=o(439),ir="#4A4A4A",ar="#E2E7EA",lr="#787878",ur="#D1D9DD",cr="#8BC34A",sr="#F44336",fr="#FFFFFF",pr="#EEEEEE",dr="latoregular",yr="latobold",hr="Arial",mr="0 3px 6px 0 rgba(0,0,0,0.16)",br="0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3)";function vr(e){return vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vr(e)}function gr(e,t){for(var n=0;n0?this.props.findTest(t):this.props.filterTests(this.props.tests.filterStatus)}},{key:"render",value:function(){return e.createElement(Do,null,e.createElement(Ao,{onChange:this.onChange.bind(this)}))}}])&&_o(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),l}(e.Component);const zo=X((function(e){return{tests:e.tests}}),(function(e){return{findTest:function(t){e(function(e){return{type:"SEARCH_TESTS",value:e}}(t))},filterTests:function(t){e(ro(t))}}}))(Lo);function Bo(e){return Bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bo(e)}var Fo;function Uo(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};switch(l=c.duration||1e3,r=c.offset||0,f=c.callback,o=c.easing||Ka,i=c.a11y||!1,t=window.scrollY||window.pageYOffset,void 0===u?"undefined":$a(u)){case"number":e=void 0,i=!1,n=t+u;break;case"object":n=p(e=u);break;case"string":e=document.querySelector(u),n=p(e)}switch(a=n-t+r,$a(c.duration)){case"number":l=c.duration;break;case"function":l=c.duration(a)}window.requestAnimationFrame(d)}}();const tl=el;function nl(e){return nl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nl(e)}var rl,ol;function il(e,t){for(var n=0;n=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function Vl(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function Gl(e,t){for(var n=0;n0,m=this,b=this.state.isRefImageMissing||!h,v=!h&&"SHOW_SCRUBBER_REF_IMAGE"===n,g=!h&&"SHOW_SCRUBBER_TEST_IMAGE"===n;return e.createElement("div",null,e.createElement(Uu,null,h&&e.createElement("div",null,e.createElement(Bu,{selected:"SHOW_SCRUBBER_REF_IMAGE"===n,onClick:s},"REFERENCE"),e.createElement(Bu,{selected:"SHOW_SCRUBBER_TEST_IMAGE"===n,onClick:c},"TEST"),e.createElement(Bu,{selected:"SHOW_SCRUBBER_DIFF_IMAGE"===n,onClick:f},"DIFF"),e.createElement(Bu,{selected:"SCRUB"===n,onClick:d},"SCRUBBER"),e.createElement(Bu,{selected:"SHOW_SCRUBBER_DIVERGED_IMAGE"===n,onClick:function(){if(m.state.isLoading)console.error("Diverged process is already running. Please hang on.");else if(u)p(u);else{p(""),m.loadingDiverge(!0);var e=document.images.isolatedRefImage,t=document.images.isolatedTestImage,n=e.height,r=e.width,o=new Worker("divergedWorker.js");o.addEventListener("message",(function(e){for(var t=e.data,o=function(e,t){return Gu(null,e,t).createImageData(t,e)}(n,r),i=t.length-1;i>=0;i--)o.data[i]=t[i];var a=Gu(null,n,r);a.putImageData(o,0,0);var l=a.canvas.toDataURL("image/png");p(l),m.loadingDiverge(!1)}),!1),o.addEventListener("error",(function(e){p(""),m.loadingDiverge(!1),console.error(e)})),o.postMessage({divergedInput:[Vu(Gu(e)),Vu(Gu(t)),n,r]})}},className:this.state.isLoading?"loadingDiverged":"",style:{display:/remote/.test(location.search)?"":"none"}},this.state.isLoading?"DIVERGING!":"DIVERGED"))),e.createElement(Fu,null,e.createElement("img",{id:"isolatedRefImage",src:i,style:{margin:"auto",display:v?"block":"none"}}),e.createElement("img",{id:"isolatedTestImage",className:"testImage",src:a,style:{margin:"auto",display:g?"block":"none"}}),e.createElement("img",{className:"diffImage",src:l,style:{margin:"auto",display:b?"block":"none"}}),e.createElement("div",{style:{display:b?"none":"block"}},e.createElement(Cu.Z,{verticalAlign:"top",minDistanceToBeginInteraction:0,maxAngleToBeginInteraction:1/0,initialPosition:o,newPosition:o},e.createElement("img",{id:"scrubberRefImage",className:"refImage",src:i,onError:this.handleRefImageLoadingError}),e.createElement("img",{id:"scrubberTestImage",className:"testImage",src:y}),e.createElement(Wu,{className:"slider"})))))}}],r&&Au(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),l}(e.Component);function Vu(e){return e.getImageData(0,0,e.canvas.width,e.canvas.height).data}function Gu(e,t,n){var r=e;e||(r={height:t,width:n});var o=document.createElement("canvas");o.width=r.width,o.height=r.height;var i=o.getContext("2d");return e&&i.drawImage(r,0,0),i}function qu(e){return qu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qu(e)}function Qu(e,t){for(var n=0;n=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function sc(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function fc(e,t){for(var n=0;n`"]),n.push(["","","Please see the docs for more info."])),e.setState({logLines:n})}))}}],r&&fc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),l}(e.Component);const Oc=X((function(e){return{logs:e.logs}}),(function(e){return{closeModal:function(){e({type:"CLOSE_LOG_MODAL",value:!1})}}}))(Sc);function Ec(e){return Ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ec(e)}var kc;function Pc(e,t){for(var n=0;n