@nyris/nyris-webapp 0.3.35 → 0.3.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/build/asset-manifest.json +13 -13
  2. package/build/index.html +1 -1
  3. package/build/{precache-manifest.375ac411683570ee1df5aea6de03409d.js → precache-manifest.a2657ad49c132fb9c82629d37be15547.js} +14 -14
  4. package/build/service-worker.js +1 -1
  5. package/build/static/css/main.41fb4769.chunk.css +2 -0
  6. package/build/static/css/main.41fb4769.chunk.css.map +1 -0
  7. package/build/static/js/2.ff44260e.chunk.js +3 -0
  8. package/build/static/js/2.ff44260e.chunk.js.map +1 -0
  9. package/build/static/js/main.0b3b11fc.chunk.js +3 -0
  10. package/build/static/js/main.0b3b11fc.chunk.js.map +1 -0
  11. package/build/static/media/error.48b946a9.svg +3 -0
  12. package/package.json +3 -3
  13. package/public/index.html +13 -0
  14. package/src/Store/search/Search.ts +4 -4
  15. package/src/Store/search/search.initialState.ts +1 -1
  16. package/src/Store/search/types.ts +1 -1
  17. package/src/common/assets/icons/arrow_left.svg +3 -0
  18. package/src/common/assets/icons/arrow_right.svg +3 -0
  19. package/src/common/assets/icons/error.svg +3 -0
  20. package/src/components/AppMobile.tsx +111 -0
  21. package/src/components/DragDropFile.tsx +5 -4
  22. package/src/components/FooterMobile.tsx +8 -2
  23. package/src/components/Header.tsx +2 -1
  24. package/src/components/HeaderMobile.tsx +5 -3
  25. package/src/components/ImageCaptureHelpModal.tsx +7 -1
  26. package/src/components/ImagePreviewMobile.tsx +87 -0
  27. package/src/components/Layout.tsx +32 -92
  28. package/src/components/ProductList/index.tsx +4 -1
  29. package/src/components/RfqBanner.tsx +120 -0
  30. package/src/components/SidePanel.tsx +147 -0
  31. package/src/components/appMobile.scss +147 -142
  32. package/src/components/drawer/cameraCustom.tsx +5 -4
  33. package/src/components/input/inputSearch.tsx +12 -7
  34. package/src/components/modal/DefaultModal.tsx +1 -1
  35. package/src/components/pre-filter/index.tsx +108 -51
  36. package/src/components/results/ItemResult.tsx +1 -1
  37. package/src/components/rfq/RfqModal.tsx +262 -0
  38. package/src/helpers/ToastHelper.ts +10 -0
  39. package/src/helpers/getCroppedCanvas.ts +26 -0
  40. package/src/hooks/useFilteredRegions.ts +37 -0
  41. package/src/index.css +0 -4
  42. package/src/page/landingPage/AppMD.tsx +0 -11
  43. package/src/page/landingPage/AppMobile.tsx +1 -0
  44. package/src/page/landingPage/common.scss +41 -58
  45. package/src/page/result/index.tsx +256 -309
  46. package/src/translations.ts +2 -2
  47. package/src/types.ts +1 -0
  48. package/src/utils.ts +0 -1
  49. package/build/static/css/main.f5a1c730.chunk.css +0 -2
  50. package/build/static/css/main.f5a1c730.chunk.css.map +0 -1
  51. package/build/static/js/2.724f4cba.chunk.js +0 -3
  52. package/build/static/js/2.724f4cba.chunk.js.map +0 -1
  53. package/build/static/js/main.f579fa9f.chunk.js +0 -3
  54. package/build/static/js/main.f579fa9f.chunk.js.map +0 -1
  55. package/build/static/media/support3.4a17f96e.svg +0 -3
  56. /package/build/static/js/{2.724f4cba.chunk.js.LICENSE.txt → 2.ff44260e.chunk.js.LICENSE.txt} +0 -0
  57. /package/build/static/js/{main.f579fa9f.chunk.js.LICENSE.txt → main.0b3b11fc.chunk.js.LICENSE.txt} +0 -0
@@ -0,0 +1,3 @@
1
+ /*! For license information please see main.0b3b11fc.chunk.js.LICENSE.txt */
2
+ (this["webpackJsonp@nyris/nyris-webapp"]=this["webpackJsonp@nyris/nyris-webapp"]||[]).push([[0],{172:function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=n(0)},function(e,t){e.exports=n(55)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);t.Preview=r.default;var a=n(7);t.Capture=a.default,function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(14))},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(0)),c=n(4),l=n(1),u=o(n(5)),s=n(6),f=function(e){return e.dotHover?"pointer":e.tlHover?"nw-resize":e.trHover?"ne-resize":e.blHover?"sw-resize":e.brHover?"se-resize":e.rectHover?"move":"default"};t.default=function(e){var t=e.dotColor,n=e.image,a=e.maxHeight,o=e.maxWidth,h=e.minCropHeight,d=e.minCropWidth,p=e.onSelectionChange,m=e.regions,v=e.rounded,g=e.selection,y=l.getThumbSizeLongestEdge(o,a,n.width,n.height),b=y.w,x=y.h,w=function(e,t,n,r,a){var o=n.x1,i=n.x2,c=n.y1,l=n.y2,u={x1:Math.max(o*e,5),x2:Math.min(i*e,e-5),y1:Math.max(c*t,5),y2:Math.min(l*t,t-5)};return r&&a&&u.x2-u.x1<r&&u.y2-u.y1<a?{x1:Math.max(o*e-r/2,5),x2:Math.min(i*e+r/2,e-5),y1:Math.max(c*t-a/2,5),y2:Math.min(l*t+a/2,t-5)}:u}(b,x,g,d,h),E=w.x1,O=w.y1,j=w.x2,C=w.y2,k=[100,100],S=k[0],L=k[1],N=i.useRef(null),R=i.useState({tlHover:!1,trHover:!1,blHover:!1,brHover:!1,dotHover:!1,rectHover:!1}),I=R[0],_=R[1],M=function(e){var t={};Object.assign(t,I,e),_(t)},T=function(e,t){if(!(t.target instanceof u.default.Stage)){var n=t.target.getAbsolutePosition(),r=n.x,a=n.y,o=t.target.getSize(),i=o.width,c=o.height,l=function(e,t,n,r,a,o){var i=e.x1,c=e.x2,l=e.y1,u=e.y2;switch(t){case"rect":return{x1:n,y1:r,x2:n+a,y2:r+o};case"tl":return{x1:n,y1:r,x2:c,y2:u};case"tr":return{x2:n,y1:r,x1:i,y2:u};case"bl":return{x1:n,y2:r,x2:c,y1:l};case"br":return{x2:n,y2:r,x1:i,y1:l}}}({x1:E,x2:j,y1:O,y2:C},e,r+("rect"!==e?D:0),a+("rect"!==e?D:0),i,c),s={x1:l.x1/b,x2:l.x2/b,y1:l.y1/x,y2:l.y2/x};G(s)}};i.useEffect((function(){if(N.current){var e=new u.default.Animation((function(e){if(e&&N.current){var t=40*e.time/1e3;N.current.dashOffset(-t)}}),N.current.getLayer());return e.start(),function(){e&&e.stop()}}}),[N]);var F=T.bind(null,"rect"),P=T.bind(null,"tl"),H=T.bind(null,"tr"),A=T.bind(null,"bl"),B=T.bind(null,"br"),G=function(e){p&&p(e)};if(!n)return null;var z=m.map((function(e,t){var n=e.normalizedRect,r=n.x1,a=n.x2,o=n.y1,i=n.y2,c=b*((a-r)/2+r),l=x*((i-o)/2+o);return{region:e,key:c+"-"+l+"-"+t,x:c,y:l,show:e.show}})),D=10,q=[4,4,4,4],V=function(e){e.beginPath();var t=0,n=0,r=0,i=0;"number"==typeof q&&v?t=n=r=i=Math.min(q,b/2,x/2):v&&(t=Math.min(q[0]||0,o/2,a/2),n=Math.min(q[1]||0,o/2,a/2),i=Math.min(q[2]||0,o/2,a/2),r=Math.min(q[3]||0,o/2,a/2)),e.moveTo(t,0),e.lineTo(o-n,0),e.arc(o-n,n,n,3*Math.PI/2,0,!1),e.lineTo(o,a-i),e.arc(o-i,a-i,i,0,Math.PI/2,!1),e.lineTo(r,a),e.arc(r,a-r,r,Math.PI/2,Math.PI,!1),e.lineTo(0,t),e.arc(t,t,t,Math.PI,3*Math.PI/2,!1),e.closePath()};return i.default.createElement(c.Stage,{width:b,height:x,style:{cursor:f(I),width:b,height:x,margin:"auto"}},i.default.createElement(c.Layer,{key:"img",clipFunc:V},i.default.createElement(c.Image,{image:n,width:b,height:x})),i.default.createElement(c.Layer,{key:"selection",clipFunc:V},i.default.createElement(c.Rect,{stroke:"white",opacity:0,strokeWidth:0,x:E,y:O,width:j-E,height:C-O}),i.default.createElement(c.Rect,{stroke:"black",draggable:!0,onDragMove:F,dragBoundFunc:function(e){var t=e.x,n=e.y,r=j-E+5,a=C-O+5;return{x:Math.max(Math.min(t,b-r),5),y:Math.max(Math.min(n,x-a),5)}},onMouseOver:function(){return M({rectHover:!0})},onMouseOut:function(){return M({rectHover:!1})},opacity:0,strokeWidth:2,x:E,y:O,width:j-E,height:C-O,dash:[0,0],ref:N}),i.default.createElement(c.Rect,{fill:"black",opacity:.3,x:0,y:0,width:b,height:O}),i.default.createElement(c.Rect,{fill:"black",opacity:.3,x:0,y:C,width:b,height:x-C}),i.default.createElement(c.Rect,{fill:"black",opacity:.3,x:0,y:O,width:E,height:C-O}),i.default.createElement(c.Rect,{fill:"black",opacity:.3,x:j,y:O,width:b-j,height:C-O})),i.default.createElement(c.Layer,null,i.default.createElement(c.Path,{data:"M2 18V10C2 5.58172 5.58172 2 10 2H18",stroke:"white",strokeWidth:5,lineCap:"round",opacity:1,x:E-3,y:O-3,shadowColor:"#000000",shadowBlur:4,shadowOffset:{x:0,y:0},shadowOpacity:.25}),i.default.createElement(c.Rect,{draggable:!0,onDragMove:P,dragBoundFunc:function(e){var t=e.x,n=e.y;return{x:Math.max(Math.min(t,j-S),0),y:Math.max(Math.min(n,C-L),0)}},onMouseOver:function(){return M({tlHover:!0})},onMouseOut:function(){return M({tlHover:!1})},opacity:1,width:20+D,height:20+D,x:E-D,y:O-D}),i.default.createElement(c.Path,{data:"M2 2L10 2C14.4183 2 18 5.58172 18 10L18 18",stroke:"white",strokeWidth:5,lineCap:"round",opacity:1,x:j+3,y:O-3,offsetX:20,shadowColor:"#000000",shadowBlur:4,shadowOffset:{x:0,y:0},shadowOpacity:.25}),i.default.createElement(c.Rect,{draggable:!0,onDragMove:H,dragBoundFunc:function(e){var t=e.x,n=e.y;return{x:Math.min(Math.max(t,E+S),b),y:Math.max(Math.min(n,C-L),0)}},onMouseOver:function(){return M({trHover:!0})},onMouseOut:function(){return M({trHover:!1})},opacity:1,width:20+D,height:20+D,x:j-D,y:O-D,offsetX:20-D}),i.default.createElement(c.Path,{data:"M18 18L10 18C5.58172 18 2 14.4183 2 10L2 2",stroke:"white",strokeWidth:5,lineCap:"round",opacity:1,x:E-3,y:C+3,offsetY:20,shadowColor:"#000000",shadowBlur:4,shadowOffset:{x:0,y:0},shadowOpacity:.25}),i.default.createElement(c.Rect,{draggable:!0,onDragMove:A,dragBoundFunc:function(e){var t=e.x,n=e.y;return{x:Math.max(Math.min(t,j-S),0),y:Math.min(Math.max(n,O+L),x)}},onMouseOver:function(){return M({blHover:!0})},onMouseOut:function(){return M({blHover:!1})},opacity:1,width:20+D,height:20+D,x:E-D,y:C-D,offsetY:20-D}),i.default.createElement(c.Path,{data:"M18 2L18 10C18 14.4183 14.4183 18 10 18L2 18",stroke:"white",strokeWidth:5,lineCap:"round",x:j+3,y:C+3,opacity:1,offsetY:20,offsetX:20,shadowColor:"#000000",shadowBlur:4,shadowOffset:{x:0,y:0},shadowOpacity:.25}),i.default.createElement(c.Rect,{opacity:1,draggable:!0,onDragMove:B,dragBoundFunc:function(e){var t=e.x,n=e.y;return{x:Math.min(Math.max(t,E+S),b),y:Math.min(Math.max(n,O+L),x)}},onMouseOver:function(){return M({brHover:!0})},onMouseOut:function(){return M({brHover:!1})},x:j-D,y:C-D,width:20+D,height:20+D,offsetY:20-D,offsetX:20-D})),i.default.createElement(s.NodeGroup,{data:z,keyAccessor:function(e){return e.key},start:function(e,t){return{opacity:0,x:-100,y:e.y}},enter:function(e,t){return{opacity:[1],x:[e.x],y:e.y,timing:{delay:100*t,duration:300}}}},(function(e){return i.default.createElement(c.Layer,{key:"dots"},e.map((function(e){var n=e.key,a=e.data,o=e.state;return i.default.createElement(c.Circle,r({onClick:function(){G(a.region.normalizedRect),M({dotHover:!1})},onTap:function(){G(a.region.normalizedRect),M({dotHover:!1})},onMouseOver:function(){return M({dotHover:!0})},onMouseOut:function(){return M({dotHover:!1})},key:n,radius:7},o,{stroke:t,fill:"white",strokeWidth:5,opacity:a.region.show}))})))})))}},function(e,t){e.exports=n(792)},function(e,t){e.exports=n(446)},function(e,t){e.exports=n(865)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=o(n(0));n(8);var l=n(1),u=i(n(12)),s=i(n(13));t.default=function(e){var t=e.onCaptureComplete,n=e.onCaptureCanceled,o=e.useAppText,i=c.useRef(null),f=c.useState(),h=f[0],d=f[1];return c.useEffect((function(){navigator.mediaDevices.getUserMedia({video:{facingMode:"environment",width:640}}).then((function(e){var t=i.current;t&&(t.srcObject=e,d(e))})).catch((function(e){switch(e.name){case"NotFoundError":alert("Camera not found. Try with a file instead.");break;case"NotAllowedError":alert("You have to allow using the camera in order to take pictures. If you are not asked again for permissions, go to site settings and reset permissions there.");break;default:alert("Sorry, something has gone wrong while enabeling the camera. ("+e+")")}}))}),[i]),c.useEffect((function(){return function(){h&&(h.getVideoTracks&&h.getAudioTracks?(h.getVideoTracks().map((function(e){return e.stop()})),h.getAudioTracks().map((function(e){return e.stop()}))):h.stop())}}),[h]),c.default.createElement("div",{className:"nyris-capture-captureUi"},c.default.createElement("video",{autoPlay:!0,playsInline:!0,ref:i,className:"nyris-capture-video"}),c.default.createElement("input",{type:"file",name:"file",id:"capture_file",className:"nyris-capture-inputFile",accept:"image/*",capture:"environment",onChange:function(e){return r(void 0,void 0,void 0,(function(){var n,r;return a(this,(function(a){switch(a.label){case 0:return(n=e.target)&&n.files?[4,l.urlOrBlobToCanvas(n.files[0])]:[3,2];case 1:r=a.sent(),t(r),a.label=2;case 2:return[2]}}))}))}}),c.default.createElement("label",{className:"nyris-capture-app-button",htmlFor:"capture_file"},o),c.default.createElement("button",{className:"nyris-capture-backBtn",onClick:n},c.default.createElement("img",{src:s.default,alt:"back",width:"72"})),c.default.createElement("button",{className:"nyris-capture-searchBtn",onClick:function(){if(i.current){var e=l.elementToCanvas(i.current);t(e)}}},c.default.createElement("img",{src:u.default,alt:"capture"})))}},function(e,t,n){var r=n(9),a=n(10);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);r(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}},function(e,t,n){"use strict";var r,a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function i(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},r=[],a=0;a<e.length;a++){var c=e[a],l=t.base?c[0]+t.base:c[0],u=n[l]||0,s="".concat(l," ").concat(u);n[l]=u+1;var f=i(s),h={css:c[1],media:c[2],sourceMap:c[3]};-1!==f?(o[f].references++,o[f].updater(h)):o.push({identifier:s,updater:m(h,t),references:1}),r.push(s)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var i=a(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var u,s=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function f(e,t,n,r){var a=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=s(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function h(e,t,n){var r=n.css,a=n.media,o=n.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),o&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var d=null,p=0;function m(e,t){var n,r,a;if(t.singleton){var o=p++;n=d||(d=l(t)),r=f.bind(null,n,o,!1),a=f.bind(null,n,o,!0)}else n=l(t),r=h.bind(null,n,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var a=i(n[r]);o[a].references--}for(var l=c(e,t),u=0;u<n.length;u++){var s=i(n[u]);0===o[s].references&&(o[s].updater(),o.splice(s,1))}n=l}}}},function(e,t,n){(t=n(11)(!1)).push([e.i,".nyris-capture-app-button {\n position: fixed;\n top: 0;\n right: 0;\n color: white;\n margin: 10px;\n padding: 10px;\n background-color: rgba(255,255,255,0.3);\n border-radius: 2px;\n text-shadow: 1px 1px 3px #000;\n line-height: 1em;\n box-shadow: 1px 1px 3px rgba(0, 0, 0,0.5);\n}\n\n.nyris-capture-inputFile {\n visibility: hidden;\n}\n\n.nyris-capture-captureUi {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n background-color: black;\n z-index: 10000;\n}\n\n.nyris-capture-video {\n position: fixed;\n min-height: 100%;\n min-width: 100%;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n width: auto;\n height: auto;\n}\n\n.nyris-capture-searchBtn {\n position: fixed;\n bottom: 0;\n right: 0;\n z-index: 10001;\n left: 50%;\n transform: translateX(-50%);\n\n color: black;\n background-color: transparent;\n text-transform: uppercase;\n border: 0;\n margin: auto;\n display: block;\n -webkit-filter: drop-shadow( 1px 1px 5px #000 );\n filter: drop-shadow( 1px 1px 5px #000 );\n\n}\n\n.nyris-capture-backBtn {\n position: fixed;\n bottom: 0;\n left: 0;\n z-index: 10001;\n color: white;\n background-color: transparent;\n border: 0;\n\n text-transform: uppercase;\n border-radius: 50%;\n display: block;\n padding: 0;\n font-size: 16px;\n margin-bottom: 5px;\n margin-left: 5px;\n -webkit-filter: drop-shadow( 1px 1px 5px #000 );\n filter: drop-shadow( 1px 1px 5px #000 );\n}\n\n",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,a,o=e[1]||"",i=e[3];if(!i)return o;if(t&&"function"==typeof btoa){var c=(n=i,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(a," */")),l=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[o].concat(l).concat([c]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);r&&a[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"ReactComponent",(function(){return l}));var r=n(0);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var o=r.createElement("defs",null,r.createElement("path",{id:"capture_svg__a",d:"M150 540a30 30 0 1160 0 30 30 0 01-60 0z"}),r.createElement("path",{id:"capture_svg__b",d:"M144 540a36 36 0 1172 0 36 36 0 01-72 0zm36 33.95a33.94 33.94 0 100-67.89 33.94 33.94 0 000 67.89z"})),i=r.createElement("use",{fill:"#c00",xlinkHref:"#capture_svg__a",transform:"translate(-144 -504)"}),c=r.createElement("use",{fill:"#c00",fillOpacity:.9,xlinkHref:"#capture_svg__b",opacity:.7,transform:"translate(-144 -504)"});function l(e){return r.createElement("svg",a({width:72,height:72},e),o,i,c)}t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIHZpZXdCb3g9IjAgMCA3MiA3MiI+PGRlZnM+PHBhdGggaWQ9IjFoN3JhIiBkPSJNMTUwIDU0MGEzMCAzMCAwIDEgMSA2MCAwIDMwIDMwIDAgMCAxLTYwIDB6Ii8+PHBhdGggaWQ9IjFoN3JiIiBkPSJNMTQ0IDU0MGEzNiAzNiAwIDEgMSA3MiAwIDM2IDM2IDAgMCAxLTcyIDB6bTM2IDMzLjk1YTMzLjk0IDMzLjk0IDAgMSAwIDAtNjcuODkgMzMuOTQgMzMuOTQgMCAwIDAgMCA2Ny44OXoiLz48L2RlZnM+PGc+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE0NCAtNTA0KSI+PHVzZSBmaWxsPSIjYzAwIiB4bGluazpocmVmPSIjMWg3cmEiLz48L2c+PGcgb3BhY2l0eT0iLjciIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xNDQgLTUwNCkiPjx1c2UgZmlsbD0iI2MwMCIgZmlsbC1vcGFjaXR5PSIuOSIgeGxpbms6aHJlZj0iIzFoN3JiIi8+PC9nPjwvZz48L3N2Zz4="},function(e,t,n){"use strict";n.r(t),n.d(t,"ReactComponent",(function(){return c}));var r=n(0);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var o=r.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),i=r.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",fill:"#fff"});function c(e){return r.createElement("svg",a({width:24,height:24},e),o,i)}t.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4KICAgIDxwYXRoIGQ9Ik0yMCAxMUg3LjgzbDUuNTktNS41OUwxMiA0bC04IDggOCA4IDEuNDEtMS40MUw3LjgzIDEzSDIwdi0yeiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg=="},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeFileHandler=function(e){return function(t){var n=null,r=t;if(r&&r.target){var a=r.target;if(a.files&&a.files[0]&&(n=a.files[0]),a.value&&(a.value=""),n)return e(n)}var o=t;if(o&&(n=o.dataTransfer&&o.dataTransfer.files[0]),n)return e(n)}}}])},263:function(e,t,n){e.exports=n.p+"static/media/Union.3c6afbb0.svg"},264:function(e,t,n){e.exports=n.p+"static/media/unnamed.f7f1b5cb.png"},408:function(e,t,n){},410:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(t){o(t)}}function c(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(c){o=[6,c],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(734));function c(e,t){return{x1:e.x1*t.w,x2:e.x2*t.w,y1:e.y1*t.h,y2:e.y2*t.h}}function l(e){return{w:e.x2-e.x1,h:e.y2-e.y1}}function u(e){var t=e,n=e;return{w:t.naturalWidth||n.videoWidth||e.width,h:t.naturalHeight||n.videoHeight||e.height}}t.selectFirstCenteredRegion=function(e,t,n){var r=e.filter((function(e){return function(e,t){var n=e[0],r=e[1],a=t[0],o=t[1];return Math.sqrt(Math.pow(n-a,2)+Math.pow(r-o,2))}([.5,.5],function(e){var t=e.x1,n=e.x2,r=e.y1;return[(n-t)/2+t,(e.y2-r)/2+r]}(e.normalizedRect))<t}));return 0===r.length?n:r[0].normalizedRect},t.getUrlParam=function(e){var t=new RegExp("[?&]"+e+"(=([^&#]*))?(&|$|#)","i").exec(window.location.href);return t&&t[2]?(console.log("has value",e,t[2]),decodeURIComponent(t[2])):!!t||void 0},t.getThumbSizeArea=function(e,t,n){var r=e*t,a=Math.sqrt(r*n);return{w:a,h:a/n}},t.getThumbSizeLongestEdge=function(e,t,n,r){return e/t>n/r?{w:n*t/r,h:t}:{w:e,h:r*e/n}},t.scaleRect=c,t.getRectSize=l,t.getRectAspectRatio=function(e,t){var n=l(c(e,t));return n.w/n.h},t.getElementSize=u,t.elementToCanvas=function(e,t,n){var r=u(e),a=r.w,o=r.h,i=n||{x1:0,x2:1,y1:0,y2:1},c=i.x1,l=i.x2,s=i.y1,f=a*c,h=a*(l-c),d=o*s,p=o*(i.y2-s),m=t&&t.w||a,v=t&&t.h||o,g=document.createElement("canvas");g.width=m,g.height=v;var y=g.getContext("2d");if(!y)throw Error("Error converting element to canvas: Can not get 2d context");return y.fillStyle="rgb(255, 255,255)",y.fillRect(0,0,m,v),y.drawImage(e,f,d,h,p,0,0,m,v),g},t.urlOrBlobToCanvas=function(e){return new Promise((function(t,n){i.default(e,(function(e){e?t(e):n()}),{canvas:!0,orientation:!0,crossOrigin:"anonymous"})}))},t.canvasToJpgBlob=function(e,t){return new Promise((function(n,r){e.toBlob((function(e){e?n(e):r()}),"image/jpeg",t)}))},t.cadExtensions=[".stp",".step",".stl",".obj",".glb",".gltf"],t.isCadFile=function(e){return t.cadExtensions.some((function(t){return e.name.endsWith(t)}))},t.isImageFile=function(e){return e.type.startsWith("image/")},t.timePromise=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(a){switch(a.label){case 0:return t=Date.now(),[4,e];case 1:return n=a.sent(),r=Date.now(),[2,{res:n,durationSeconds:(r-t)/1e3}]}}))}))}},456:function(e,t,n){e.exports=n.p+"static/media/img-1-1.6144e5f9.png"},457:function(e,t,n){e.exports=n.p+"static/media/img-1-2.ad943f0f.png"},458:function(e,t,n){e.exports=n.p+"static/media/img2-1.a87c79c7.png"},459:function(e,t,n){e.exports=n.p+"static/media/img2-2.39c5b73f.png"},460:function(e,t,n){e.exports=n.p+"static/media/img3-1.443b0c3a.png"},461:function(e,t,n){e.exports=n.p+"static/media/img3-2.37db7999.png"},462:function(e,t,n){e.exports=n.p+"static/media/img4-1.9c34c158.png"},463:function(e,t,n){e.exports=n.p+"static/media/img4-2.9d280a04.png"},464:function(e,t,n){e.exports=n.p+"static/media/img5-1.b61dbd4d.png"},465:function(e,t,n){e.exports=n.p+"static/media/img5-2.1c77c093.png"},466:function(e,t,n){e.exports=n.p+"static/media/img6-1.8b03dd21.png"},467:function(e,t,n){e.exports=n.p+"static/media/img6-2.1e3e7fed.png"},469:function(e,t,n){e.exports=n.p+"static/media/reverse_camera.28c80509.svg"},474:function(e,t,n){e.exports=n.p+"static/media/icon_search.373c3cc4.svg"},476:function(e,t,n){e.exports=n.p+"static/media/Icon_Upload.ebf185b4.svg"},480:function(e,t,n){e.exports=n.p+"static/media/camera.ae3f4f51.svg"},484:function(e,t,n){e.exports=n.p+"static/media/email_share.92bbfb8b.svg"},503:function(e,t,n){e.exports=n(864)},55:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(t){o(t)}}function c(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(c){o=[6,c],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),n(733);var c=n(410),l=i(n(739));!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(410));var u=function(){function e(e){if(this.httpClient=l.default.create(),!e.apiKey)throw new Error("The api-key is not set.");this.apiKey=e.apiKey;var t=e.baseUrl||"https://api.nyris.io";this.imageMatchingUrl=t+"/find/v1.1",this.cadMatchingUrl=t+"/cad/find/v0.1",this.imageMatchingUrlBySku=t+"/recommend/v1/",this.imageMatchingSubmitManualUrl=t+"/find/v1/manual/",this.feedbackUrl=t+"/feedback/v1/",this.regionProposalUrl=t+"/find/v2/regions/",this.findFilters=t+"/find/v1/filters",this.responseFormat=e.responseFormat||"application/offers.complete+json",this.maxHeight=e.maxHeight||500,this.maxWidth=e.maxWidth||500,this.jpegQuality=e.jpegQuality||.92,this.customSearchRequest=e.customSearchRequest,this.responseHook=e.responseHook,this.xOptions=e.xOptions}return e.prototype.prepareImage=function(e,t){return a(this,void 0,void 0,(function(){var n,r,a,i,l;return o(this,(function(o){switch(o.label){case 0:return n=t||{x1:0,x2:1,y1:0,y2:1},r=c.getElementSize(e),a=c.getRectAspectRatio(n,r),i=c.getThumbSizeArea(this.maxWidth,this.maxHeight,a),l=c.elementToCanvas(e,i,n),[4,c.canvasToJpgBlob(l,this.jpegQuality)];case 1:return[2,o.sent()]}}))}))},e.prototype.getSearchRequestHeaders=function(e){var t={"X-Api-Key":this.apiKey,"Accept-Language":"de,*;q=0.5",Accept:this.responseFormat,"Content-Type":e||"application/octet-stream"},n=[];return this.xOptions&&n.push(this.xOptions),n.length>0&&(t["X-Options"]=n.join(" ")),t},e.prototype.getRegionRequestHeaders=function(e){var t={"X-Api-Key":this.apiKey,"Content-Type":e||"application/octet-stream"},n=[];return this.xOptions&&n.push(this.xOptions),n.length>0&&(t["X-Options"]=n.join(" ")),t},e.prototype.getParams=function(e){return e.geoLocation?{lat:e.geoLocation.lat.toString(),lon:e.geoLocation.lon.toString(),dist:e.geoLocation.dist.toString()}:{}},e.prototype.parseCategoryPredictions=function(e){return Object.entries(e||{}).map((function(e){return{name:e[0],score:e[1]}})).sort((function(e,t){return t.score-e.score}))},e.prototype.parseSearchResult=function(e,t){var n=this.parseCategoryPredictions(e.data.predicted_category),a=e.data.barcodes||[],o=this.responseHook?this.responseHook(e.data):e.data;return{results:"offerInfos"in o?o.offerInfos.map((function(e,t){return r(r({},e),{position:t})})):o.results.map((function(e,t){return{position:t,sku:e.sku,title:e.title,img:e.images&&e.images[0]?{url:e.images[0]}:void 0,l:e.links?e.links.main:void 0,p:e.price?{vi:100*parseFloat(e.price),c:e.price.split(" ")[1]}:void 0,score:e.score}})),requestId:e.headers["x-matching-request"],duration:"durationSeconds"in e.data?e.data.durationSeconds:t,categoryPredictions:n,codes:a}},e.prototype.findByCad=function(e,t){return a(this,void 0,void 0,(function(){var n,r,a,i,l,u;return o(this,(function(o){switch(o.label){case 0:return n=e.type,r=this.getSearchRequestHeaders(n),a=this.getParams(t),[4,c.timePromise(this.httpClient.request({method:"POST",url:this.cadMatchingUrl,data:e,params:a,headers:r,responseType:"json"}))];case 1:return i=o.sent(),l=i.res,u=i.durationSeconds,[2,this.parseSearchResult(l,u)]}}))}))},e.prototype.findByImage=function(e,t,n){return a(this,void 0,void 0,(function(){var r,a,i,l,u,s,f,h,d;return o(this,(function(o){switch(o.label){case 0:return[4,this.prepareImage(e,t.cropRect)];case 1:if(r=o.sent(),this.customSearchRequest)return[2,this.customSearchRequest(r,this.httpClient)];if(a=this.getSearchRequestHeaders("image/jpeg"),i=this.getParams(t),(l=new FormData).append("image",r),n&&n.length>0)for(u=0;u<n.length;u++)for(l.append("filters["+u+"].filterType",n[u].key),s=0;s<n[u].values.length;s++)l.append("filters["+u+"].filterValues["+s+"]",n[u].values[s]);return[4,c.timePromise(this.httpClient.request({method:"POST",url:this.imageMatchingUrl,data:l,params:i,headers:a,responseType:"json"}))];case 2:return f=o.sent(),h=f.res,d=f.durationSeconds,[2,this.parseSearchResult(h,d)]}}))}))},e.prototype.findBySku=function(e,t){return a(this,void 0,void 0,(function(){var n,r,a;return o(this,(function(o){switch(o.label){case 0:return n=this.getSearchRequestHeaders(),r=""+this.imageMatchingUrlBySku+encodeURIComponent(e)+"/"+encodeURIComponent(t),[4,this.httpClient.get(r,{headers:n,responseType:"json"})];case 1:return a=o.sent(),this.responseHook&&(a=this.responseHook),[2,a]}}))}))},e.prototype.findRegions=function(e){return a(this,void 0,void 0,(function(){var t,n,r,a,i,l,u,s;return o(this,(function(o){switch(o.label){case 0:return t=c.getElementSize(e),n=t.w,r=t.h,a=c.getThumbSizeArea(this.maxWidth,this.maxHeight,n/r),i=c.elementToCanvas(e,a),[4,c.canvasToJpgBlob(i,this.jpegQuality)];case 1:return l=o.sent(),u=this.getRegionRequestHeaders("image/jpeg"),[4,this.httpClient.request({method:"POST",url:this.regionProposalUrl,data:l,headers:u})];case 2:return s=o.sent(),[2,s.data.regions.map((function(e){return{classId:e.classId,confidence:e.confidence,normalizedRect:{x1:e.region.left/a.w,x2:e.region.right/a.w,y1:e.region.top/a.h,y2:e.region.bottom/a.h}}}))]}}))}))},e.prototype.sendFeedback=function(e,t,n){return a(this,void 0,void 0,(function(){var a,i;return o(this,(function(o){switch(o.label){case 0:return a={"X-Api-Key":this.apiKey,"Content-Type":"application/json"},i=r({request_id:t,timestamp:new Date,session_id:e},n),[4,this.httpClient.request({method:"POST",url:this.feedbackUrl,headers:a,data:i})];case 1:return o.sent(),[2]}}))}))},e.prototype.getFilters=function(e){return a(this,void 0,void 0,(function(){var t,n;return o(this,(function(r){switch(r.label){case 0:return t=this.getSearchRequestHeaders(),n=this.findFilters+"?limit="+e,[4,this.httpClient.get(n,{headers:t,responseType:"json"})];case 1:return[2,r.sent().data]}}))}))},e.prototype.searchFilters=function(e,t,n){return void 0===n&&(n=100),a(this,void 0,void 0,(function(){var r,a;return o(this,(function(o){switch(o.label){case 0:return r=this.getSearchRequestHeaders(),a=this.findFilters+"/"+e+"/"+t+"?limit="+n,[4,this.httpClient.get(a,{headers:r,responseType:"json"})];case 1:return[2,o.sent().data]}}))}))},e}();t.default=u},732:function(e,t,n){},790:function(e,t,n){},791:function(e,t,n){},850:function(e,t,n){},864:function(e,t,n){"use strict";n.r(t);n(325),n(368);var r=n(0),a=n.n(r),o=n(38),i=n.n(o);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var c=n(209),l=n(902),u=(n(407),n(66)),s=n(93),f=n(43),h=n(5),d=n(20),p=n(7),m=n(905),v=n(262),g=n.n(v),y=n(907),b=n(32),x=n(135),w=n(456),E=n.n(w),O=n(457),j=n.n(O),C=n(458),k=n.n(C),S=n(459),L=n.n(S),N=n(460),R=n.n(N),I=n(461),_=n.n(I),M=n(462),T=n.n(M),F=n(463),P=n.n(F),H=n(464),A=n.n(H),B=n(465),G=n.n(B),z=n(466),D=n.n(z),q=n(467),V=n.n(q),W={x1:0,x2:1,y1:0,y2:1},U=[{value:10,label:"10"},{value:20,label:"20"},{value:30,label:"30"},{value:40,label:"40"},{value:50,label:"50"},{value:60,label:"60"},{value:70,label:"70"},{value:80,label:"80"},{value:90,label:"90"},{value:100,label:"100"}],Z=[{title:"SELECT THE RIGHT IMAGE AREA",description:"The main object should occupy the major part of the image. Use the cropping tool available to crop the image and remove excess background.",imageLeft:E.a,imageRight:j.a},{title:"PICTURE CLARITY",description:"The image should not be blurred or out of focus.",imageLeft:k.a,imageRight:L.a},{title:"OPTIMAL LIGHTING",description:"The images should be taken in a bright area or use your camera\u2019s flash to take a well-lit picture.",imageLeft:R.a,imageRight:_.a},{title:"MONOCHROME BACKGROUND",description:"The object should be placed on a plain and light background and patterned background should be avoided.",imageLeft:T.a,imageRight:P.a},{title:"VISIBILITY OF THE OBJECT",description:"Click an image encapsulating most of the object\u2019s key components.",imageLeft:A.a,imageRight:G.a},{title:"OCR CAPTURE",description:"It is recommended to take a clear picture of the text on the typeplate etc, to ensure that the model can detect the text and give accurate results.",imageLeft:D.a,imageRight:V.a}],Y={categoryPredictions:[],codes:[],configureFilter:{},errorMessage:"",fetchingRegions:!1,fetchingResults:!1,filterOptions:[],filters:[],imageThumbSearchInput:"",isShowModalDetailItemMobile:!1,preFilter:{},loadingSearchAlgolia:!1,preFilterDropdown:!1,imageCaptureHelpModal:!1,regions:[],requestImage:void 0,results:[],resultSearchText:[],selectedRegion:void 0,textSearchInputMobile:"",valueTextSearch:{configure:{filters:""},page:1,refinementList:""}},K=Object(x.b)({name:"search",initialState:Y,reducers:{setSearchResults:function(e,t){var n=t.payload,r=n.results,a=n.requestId,o=n.categoryPredictions,i=n.codes,c=n.duration,l=n.filters;return Object(h.a)(Object(h.a)({},e),{},{filters:l,results:r,requestId:a,categoryPredictions:o,codes:i,duration:c,sessionId:e.sessionId||a,fetchingResults:!1})},setRegions:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{regions:t.payload})},setSelectedRegion:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{selectedRegion:t.payload})},setRequestImage:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{requestImage:{canvas:t.payload,id:Math.random().toString()},regions:[]})},selectionChanged:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),{},{selectedRegion:n})},loadFileSelectRegion:function(e,t){var n=t.payload,r=n.results,a=n.requestId,o=n.categoryPredictions,i=n.codes,c=n.duration;return Object(h.a)(Object(h.a)({},e),{},{results:r,requestId:a,categoryPredictions:o,codes:i,duration:c,sessionId:e.sessionId||a,fetchingRegions:!1})},loadingActionResults:function(e){return Object(h.a)(Object(h.a)({},e),{},{fetchingResults:!0})},loadingActionRegions:function(e){return Object(h.a)(Object(h.a)({},e),{},{fetchingRegions:!0})},searchFileImageNonRegion:function(e,t){var n=t.payload,r=n.results,a=n.requestId,o=n.duration,i=n.categoryPredictions,c=n.codes;return Object(h.a)(Object(h.a)({},e),{},{results:r,requestId:a,duration:o,categoryPredictions:i,codes:c,fetchingResults:!1})},changeValueTextSearch:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),{},{valueTextSearch:n})},resultSearchText:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),{},{resultSearchText:n})},updateResults:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),{},{results:n})},reset:function(e,t){return{results:[],regions:[],selectedRegion:W,requestImage:void 0,fetchingResults:!1,fetchingRegions:!1,filterOptions:[],categoryPredictions:[],codes:[],errorMessage:"",valueTextSearch:{},resultSearchText:[],filters:[],loadingSearchAlgolia:!1,imageThumbSearchInput:"",textSearchInputMobile:"",isShowModalDetailItemMobile:!1,preFilter:e.preFilter||{},preFilterDropdown:!1,imageCaptureHelpModal:!1}},onResetRequestImage:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{requestImage:void 0,imageThumbSearchInput:"",results:[],regions:[]})},configureFilter:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),{},{configureFilter:n})},setUpdateSession:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),{},{sessionId:n})},updateResultChangePosition:function(e,t){var n=t.payload.results;return Object(h.a)(Object(h.a)({},e),{},{fetchingResults:!1,results:n})},setError:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{fetchingRegions:!1,fetchingResults:!1,errorMessage:t.payload})},setImageSearchInput:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),{},{imageThumbSearchInput:n})},updateStatusLoading:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),{},{loadingSearchAlgolia:n})},updateValueTextSearchMobile:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),{},{textSearchInputMobile:n})},onToggleModalItemDetail:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),{},{isShowModalDetailItemMobile:n})},setPreFilter:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),{},{preFilter:n})},setPreFilterDropdown:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{preFilterDropdown:t.payload})},setImageCaptureHelpModal:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{imageCaptureHelpModal:t.payload})},setFilter:function(e,t){return Object(h.a)(Object(h.a)({},e),{},{filter:t.payload})}}}),Q=K.actions,J=Q.changeValueTextSearch,X=(Q.configureFilter,Q.loadFileSelectRegion,Q.loadingActionRegions,Q.loadingActionResults),$=Q.onResetRequestImage,ee=Q.onToggleModalItemDetail,te=Q.reset,ne=(Q.resultSearchText,Q.searchFileImageNonRegion,Q.selectionChanged),re=(Q.setError,Q.setImageCaptureHelpModal),ae=Q.setImageSearchInput,oe=Q.setPreFilterDropdown,ie=Q.setRegions,ce=Q.setRequestImage,le=Q.setSearchResults,ue=Q.setSelectedRegion,se=Q.setPreFilter,fe=Q.setUpdateSession,he=Q.updateResultChangePosition,de=(Q.updateResults,Q.updateStatusLoading),pe=Q.updateValueTextSearchMobile,me=(Q.setFilter,K.reducer),ve=n(94),ge=n(468),ye=n.n(ge),be=Object(x.b)({name:"auth",initialState:{accessToken:null,name:null,role:null},reducers:{login:function(e,t){},logout:function(e){e.accessToken=null,e.name=null,e.role=null,ye.a.remove("token")}}}),xe=be.actions,we=(xe.login,xe.logout,be.reducer);function Ee(e){var t=new RegExp("[?&]".concat(e,"(=([^&#]*))?(&|$|#)"),"i").exec(window.location.href);return t&&t[2]?decodeURIComponent(t[2]):!!t||void 0}var Oe=Object(x.b)({name:"nyris",initialState:{showPart:"start",feedbackState:"hidden"},reducers:{showStart:function(e){return Object(h.a)(Object(h.a)({},e),{},{showPart:"start"})},showCamera:function(e){return Object(h.a)(Object(h.a)({},e),{},{showPart:"camera"})},showResults:function(e){return Object(h.a)(Object(h.a)({},e),{},{showPart:"results"})},showFeedback:function(e){return Object(h.a)(Object(h.a)({},e),{},{feedbackState:"question"})},hideFeedback:function(e){return Object(h.a)(Object(h.a)({},e),{},{feedbackState:"hidden"})},feedbackSubmitPositive:function(e){return Object(h.a)(Object(h.a)({},e),{},{feedbackState:"positive"})},feedbackNegative:function(e){return Object(h.a)(Object(h.a)({},e),{},{feedbackState:"negative"})}}}),je=Oe.actions,Ce=(je.showStart,je.showCamera,je.showResults),ke=je.showFeedback,Se=(je.hideFeedback,je.feedbackSubmitPositive,je.feedbackNegative,Oe.reducer),Le=Object(h.a)(Object(h.a)({},{xOptions:!1,apiKey:"UNSET",preview:!0,regions:!1,maxWidth:500,maxHeight:500,jpegQuality:.92,baseUrl:"https://api.nyris.io",instantRedirectPatterns:["^https?://(www.)?youtube.com/","^https?://(www.)?youtu.be/","^https?://(www.)?vimeo.com/","^https?://(www.)?dailymotion.com/","^https?://(www.)?dai.ly/"],theme:{},field:{ctaLinkField:"",productName:"",productDetails:"",manufacturerNumber:"",productTag:"",warehouseNumber:"",warehouseNumberValue:"",warehouseShelfNumber:"",warehouseShelfNumberValue:"",warehouseStock:"",warehouseStockValue:""}}),settings);Le=Object(h.a)(Object(h.a)({},Le),{},{apiKey:Ee("apiKey")||Le.apiKey,xOptions:Ee("xOptions")||Le.xOptions,regions:Ee("use.regions")||Le.regions,preview:Ee("use.preview")||Le.preview});var Ne,Re=Object(ve.b)({auth:we,settings:function(){return Le},search:me,nyris:Se}),Ie=Object(x.a)({reducer:Re,devTools:!1}),_e=function(){return Object(c.b)()},Me=c.c,Te=(n(732),n(408),n(889)),Fe=["svgRef","title"];function Pe(){return(Pe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function He(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Ae=function(e){var t=e.svgRef,n=e.title,r=He(e,Fe);return a.a.createElement("svg",Pe({width:28,height:28,viewBox:"0 0 28 28",fill:"currentColor",ref:t},r),n?a.a.createElement("title",null,n):null,Ne||(Ne=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28 24C28 24.5523 27.5523 25 27 25H1C0.447715 25 0 24.5523 0 24V7C0 6.44772 0.447715 6 1 6H7.46L9.17 3.45C9.35398 3.17061 9.66548 3.00173 10 3H18C18.3345 3.00173 18.646 3.17061 18.83 3.45L20.54 6H27C27.5523 6 28 6.44772 28 7V24ZM2 23H26V8H20C19.6655 7.99827 19.354 7.82939 19.17 7.55L17.46 5H10.54L8.83 7.55C8.64602 7.82939 8.33452 7.99827 8 8H2V23ZM14 21C10.6863 21 8 18.3137 8 15C8 11.6863 10.6863 9 14 9C17.3137 9 20 11.6863 20 15C20 18.3137 17.3137 21 14 21ZM14 11C11.7909 11 10 12.7909 10 15C10 17.2091 11.7909 19 14 19C16.2091 19 18 17.2091 18 15C18 12.7909 16.2091 11 14 11Z",fill:"currentColor"})))},Be=a.a.forwardRef((function(e,t){return a.a.createElement(Ae,Pe({svgRef:t},e))})),Ge=(n.p,n(909)),ze=n(888),De=n(67),qe=n.n(De),Ve=n(472),We=n.n(Ve),Ue=n(469),Ze=n.n(Ue),Ye=n(13),Ke=n(176),Qe=n(470),Je=n.n(Qe),Xe=n(55),$e=n.n(Xe);function et(){et=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return r(i,"_invoke",{value:w(e,n,c)}),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},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 a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var tt=function(){var e=Object(d.a)(et().mark((function e(t){var n;return et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t instanceof HTMLCanvasElement)){e.next=4;break}e.t0=t,e.next=7;break;case 4:return e.next=6,Object(Xe.urlOrBlobToCanvas)(t);case 6:e.t0=e.sent;case 7:return n=e.t0,e.abrupt("return",n);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),nt=function(e){return 0===e.length?W:e.reduce((function(e,t){return e.confidence=e.confidence||0,t.confidence=t.confidence||0,e.confidence>=t.confidence?e:t})).normalizedRect},rt=function(){var e=Object(d.a)(et().mark((function e(t,n){var r,a,o;return et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new $e.a(n),e.next=3,r.findRegions(t);case 3:return a=e.sent,o=nt(a),e.abrupt("return",{selectedRegion:Object(Ye.isEqual)(o,W)?W:o,regions:a});case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),at=function(e){var t=e.image,n=e.settings,r=e.region,a=e.filters,o={};return r&&(o={cropRect:r}),new $e.a(n).findByImage(t,o,a)};function ot(){ot=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return r(i,"_invoke",{value:w(e,n,c)}),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},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 a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var it,ct=function(e){var t,n=e.isToggle,o=e.onToggleModal,i=Object(r.useRef)(null),c=Object(r.useState)("environment"),l=Object(p.a)(c,2),u=l[0],s=l[1],v=Object(r.useState)(1),g=Object(p.a)(v,2),y=g[0],b=g[1],x=Me((function(e){return e})),w=x.search,E=x.settings,O=Object(f.g)(),j=_e(),C=w.preFilter,k=Object(r.useCallback)((function(){s((function(e){return"environment"===e?"user":"environment"}))}),[]),S=function(){var e=Object(d.a)(ot().mark((function e(t){var n,r,a,o,i;return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return j(de(!0)),j(X()),"/result"!==O.location.pathname&&O.push("/result"),e.next=5,tt(t);case 5:if(r=e.sent,j(ce(r)),j(ae(t)),j(ee(!1)),L(),!E.regions){e.next=17;break}return e.next=13,rt(r,E);case 13:a=e.sent,j(ie(a.regions)),n=a.selectedRegion,j(ue(n));case 17:o=[{key:E.visualSearchFilterKey,values:Object.keys(C)}],i=[],at({image:r,settings:E,filters:Object(Ye.isEmpty)(C)?void 0:o,region:n}).then((function(e){null===e||void 0===e||e.results.map((function(e){i.push({sku:e.sku,score:e.score})}));var t=Object(h.a)(Object(h.a)({},e),{},{filters:i});j(le(t)),j(de(!1))})).catch((function(e){console.log("error input search",e),j(de(!1))}));case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),L=function(){s("environment"),b(1),o()},N=Object(Ke.a)({onDrop:function(){var e=Object(d.a)(ot().mark((function e(t){var n,r,a,o,i;return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[],j(de(!0)),j(ae(URL.createObjectURL(t[0]))),e.next=5,tt(t[0]);case 5:if(o=e.sent,j(ce(o)),!E.regions){e.next=14;break}return e.next=10,rt(o,E);case 10:i=e.sent,j(ie(i.regions)),a=i.selectedRegion,j(ue(a));case 14:return e.abrupt("return",at({image:o,settings:E,region:a}).then((function(e){null===e||void 0===e||e.results.map((function(e){r.push({sku:e.sku,score:e.score})})),n=Object(h.a)(Object(h.a)({},e),{},{filters:r}),j(le(n)),setTimeout((function(){j(de(!1)),L(),O.push("/result")}),500)})).catch((function(e){console.log("err camera_custom",e),j(de(!1)),L()})));case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).getInputProps;return a.a.createElement(m.a,{className:"box-camera-custom"},a.a.createElement(Ge.a,{anchor:"bottom",open:n,onClose:L,className:"modal-togggle-cam"},a.a.createElement(m.a,{className:"wrap-camera"},a.a.createElement("button",{className:"btn-close-modal right",style:{backgroundColor:"#666666"},onClick:L},a.a.createElement(qe.a,{style:{fontSize:20,color:"#fff"}})),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",height:"100svh",width:"100%"}},a.a.createElement(Je.a,{audio:!1,height:"100svh",width:"100%",imageSmoothing:!0,screenshotFormat:"image/jpeg",forceScreenshotSourceSize:!0,videoConstraints:Object(h.a)(Object(h.a)({},{width:1080,height:1080,aspectRatio:1.33333333333}),{},{facingMode:u}),ref:i,style:{height:"100%",width:"100%",objectFit:"cover",transform:"scale(".concat(y,")")},screenshotQuality:1},(function(e){var t=e.getScreenshot;return a.a.createElement("button",{onClick:function(){var e=t();S(e)},className:"btn-capture-camera"},a.a.createElement("svg",{width:"63",height:"63",viewBox:"0 0 63 63",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.a.createElement("circle",{cx:"31.5",cy:"31.5",r:"31.5",fill:"white"})))}))),a.a.createElement("button",{className:"btn-switch-camera",onClick:k},a.a.createElement("img",{src:Ze.a,alt:"",width:52,height:52})),a.a.createElement("div",{className:"box-scale-camera",style:{backgroundColor:null===(t=E.theme)||void 0===t?void 0:t.secondaryColor}},a.a.createElement("button",{className:"".concat(1===y&&"active"),style:{backgroundColor:1===y?"white":"",color:1===y?"black":"white"},onClick:function(){return b(1)}},"1"),a.a.createElement("button",{className:"".concat(1.5===y&&"active"),style:{backgroundColor:1.5===y?"white":"",color:1.5===y?"black":"white"},onClick:function(){return b(1.5)}},"1.5"),a.a.createElement("button",{className:"".concat(2===y&&"active"),style:{backgroundColor:2===y?"white":"",color:2===y?"black":"white"},onClick:function(){return b(2)}},"2")),a.a.createElement("div",{className:"wrap-box-input-mobile custom-library"},a.a.createElement("input",Object.assign({id:"icon-button-file",type:"file",style:{display:"none"}},N({accept:"image/png,image/jpeg",onClick:function(e){e.stopPropagation()}}))),a.a.createElement("label",{htmlFor:"icon-button-file"},a.a.createElement(ze.a,{color:"primary","aria-label":"upload picture",component:"span",style:{width:32,height:32,borderRadius:"100%",padding:7,backgroundColor:"#F3F3F5"}},a.a.createElement(We.a,{style:{fontSize:20,color:"red"}})))))))},lt=["svgRef","title"];function ut(){return(ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function st(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ft,ht=function(e){var t=e.svgRef,n=e.title,r=st(e,lt);return a.a.createElement("svg",ut({width:24,height:22,viewBox:"0 0 22 21",style:{enableBackground:"new 0 0 22 20.28"},ref:t},r),n?a.a.createElement("title",null,n):null,it||(it=a.a.createElement("path",{className:"st3",d:"M 10.959 1.845 C 11.109 1.845 11.266 1.886 11.408 1.96 L 19.66 6.661 C 19.935 6.825 20.101 7.112 20.101 7.424 L 20.101 15.776 C 20.101 16.111 19.91 16.415 19.61 16.562 L 15.912 18.384 C 15.787 18.449 15.646 18.474 15.513 18.474 C 15.347 18.474 15.189 18.433 15.048 18.343 C 14.782 18.178 14.624 17.9 14.624 17.596 L 14.624 10.041 L 10.959 7.957 L 7.294 10.041 L 7.294 17.605 C 7.294 17.908 7.136 18.196 6.87 18.351 C 6.728 18.441 6.562 18.483 6.405 18.483 C 6.272 18.483 6.13 18.449 6.006 18.392 L 2.307 16.57 C 2.008 16.415 1.817 16.111 1.817 15.776 L 1.817 7.424 C 1.817 7.112 1.983 6.817 2.265 6.661 L 10.519 1.96 C 10.651 1.886 10.801 1.845 10.959 1.845 M 10.959 0.205 C 10.51 0.205 10.069 0.32 9.679 0.541 L 1.426 5.242 C 0.645 5.693 0.155 6.529 0.155 7.424 L 0.155 15.776 C 0.155 16.735 0.695 17.596 1.568 18.031 L 5.266 19.852 C 5.615 20.025 6.014 20.115 6.405 20.115 C 6.878 20.115 7.343 19.984 7.742 19.738 C 8.499 19.278 8.956 18.474 8.956 17.596 L 8.956 10.984 L 10.959 9.844 L 12.962 10.984 L 12.962 17.596 C 12.962 18.474 13.41 19.278 14.175 19.738 C 14.583 19.984 15.039 20.115 15.522 20.115 C 15.912 20.115 16.311 20.025 16.66 19.852 L 20.359 18.031 C 21.231 17.605 21.771 16.735 21.771 15.776 L 21.771 7.424 C 21.771 6.529 21.281 5.693 20.492 5.242 L 12.239 0.541 C 11.848 0.32 11.408 0.205 10.959 0.205 Z",fill:"currentColor",transform:"matrix(0.999999, 0.00121, -0.00121, 0.999999, 0.012302, -0.013258)"})))},dt=a.a.forwardRef((function(e,t){return a.a.createElement(ht,ut({svgRef:t},e))})),pt=(n.p,["svgRef","title"]);function mt(){return(mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function vt(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var gt=function(e){var t=e.svgRef,n=e.title,r=vt(e,pt);return a.a.createElement("svg",mt({width:12,height:12,viewBox:"0 0 12 12",fill:"currentColor",ref:t},r),n?a.a.createElement("title",null,n):null,ft||(ft=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.66658 10.9888C3.65328 11.6481 4.81331 12 6 12C7.5913 12 9.11742 11.3679 10.2426 10.2426C11.3679 9.11742 12 7.5913 12 6C12 4.81331 11.6481 3.65328 10.9888 2.66658C10.3295 1.67989 9.39246 0.910851 8.2961 0.456725C7.19975 0.0025997 5.99335 -0.11622 4.82946 0.115291C3.66557 0.346802 2.59648 0.918247 1.75736 1.75736C0.918247 2.59648 0.346802 3.66557 0.115291 4.82946C-0.11622 5.99335 0.0025997 7.19975 0.456725 8.2961C0.910851 9.39246 1.67989 10.3295 2.66658 10.9888ZM3.14278 1.72387C3.98852 1.15877 4.98284 0.857145 6 0.857145C7.36397 0.857145 8.67208 1.39898 9.63655 2.36345C10.601 3.32793 11.1429 4.63603 11.1429 6C11.1429 7.01716 10.8412 8.01148 10.2761 8.85722C9.71103 9.70296 8.90782 10.3621 7.96809 10.7514C7.02835 11.1406 5.9943 11.2425 4.99668 11.044C3.99906 10.8456 3.08269 10.3558 2.36345 9.63655C1.64421 8.91731 1.1544 8.00094 0.955964 7.00332C0.757526 6.00571 0.859372 4.97165 1.24862 4.03192C1.63787 3.09218 2.29705 2.28898 3.14278 1.72387ZM6 2.57143C5.87285 2.57143 5.74857 2.60913 5.64285 2.67977C5.53713 2.75041 5.45473 2.85081 5.40608 2.96827C5.35742 3.08574 5.34469 3.215 5.36949 3.3397C5.3943 3.4644 5.45553 3.57895 5.54543 3.66885C5.63534 3.75876 5.74988 3.81999 5.87458 3.84479C5.99929 3.8696 6.12854 3.85686 6.24601 3.80821C6.36348 3.75955 6.46388 3.67715 6.53452 3.57144C6.60515 3.46572 6.64286 3.34143 6.64286 3.21429C6.64286 3.04379 6.57513 2.88028 6.45457 2.75972C6.33401 2.63916 6.1705 2.57143 6 2.57143ZM6.42857 8.57143V5.14286H4.71428V6H5.57143V8.57143H4.28571V9.42857H7.71428V8.57143H6.42857Z",fill:"currentColor"})))},yt=a.a.forwardRef((function(e,t){return a.a.createElement(gt,mt({svgRef:t},e))}));n.p;var bt,xt=function(e){var t,n,o,i,c,l,s=Object(r.useState)(!1),h=Object(p.a)(s,2),d=h[0],v=h[1],g=Object(f.g)(),y=Me((function(e){return e})),b=y.settings,x=y.search.imageCaptureHelpModal,w=_e();return a.a.createElement(a.a.Fragment,null,a.a.createElement(m.a,{className:"box-footer-mobile",display:"flex",position:"relative",alignItems:"center",height:"100%",justifyContent:"space-between",style:{paddingLeft:"40px",paddingRight:"40px",height:"64px"}},a.a.createElement(u.b,{style:{width:"48px",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"100%",backgroundColor:"/"!==g.location.pathname||x?"":"".concat(null===(t=b.theme)||void 0===t?void 0:t.primaryColor,"21")},activeClassName:"active",to:"/",className:"nav-link p-0 menu-children rounded-0",onClick:function(){w(te("")),w(se({})),w(re(!1))}},a.a.createElement(dt,{color:"/"!==g.location.pathname||x?"#000":null===(n=b.theme)||void 0===n?void 0:n.primaryColor})),"/"!==(null===(o=g.location)||void 0===o?void 0:o.pathname)&&!x&&a.a.createElement(m.a,{className:"box-icon-camera-mobile"},a.a.createElement(Te.a,{onClick:function(){v(!d)}},a.a.createElement(Be,{color:"#000"}))),"/"!==(null===(i=g.location)||void 0===i?void 0:i.pathname)&&a.a.createElement("div",{style:{width:"48px",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"100%",backgroundColor:x?"".concat(null===(c=b.theme)||void 0===c?void 0:c.primaryColor,"21"):""},onClick:function(){w(re(!x))}},a.a.createElement(yt,{fontSize:24,width:24,height:24,color:x?null===(l=b.theme)||void 0===l?void 0:l.primaryColor:"#000"}))),a.a.createElement(m.a,{className:"box-screenshot-camera"},a.a.createElement(ct,{isToggle:d,onToggleModal:function(){v(!d)}})))},wt=["svgRef","title"];function Et(){return(Et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ot(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var jt,Ct=function(e){var t=e.svgRef,n=e.title,r=Ot(e,wt);return a.a.createElement("svg",Et({width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",ref:t},r),n?a.a.createElement("title",null,n):null,bt||(bt=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 4H12.95C12.7 2.85 11.7 2 10.5 2C9.3 2 8.3 2.85 8.05 4H1V5H8.05C8.3 6.15 9.3 7 10.5 7C11.7 7 12.7 6.15 12.95 5H15V4ZM10.5 6C9.65 6 9 5.35 9 4.5C9 3.65 9.65 3 10.5 3C11.35 3 12 3.65 12 4.5C12 5.35 11.35 6 10.5 6ZM1 12H3.05C3.3 13.15 4.3 14 5.5 14C6.7 14 7.7 13.15 7.95 12H15V11H7.95C7.7 9.85 6.7 9 5.5 9C4.3 9 3.3 9.85 3.05 11H1V12ZM5.5 10C6.35 10 7 10.65 7 11.5C7 12.35 6.35 13 5.5 13C4.65 13 4 12.35 4 11.5C4 10.65 4.65 10 5.5 10Z",fill:"currentColor"})))},kt=a.a.forwardRef((function(e,t){return a.a.createElement(Ct,Et({svgRef:t},e))})),St=(n.p,n(890)),Lt=n(891),Nt=["svgRef","title"];function Rt(){return(Rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function It(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var _t,Mt=function(e){var t=e.svgRef,n=e.title,r=It(e,Nt);return a.a.createElement("svg",Rt({width:24,height:24,viewBox:"0 0 24 24",fill:"none",ref:t},r),n?a.a.createElement("title",null,n):null,jt||(jt=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.3723 22.117C23.719 22.4637 23.719 23.0257 23.3723 23.3723C23.0257 23.719 22.4637 23.719 22.117 23.3723L16.8475 18.1028C16.3904 17.6457 15.6641 17.6208 15.123 17.9745C11.1608 20.5639 5.82363 19.9525 2.55769 16.3754C-0.967972 12.5138 -0.832726 6.56215 2.86471 2.86471C6.56215 -0.832726 12.5138 -0.967972 16.3754 2.55769C19.9525 5.82363 20.5639 11.1608 17.9745 15.123C17.6208 15.6641 17.6457 16.3904 18.1028 16.8475L23.3723 22.117ZM9.79677 1.80687C5.38428 1.80687 1.80725 5.3839 1.80725 9.79639C1.81214 14.2069 5.38631 17.781 9.79677 17.7859C14.2093 17.7859 17.7863 14.2089 17.7863 9.79639C17.7863 5.3839 14.2093 1.80687 9.79677 1.80687Z",fill:"#000"})))},Tt=a.a.forwardRef((function(e,t){return a.a.createElement(Mt,Rt({svgRef:t},e))})),Ft=(n.p,["svgRef","title"]);function Pt(){return(Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ht(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var At=function(e){var t=e.svgRef,n=e.title,r=Ht(e,Ft);return a.a.createElement("svg",Pt({width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",ref:t},r),n?a.a.createElement("title",null,n):null,_t||(_t=a.a.createElement("path",{d:"M9.33333 16H6.66667C6.31305 16 5.97391 15.8595 5.72386 15.6095C5.47381 15.3594 5.33333 15.0203 5.33333 14.6667V9.60667L0.393333 4.66667C0.142942 4.41777 0.00148853 4.07972 0 3.72667V1.33333C0 0.979711 0.140476 0.640573 0.390524 0.390524C0.640573 0.140476 0.979711 0 1.33333 0H14.6667C15.0203 0 15.3594 0.140476 15.6095 0.390524C15.8595 0.640573 16 0.979711 16 1.33333V3.72667C15.9985 4.07972 15.8571 4.41777 15.6067 4.66667L10.6667 9.60667V14.6667C10.6667 15.0203 10.5262 15.3594 10.2761 15.6095C10.0261 15.8595 9.68696 16 9.33333 16ZM1.33333 1.33333V3.72667L6.66667 9.06V14.6667H9.33333V9.06L14.6667 3.72667V1.33333H1.33333Z",fill:"currentColor"})))},Bt=a.a.forwardRef((function(e,t){return a.a.createElement(At,Pt({svgRef:t},e))})),Gt=(n.p,function(){var e=Object(f.h)().search;return Object(r.useMemo)((function(){return new URLSearchParams(e)}),[e])});var zt=Object(St.a)(Object(r.memo)(Object(Lt.a)((function(e){var t,n,o,i,c,l,s,d,v,g,y,b,x,w=e.onToggleFilterMobile,E=e.refine,O=_e(),j=Me((function(e){return e})).search,C=j.imageThumbSearchInput,k=j.textSearchInputMobile,S=j.preFilter,L=j.preFilterDropdown,N=j.valueTextSearch,R=Gt(),I=Object(r.useRef)(null),_=Object(r.useState)(!1),M=Object(p.a)(_,2),T=M[0],F=M[1],P=Object(f.g)(),H=Me((function(e){return e})).settings;Object(r.useEffect)((function(){var e;"/result"===(null===(e=P.location)||void 0===e?void 0:e.pathname)&&(C||k)?F(!0):F(!1)}),[C,P.location,k]),Object(r.useEffect)((function(){""!==C&&(P.push("/result"),O(pe("")),E(""))}),[C,O,E,P]),Object(r.useEffect)((function(){var e=R.get("query")||"";Object(Ye.isEmpty)(e)||(O(pe(e)),E(e),setTimeout((function(){E(e)}),100))}),[R,E,O]);var A=Object(r.useCallback)(Object(Ye.debounce)((function(e){e?P.push({pathname:"/result",search:"?query=".concat(e)}):P.push("/result")}),500),[]),B=Object(r.useMemo)((function(){var e=!1;return!!(null===N||void 0===N?void 0:N.refinementList)&&(Object.keys(null===N||void 0===N?void 0:N.refinementList).forEach((function(t){"object"!==typeof N.refinementList[t]||(e=!0)})),e)}),[null===N||void 0===N?void 0:N.refinementList]),G=Object(r.useMemo)((function(){var t;return!(H.postFilterOption&&(null===(t=e.allSearchResults)||void 0===t?void 0:t.hits.length)>0)}),[H.postFilterOption,null===(t=e.allSearchResults)||void 0===t?void 0:t.hits]);return a.a.createElement("div",{style:{width:"100%",background:"#fafafa"}},"/result"!==(null===(n=P.location)||void 0===n?void 0:n.pathname)&&a.a.createElement(m.a,{className:"box-content",style:{display:"flex",alignItems:"center",height:"48px",borderBottom:"1px solid #e9e9ec",background:null===(o=H.theme)||void 0===o?void 0:o.headerColor}},a.a.createElement(u.b,{to:"/",style:{lineHeight:0,paddingLeft:"10px"},onClick:function(){O(te("")),O(se({}))}},a.a.createElement("img",{src:null===(i=H.theme)||void 0===i?void 0:i.appBarLogoUrl,alt:"logo",style:{aspectRatio:1,width:null===(c=H.theme)||void 0===c?void 0:c.logoWidth,height:null===(l=H.theme)||void 0===l?void 0:l.logoHeight}}))),a.a.createElement("div",{style:{margin:"16px 8px 0px 8px",display:"flex",columnGap:"8px",alignItems:"center"}},a.a.createElement("div",{className:"wrap-header-mobile",style:{height:"56px"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",height:"100%"}},a.a.createElement("div",{ref:I,id:"box-input-search",className:"d-flex w-100",style:{alignItems:"center",height:"100%"}},a.a.createElement(m.a,{className:"pre-filter-icon",onClick:function(){H.preFilterOption&&(w(!1),O(oe(!L)))},style:{cursor:H.preFilterOption?"pointer":""}},H.preFilterOption&&a.a.createElement("div",{className:"icon-hover",style:Object(h.a)({},Object(Ye.isEmpty)(S)?{backgroundColor:"".concat(null===(d=H.theme)||void 0===d?void 0:d.secondaryColor)}:{backgroundColor:"".concat(null===(s=H.theme)||void 0===s?void 0:s.primaryColor)})},a.a.createElement(kt,{color:"white"})),!H.preFilterOption&&a.a.createElement(Tt,{width:16,height:16}),!Object(Ye.isEmpty)(S)&&a.a.createElement("div",{style:{position:"absolute",top:"10px",left:"31px",display:"flex",justifyContent:"center",alignItems:"center",background:"white",width:"10px",height:"10px",borderRadius:"100%"}},a.a.createElement("div",{style:{width:"8px",height:"8px",background:null===(v=H.theme)||void 0===v?void 0:v.primaryColor,borderRadius:"100%"}}))),a.a.createElement(Dt,{value:k,onChange:function(e){A(e.currentTarget.value),""===e.currentTarget.value?(O(pe("")),E("")):O(pe(e.currentTarget.value))}}),"/"!==(null===(g=P.location)||void 0===g?void 0:g.pathname)&&k&&a.a.createElement(Te.a,{onClick:function(){if(C)return P.push("/result"),O(pe("")),void E("");O(pe("")),O(te("")),E(""),P.push("/")},style:{marginRight:"8px",border:0,width:"40px",height:"40px"}},a.a.createElement(qe.a,{style:{fontSize:16,color:null===(y=H.theme)||void 0===y?void 0:y.secondaryColor}}))))),T&&H.postFilterOption&&a.a.createElement("div",{style:{position:"relative",width:"56px",height:"56px",padding:" 8px",flexShrink:0,borderRadius:"32px",background:"#FAFAFA",boxShadow:" 0px 0px 8px 0px rgba(0, 0, 0, 0.15)"},onClick:function(){G||(w(),O(oe(!1)))}},a.a.createElement("div",{style:{display:"flex",background:"".concat(G?"#F3F3F5":null===(b=H.theme)||void 0===b?void 0:b.primaryColor),borderRadius:"40px",width:"40px",height:"40px",justifyContent:"center",alignItems:"center"}},a.a.createElement(Bt,{color:"".concat(G?"#E0E0E0":"white")})),B&&!G&&a.a.createElement("div",{style:{position:"absolute",top:"8px",left:"37px",display:"flex",justifyContent:"center",alignItems:"center",background:"white",width:"10px",height:"10px",borderRadius:"100%"}},a.a.createElement("div",{style:{width:"8px",height:"8px",background:null===(x=H.theme)||void 0===x?void 0:x.primaryColor,borderRadius:"100%"}})))))})))),Dt=function(e){var t=e.value,n=e.onChange;return Object(r.useEffect)((function(){var e=document.getElementById("mobile-input-search"),t=function(t){"Enter"===t.key&&(null===e||void 0===e||e.blur())};return null===e||void 0===e||e.addEventListener("keyup",t,!1),function(){null===e||void 0===e||e.removeEventListener("scroll",t,!1)}}),[]),a.a.createElement("input",{style:{border:"0px",width:"100%",display:"flex",flexGrow:1,fontSize:14,paddingLeft:"12px",paddingRight:"4px",color:"#2B2C46",outline:"none",borderRadius:"32px"},className:"input-search",placeholder:"Search",value:t,onChange:n,id:"mobile-input-search"})};var qt=function(){var e,t,n,r=_e(),o=Me((function(e){return e})).settings;return a.a.createElement(m.a,{className:"box-content",display:"flex"},a.a.createElement(u.b,{to:"/",style:{lineHeight:0,paddingLeft:"10px"},onClick:function(){r(te("")),r(se({}))}},a.a.createElement("img",{src:null===(e=o.theme)||void 0===e?void 0:e.appBarLogoUrl,alt:"logo",style:{aspectRatio:1,width:null===(t=o.theme)||void 0===t?void 0:t.logoWidth,height:null===(n=o.theme)||void 0===n?void 0:n.logoHeight}})))},Vt=n(473);function Wt(){Wt=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return r(i,"_invoke",{value:w(e,n,c)}),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},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 a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var Ut=n.n(Vt).a.create(),Zt=function(){var e=Object(d.a)(Wt().mark((function e(t){var n,r,a,o;return Wt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.apiKey,r=t.baseUrl,a={"X-Api-Key":n},e.next=4,Ut.request({method:"POST",url:"".concat(r,"/find/v1/session"),headers:a});case 4:return o=e.sent,e.abrupt("return",o.data.session);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var Yt=function(e){var t=e.handleClose;return a.a.createElement(m.a,{style:{paddingLeft:"24px",paddingRight:"24px",paddingBottom:"24px"}},a.a.createElement(m.a,{display:"flex",justifyContent:"end",position:"sticky",top:0,style:{background:"white",width:"100%"}},a.a.createElement(Te.a,{onClick:t},a.a.createElement(qe.a,null))),a.a.createElement("p",{style:{fontSize:"40px",lineHeight:"40px",fontWeight:700,color:"#2B2C46"}},"Six ways to optimize visual search"),a.a.createElement("div",{style:{display:"flex",flexDirection:"column",rowGap:"16px",marginTop:"16px"}},Z.map((function(e,t){return a.a.createElement("div",{key:t,style:{display:"flex",flexDirection:"column",rowGap:"8px"}},a.a.createElement("p",{style:{fontSize:"16px",lineHeight:"24px",fontWeight:700,color:"#2B2C46",marginBottom:"0px"}},"".concat(t+1,"- ").concat(e.title)),a.a.createElement("p",{style:{fontSize:"14px",lineHeight:"20px",fontWeight:400,color:"#2B2C46",marginBottom:"0px"}},e.description),a.a.createElement("div",{style:{display:"flex",columnGap:"16px"}},a.a.createElement("div",null,a.a.createElement("img",{src:e.imageLeft,alt:""})),a.a.createElement("div",null,a.a.createElement("img",{src:e.imageRight,alt:""}))))}))))},Kt=n(95),Qt=n(80),Jt=["children","enabled"];function Xt(e){var t=e.children,n=e.enabled,o=void 0===n||n,i=Object(s.a)(e,Jt),c=Object(r.useState)(),l=Object(p.a)(c,2),u=l[0],f=l[1];return Object(r.useEffect)((function(){f(o)}),[o]),u?a.a.createElement("div",i,t):a.a.createElement(a.a.Fragment,null)}var $t=n(251),en=n.n($t),tn=n(252),nn=n.n(tn),rn=n(892);function an(e){var t=e.icon,n=e.label,o=(e.labelPosition,e.className,e.classNameLabel),i=void 0===o?"":o,c=Object(r.useState)(""),l=Object(p.a)(c,2),u=l[0],s=l[1];return Object(r.useEffect)((function(){s(t)}),[t]),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},n&&a.a.createElement("div",{className:i},a.a.createElement(rn.a,{style:{textTransform:"none",fontSize:12,color:"#55566B",fontWeight:600}},n)),"remove"===u?a.a.createElement(en.a,{style:{color:"#55566B"}}):a.a.createElement(nn.a,{style:{color:"#55566B"}}))}var on=n(114),cn=n(906),ln=n(48),un=n.n(ln),sn=n(914),fn=n(903),hn={collapsed:function(e){return{height:e?"auto":0,opacity:0,pointerEvents:"none",transitionEnd:{display:"none"}}},expanded:function(e){return{height:"auto",opacity:1,pointerEvents:"auto",display:"block"}}},dn={ease:[.16,1,.3,1],duration:.6};function pn(e){var t=e.isCollapsed,n=e.className,r=e.children,o=Object(sn.a)();return a.a.createElement(a.a.Fragment,null,a.a.createElement(fn.a.div,{key:"collapse",initial:"collapsed",animate:t?"collapsed":"expanded",variants:hn,className:un()("overflow-hidden",n),transition:dn,custom:o},r))}var mn=n(183),vn=n(893),gn=n(106),yn=n.n(gn),bn=Object(on.atom)({searchResults:void 0,isSearchStalled:void 0}),xn=Object(mn.selectAtom)(bn,(function(e){return e.searchResults}),yn.a);Object(mn.selectAtom)(bn,(function(e){return e.isSearchStalled}));Object(Lt.a)(Object(r.memo)((function(e){var t=e.searchResults,n=e.isSearchStalled,a=Object(mn.useUpdateAtom)(bn);return Object(r.useEffect)((function(){a({searchResults:t,isSearchStalled:n})}),[a,t,n]),null}),yn.a));var wn=Object(vn.a)(Object(r.memo)((function(e){var t=e.children,n=e.className,o=e.header,i=e.attributes,c=void 0===i?[]:i,l=e.isOpened,u=void 0!==l&&l,s=(e.items,e.onToggle),f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(r.useMemo)((function(){var t=(null===e||void 0===e?void 0:e.disjunctiveFacets)||[],n=(null===e||void 0===e?void 0:e.hierarchicalFacets)||[];return[].concat(Object(Qt.a)(t),Object(Qt.a)(n))}),[e]),a=Object(r.useMemo)((function(){var e=!t.length;return n.forEach((function(n){null===t||void 0===t||t.forEach((function(t){n.name===t&&n.data&&(e=!0)}))})),e}),[n,t]);return a}(Object(mn.useAtomValue)(xn),c),h=Object(b.useMediaQuery)({query:"(max-width: 776px)"});return a.a.createElement(m.a,null,a.a.createElement("div",{className:un()("border-neutral-light",{hidden:!f},n)},a.a.createElement(Te.a,{className:"w-full flex items-center justify-between group","aria-expanded":u,style:{paddingLeft:0},onClick:function(e){"function"===typeof s&&s(e)}},a.a.createElement("div",{className:"flex items-center w-full subhead"},a.a.createElement(rn.a,{className:"fw-700",style:{textTransform:"none",fontFamily:"Montserrat !important",fontSize:14}},o||c[0])),!h&&a.a.createElement("div",{className:"text-neutral-dark can-hover:transition-colors can-hover:group-hover:text-neutral-light"},u?a.a.createElement(en.a,null):a.a.createElement(nn.a,null))),a.a.createElement(pn,{isCollapsed:!u},a.a.createElement("div",{className:"mt-4"},t))))})));function En(e){var t;return(null===e||void 0===e?void 0:e.attributes)?null===(t=e.options)||void 0===t?void 0:t.attributes.join(":"):null===e||void 0===e?void 0:e.attribute}function On(e){var t=e.widgets,n=[];return(null===t||void 0===t?void 0:t.length)?t.forEach((function(e){return n.push(En(e))})):n.push(En(e)),n.join(":")}function jn(e){return null===e||void 0===e?void 0:e.attribute}var Cn=["children","onToggle","panelId"];var kn=Object(on.atom)((function(e){return Boolean(Object.values(e(Sn)).find((function(e){return!0===e})))}),(function(e,t,n){var r,a,o=n(e(kn));t(Sn,(r=e(Sn),a=o,Object.keys(r).reduce((function(e,t){return Object(h.a)(Object(h.a)({},e),{},Object(Kt.a)({},t,a))}),{})))})),Sn=Object(on.atom)({});function Ln(e){var t=e.children,n=e.onToggle,o=e.panelId,i=Object(s.a)(e,Cn),c=Object(r.useCallback)((function(){return n(o)}),[n,o]);return a.a.createElement(wn,Object.assign({onToggle:c},i),t)}function Nn(e){var t,n=e.dynamicWidgets,o=void 0===n||n,i=e.onApply,c=(e.disjunctiveFacets,Me((function(e){return e})).settings),l=c.refinements,u=Object(on.useAtom)(Sn),s=Object(p.a)(u,2),d=s[0],v=s[1],g=Object(on.useAtom)(kn),y=Object(p.a)(g,2),x=y[0],w=y[1],E=Object(f.g)(),O=Object(b.useMediaQuery)({query:"(max-width: 776px)"});Object(r.useEffect)((function(){v((function(e){return Object(h.a)(Object(h.a)({},e),l.reduce((function(e,t){return Object(h.a)(Object(h.a)({},e),{},Object(Kt.a)({},On(t),Boolean(t.isExpanded)))}),{}))}))}),[]);var j=Object(r.useCallback)((function(e){v((function(t){return Object(h.a)(Object(h.a)({},t),{},Object(Kt.a)({},e,!t[e]))}))}),[v]),C=Object(r.useMemo)((function(){return l.map((function(e){return a.a.createElement(cn.a,Object.assign({className:"box-refinement-list",attribute:e.attribute},e.options,{translations:{noResults:"No results",placeholder:""},sortBy:["isRefined:desc","name:asc"]}))}))}),[l]),k=Object(r.useMemo)((function(){return C.map((function(e,t){var n=l[t],r=On(n),o=function(e){var t,n=null===(t=e)||void 0===t?void 0:t.widgets,r=[];return(null===n||void 0===n?void 0:n.length)?n.forEach((function(e){return r.push(jn(e))})):r.push(jn(e)),r}(n);return e?a.a.createElement(Ln,{key:r,panelId:r,attributes:o,header:n.header,isOpened:O?!d[r]:d[r],onToggle:j},e):a.a.createElement(a.a.Fragment,null)}))}),[C,l,j,d,O]),S=Object(r.useCallback)((function(){w((function(e){return!e}))}),[w]);return a.a.createElement(a.a.Fragment,null,!O&&a.a.createElement("div",{className:"wrap-main-header-panel"},a.a.createElement(m.a,{style:{borderBottom:"1px solid #E0E0E0"}},a.a.createElement(Te.a,{className:"text-neutral-darkest",onClick:S,style:{justifyContent:"flex-end"}},a.a.createElement(an,{icon:x?"remove":"add",label:"".concat(x?"Collapse":"Expand"," all")})))),a.a.createElement(m.a,null,O&&a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end",position:"sticky",top:"0px",zIndex:100,background:"white",alignItems:"center",paddingTop:"10px",paddingRight:"10px"}},a.a.createElement(Te.a,{onClick:i},a.a.createElement(qe.a,null))),a.a.createElement(m.a,{className:"box-center-filter",style:Object(h.a)({},O?{paddingLeft:"24px",paddingRight:"24px",overflow:"auto"}:{})},a.a.createElement(Xt,{enabled:o},k))),O&&a.a.createElement(m.a,{style:{position:"sticky",bottom:0,width:"100%"}},a.a.createElement(Te.a,{className:"text-white",style:{width:"100%",backgroundColor:null===(t=c.theme)||void 0===t?void 0:t.primaryColor,fontWeight:700,fontSize:14,borderRadius:0},onClick:function(){i(),"/result"!==E.location.pathname&&E.push("/result")}},"APPLY")))}var Rn=Object(Lt.a)(Object(r.memo)((function(e){var t;return a.a.createElement(Nn,{disjunctiveFacets:null===e||void 0===e||null===(t=e.allSearchResults)||void 0===t?void 0:t.disjunctiveFacets,onApply:e.onApply})}))),In=n(912),_n=n(474),Mn=n.n(_n);function Tn(){Tn=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return r(i,"_invoke",{value:w(e,n,c)}),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},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 a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var Fn=function(){var e=Object(d.a)(Tn().mark((function e(){var t,n,r,a=arguments;return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:10,n=a.length>1?a[1]:void 0,r=new $e.a(n),e.abrupt("return",r.getFilters(t));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Pn=function(){var e=Object(d.a)(Tn().mark((function e(){var t,n,r,a,o,i=arguments;return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:"",n=i.length>1?i[1]:void 0,r=i.length>2?i[2]:void 0,a=new $e.a(r),o=n||"",e.abrupt("return",a.searchFilters(t,o));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Hn=n(895);function An(e,t){return(null===e||void 0===e?void 0:e.length)>t?(null===e||void 0===e?void 0:e.slice(0,t))+"...":e}function Bn(){Bn=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return r(i,"_invoke",{value:w(e,n,c)}),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},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 a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var Gn=function(e){var t,n,o=e.handleClose,i=_e(),c=Me((function(e){return e})),l=c.settings,u=c.search.preFilter,s=Object(r.useState)([]),f=Object(p.a)(s,2),v=f[0],g=f[1],y=Object(r.useState)(u||{}),x=Object(p.a)(y,2),w=x[0],E=x[1],O=Object(r.useState)(!1),j=Object(p.a)(O,2),C=j[0],k=j[1],S=Object(r.useState)(0),L=Object(p.a)(S,2),N=L[0],R=L[1],I=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),_=Object(r.useMemo)((function(){return Object.keys(w).reduce((function(e,t){return!0===w[t]?e+1:e}),0)}),[w]),M=function(){var e=Object(d.a)(Bn().mark((function e(){var t;return Bn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),t=Fn(1e3,l).then((function(e){var t,n=((null===(t=e.find((function(e){return e.key===l.visualSearchFilterKey})))||void 0===t?void 0:t.values)||[]).sort().reduce((function(e,t){var n;if(!t[0])return e;var r=null===(n=t[0])||void 0===n?void 0:n.toLocaleUpperCase();return e[r]?e[r].push(t):e[r]=[t],e}),{});g(n),R(Object.keys(n).length)})).catch((function(e){console.log("err getDataFilterDesktop",e)})).finally((function(){k(!1)})),e.abrupt("return",t);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){M()}),[]);var T=function(){var e=Object(d.a)(Bn().mark((function e(t){var n;return Bn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return M(),e.abrupt("return");case 3:return e.next=5,Pn(l.visualSearchFilterKey,encodeURIComponent(t),l).then((function(e){e.length>0?(g(Object(Kt.a)({},e[0][0].toLocaleUpperCase(),e)),e.length<=20?R(1):e.length<=40?R(2):R(4)):(g({}),R(4))})).catch((function(e){console.log("err filterSearchHandler",e)}));case 5:return n=e.sent,e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=function(){i(se(Object(Ye.pickBy)(w,(function(e){return!!e})))),o()};return a.a.createElement(m.a,{className:"box-child-component-filter-desktop",display:"flex",flexDirection:"column",style:{position:"relative"}},a.a.createElement("div",{style:{background:"white",width:"100%",display:"flex",justifyContent:"space-between",position:"sticky",top:0,zIndex:100}},a.a.createElement(rn.a,{style:{color:"#000",fontSize:"24px",fontWeight:700,paddingLeft:"14px",marginBottom:I?"0px":"-8px",marginTop:I?"0px":"24px"}},l.preFilterTitle),a.a.createElement(Te.a,{onClick:o},a.a.createElement(qe.a,null))),a.a.createElement(m.a,{className:"box-top",display:"flex",justifyContent:"space-between",alignItems:"center"},a.a.createElement(m.a,{className:"box-input-search-filter",display:"flex",justifyItems:"center",style:I?{width:"100%"}:void 0},a.a.createElement(m.a,{className:"icon-search",style:{marginRight:11},display:"flex",justifyContent:"center",alignItems:"center"},a.a.createElement("img",{style:{maxWidth:"fit-content"},src:Mn.a,alt:"",width:18,height:18})),a.a.createElement("input",{className:"input-search-filter",placeholder:"Search",onChange:function(e){T(e.target.value)}}))),!Object(Ye.isEmpty)(w)&&_>0&&a.a.createElement(m.a,{style:{margin:"10px 16px 10px 16px",display:"flex",justifyContent:"space-between"}},a.a.createElement(m.a,{style:{display:"flex",flexWrap:"wrap",rowGap:"8px",columnGap:"8px",alignItems:"baseline",fontSize:"12px",marginBottom:"4px"}},Object.keys(w).map((function(e,t){return w[e]?a.a.createElement(m.a,{key:t,className:"box-keyFilter",style:{display:"flex",height:"fit-content"}},a.a.createElement(rn.a,{className:"keyFilter"},e),a.a.createElement(Te.a,{style:{padding:0},onClick:function(){return E(Object(h.a)(Object(h.a)({},w),{},Object(Kt.a)({},e,!1)))}},a.a.createElement(qe.a,{style:{fontSize:12,color:"#2B2C46"}}))):a.a.createElement(a.a.Fragment,null)})),a.a.createElement("p",{style:{fontWeight:"bold",color:"#000"}},"".concat(_,"/").concat(10)),a.a.createElement(m.a,{style:{color:"#E31B5D",fontSize:"12px",cursor:"pointer",marginLeft:"12px"},onClick:function(){E({})}},"Clear all"))),a.a.createElement(m.a,{className:"box-bottom",height:"100%",style:I?{columnCount:1,marginBottom:w?"50px":"0px"}:N<=4?{columnCount:N,height:"100%",paddingBottom:20}:{columnCount:4,paddingBottom:20}},Object.entries(v).map((function(e,t){var n=Object(p.a)(e,2),r=n[0],o=n[1];return a.a.createElement(m.a,{className:"box-group-items",key:r},a.a.createElement(m.a,{style:{display:"flex",flexDirection:"column",rowGap:"12px",width:"100%"}},a.a.createElement(rn.a,{style:{fontWeight:"bold",color:"#000",fontSize:"12px"}},r),o.map((function(e,t){return a.a.createElement(In.a,{key:e,title:e,placement:"top",arrow:!0,disableHoverListener:e.length<35},a.a.createElement(m.a,{"aria-label":e,style:{cursor:"pointer",fontSize:"12px",minHeight:"20px",color:"#2B2C46",width:"100%",maxWidth:"fit-content",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",backgroundColor:w[e]?"#E9E9EC":"",borderRadius:8,paddingLeft:"8px",paddingRight:"8px"},onClick:function(){_<10&&E(Object(h.a)(Object(h.a)({},w),{},Object(Kt.a)({},e,!w[e])))}},An(e,35)))}))))})),C&&a.a.createElement(m.a,{style:{columnCount:I?1:4}},Array(12).fill("").map((function(e,t){return a.a.createElement(m.a,{key:t,mb:5},a.a.createElement(Hn.a,{animation:"pulse",height:30,width:60}),Array(6).fill("").map((function(e,t){return a.a.createElement(Hn.a,{animation:"pulse",height:30})})))}))),Object(Ye.isEmpty)(v)&&!C&&a.a.createElement(rn.a,null,"No result found")),!I&&a.a.createElement(m.a,{className:"footer",style:{height:64,marginTop:"auto"},display:"flex"},a.a.createElement(Te.a,{className:"button-left",style:{width:"50%",height:"64px",backgroundColor:"#000000",color:"#fff",borderRadius:0,justifyContent:"flex-start",textTransform:"none",paddingLeft:"16px"},onClick:function(){return o()}},"Cancel"),a.a.createElement(Te.a,{className:"button-right",style:{width:"50%",backgroundColor:null===(t=l.theme)||void 0===t?void 0:t.primaryColor,color:"#fff",borderRadius:0,justifyContent:"flex-start",textTransform:"none",paddingLeft:"16px"},onClick:function(){return F()}},"Apply")),I&&a.a.createElement(m.a,{className:"footer",style:{height:64,marginTop:"auto",position:"fixed",bottom:"0px",left:"0px",width:"100vw"},display:"flex"},a.a.createElement(Te.a,{className:"button-left",style:{width:"50%",backgroundColor:"#000000",color:"#fff",borderRadius:0,justifyContent:"flex-start"},onClick:function(){return o()}},"Cancel"),a.a.createElement(Te.a,{className:"button-right",style:{width:"50%",backgroundColor:null===(n=l.theme)||void 0===n?void 0:n.primaryColor,color:"#fff",borderRadius:0,justifyContent:"flex-start"},onClick:function(){return F()}},"Apply")))};var zn=function(e){var t=e.children,n=_e(),o=Me((function(e){return e})).search,i=o.preFilterDropdown,c=o.imageCaptureHelpModal,l=Object(r.useState)(!1),u=Object(p.a)(l,2),s=u[0],f=u[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"wrap-mobile"},a.a.createElement("div",{className:"box-header-mobile-main"},a.a.createElement(zt,{onToggleFilterMobile:function(e){f(Object(Ye.isUndefined)(e)?!s:e)}})),a.a.createElement("div",{style:{display:"flex",flexGrow:1,flexDirection:"column",overflowY:"auto",overflowX:"hidden"}},t),a.a.createElement("div",{className:"footer-wrap-main",style:{zIndex:999}},a.a.createElement(xt,null))),a.a.createElement(m.a,{className:"box-filter ".concat(s?"open":"close"," "),position:"absolute",style:{top:"0px",height:"100%",width:"100%"}},a.a.createElement(Rn,{onApply:function(){f(!s)}})),i&&a.a.createElement(m.a,{className:"box-filter open",position:"absolute",style:{top:"0px",height:"100%",width:"100%",zIndex:999}},a.a.createElement("div",{style:{width:"100%"},className:"wrap-filter-desktop"},a.a.createElement("div",{className:"bg-white box-filter-desktop isMobile"},a.a.createElement(Gn,{handleClose:function(){return n(oe(!i))}})))),c&&a.a.createElement(m.a,{className:"box-filter open",position:"absolute",style:{top:"0px",width:"100%",zIndex:100}},a.a.createElement("div",{style:{width:"100%"},className:"wrap-filter-desktop"},a.a.createElement("div",{className:"bg-white box-filter-desktop isMobile"},a.a.createElement(Yt,{handleClose:function(){return n(re(!c))}})))))};function Dn(){Dn=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return r(i,"_invoke",{value:w(e,n,c)}),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},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 a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var qn=Object(r.memo)((function(e){var t,n,o,i,c,l=e.children,u=_e(),s=Me((function(e){return e})),v=s.settings,x=s.search,w=x.valueTextSearch,E=x.loadingSearchAlgolia,O=v.algolia,j=O.apiKey,C=O.appId,k=O.indexName,S=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),L=Object(r.useState)(!1),N=Object(p.a)(L,2),R=N[0],I=N[1],_=Object(f.g)(),M=S&&"/result"===(null===(t=_.location)||void 0===t?void 0:t.pathname)||"/"===(null===(n=_.location)||void 0===n?void 0:n.pathname);Object(r.useEffect)((function(){(function(){var e=Object(d.a)(Dn().mark((function e(){var t;return Dn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Zt(v);case 2:t=e.sent,u(fe(t));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()().catch(console.log)}),[]),Object(r.useEffect)((function(){var e;"/"===(null===(e=_.location)||void 0===e?void 0:e.pathname)&&(document.title=v.appTitle||"",u($("")))}),[_.location]);var T="newVersion";S?(T="mobile",c=xt,i=zt):i=qt;var F=Object(r.useMemo)((function(){var e=g()(C,j);return e.initIndex(k),Object(h.a)(Object(h.a)({},e),{},{search:function(t){return t.every((function(e){var t,n,r;return!(null===(t=e.params)||void 0===t?void 0:t.query)&&(!(null===(n=e.params)||void 0===n?void 0:n.filters)||(null===(r=e.params)||void 0===r?void 0:r.filters.endsWith("<score=1>")))}))?Promise.resolve({results:t.map((function(){return{hits:[],nbHits:0,nbPages:0,processingTimeMS:0}}))}):e.search(t)}})}),[j,C,k]);return a.a.createElement("div",{style:{position:"relative"}},E&&a.a.createElement(m.a,{className:"box-wrap-loading",style:{zIndex:99999999}},a.a.createElement(m.a,{className:"loadingSpinCT",style:{top:0,bottom:0}},a.a.createElement(m.a,{className:"box-content-spin"}))),a.a.createElement(y.a,{indexName:k,searchClient:F,searchState:w,onSearchStateChange:function(e){e.page&&void 0!==e.query&&u(J(e))}},S&&a.a.createElement(zn,null,l),!S&&a.a.createElement("div",{className:"layout-main-".concat(T)},a.a.createElement("div",{className:S?M?"box-header-".concat(T,"-main"):"":"box-header-".concat(T,"-main"),style:Object(h.a)({},"newVersion"===T?{background:null===(o=v.theme)||void 0===o?void 0:o.headerColor}:{})},a.a.createElement(i,{onToggleFilterMobile:function(e){I(Object(Ye.isUndefined)(e)?!R:e)}})),a.a.createElement("div",{className:"box-body-".concat(T,"-wrap-main")},l),S&&a.a.createElement("div",{className:"footer-wrap-main"},a.a.createElement(c,null)))))})),Vn=(n(790),n(791),n(172)),Wn=n(476),Un=n.n(Wn),Zn=n(61);function Yn(){Yn=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return r(i,"_invoke",{value:w(e,n,c)}),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},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 a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var Kn=Object(r.memo)((function(e){var t=Object(f.g)(),n=_e(),o=e.acceptTypes,i=e.onChangeLoading,c=e.isLoading,l=Me((function(e){return e})),u=l.settings,s=l.search.preFilter,v=Object(r.useState)(!1),g=Object(p.a)(v,2),y=g[0],b=g[1],x=Object(Zn.b)().t,w=Object(Ke.a)({onDrop:function(){var e=Object(d.a)(Yn().mark((function e(r){var a,o,c,l,f,d;return Yn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.push("/result"),n(de(!0)),n(X()),i(!0),o=[],b(!0),console.log("fs",r),n(ae(URL.createObjectURL(r[0]))),e.next=10,tt(r[0]);case 10:if(c=e.sent,n(ce(c)),l=[{key:u.visualSearchFilterKey,values:Object.keys(s)}],!u.regions){e.next=20;break}return e.next=16,rt(c,u);case 16:d=e.sent,n(ie(d.regions)),f=d.selectedRegion,n(ue(f));case 20:return e.abrupt("return",at({image:c,settings:u,region:f,filters:Object(Ye.isEmpty)(s)?void 0:l}).then((function(e){return null===e||void 0===e||e.results.map((function(e){o.push({sku:e.sku,score:e.score})})),a=Object(h.a)(Object(h.a)({},e),{},{filters:o}),n(le(a)),b(!1),i(!1),n(de(!1)),n(ke())})));case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),E=w.getRootProps,O=w.getInputProps,j=w.isDragActive;return a.a.createElement(m.a,{className:j||y?"box-content-main-drop":"box-content-main"},c&&a.a.createElement(m.a,{className:"loadingSpinCT"},a.a.createElement(m.a,{className:"box-content-spin"})),a.a.createElement("div",Object.assign({className:"box-border",style:{position:"relative"}},E({onClick:function(e){e.stopPropagation()}})),j?a.a.createElement(m.a,null,a.a.createElement(rn.a,{className:"text-drop-file"},"DRAG ",a.a.createElement("span",{className:"tractor"},"&")," DROP"),a.a.createElement("input",Object.assign({},O({onClick:function(e){e.stopPropagation()}}),{type:"file",name:"file",id:"select_file",placeholder:"Choose photo",accept:o,onChange:Object(Vn.makeFileHandler)((function(e){}))}))):a.a.createElement(a.a.Fragment,null,a.a.createElement(m.a,Object.assign({className:"box-content-drop"},E({onClick:function(e){e.stopPropagation()}})),a.a.createElement(m.a,{style:{marginBottom:16}},a.a.createElement("img",{src:Un.a,alt:"",width:48,height:48})),a.a.createElement("label",{htmlFor:"select_file",className:"",style:{color:"#2B2C46",fontSize:14}},a.a.createElement("span",{className:"fw-700",style:{paddingRight:"4px"}},x("Choose an image")),x("or drag it here")),a.a.createElement("input",Object.assign({},O(),{type:"file",name:"file",id:"select_file",className:"inputFile",placeholder:"Choose photo",style:{display:"block"}}))))))})),Qn=n(481),Jn=n.n(Qn),Xn=n(480),$n=n.n(Xn),er=n(908);var tr=function(e){var t=e.children,n=e.openModal,r=void 0!==n&&n,o=e.handleClose,i=e.classNameModal,c=e.classNameComponentChild;return a.a.createElement(er.a,{open:r,onClose:o,className:"modal-container ".concat(i||""),style:{display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("div",{className:c,style:{overflowY:"auto",maxHeight:"95vh",borderRadius:12}},t))};function nr(){nr=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return r(i,"_invoke",{value:w(e,n,c)}),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},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 a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var rr=Object(St.a)(Object(r.memo)((function(e){var t,n,o,i,c,l=e.refine,u=e.onToggleFilterMobile,s=Me((function(e){return e})),v=s.search,g=s.settings,y=v.imageThumbSearchInput,x=v.preFilter,w=Object(r.useRef)(null),E=Object(f.g)(),O=Object(r.useState)(""),j=Object(p.a)(O,2),C=j[0],k=j[1],S=_e(),L=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),N=Gt(),R=Object(r.useState)(!1),I=Object(p.a)(R,2),_=I[0],M=I[1],T=Object(Zn.b)().t;Object(r.useEffect)((function(){(null===w||void 0===w?void 0:w.current)&&(null===w||void 0===w||w.current.focus())}),[w]),Object(r.useEffect)((function(){var e=N.get("query")||"";Object(Ye.isEmpty)(e)||(k(e),l(e),setTimeout((function(){l(e)}),100))}),[N,l]),Object(r.useEffect)((function(){y&&(k(""),l(""),E.push("/result"))}),[y]);var F=Object(r.useCallback)(Object(Ye.debounce)((function(e){e?E.push({pathname:"/result",search:"?query=".concat(e)}):E.push("/result")}),500),[]),P=Object(Ke.a)({onDrop:function(){var e=Object(d.a)(nr().mark((function e(t){var n,r,a,o,i,c;return nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(de(!0)),S(X()),"/result"!==E.location.pathname&&E.push("/result"),r=[],S(ae(URL.createObjectURL(t[0]))),e.next=7,tt(t[0]);case 7:if(o=e.sent,S(ce(o)),i=[{key:g.visualSearchFilterKey,values:Object.keys(x)}],!g.regions){e.next=17;break}return e.next=13,rt(o,g);case 13:c=e.sent,S(ie(c.regions)),a=c.selectedRegion,S(ue(a));case 17:return e.abrupt("return",at({image:o,settings:g,filters:Object(Ye.isEmpty)(x)?void 0:i,region:a}).then((function(e){null===e||void 0===e||e.results.map((function(e){r.push({sku:e.sku,score:e.score})})),n=Object(h.a)(Object(h.a)({},e),{},{filters:r}),S(le(n)),S(de(!1))})).catch((function(e){console.log("error input search",e),S(de(!1))})));case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).getInputProps;return a.a.createElement("div",{className:"wrap-input-search-field"},a.a.createElement("div",{className:"box-input-search d-flex"},a.a.createElement("form",{noValidate:!0,action:"",role:"search"},a.a.createElement(m.a,{className:"box-inp"},a.a.createElement(In.a,{title:Object(Ye.isEmpty)(x)?"Add pre-filter":Object.keys(x).join(", "),placement:"top",arrow:!0,disableHoverListener:!g.preFilterOption},a.a.createElement(m.a,{className:"pre-filter-icon",style:{cursor:g.preFilterOption?"pointer":"default"},onClick:function(){return!!g.preFilterOption&&M(!0)}},g.preFilterOption&&a.a.createElement("div",{className:"icon-hover",style:Object(h.a)({},Object(Ye.isEmpty)(x)?{}:{backgroundColor:"".concat(null===(t=g.theme)||void 0===t?void 0:t.secondaryColor,"26")})},a.a.createElement(kt,{color:"black"})),!g.preFilterOption&&a.a.createElement(Tt,{width:16,height:16}),!Object(Ye.isEmpty)(x)&&a.a.createElement("div",{style:{position:"absolute",top:"6px",left:"31px",display:"flex",justifyContent:"center",alignItems:"center",background:"white",width:"10px",height:"10px",borderRadius:"100%"}},a.a.createElement("div",{style:{width:"8px",height:"8px",background:null===(n=g.theme)||void 0===n?void 0:n.secondaryColor,borderRadius:"100%"}})))),a.a.createElement(m.a,{style:{height:"75%",order:1}},y&&a.a.createElement(m.a,{style:{border:"2px solid ".concat(null===(o=g.theme)||void 0===o?void 0:o.secondaryColor,"c7"),backgroundColor:"".concat(null===(i=g.theme)||void 0===i?void 0:i.secondaryColor,"26"),marginRight:"5px"},className:"box-image-search-thumb",display:"flex"},a.a.createElement("img",{src:y,style:{objectFit:"contain"},alt:"img_search"}),a.a.createElement(In.a,{title:"Clear image search",placement:"top",arrow:!0},a.a.createElement("button",{type:"button",onClick:function(){C||(S(te("")),E.push("/")),S(te("")),l(C)}},a.a.createElement(qe.a,{style:{fontSize:20,color:null===(c=g.theme)||void 0===c?void 0:c.secondaryColor}}))))),a.a.createElement("input",{style:{border:"0px",width:"100%",fontSize:14,color:"#2B2C46"},className:"input-search",placeholder:T("Search"),value:C,onChange:function(e){k(e.currentTarget.value),F(e.currentTarget.value),""===e.currentTarget.value&&(k(""),l(""))},ref:w})),"/result"===E.location.pathname&&C&&a.a.createElement(Te.a,{className:"btn-clear-text",onClick:function(){if(y)return k(""),void l("");k(""),l(""),S(te("")),E.push("/")}},a.a.createElement(In.a,{title:T("Clear text search"),placement:"top",arrow:!0},a.a.createElement(Jn.a,{style:{fontSize:16,color:"#2B2C46"}}))),L?a.a.createElement(m.a,null,a.a.createElement(Te.a,{className:"btn-mobile-filter",onClick:u},a.a.createElement(kt,{width:18,height:18}))):a.a.createElement("div",{className:"wrap-box-input-mobile d-flex"},a.a.createElement("input",Object.assign({accept:"image/*",id:"icon-button-file",type:"file",style:{display:"none"}},P({onClick:function(e){e.stopPropagation()}}))),a.a.createElement(In.a,{title:T("Search with an image"),placement:"top",arrow:!0},a.a.createElement("label",{htmlFor:"icon-button-file"},a.a.createElement(ze.a,{color:"primary","aria-label":"upload picture",component:"span",style:{width:32,height:32,borderRadius:"100%",padding:7}},a.a.createElement("img",{src:$n.a,alt:"",width:18,height:18}))))))),g.preFilterOption&&a.a.createElement(tr,{openModal:_,handleClose:function(){return M(!1)},classNameModal:"wrap-filter-desktop",classNameComponentChild:"bg-white box-filter-desktop"},a.a.createElement(Gn,{handleClose:function(){return M(!1)}})))}))),ar=n(896);var or,ir=function(){var e=Me((function(e){return e})).settings,t=Object(r.useState)(!1),n=Object(p.a)(t,2),o=n[0],i=n[1],c=e.algolia,l=c.apiKey,u=c.appId,s=c.indexName;g()(u,l).initIndex(s);var f=["image/*"].concat(e.cadSearch?Xe.cadExtensions:[]).join(","),h=Object(ar.a)((function(e){e.hits;return a.a.createElement("div",null)}));return a.a.createElement(m.a,{className:"box-content-main ".concat(o?"loading":"")},a.a.createElement(m.a,{className:"box-content_top"},a.a.createElement(m.a,{className:"fw-700 text-f32 text-dark2"},a.a.createElement("h1",null,e.headerText)),a.a.createElement("div",{className:"box-input"},a.a.createElement("div",{className:"wrap-input-search"},a.a.createElement("div",{style:{display:"none"}},a.a.createElement(h,null)),a.a.createElement(rr,null)))),a.a.createElement(m.a,{className:"box-content_bottom"},a.a.createElement(Kn,{acceptTypes:f,isLoading:o,onChangeLoading:function(e){i(e)}})))},cr=["svgRef","title"];function lr(){return(lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ur(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var sr=function(e){var t=e.svgRef,n=e.title,r=ur(e,cr);return a.a.createElement("svg",lr({width:121,height:96,viewBox:"0 0 121 96",fill:"currentColor",ref:t},r),n?a.a.createElement("title",null,n):null,a.a.createElement("g",{style:{mixBlendMode:"multiply"}},or||(or=a.a.createElement("path",{d:"M81.7314 54.5169C81.7314 66.4489 71.985 76.1561 60.0049 76.1561C48.0248 76.1561 38.2785 66.4489 38.2785 54.5169C38.2785 42.5849 48.0248 32.8777 60.0049 32.8777C71.985 32.8777 81.7314 42.5849 81.7314 54.5169ZM120.005 24.1972V84.8366C120.005 90.4872 115.363 95.1111 109.689 95.1111H10.3215C4.64805 95.1111 0.00549316 90.4878 0.00549316 84.8366V24.1972C0.00549316 18.5466 4.64748 13.9227 10.3215 13.9227H34.2641L37.8838 5.57484C39.3502 2.1909 42.6961 0 46.3964 0H73.6134C77.3137 0 80.6602 2.1909 82.1272 5.57484L85.7469 13.9227H109.69C115.363 13.9227 120.005 18.546 120.005 24.1972H120.005ZM21.6286 26.4758C21.6286 25.1029 20.5011 23.98 19.1227 23.98H12.2151C10.8366 23.98 9.7092 25.1029 9.7092 26.4758V29.8484C9.7092 31.2214 10.8366 32.3443 12.2151 32.3443H19.1227C20.5011 32.3443 21.6286 31.2214 21.6286 29.8484V26.4758ZM92.258 54.5169C92.258 50.1826 91.4044 45.975 89.7215 42.0118C88.0965 38.1861 85.7719 34.7512 82.8116 31.8029C79.8514 28.8545 76.4027 26.5392 72.5615 24.9207C68.5818 23.2441 64.3578 22.3944 60.0061 22.3944C55.6543 22.3944 51.4298 23.2446 47.4506 24.9207C43.6094 26.5392 40.1607 28.8545 37.2005 31.8029C34.2403 34.7512 31.9156 38.1861 30.2906 42.0118C28.6072 45.9756 27.7541 50.1826 27.7541 54.5169C27.7541 58.8512 28.6077 63.0588 30.2906 67.022C31.9156 70.8477 34.2403 74.2825 37.2005 77.2309C40.1607 80.1793 43.6094 82.4946 47.4506 84.113C51.4303 85.7897 55.6543 86.6394 60.0061 86.6394C64.3578 86.6394 68.5824 85.7892 72.5615 84.113C76.4027 82.4946 79.8514 80.1793 82.8116 77.2309C85.7719 74.2825 88.0965 70.8477 89.7215 67.022C91.405 63.0582 92.258 58.8512 92.258 54.5169Z",fill:"currentColor"}))))},fr=a.a.forwardRef((function(e,t){return a.a.createElement(sr,lr({svgRef:t},e))}));n.p;var hr=function(){var e=_e(),t=Object(r.useState)(!1),n=Object(p.a)(t,2),o=n[0],i=n[1];return Object(r.useEffect)((function(){e(te(""))}),[e]),a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"}},a.a.createElement("div",{className:"take-photo"},a.a.createElement("div",{className:"take-photo-wrapper",style:{background:"linear-gradient(90deg, #55566B 0%, #2B2C46 100%)"}},a.a.createElement("div",{className:"outer",onClick:function(){i(!o)}},a.a.createElement("div",{className:"inner"},a.a.createElement(fr,{color:"#2B2C46"}))))),a.a.createElement(m.a,{className:"box-screenshot-camera"},a.a.createElement(ct,{isToggle:o,onToggleModal:function(){i(!o)}})))},dr=n(323);dr.a.use(Zn.a).init({resources:{en:{translation:{Search:"Search","Choose an image":"Choose an image","or drag it here":"or drag it here","Manufacturer Number":"Manufacturer Number","Close group":"Close group","Show group":"Show group","Adjust the search frame around your object for improved results":"Adjust the search frame around your object for improved results","Crop the image for better results":"Crop the image for better results","Items per page":"Items per page","Search with an image":"Search with an image","Clear text search":"Clear text search"}},de:{translation:{Search:"Suche","Choose an image":"Bild w\xe4hlen","or drag it here":"oder hierhin ziehen","Manufacturer Number":"Herst. Teile-Nr.","Close group":"Schlie\xdfe Gruppe","Show group":"Zeige Gruppe","Adjust the search frame around your object for improved results":"Anpassen des Rahmens f\xfcr bessere Ergebnisse","Crop the image for better results":"Bildausschnitt anpassen f\xfcr bessere Ergebnisse","Items per page":"Artikel pro Seite","Search with an image":"Bildsuche","Clear text search":"Suchtext l\xf6schen"}}},fallbackLng:"en",interpolation:{escapeValue:!1},returnNull:!1});var pr=function(){var e=Me((function(e){return e.settings.language}));dr.a.changeLanguage(e);var t=Object(b.useMediaQuery)({query:"(max-width: 776px)"})?hr:ir;return a.a.createElement(t,null)},mr=n(487),vr=n.n(mr),gr=n(488),yr=n.n(gr),br=n(897);var xr=Object(vn.a)(Object(r.memo)((function(e){var t=e.children,n=e.type,o=void 0===n?"native":n,i=e.className,c=e.items,l=e.refine,u=Object(r.useCallback)((function(){return l(c)}),[l,c]),s=Me((function(e){return e})).settings;return a.a.createElement(Te.a,{type:o,disabled:!c.length,className:i,onClick:u,style:{color:s.theme.secondaryColor,fontWeight:"bold",textTransform:"capitalize",padding:0}},t)}),yn.a)),wr=n(139),Er=n.n(wr),Or=["children","className","selected","closeIcon"];function jr(e){var t=e.children,n=e.className,r=(e.selected,e.closeIcon),o=void 0!==r&&r,i=Object(s.a)(e,Or);return a.a.createElement(Te.a,Object.assign({type:"native",className:n},i),t,o&&a.a.createElement(Er.a,{style:{fontSize:"16px",fontWeight:"bold"}}))}Object(on.atom)(0);var Cr=Object(vn.a)((function(e){var t=e.items,n=e.refine,o=e.className,i=e.statusSwitchButton,c=Me((function(e){return e})).settings,l=Object(r.useState)([]),u=Object(p.a)(l,2),s=u[0],f=u[1];Object(r.useEffect)((function(){i&&f(t)}),[t,i]);var h=Object(r.useMemo)((function(){return s.reduce((function(e,t){return[].concat(Object(Qt.a)(e),Object(Qt.a)(function(e,t){var n,r;switch(t.forEach((function(t){(function(e,t){var n=e.attribute;return(null===n||void 0===n?void 0:n.attributes)?(null===n||void 0===n?void 0:n.attributes[0])===t.attribute:n===t.attribute})(t,e)&&(r=t)})),null===(n=r)||void 0===n?void 0:n.type){case"size":case"list":var a;return(null===e||void 0===e||null===(a=e.items)||void 0===a?void 0:a.map((function(e){var t;return{category:null===(t=r)||void 0===t?void 0:t.header,label:e.label,value:e.value}})))||[];default:return[]}}(t,null===c||void 0===c?void 0:c.refinements)))}),[])}),[c,s]);return h.length?a.a.createElement("div",{className:o,style:{marginBottom:h.length>0?"10px":"0px",marginTop:h.length>0?"16px":"0px"}},a.a.createElement("ul",{className:"flex flex-wrap gap-3"},h.map((function(e){return a.a.createElement(br.a.li,{key:[e.category,e.label].join(":")},a.a.createElement(jr,{closeIcon:!0,onClick:function(){return n(e.value)}},e.category&&a.a.createElement("div",{className:"text-f12"},e.category,":"),a.a.createElement("div",{className:"capitalize fw-700",style:{marginLeft:5,textTransform:"capitalize",marginRight:10}},e.label)))})),a.a.createElement("li",{key:"clear",className:un()("flex items-center",{hidden:h.length<2})},a.a.createElement(xr,{className:"text-f12 fw-600"},"Clear all")))):null})),kr=n(898),Sr=n(899);var Lr,Nr=Object(Sr.a)((function(e){var t=e.children;return a.a.createElement(kr.a,{container:!0,justifyContent:"space-between",alignItems:"center",style:{height:"100%"}},t,a.a.createElement(kr.a,{item:!0,className:"item-notify-right",style:{minWidth:32}}))})),Rr=n(321),Ir=n.n(Rr),_r=n(263),Mr=n.n(_r),Tr=["svgRef","title"];function Fr(){return(Fr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Pr(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Hr,Ar=function(e){var t=e.svgRef,n=e.title,r=Pr(e,Tr);return a.a.createElement("svg",Fr({width:10,height:11,viewBox:"0 0 10 11",fill:"currentColor",ref:t},r),n?a.a.createElement("title",null,n):null,Lr||(Lr=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.56905 7.91401C6.92789 7.46225 7.47234 7.19773 8.04926 7.19483C9.10003 7.19483 9.95185 8.04665 9.95185 9.09742C9.95185 10.1482 9.10003 11 8.04926 11C6.99849 11 6.14667 10.1482 6.14667 9.09742C6.14847 8.92726 6.17408 8.75819 6.22277 8.59513L3.44118 6.85616C2.93785 7.48979 2.0888 7.73571 1.32474 7.46917C0.560687 7.20264 0.0488281 6.48196 0.0488281 5.67275C0.0488281 4.86354 0.560687 4.14287 1.32474 3.87633C2.0888 3.60979 2.93785 3.85571 3.44118 4.48934L6.22277 2.75037C6.17408 2.58732 6.14847 2.41825 6.14667 2.24809C6.14083 1.32028 6.80508 0.523574 7.7188 0.36244C8.63252 0.201306 9.52922 0.722744 9.84111 1.59657C10.153 2.4704 9.78909 3.44177 8.97983 3.89559C8.17057 4.34941 7.15198 4.15332 6.56905 3.4315L3.78746 5.17047C3.88883 5.49765 3.88883 5.84785 3.78746 6.17504L6.56905 7.91401ZM9.19066 2.24808C9.19066 1.61762 8.67957 1.10653 8.04911 1.10653C7.41864 1.10653 6.90755 1.61762 6.90755 2.24808C6.90755 2.87855 7.41864 3.38964 8.04911 3.38964C8.67957 3.38964 9.19066 2.87855 9.19066 2.24808ZM1.96089 6.81431C1.33043 6.81431 0.819336 6.30322 0.819336 5.67275C0.819336 5.04229 1.33043 4.5312 1.96089 4.5312C2.59136 4.5312 3.10245 5.04229 3.10245 5.67275C3.10245 6.30322 2.59136 6.81431 1.96089 6.81431ZM6.90755 9.09742C6.90755 9.72788 7.41864 10.239 8.04911 10.239C8.67957 10.239 9.19066 9.72788 9.19066 9.09742C9.19066 8.46695 8.67957 7.95586 8.04911 7.95586C7.41864 7.95586 6.90755 8.46695 6.90755 9.09742Z",fill:"currentColor"})))},Br=a.a.forwardRef((function(e,t){return a.a.createElement(Ar,Fr({svgRef:t},e))})),Gr=(n.p,["svgRef","title"]);function zr(){return(zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Dr(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var qr,Vr=function(e){var t=e.svgRef,n=e.title,r=Dr(e,Gr);return a.a.createElement("svg",zr({width:11,height:11,viewBox:"0 0 11 11",fill:"currentColor",ref:t},r),n?a.a.createElement("title",null,n):null,Hr||(Hr=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.53059 7.14308H3.81466V9.11675C3.7348 9.90592 4.28699 10.6128 5.04806 10.6957C5.14416 10.7075 5.24128 10.7075 5.33738 10.6957H5.93504C6.19675 10.6882 6.42056 10.4984 6.47941 10.2338V10.1865L6.86009 7.68387L8.20769 5.56415H10.6669V0.0378923H3.43399C0.601741 0.0378923 0.00788307 1.75498 0.00788307 3.19576V5.56415C-0.0719852 6.35332 0.480213 7.06022 1.24128 7.14308C1.33738 7.15493 1.43449 7.15493 1.53059 7.14308ZM8.38276 0.827361H9.90548V4.77469H8.38276V0.827361ZM3.43384 0.827355C1.6142 0.827355 0.769092 1.5813 0.769092 3.19575V5.56415C0.769092 6.13256 0.982271 6.35361 1.53045 6.35361H4.57587V9.11674C4.57587 9.68516 4.78905 9.90621 5.33723 9.90621H5.76739L5.82069 9.51148L6.09858 7.39176L7.6213 5.051V0.827355H3.43384Z",fill:"currentColor"})))},Wr=a.a.forwardRef((function(e,t){return a.a.createElement(Vr,zr({svgRef:t},e))})),Ur=(n.p,["svgRef","title"]);function Zr(){return(Zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Yr(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Kr,Qr=function(e){var t=e.svgRef,n=e.title,r=Yr(e,Ur);return a.a.createElement("svg",Zr({width:12,height:11,viewBox:"0 0 12 11",fill:"currentColor",ref:t},r),n?a.a.createElement("title",null,n):null,qr||(qr=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.80278 3.59938H7.51871V1.62572C7.59858 0.836545 7.04638 0.129649 6.28531 0.0467847C6.18921 0.0349422 6.0921 0.0349422 5.996 0.0467847H5.39833C5.13662 0.0542197 4.91282 0.244093 4.85396 0.508622V0.55599L4.47329 3.0586L3.12568 5.17831H0.666504V10.7046H7.89939C10.7316 10.7046 11.3255 8.98748 11.3255 7.54671V5.17831C11.4054 4.38914 10.8532 3.68224 10.0921 3.59938C9.99599 3.58754 9.89888 3.58754 9.80278 3.59938ZM2.95061 9.9151H1.4279V5.96777H2.95061V9.9151ZM7.89954 9.9151C9.71918 9.9151 10.5643 9.16116 10.5643 7.5467V5.1783C10.5643 4.60989 10.3511 4.38884 9.80293 4.38884H6.7575V1.62571C6.7575 1.05729 6.54432 0.836243 5.99615 0.836243H5.56598L5.51268 1.23098L5.23479 3.35069L3.71208 5.69146V9.9151H7.89954Z",fill:"currentColor"})))},Jr=a.a.forwardRef((function(e,t){return a.a.createElement(Qr,Zr({svgRef:t},e))})),Xr=(n.p,["svgRef","title"]);function $r(){return($r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ea(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ta=function(e){var t=e.svgRef,n=e.title,r=ea(e,Xr);return a.a.createElement("svg",$r({width:16,height:16,viewBox:"0 0 16 16",fill:"none",ref:t},r),n?a.a.createElement("title",null,n):null,Kr||(Kr=a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.42028 4.82804C1.42028 5.22014 1.10221 5.53825 0.710142 5.53825C0.318078 5.53825 0 5.22014 0 4.82804V2.69216C0 1.20767 1.20757 0 2.69193 0H4.87323C5.26529 0 5.58337 0.318104 5.58337 0.710201C5.58337 1.1023 5.26529 1.4204 4.87323 1.4204H2.69193C1.99071 1.4204 1.42028 1.99087 1.42028 2.69216V4.82804ZM13.3081 0H11.1268C10.7347 0 10.4167 0.318104 10.4167 0.710201C10.4167 1.1023 10.7347 1.4204 11.1268 1.4204H13.3081C14.0093 1.4204 14.5798 1.99087 14.5798 2.69216V4.82804C14.5798 5.22014 14.8978 5.53825 15.2899 5.53825C15.682 5.53825 16 5.22014 16 4.82804V2.69216C16 1.20767 14.7925 0 13.3081 0ZM15.2899 10.4614C14.8978 10.4614 14.5798 10.7795 14.5798 11.1716V13.3078C14.5798 14.0091 14.0093 14.5796 13.3081 14.5796H11.1268C10.7347 14.5796 10.4167 14.8977 10.4167 15.2898C10.4167 15.6819 10.7347 16 11.1268 16H13.3081C14.7925 16 16 14.7923 16 13.3078V11.1716C16 10.7795 15.682 10.4614 15.2899 10.4614ZM4.87323 14.5796H2.69193C1.99071 14.5796 1.42028 14.0091 1.42028 13.3078V11.1716C1.42028 10.7795 1.10221 10.4614 0.710142 10.4614C0.318078 10.4614 0 10.7792 0 11.1716V13.3078C0 14.7923 1.20757 16 2.69193 16H4.87323C5.26529 16 5.58337 15.6819 5.58337 15.2898C5.58337 14.8977 5.26529 14.5796 4.87323 14.5796ZM12.6019 12.6029C12.4476 12.7572 12.2425 12.8421 12.0242 12.8421L12.0245 12.8418C11.8062 12.8418 11.6011 12.7569 11.4468 12.6026L10.2604 11.4161C9.59218 11.8613 8.81663 12.0952 8.00047 12.0952C6.90685 12.0952 5.87863 11.6694 5.1054 10.8961C4.33217 10.1228 3.90641 9.09453 3.90641 8.00082C3.90641 6.90711 4.33217 5.87881 5.1054 5.10552C5.87863 4.33222 6.90685 3.90643 8.00047 3.90643C9.09408 3.90643 10.1223 4.33222 10.8955 5.10552C11.6688 5.87881 12.0945 6.90711 12.0945 8.00082C12.0945 8.81706 11.8607 9.59266 11.4154 10.2612L12.6019 11.4478C12.9203 11.7662 12.9203 12.2845 12.6019 12.6029ZM9.73685 9.73702C9.75171 9.72248 9.76723 9.70795 9.78342 9.69407C10.2201 9.23426 10.4605 8.63373 10.4605 8.00082C10.4605 6.64418 9.35667 5.54023 8.00014 5.54023C6.6436 5.54023 5.53974 6.64418 5.53974 8.00082C5.53974 9.35747 6.64327 10.4614 8.00014 10.4614C8.63299 10.4614 9.23347 10.2213 9.69325 9.78425C9.70745 9.76774 9.72198 9.75188 9.73685 9.73702Z",fill:"#AAABB5"})))},na=a.a.forwardRef((function(e,t){return a.a.createElement(ta,$r({svgRef:t},e))})),ra=(n.p,n(264)),aa=n.n(ra),oa=n(900),ia=n(483),ca=n.n(ia),la=n(269),ua=(n(848),n(849),n(850),function(e){var t=e.imgItem,n=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),o=Object(r.useRef)(null),i=Object(r.useRef)(null),c=Object(r.useMemo)((function(){var e=75+58*t.length,r=n?340:400;return e<r?e:r}),[t.length,n]),l=Object(r.useMemo)((function(){return{type:"slide",perPage:1,perMove:1,gap:"1rem",pagination:!1,arrows:!1,width:n?340:370}}),[n]),u=Object(r.useMemo)((function(){return{type:"slide",rewind:!0,gap:"1rem",pagination:!1,fixedWidth:40,fixedHeight:40,cover:!0,focus:"center",isNavigation:!0,arrows:t.length>1,width:c}}),[t.length,c]),s=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.map((function(t){return a.a.createElement(la.b,{key:t.url,className:e?"":"img-container"},a.a.createElement("img",{style:{objectFit:"contain",minHeight:"400px"},alt:"preview",src:t.url}))}))};return a.a.useEffect((function(){var e;o.current&&i.current&&(null===(e=i.current)||void 0===e?void 0:e.splide)&&o.current.sync(i.current.splide)}),[]),a.a.createElement(a.a.Fragment,null,a.a.createElement(la.a,{options:l,ref:o},s()),a.a.createElement("div",{className:"thumbs-list ".concat(t.length<=1?"d-none":"")},a.a.createElement(la.a,{options:u,ref:i},s(!0))))}),sa=n(482),fa=n.n(sa);var ha=function(e){var t,n,o,i,c,l,u,s,f,h,d=e.handlerCloseModal,v=e.dataItem,g=e.onSearchImage,y=e.onHandlerModalShare,x=e.handlerFeedback,w=Object(r.useState)(!1),E=Object(p.a)(w,2),O=E[0],j=E[1],C=v.sku,k=Object(r.useState)([]),S=Object(p.a)(k,2),L=S[0],N=S[1],R=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),I=Me((function(e){return e})).settings,_=Object(r.useState)("none"),M=Object(p.a)(_,2),T=M[0],F=M[1],P=Object(r.useState)(""),H=Object(p.a)(P,2),A=H[0],B=H[1],G=v[I.field.productTag];Object(r.useEffect)((function(){v&&(D(v),z(v["image(main_similarity)"]||v.main_image_link))}),[v]);var z=function(e,t){t=t||5e3;var n=new Image;n.onerror=n.onabort=function(){clearTimeout(void 0),B("")},n.onload=function(){return clearTimeout(void 0),void B(e)},n.src=e},D=function(e){var t=function(e){var t=[],n=e;if(!e)return[];for(var r in n)(null===r||void 0===r?void 0:r.includes("image(recognition)"))||(null===r||void 0===r?void 0:r.includes("additional_image_link"))?Object(Ye.isEmpty)(n[r])||n[r]&&t.push({url:n[r]}):"image(main_similarity)"!==r&&"main_image_link"!==r||n[r]&&t.push({url:n[r]});return t}(e);N(t)},q=Object(Zn.b)().t,V=v[null===(t=I.field)||void 0===t?void 0:t.ctaLinkField];return a.a.createElement(m.a,{className:"box-modal-default",borderRadius:12,style:R?{margin:0}:{}},a.a.createElement(m.a,{className:"ml-auto",style:{width:"fit-content",marginRight:4}},a.a.createElement(Te.a,{style:{padding:0},onClick:function(){return null===d||void 0===d?void 0:d()}},a.a.createElement(Er.a,{style:{fontSize:20,color:"#55566B"}}))),a.a.createElement(m.a,{style:{overflowY:"auto",maxHeight:"90svh"}},a.a.createElement(m.a,{className:"box-carosel",style:0===L.length?{display:"flex",justifyContent:"center"}:{}},L.length>0?a.a.createElement(ua,{imgItem:L}):a.a.createElement("img",{src:aa.a,alt:"image_item",className:"img-style",style:{width:"300px",height:"300px",padding:"8px"}}),L.length>0&&a.a.createElement(Te.a,{className:"icon-style",onClick:function(){if(A.length>1)return g(A),void(null===d||void 0===d||d())}},a.a.createElement(na,{color:"#AAABB5"}))),a.a.createElement(m.a,{className:"box-content",display:"flex",style:{flexDirection:"column",borderBottomLeftRadius:12,borderBottomRightRadius:12,paddingBottom:19,backgroundColor:"#F3F3F5"}},a.a.createElement(m.a,{className:"box-top"},a.a.createElement(kr.a,{container:!0,justifyContent:"space-between"},a.a.createElement(kr.a,{item:!0,xs:12},a.a.createElement(rn.a,{className:"text-f13 fw-500 max-line-1"},I.itemIdLabel||"SKU",": ",a.a.createElement("span",null," ",C)),v[I.field.manufacturerNumber]&&a.a.createElement(rn.a,{className:"text-f13 fw-500 max-line-1",style:{marginTop:"12px"}},q("Manufacturer Number"),":"," ",v[I.field.manufacturerNumber]),I.warehouseVariant&&a.a.createElement(rn.a,{className:"text-f13 max-line-1 fw-500",style:{marginTop:12,display:"inline-block"}},a.a.createElement("span",{style:{marginRight:3}},v[I.field.warehouseStock],":"),a.a.createElement("span",{style:{color:v[I.field.warehouseStockValue]?"#00C070":"#c54545",fontWeight:600}},v[I.field.warehouseStockValue]||0)),(G||I.brandName)&&a.a.createElement(m.a,{borderRadius:16,style:{backgroundColor:"".concat(null===(n=I.theme)||void 0===n?void 0:n.secondaryColor,"26"),width:"fit-content",padding:"3px 5px",marginTop:12}},a.a.createElement(rn.a,{style:{color:null===(o=I.theme)||void 0===o?void 0:o.secondaryColor,fontSize:12,fontWeight:700}},G||I.brandName))),a.a.createElement(kr.a,{item:!0,xs:12},a.a.createElement(m.a,{style:{background:"linear-gradient(270deg, ".concat(null===(i=I.theme)||void 0===i?void 0:i.primaryColor,"bb 0%, ").concat(null===(c=I.theme)||void 0===c?void 0:c.primaryColor," 100%)"),boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.25)",borderRadius:4,marginTop:12},display:"flex",justifyContent:"space-between",alignItems:"center",className:"btn-detail-item"},a.a.createElement(m.a,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",padding:"0px 12px",minHeight:64,cursor:V?"pointer":"normal"},onClick:function(){V&&window.open("".concat(v[I.field.ctaLinkField]),"_blank")}},a.a.createElement(rn.a,{className:"text-f18 fw-700 text-white max-line-2",align:"left",style:{letterSpacing:"0.55px",maxWidth:"300px",paddingRight:"4px"}},v[I.field.productName]),V&&a.a.createElement("img",{src:Mr.a,alt:"",style:{minWidth:23,marginLeft:5}}))),v[I.field.productDetails]&&a.a.createElement(m.a,{className:"w-100"},a.a.createElement(Te.a,{className:"w-100",style:{display:"flex",justifyContent:"space-between",color:null===(l=I.theme)||void 0===l?void 0:l.secondaryColor,fontSize:14,textTransform:"initial",paddingLeft:5,marginTop:12},onClick:function(){return j((function(e){return!e}))}},"View details",O?a.a.createElement(fa.a,{htmlColor:null===(u=I.theme)||void 0===u?void 0:u.secondaryColor}):a.a.createElement(ca.a,{htmlColor:null===(s=I.theme)||void 0===s?void 0:s.secondaryColor})),a.a.createElement(oa.a,{in:O},a.a.createElement(rn.a,{style:{fontSize:14,paddingTop:5}},v[I.field.productDetails])))))),I.warehouseVariant&&a.a.createElement(m.a,{display:"flex",justifyContent:"space-between",style:{color:"#2B2C46",marginTop:12},gridGap:20},I.field.warehouseNumber&&a.a.createElement(m.a,{style:{backgroundColor:"".concat(null===(f=I.theme)||void 0===f?void 0:f.secondaryColor,"26"),padding:"5px 10px",borderRadius:4,width:"100%"}},a.a.createElement("div",{style:{fontSize:15,fontWeight:500}},v[I.field.warehouseNumber]),a.a.createElement("div",{style:{fontSize:17,fontWeight:700}},v[I.field.warehouseNumberValue]||"N/A")),I.field.warehouseShelfNumber&&a.a.createElement(m.a,{style:{backgroundColor:"".concat(null===(h=I.theme)||void 0===h?void 0:h.secondaryColor,"26"),padding:"5px 10px",borderRadius:4,width:"100%"}},a.a.createElement("div",{style:{fontSize:15,fontWeight:500}},v[I.field.warehouseShelfNumber]),a.a.createElement("div",{style:{fontSize:17,fontWeight:700}},v[I.field.warehouseShelfNumberValue]||"N/A"))),I.showFeedbackAndShare&&a.a.createElement(m.a,{className:"box-bottom",style:{marginBottom:6,marginTop:28}},a.a.createElement(kr.a,{container:!0,justifyContent:I.shareOption?"space-between":"space-around",alignItems:"center"},a.a.createElement(kr.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{className:"btn-item",onClick:function(){x("like"),F("like")}},a.a.createElement(Jr,{width:30,height:30,color:"like"===T?"#3E36DC":"#000000"})))),a.a.createElement(kr.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{className:"btn-item",onClick:function(){x("dislike"),F("dislike")}},a.a.createElement(Wr,{width:30,height:30,color:"dislike"===T?"#CC1854":"#000000"})))),I.shareOption&&a.a.createElement(kr.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{className:"btn-item",onClick:function(){return y()}},a.a.createElement(Br,{width:30,height:30,color:"#000000"})))))))))},da=n(885),pa=n(320),ma=n.n(pa),va=n(484),ga=n.n(va),ya=function(e){var t=e.dataItem,n=e.isOpen,r=e.setModalState,o=t["image(main_similarity)"]||t.main_image_link;return a.a.createElement(tr,{openModal:n,handleClose:function(){return r(!1)}},a.a.createElement(m.a,{className:"box-modal-default box-modal-share",style:{padding:"4px"}},a.a.createElement(m.a,{className:"ml-auto",style:{width:"fit-content",marginRight:5}},a.a.createElement(Te.a,{style:{padding:0},onClick:function(){return r(!1)}},a.a.createElement(Er.a,{style:{fontSize:16,color:"#55566B"}}))),a.a.createElement(m.a,{className:"box-content-box-share"},a.a.createElement(rn.a,{className:"text-f12 text-gray text-bold",style:{marginBottom:"5px"}},"Share"),o&&a.a.createElement(da.a,{component:"form",className:"box-input"},a.a.createElement(m.a,{className:"text-f9 text-gray",style:{width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingRight:"10px"}},o),a.a.createElement(ze.a,{color:"secondary","aria-label":"directions",style:{padding:"4px"},onClick:function(){navigator.clipboard.writeText(o)}},a.a.createElement(ma.a,{style:{fontSize:14}}))),a.a.createElement(da.a,{component:"form",className:"box-input",style:{marginTop:"12px",marginBottom:"8px"}},a.a.createElement(m.a,{className:"text-f9 text-gray",style:{width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingRight:"10px",display:"flex",alignItems:"center"}},a.a.createElement("span",{style:{fontWeight:"bold",paddingRight:"4px"}},"SKU:")," ",t.sku),a.a.createElement(ze.a,{color:"secondary","aria-label":"directions",style:{padding:"4px"},onClick:function(){navigator.clipboard.writeText(t.sku)}},a.a.createElement(ma.a,{style:{fontSize:14}}))),a.a.createElement(m.a,{className:"box-media-share",display:"flex",style:{marginTop:"18px"}},a.a.createElement("a",{style:{padding:0},href:"mailto:support@nyris.io?subject=GF-Sparepart-Search&body= ".concat(encodeURIComponent("SKU: "+t.sku+"\r\n"+(o?"Image Link: ".concat(o):""))," ")},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement("img",{width:40,height:40,src:ga.a,alt:"icon_email"})))))))},ba=n(174),xa=n(175),wa=n(97),Ea=n.n(wa),Oa=function(){function e(){Object(ba.a)(this,e)}return Object(xa.a)(e,null,[{key:"success",value:function(e){Ea.a.success(e,{duration:3e3,style:{background:"#1E1F31",color:"#fff"}})}},{key:"error",value:function(e){Ea.a.error(e,{duration:3e3,style:{background:"#1E1F31",color:"#fff"}})}}]),e}();function ja(){ja=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return r(i,"_invoke",{value:w(e,n,c)}),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},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 a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var Ca=function(){var e=Object(d.a)(ja().mark((function e(t,n){var r,a,o,i,c;return ja().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.search,a=t.settings,o=r.sessionId,i=r.requestId||r.sessionId,e.prev=3,e.next=6,Na(a,o,i,{event:"feedback",data:{success:n}});case 6:return c=e.sent,wa.toast.dismiss(),Oa.success("Thank you for your feedback."),e.abrupt("return",c);case 12:e.prev=12,e.t0=e.catch(3),console.log(e.t0);case 15:case"end":return e.stop()}}),e,null,[[3,12]])})));return function(t,n){return e.apply(this,arguments)}}(),ka=function(){var e=Object(d.a)(ja().mark((function e(t,n,r){var a,o;return ja().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.search,o=t.settings,e.next=3,Na(o,a.sessionId,a.requestId,{event:"click",data:Object(h.a)({positions:[n]},r?{product_ids:[r]}:{})});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),Sa=function(){var e=Object(d.a)(ja().mark((function e(t,n,r){var a,o;return ja().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.search,o=t.settings,e.next=3,Na(o,a.sessionId,a.requestId,{event:"conversion",data:Object(h.a)({positions:[n]},r?{product_ids:[r]}:{})});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),La=function(){var e=Object(d.a)(ja().mark((function e(t,n){var r,a,o,i,c,l,u,s,f;return ja().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.settings,a=t.search,o=a.sessionId,i=a.requestId,c=n.x1,l=n.x2,u=n.y1,s=n.y2,f={event:"region",data:{rect:{x:c,y:u,w:l-c,h:s-u}}},e.next=6,Na(r,o,i,f);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Na=function(){var e=Object(d.a)(ja().mark((function e(t,n,r,a){var o;return ja().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=new $e.a(t),!n||!r){e.next=10;break}return e.prev=2,e.next=5,o.sendFeedback(n,r,a).then((function(e){}));case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),console.log("error sendFeedbackByApi321",e.t0);case 10:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(t,n,r,a){return e.apply(this,arguments)}}();var Ra=Object(r.memo)((function(e){var t,n,o,i,c,l,u,s,f=e.dataItem,h=e.isHover,d=void 0!==h&&h,v=e.onSearchImage,g=e.handlerGroupItem,y=e.handlerFeedback,x=e.isGroupItem,w=e.handlerCloseGroup,E=e.main_image_link,O=e.indexItem,j=_e(),C=Object(r.useState)(""),k=Object(p.a)(C,2),S=k[0],L=k[1],N=Me((function(e){return e})),R=N.settings,I=Object(r.useState)(!1),_=Object(p.a)(I,2),M=_[0],T=_[1],F=Object(r.useState)(!1),P=Object(p.a)(F,2),H=P[0],A=P[1],B=Object(r.useState)("none"),G=Object(p.a)(B,2),z=G[0],D=G[1],q=Object(Zn.b)().t,V=f.sku,W=f.collap,U=f[R.field.productTag],Z=Object(b.useMediaQuery)({query:"(max-width: 776px)"});Object(r.useEffect)((function(){E&&Y(E)}),[E]);var Y=function(e,t){t=t||5e3;var n=new Image;n.onerror=n.onabort=function(){clearTimeout(void 0),L("")},n.onload=function(){return clearTimeout(void 0),void L(e)},n.src=e},K=f[null===(t=R.field)||void 0===t?void 0:t.ctaLinkField];return a.a.createElement(m.a,{className:"wrap-main-item-result"},a.a.createElement(tr,{openModal:M,handleClose:function(e){T(!1)}},a.a.createElement(ha,{handlerCloseModal:function(){T(!1)},handlerFeedback:y,dataItem:f,onHandlerModalShare:function(){return A(!0)},onSearchImage:function(e){j(de(!0)),v(e)}})),a.a.createElement(ya,{setModalState:A,dataItem:f,isOpen:H}),a.a.createElement(m.a,{className:"box-top"},x&&W&&a.a.createElement(m.a,{className:"btn-show-result"},a.a.createElement(Te.a,{onClick:function(){g(f,O)}},q("Show group"),a.a.createElement(Ir.a,{style:{fontSize:"10px"}}))),x&&!W&&a.a.createElement(m.a,{className:"btn-show-result"},a.a.createElement(Te.a,{onClick:function(){w(f,O)}},q("Close group"),a.a.createElement(Ir.a,{style:{fontSize:"10px"}}))),!d&&E&&a.a.createElement(m.a,{className:"box-icon-modal",onClick:function(){S.length>1&&v(E)}},a.a.createElement(na,{width:16,height:16,color:"#AAABB5"})),a.a.createElement(m.a,{className:"box-image"},a.a.createElement(Te.a,{style:{width:"100%",height:"100%"},onClick:function(e){e.preventDefault(),ka(N,O,f.sku),T(!0),j(ee(!0)),j(de(!0)),setTimeout((function(){j(de(!1))}),400)}},E?a.a.createElement("img",{src:E,key:E,alt:"image_item",className:"img-style",style:{width:"100%",height:"100%",objectFit:"contain"}}):a.a.createElement("img",{src:aa.a,alt:"image_item",className:"img-style",style:{width:"100%",height:"100%",objectFit:"cover"}})))),a.a.createElement(m.a,{className:"box-content",display:"flex",style:{flexDirection:"column",backgroundColor:"#F3F3F5",flexGrow:1}},a.a.createElement(m.a,{className:"box-top"},a.a.createElement(kr.a,{container:!0,justifyContent:"space-between"},a.a.createElement(kr.a,{item:!0,xs:12},a.a.createElement(In.a,{title:V,placement:"top",arrow:!0,disableHoverListener:(null===V||void 0===V?void 0:V.length)<19||!V},a.a.createElement(rn.a,{className:"text-f12 max-line-1 fw-400",style:{color:"#2B2C46",marginTop:12,display:"inline-block"}},a.a.createElement("span",{style:{marginRight:3}},R.itemIdLabel||"SKU",":"),An(V,Z?17:20))),R.warehouseVariant&&a.a.createElement(m.a,null,a.a.createElement(rn.a,{className:"text-f12 max-line-1 fw-400",style:{color:"#2B2C46",display:"inline-block"}},a.a.createElement("span",{style:{marginRight:3}},f[R.field.warehouseStock],":"),a.a.createElement("span",{style:{color:f[R.field.warehouseStockValue]?"#00C070":"#c54545",fontWeight:600}},f[R.field.warehouseStockValue]||0))),(!!U||!!R.brandName)&&a.a.createElement(In.a,{title:U,placement:"top",arrow:!0,disableHoverListener:(null===U||void 0===U?void 0:U.length)<22||!U},a.a.createElement(m.a,{style:{background:"".concat(null===(n=R.theme)||void 0===n?void 0:n.secondaryColor,"26"),borderRadius:"6px",display:"flex",width:"fit-content",padding:"2px 5px",marginTop:3}},a.a.createElement(rn.a,{className:"fw-700",style:{color:null===(o=R.theme)||void 0===o?void 0:o.secondaryColor,fontSize:10,letterSpacing:"1px",maxWidth:"160px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},An(U,22)||R.brandName)))))),a.a.createElement("div",null,a.a.createElement(In.a,{title:f[R.field.productName],placement:"top",arrow:!0,disableHoverListener:(null===(i=f[R.field.productName])||void 0===i?void 0:i.length)<45},a.a.createElement(m.a,{style:{boxShadow:"-2px 2px 4px rgba(170, 171, 181, 0.5)",height:40,background:"linear-gradient(270deg, ".concat(null===(c=R.theme)||void 0===c?void 0:c.primaryColor,"bb 0%, ").concat(null===(l=R.theme)||void 0===l?void 0:l.primaryColor," 100%)"),borderRadius:4,padding:"0px 8px",marginTop:"12px"},display:"flex",justifyItems:"center",alignItems:"center",justifyContent:"space-between"},a.a.createElement(m.a,{style:{display:"flex",justifyContent:"space-between",width:"100%",padding:0,cursor:K?"pointer":"normal"},onClick:function(){K&&(Sa(N,O,f.sku),window.open("".concat(K),"_blank"))}},a.a.createElement(rn.a,{className:"text-white max-line-2",style:{overflow:"hidden",textOverflow:"ellipsis",fontWeight:500,fontSize:"11px",letterSpacing:"0.27px",wordBreak:"break-all",maxWidth:!Z&&K?"136px":"164x",paddingRight:"8px"},align:"left"},An(f[R.field.productName],45)),!Z&&K&&a.a.createElement("img",{src:Mr.a,alt:"more-info",width:20})))),R.warehouseVariant&&a.a.createElement(m.a,{display:"flex",justifyContent:"space-between",style:{color:"#2B2C46",marginTop:"12px"},gridGap:10},R.field.warehouseNumber&&a.a.createElement(m.a,{style:{backgroundColor:"".concat(null===(u=R.theme)||void 0===u?void 0:u.secondaryColor,"26"),padding:"5px 10px",borderRadius:4,width:"100%"}},a.a.createElement("div",{style:{fontSize:10,fontWeight:500}},f[R.field.warehouseNumber]),a.a.createElement("div",{style:{fontSize:13,fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},f[R.field.warehouseNumberValue]||"N/A")),R.field.warehouseShelfNumber&&a.a.createElement(m.a,{style:{backgroundColor:"".concat(null===(s=R.theme)||void 0===s?void 0:s.secondaryColor,"26"),padding:"5px 10px",borderRadius:4,width:"100%"}},a.a.createElement("div",{style:{fontSize:10,fontWeight:500}},f[R.field.warehouseShelfNumber]),a.a.createElement("div",{style:{fontSize:13,fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},f[R.field.warehouseShelfNumberValue]||"N/A"))),R.showFeedbackAndShare&&a.a.createElement(m.a,{className:"box-bottom",style:{marginBottom:6,marginTop:12}},a.a.createElement(kr.a,{container:!0,justifyContent:R.shareOption?"space-between":"space-around",alignItems:"center"},a.a.createElement(kr.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{className:"btn-item",style:{padding:"6px"},onClick:function(){y("like"),D("like")}},a.a.createElement(Jr,{width:16,height:16,color:"like"===z?"#3E36DC":"#000000"})))),a.a.createElement(kr.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{style:{padding:"6px"},className:"btn-item",onClick:function(){y("dislike"),D("dislike")}},a.a.createElement(Wr,{width:16,height:16,color:"dislike"===z?"#CC1854":"#000000"})))),R.shareOption&&a.a.createElement(kr.a,{item:!0},a.a.createElement(m.a,{display:"flex",alignItems:"center"},a.a.createElement(Te.a,{style:{padding:"6px"},className:"btn-item",onClick:function(){return A(!0)}},a.a.createElement(Br,{width:16,height:16,color:"#000000"})))))))))}));var Ia,_a=Object(Lt.a)(Object(r.memo)((function(e){var t=e.allSearchResults,n=e.getUrlToCanvasFile,o=e.sendFeedBackAction,i=e.moreInfoText,c=e.searchQuery,l=e.requestImage,u=e.isSearchStalled,s=Me((function(e){return e})),f=s.search,d=s.settings,v=f.loadingSearchAlgolia,g=Object(r.useState)({}),y=Object(p.a)(g,2),x=y[0],w=y[1],E=Object(r.useState)([]),O=Object(p.a)(E,2),j=O[0],C=O[1],k=Object(r.useState)(!1),S=Object(p.a)(k,2),L=S[0],N=S[1],R=Object(b.useMediaQuery)({query:"(max-width: 776px)"});Object(r.useEffect)((function(){u&&N(!0)}),[u]),Object(r.useEffect)((function(){var e;if(null===t||void 0===t||null===(e=t.hits)||void 0===e?void 0:e.length){N(!1);var n=d.showGroup?I(null===t||void 0===t?void 0:t.hits):null===t||void 0===t?void 0:t.hits;C(n)}else C([])}),[null===t||void 0===t?void 0:t.hits,null===f||void 0===f?void 0:f.valueTextSearch]);var I=function(e){var t=[],n=[],r=e.map((function(e){return e.group_id?e:Object(h.a)(Object(h.a)({},e),{},{group_id:Object(Ye.uniqueId)("random-group-id")})})),a=Object(Ye.groupBy)(r,"group_id");return w(a),0===(t=Object.values(a)).length?e:(t.forEach((function(e){var t;e.length>=2?(t=Object(h.a)(Object(h.a)({},e[0]),{},{isGroup:!0,collap:!0}),n.push(t)):(t=Object(h.a)(Object(h.a)({},e[0]),{},{isGroup:!1,collap:null}),n.push(t))})),n)},_=Object(r.useMemo)((function(){return l||f.valueTextSearch.query||u?0!==j.length||v||u||!L&&!l?j.map((function(e,t){return a.a.createElement(m.a,{key:t,style:{height:"fit-content"}},a.a.createElement(Ra,{dataItem:e,indexItem:t,isHover:!1,onSearchImage:function(e){n(e)},handlerFeedback:function(e){o(e)},handlerGroupItem:function(e,t){return function(e,t){var n=e.group_id,r=Object(Qt.a)(j),a=r.slice(0,t+1);a.filter((function(e){return e.group_id===n}))[0].collap=!1;var o=r.slice(t+1,r.length),i=Object(Qt.a)(x[n]);i.shift(),o=i.concat(o),C(a.concat(o))}(e,t)},handlerCloseGroup:function(e,t){return function(e,t){var n=e.group_id,r=Object(Qt.a)(j),a=r.slice(0,t+1);a.filter((function(e){return e.group_id===n}))[0].collap=!0;var o=r.slice(t+1,r.length);o=o.filter((function(e){return e.group_id!==n})),C(a.concat(o))}(e,t)},isGroupItem:!!d.showGroup&&(null===e||void 0===e?void 0:e.isGroup),moreInfoText:i,main_image_link:e["image(main_similarity)"]||e.main_image_link}))})):a.a.createElement(m.a,{style:{marginTop:"50px",width:"100%",textAlign:"center"}},"No products were found matching your search criteria."):a.a.createElement(m.a,{style:{marginTop:"50px",width:"100%",textAlign:"center"}},"Please upload an image or enter a keyword to search.")}),[j,c,l,f.valueTextSearch,u,L,v,R]);return a.a.createElement(a.a.Fragment,null,_)}))),Ma=n(915),Ta=n(910),Fa=n(911),Pa=function(e,t){var n=t||{x1:0,x2:1,y1:0,y2:1};if(!e)return null;var r=Object(Xe.getElementSize)(e),a=Object(Xe.getRectAspectRatio)(n,r),o=Object(Xe.getThumbSizeArea)(600,600,a);return Object(Xe.elementToCanvas)(e,o,n)},Ha=n(322),Aa=n(901),Ba=["svgRef","title"];function Ga(){return(Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function za(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Da=function(e){var t=e.svgRef,n=e.title,r=za(e,Ba);return a.a.createElement("svg",Ga({width:20,height:20,viewBox:"0 0 20 20",fill:"none",ref:t},r),n?a.a.createElement("title",null,n):null,Ia||(Ia=a.a.createElement("path",{d:"M10 0.000191037C8.68453 -0.0079651 7.38053 0.245119 6.16361 0.744768C4.94669 1.24442 3.84108 1.98069 2.91088 2.91088C1.98069 3.84108 1.24442 4.94669 0.744768 6.16361C0.245119 7.38053 -0.0079651 8.68453 0.000191037 10C-0.0079651 11.3155 0.245119 12.6195 0.744768 13.8364C1.24442 15.0533 1.98069 16.1589 2.91088 17.0891C3.84108 18.0193 4.94669 18.7556 6.16361 19.2552C7.38053 19.7549 8.68453 20.008 10 19.9998C11.3155 20.008 12.6195 19.7549 13.8364 19.2552C15.0533 18.7556 16.1589 18.0193 17.0891 17.0891C18.0193 16.1589 18.7556 15.0533 19.2552 13.8364C19.7549 12.6195 20.008 11.3155 19.9998 10C20.008 8.68453 19.7549 7.38053 19.2552 6.16361C18.7556 4.94669 18.0193 3.84108 17.0891 2.91088C16.1589 1.98069 15.0533 1.24442 13.8364 0.744768C12.6195 0.245119 11.3155 -0.0079651 10 0.000191037ZM13.8891 14.9999L5.0001 6.11129L6.11129 5.0001L14.9999 13.8891L13.8891 14.9999Z",fill:"#E31B5D"})))},qa=a.a.forwardRef((function(e,t){return a.a.createElement(Da,Ga({svgRef:t},e))}));n.p;function Va(){Va=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return r(i,"_invoke",{value:w(e,n,c)}),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},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 a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var Wa=/.+\@.+\..+$/,Ua=function(e){switch(e.status){case 400:return"Your email could not be sent, please try again or send an email to support@nyris.io";case 421:case 450:case 451:case 452:return"Email delivery failed. Rest assured, we're continuously attempting to send it for you. Alternatively, you can forward the email to support@nyris.io";default:return"Your email could not be sent, please try again or send an email to support@nyris.io"}};function Za(e){var t,n=e.requestImage,o=e.selectedRegion,i=e.setIsRfqModalOpen,c=e.isRfqModalOpen,l=e.setRfqStatus,u=Object(r.useState)(""),s=Object(p.a)(u,2),f=s[0],h=s[1],m=Object(r.useState)(void 0),v=Object(p.a)(m,2),g=v[0],y=v[1],b=Object(r.useState)(""),x=Object(p.a)(b,2),w=x[0],E=x[1];Object(r.useEffect)((function(){return Ha.a.init("SMGihPnuEGcYLm0V4")}),[]),Object(r.useEffect)((function(){f&&(Wa.test(f)?y(!0):y(!1))}),[f]);var O=function(){var e=Object(d.a)(Va().mark((function e(t){var r,c;return Va().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),r=n.canvas,c=Pa(r,o),"service_zfsxshi","template_jlgc9le",i(!1),e.prev=6,l("loading"),e.next=10,Ha.a.send("service_zfsxshi","template_jlgc9le",{email_id:f.trim(),information_text:w,request_image:null===c||void 0===c?void 0:c.toDataURL()});case 10:l("sent"),Oa.success("Request sent successfully"),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(6),l("inactive"),Ea()((function(t){return a.a.createElement("div",{style:{display:"flex",flexDirection:"column",fontSize:"14px",width:"294px"}},a.a.createElement("span",{style:{fontWeight:"bold"}},"Email not sent"),a.a.createElement("span",null,Ua(e.t0)),a.a.createElement("a",{href:"mailto:support@nyris.io?subject=Request for quotation&body=".concat(w),style:{padding:"8px 16px 8px 16px",border:"1px solid #000",marginTop:"16px",backgroundColor:"transparent",color:"#000",cursor:"pointer",width:"fit-content"}},"support@nyris.io"))}),{duration:5e3,style:{background:"#FFE5EF",color:"#000000",maxWidth:"400px"},icon:a.a.createElement("div",{style:{minWidth:"20px",minHeight:"20px"}},a.a.createElement(qa,null))});case 18:i(!1);case 19:case"end":return e.stop()}}),e,null,[[6,14]])})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(tr,{openModal:c,handleClose:function(e){i(!1)}},a.a.createElement("div",{style:{display:"flex",width:"378px",flexDirection:"column",backgroundColor:"#fff"}},a.a.createElement("div",{style:{padding:"16px",display:"flex",flexDirection:"column"}},a.a.createElement(qe.a,{style:{fontSize:16,color:"black",alignSelf:"flex-end",cursor:"pointer"},onClick:function(){return i(!1)}}),a.a.createElement("p",{style:{color:"#2B2C46",fontSize:"20px",fontWeight:"bold"}},"Submit your image for quotation")),a.a.createElement("div",{style:{padding:"16px",backgroundColor:"#F3F3F5",display:"flex",justifyContent:"center"}},a.a.createElement("img",{src:null===(t=Pa(null===n||void 0===n?void 0:n.canvas,o))||void 0===t?void 0:t.toDataURL(),alt:"request_image",style:{maxHeight:"200px"}})),a.a.createElement("div",{style:{padding:"0px 16px 16px 16px",backgroundColor:"#F3F3F5",display:"flex",flexDirection:"column",rowGap:"16px"}},a.a.createElement("div",null,a.a.createElement("p",{style:{fontSize:"12px",color:"#2B2C46"}},"Your email (required)"),a.a.createElement("input",{value:f,onChange:function(e){return h(e.currentTarget.value.trim())},style:{width:"100%",border:"none",height:"32px",padding:"8px 16px 8px 16px"}}),!g&&!Object(Ye.isUndefined)(g)&&a.a.createElement("p",{style:{color:"red",fontSize:"12px",paddingTop:"8px"}},"Please enter a valid email.")),a.a.createElement("div",null,a.a.createElement("p",{style:{fontSize:"12px",color:"#2B2C46"}},"Additional information"),a.a.createElement(Aa.a,{value:w,onChange:function(e){return E(e.currentTarget.value)},style:{width:"100%",border:"none",maxWidth:"346px",padding:"8px 16px 8px 16px"}}))),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("button",{style:{height:"66px",display:"flex",alignItems:"center",width:"50%",backgroundColor:"#4B4B4A",color:"white",fontSize:"14px",paddingLeft:"16px",border:"none",cursor:"pointer"},onClick:function(){return i(!1)}},"Cancel"),a.a.createElement("button",{style:{height:"66px",display:"flex",alignItems:"center",width:"50%",backgroundColor:g?"#4DBE51":"#E9E9EC",color:g?"#fff":"#AAABB5",fontSize:"14px",paddingLeft:"16px",border:"none",cursor:g?"pointer":"normal"},disabled:!g,onClick:O},"Send"))))}var Ya=n(485),Ka=n.n(Ya),Qa=n(486),Ja=n.n(Qa);var Xa=function(e){var t=e.setImageSelection,n=e.imageSelection,o=e.debouncedOnImageSelectionChange,i=e.filteredRegions,c=e.showAdjustInfoBasedOnConfidence,l=e.showAdjustInfo,u=e.showPostFilter,s=e.disjunctiveFacets,f=Object(Zn.b)().t,h=Object(r.useState)(!1),d=Object(p.a)(h,2),v=d[0],g=d[1],y=Me((function(e){return e})),b=y.search,x=y.settings,w=b.requestImage;return a.a.createElement(m.a,{className:"wrap-main-col-left ".concat(v?"toggle":""),style:{display:"flex",flexDirection:"column",justifyContent:"space-between"}},a.a.createElement(m.a,{className:"box-toggle-coloumn",style:{right:w||v?"0px":"16px"}},a.a.createElement(Te.a,{style:{color:"#55566b",height:"32px"},onClick:function(){g(!v)}},v?a.a.createElement(Ka.a,null):a.a.createElement(Ja.a,null))),a.a.createElement(m.a,null,x.preview&&w&&a.a.createElement(m.a,{className:"col-left"},a.a.createElement(m.a,{className:"box-preview"},a.a.createElement(m.a,{className:"preview-item",style:{backgroundColor:"white",paddingTop:"32px",width:"100%"}},a.a.createElement("div",{style:{backgroundColor:"#F3F3F5",width:"100%",paddingTop:"16px",paddingBottom:"16px"}},a.a.createElement(Vn.Preview,{key:null===w||void 0===w?void 0:w.id,onSelectionChange:function(e){t(e),o(e)},image:null===w||void 0===w?void 0:w.canvas,selection:n||W,regions:i,maxWidth:288,maxHeight:288,dotColor:"#FBD914",minCropWidth:60,minCropHeight:60,rounded:!0})))),(c||l)&&a.a.createElement(m.a,{className:"box-title_col-left",alignItems:"center",style:{backgroundColor:"#3E36DC",display:"flex",columnGap:"6px",padding:"5px"}},a.a.createElement(yt,{color:"white"}),a.a.createElement(rn.a,{style:{fontSize:10,color:"#fff"}},l?f("Crop the image for better results"):"Crop the image for better results"))),u&&a.a.createElement(m.a,{className:"col-left__bottom"},a.a.createElement(Nn,{disjunctiveFacets:s}))))},$a=function(e,t){return Object(r.useMemo)((function(){return e.map((function(e){var n,r,a,o;return(null===(n=e.normalizedRect)||void 0===n?void 0:n.x1)===(null===t||void 0===t?void 0:t.x1)&&(null===(r=e.normalizedRect)||void 0===r?void 0:r.x2)===(null===t||void 0===t?void 0:t.x2)&&(null===(a=e.normalizedRect)||void 0===a?void 0:a.y1)===(null===t||void 0===t?void 0:t.y1)&&(null===(o=e.normalizedRect)||void 0===o?void 0:o.y2)===(null===t||void 0===t?void 0:t.y2)||0===(null===t||void 0===t?void 0:t.x1)&&1===(null===t||void 0===t?void 0:t.x2)&&0===(null===t||void 0===t?void 0:t.y1)&&1===(null===t||void 0===t?void 0:t.y2)?Object(h.a)(Object(h.a)({},e),{},{show:!1}):Object(h.a)(Object(h.a)({},e),{},{show:!0})}))}),[e,t])};var eo=function(e){var t=e.requestImage,n=e.imageSelection,r=e.setImageSelection,o=e.debouncedOnImageSelectionChange,i=e.filteredRegions,c=e.showAdjustInfo,l=e.showAdjustInfoBasedOnConfidence,u=Object(Zn.b)().t;return a.a.createElement(m.a,{className:"col-left",style:{backgroundColor:"#AAABB5",marginBottom:"15px"}},a.a.createElement(m.a,{className:"box-preview"},a.a.createElement(m.a,{className:"preview-item",style:{backgroundColor:"white"}},a.a.createElement(Vn.Preview,{key:null===t||void 0===t?void 0:t.id,onSelectionChange:function(e){r(e),o(e)},image:null===t||void 0===t?void 0:t.canvas,selection:n||W,regions:i,maxWidth:240,maxHeight:240,dotColor:"#FBD914",minCropWidth:60,minCropHeight:60,rounded:!1})),(l||c)&&a.a.createElement(m.a,{className:"box-title_col-left",alignItems:"center",style:{backgroundColor:"#3E36DC",display:"flex",columnGap:"6px",padding:"5px",width:"fit-content"}},a.a.createElement(yt,{color:"white"}),a.a.createElement(rn.a,{style:{fontSize:10,color:"#fff"}},c?u("Crop the image for better results"):"Crop the image for better results"))))};var to=function(e){var t,n=e.requestImage,r=e.rfqRef,o=e.rfqStatus,i=e.selectedRegion,c=e.setIsRfqModalOpen,l=Object(b.useMediaQuery)({query:"(max-width: 776px)"});return a.a.createElement(m.a,{style:{padding:"0px 16px 0px 16px",backgroundColor:"#F6F3F1",width:"100%",marginBottom:l?"0px":"32px",alignSelf:"end",height:"248px",display:"flex",alignItems:"center"},className:"rfq-box",ref:r},a.a.createElement(m.a,{style:{width:"100%",display:"flex",columnGap:"16px",alignItems:"center",justifyContent:"space-around"}},a.a.createElement(m.a,null,a.a.createElement(m.a,{style:{paddingBottom:"12px"}},a.a.createElement(m.a,{style:{fontSize:"14px",color:"inactive"===o?"#4B4B4A":"#CACAD1",fontWeight:"bold"}},l?"No matches found?":"No matches found for your request?"),a.a.createElement(m.a,{style:{fontSize:"12px",maxWidth:"320x",lineHeight:"14.1px",color:"inactive"===o?"#4B4B4A":"#CACAD1",fontWeight:"normal"}},"Get personalised help from our team of product experts.")),a.a.createElement("button",{style:{maxWidth:"200px",background:"inactive"===o?"#4B4B4A":"#E9E9EC",boxShadow:"inactive"===o?"0px 0px 4px 0px rgba(0, 0, 0, 0.25)":"",borderRadius:"2px",padding:"16px 16px 16px 16px",display:"flex",alignItems:"center",color:"inactive"===o?"#fff":"#CACAD1",fontSize:"14px",height:"48px",cursor:"inactive"===o?"pointer":"default",border:"none"},disabled:"inactive"!==o,onClick:function(){c(!0)}},"Request a Quote")),a.a.createElement("div",null,a.a.createElement("img",{src:null===(t=Pa(null===n||void 0===n?void 0:n.canvas,i))||void 0===t?void 0:t.toDataURL(),alt:"request_image",style:{mixBlendMode:"inactive"!==o?"overlay":"unset",maxHeight:"181px",maxWidth:"181px",borderRadius:"2px"}}))))};function no(){no=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new C(a||[]);return r(i,"_invoke",{value:w(e,n,c)}),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=u;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,c){var l=s(e[a],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},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 a=r.arg;j(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}var ro=Object(Lt.a)(Object(r.memo)((function(e){var t,n,o,i,c=_e(),l=Object(r.useRef)(null),u=Me((function(e){return e})),s=u.search,f=u.settings,v=s.requestImage,g=s.regions,y=s.selectedRegion,x=s.preFilter,w=s.loadingSearchAlgolia,E=s.imageThumbSearchInput,O=null===f||void 0===f?void 0:f.productCtaText,j=Object(b.useMediaQuery)({query:"(max-width: 776px)"}),C=Object(r.useState)(null),k=Object(p.a)(C,2),S=k[0],L=k[1],N=function(){return l.current.scrollIntoView("-100px")},R=Object(r.useState)(),I=Object(p.a)(R,2),_=I[0],M=I[1],T=Object(Zn.b)().t,F=Object(r.useState)(!1),P=Object(p.a)(F,2),H=P[0],A=P[1],B=Object(r.useState)(!1),G=Object(p.a)(B,2),z=G[0],D=G[1],q=Object(r.useState)("inactive"),V=Object(p.a)(q,2),Z=V[0],Y=V[1],K=Object(r.useState)(!1),Q=Object(p.a)(K,2),J=Q[0],$=Q[1],te=Object(r.useRef)(null),re=Object(r.useRef)(null),oe=Object(r.useState)("not-scrolled"),se=Object(p.a)(oe,2),fe=se[0],pe=se[1];Object(r.useEffect)((function(){if(!w&&(E.includes("blob:")||E.includes("data:"))&&te.current!==E){A(!0);var e=setTimeout((function(){A(!1)}),2e3);return te.current=E,function(){clearTimeout(e),A(!1)}}}),[E,w]),Object(r.useEffect)((function(){y&&(L(y),Y("inactive"),pe("not-scrolled"))}),[y]),Object(r.useEffect)((function(){v&&(pe("not-scrolled"),N(),L(W))}),[v]);var me=Object(r.useCallback)(function(){var e=Object(d.a)(no().mark((function e(t,n){var r;return no().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[{key:f.visualSearchFilterKey,values:Object.keys(x)}],c(X()),e.abrupt("return",at({image:t,settings:f,region:n,filters:Object(Ye.isEmpty)(x)?void 0:r}).then((function(e){return c(de(!1)),Object(h.a)({},e)})).catch((function(e){c(de(!1)),console.log("error call api change selection find image",e)})));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[f,c,x]),ve=Object(r.useCallback)(Object(Ye.debounce)(function(){var e=Object(d.a)(no().mark((function e(t){var n;return no().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){e.next=2;break}return e.abrupt("return");case 2:return c(de(!0)),n=v.canvas,me(n,t).then((function(e){c(he(e)),e.results.find((function(e){return e.score>=.65}))||D(!0),setTimeout((function(){D(!1)}),2e3)})),e.abrupt("return",c(ke()));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),250),[v,me]),ge=function(){var e=Object(d.a)(no().mark((function e(t){return no().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ca(u,"like"===t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ye=function(){var e=Object(d.a)(no().mark((function e(t){var n,r,a,o;return no().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(de(!0)),j&&(N(),c(ee(!1))),c(Ce()),c(X()),c(ae(t)),e.next=7,tt(t);case 7:if(n=e.sent,c(ce(n)),r=void 0,!f.regions){e.next=17;break}return e.next=13,rt(n,f);case 13:a=e.sent,r=a.selectedRegion,c(ie(a.regions)),c(ue(r));case 17:o=[{key:f.visualSearchFilterKey,values:Object.keys(x)}],at({image:n,settings:f,region:r,filters:Object(Ye.isEmpty)(x)?void 0:o}).then((function(e){c(le(e)),c(ke()),c(de(!1))}));case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),be=v?["sku:DOES_NOT_EXIST<score=1> "]:[],xe=(null===s||void 0===s?void 0:s.results)?null===s||void 0===s?void 0:s.results.slice().reverse().map((function(e,t){return"sku:'".concat(e.sku,"'<score=").concat(t,"> ")})):"",we=[].concat(be,Object(Qt.a)(xe)).join("OR ");Object(r.useEffect)((function(){if(document.title="Search results",!v&&!Object(Ye.isEmpty)(s.valueTextSearch.query)){var e=Object.keys(x),t=e.length>0?e.map((function(e){return"".concat(f.alogoliaFilterField,":'").concat(e,"'")})).join(" OR "):"";M(t)}}),[x,v,s.valueTextSearch.query,f.alogoliaFilterField]),Object(r.useEffect)((function(){if(v){c(de(!0));var e=v.canvas;return me(e).then((function(e){c(he(e))})),c(ke()),function(){}}}),[x]),Object(r.useEffect)((function(){if(v){var e=Object.keys(x),t=e.length>0?e.map((function(e){return"".concat(f.alogoliaFilterField,":'").concat(e,"'")})).join(" OR "):"",n=e.length>0?we?"(".concat(we,") AND ").concat(t):t:we;M(n)}}),[we,f.alogoliaFilterField]);var Ee=Object(r.useCallback)(Object(Ye.debounce)((function(e){La(u,e),c(ne(e)),ve(e)}),500),[ve,u.search]),Oe=$a(g,S),je=Object(r.useMemo)((function(){var t;return f.postFilterOption&&(null===(t=e.allSearchResults)||void 0===t?void 0:t.hits.length)>0}),[f.postFilterOption,null===(t=e.allSearchResults)||void 0===t?void 0:t.hits]),Se=Object(r.useMemo)((function(){return v||f.postFilterOption&&je}),[je,f.postFilterOption,v]);return Object(r.useEffect)((function(){var e=function(){setTimeout((function(){pe((function(e){return"not-scrolled"===e?"scrolled":e})),setTimeout((function(){pe((function(e){return"scrolled"===e?"user-scrolled":e}))}),5e3)}),1e3)};return v&&window.addEventListener("scroll",e,{capture:!0}),function(){window.removeEventListener("scroll",e)}}),[v]),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"wrap-main-result loading",id:"wrap-main-result",ref:l},a.a.createElement(a.a.Fragment,null,J&&a.a.createElement(Za,{requestImage:v,selectedRegion:y,setIsRfqModalOpen:$,isRfqModalOpen:J,setRfqStatus:Y}),_&&a.a.createElement(Ma.a,{query:s.valueTextSearch.query,filters:_}),a.a.createElement(m.a,{className:"box-wrap-result-component"},!j&&a.a.createElement("div",{className:"box-search"},a.a.createElement(rr,null)),a.a.createElement(m.a,{className:"box-result"},a.a.createElement(a.a.Fragment,null,!j&&Se&&a.a.createElement(Xa,{setImageSelection:L,allSearchResults:e.allSearchResults,debouncedOnImageSelectionChange:Ee,filteredRegions:Oe,imageSelection:S,showAdjustInfo:H,showAdjustInfoBasedOnConfidence:z,showPostFilter:je,disjunctiveFacets:e.allSearchResults.disjunctiveFacets}),a.a.createElement(m.a,{className:"col-right ".concat(f.preview&&"ml-auto mr-auto"," ").concat(j&&"col-right-result-mobile"),style:{paddingTop:j?"16px":"40px",overflow:j?"":"auto",display:"flex",flexDirection:"column"}},!j&&a.a.createElement(m.a,{className:"wrap-box-refinements"},a.a.createElement(Cr,{statusSwitchButton:!0})),j&&f.preview&&v&&a.a.createElement(eo,{requestImage:v,imageSelection:S,setImageSelection:L,debouncedOnImageSelectionChange:Ee,filteredRegions:Oe,showAdjustInfoBasedOnConfidence:z,showAdjustInfo:H}),a.a.createElement(m.a,{style:{display:"flex",flexDirection:"column",flexGrow:1,backgroundColor:"#FAFAFA"}},a.a.createElement(m.a,{className:"box-item-result ml-auto mr-auto",style:{height:"100%",paddingLeft:j?0:16}},a.a.createElement(_a,{getUrlToCanvasFile:ye,setLoading:!1,sendFeedBackAction:ge,moreInfoText:O,requestImage:v,searchQuery:s.valueTextSearch.query}),a.a.createElement(m.a,{className:"pagination-result",style:{width:"100%",margin:j?"":"20px auto",marginBottom:j&&!v?"64px":"20px",padding:"0 20%",alignSelf:"end"}},(null===(n=e.allSearchResults)||void 0===n?void 0:n.hits.length)>0&&(v||s.valueTextSearch.query)&&a.a.createElement(Ta.a,{showFirst:!1,translations:{previous:a.a.createElement(vr.a,{style:{color:"#161616"}}),next:a.a.createElement(yr.a,{style:{color:"#161616"}})}})),v&&!w&&!e.isSearchStalled&&f.rfq&&a.a.createElement(to,{rfqRef:re,rfqStatus:Z,setIsRfqModalOpen:$,requestImage:v,selectedRegion:y}))),!j&&(null===(o=e.allSearchResults)||void 0===o||null===(i=o.hits)||void 0===i?void 0:i.length)>0&&a.a.createElement(m.a,null,a.a.createElement(m.a,{className:"box-notify"},a.a.createElement(Nr,{search:s},a.a.createElement(m.a,{display:"flex",style:{padding:"0 20px"},className:"box-change-hit-items"},a.a.createElement("span",{style:{paddingRight:"10px"}},T("Items per page"),":"),a.a.createElement(Fa.a,{items:U,defaultRefinement:20}))))))))))),"scrolled"===fe&&v&&j&&e.allSearchResults.hits.length>0&&f.rfq&&a.a.createElement("div",{style:{fontSize:"14px",fontWeight:"bold",letterSpacing:"1.16px",color:"white",borderRadius:"16px",backgroundColor:"#4B4B4A",boxShadow:"0px 0px 16px 0px rgba(85, 86, 107, 0.70)",padding:"8px 16px",zIndex:100,position:"absolute",left:"50%",transform:"translate(-50%, -50%)",width:"356px",bottom:"86px"}},"Scroll down for personalized support"))}))),ao=["component","authed"],oo=function(e){var t=e.component,n=e.authed,r=Object(s.a)(e,ao);return a.a.createElement(f.b,Object.assign({},r,{render:function(){return n?a.a.createElement(t,null):a.a.createElement(f.a,{to:"/login"})}}))};var io=Object(r.memo)((function(){return a.a.createElement(f.d,null,a.a.createElement(qn,null,a.a.createElement(f.d,null,a.a.createElement(oo,{authed:!0,exact:!0,strict:!0,path:"/",component:pr}),a.a.createElement(oo,{authed:!0,exact:!0,strict:!0,path:"/result",component:ro}))))})),co=(n(863),n(489)),lo=function(){var e=Object(b.useMediaQuery)({query:"(max-width: 776px)"});return a.a.createElement(wa.Toaster,{containerStyle:e?{bottom:80}:{top:60},position:e?"bottom-center":"top-right"},(function(e){return a.a.createElement(wa.ToastBar,{toast:e,style:{padding:0,borderRadius:0}},(function(t){var n=t.icon;return a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{width:5,height:"100%",background:"success"===e.type?"#61d345":"transparent",marginRight:7}}),a.a.createElement("span",{style:{padding:15,display:"inline-flex"}},n,a.a.createElement("span",{style:{fontSize:15,fontWeight:300,margin:"0 10px"}}," ",Object(wa.resolveValue)(e.message,e)),"loading"!==e.type&&a.a.createElement("span",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Er.a,{fontSize:"small",style:{cursor:"pointer",marginLeft:10},onClick:function(){return Ea.a.dismiss(e.id)}}))))}))}))};document.title=window.location.host;var uo=Object(co.a)({overrides:{MuiTooltip:{arrow:{color:"black"},tooltip:{backgroundColor:"black"}}}});i.a.render(a.a.createElement(r.Fragment,null,a.a.createElement(lo,null),a.a.createElement(c.a,{store:Ie},a.a.createElement(l.a,{theme:uo},a.a.createElement(u.a,null,a.a.createElement(io,null))))),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[503,1,2]]]);
3
+ //# sourceMappingURL=main.0b3b11fc.chunk.js.map