@crystaldesign/diva-web-planner-react 25.6.0-beta.17 → 25.6.0-beta.18
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.
- package/build/umd/1386.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/{7668.diva-web-planner-react.umd.min.js → 1393.diva-web-planner-react.umd.min.js} +2 -2
- package/build/umd/{7668.diva-web-planner-react.umd.min.js.LICENSE.txt → 1393.diva-web-planner-react.umd.min.js.LICENSE.txt} +1 -1
- package/build/umd/1707.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2142.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2208.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/271.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/304.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/430.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5962.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6334.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6937.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7052.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7438.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7442.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7625.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7674.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8488.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8584.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/859.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8692.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8717.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8742.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9523.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9603.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9631.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9874.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/{2122.diva-web-planner-react.umd.min.js → 9944.diva-web-planner-react.umd.min.js} +2 -2
- package/build/umd/{2122.diva-web-planner-react.umd.min.js.LICENSE.txt → 9944.diva-web-planner-react.umd.min.js.LICENSE.txt} +1 -1
- package/build/umd/997.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +8 -8
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 1707.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[1707,2142,8692,430],{10304:(t,o,i)=>{o.Z=void 0;var r=function _interopRequireWildcard(t){if(t&&t.__esModule)return t;if(null===t||"object"!==_typeof(t)&&"function"!=typeof t)return{default:t};var o=_getRequireWildcardCache();if(o&&o.has(t))return o.get(t);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var l=r?Object.getOwnPropertyDescriptor(t,a):null;l&&(l.get||l.set)?Object.defineProperty(i,a,l):i[a]=t[a]}i.default=t,o&&o.set(t,i);return i}(i(87363)),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(65515));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return t},t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _extends(){return _extends=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},_extends.apply(this,arguments)}function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _defineProperty(t,o,i){return o in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}function _defineProperties(t,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _setPrototypeOf(t,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,o){return t.__proto__=o,t},_setPrototypeOf(t,o)}var l="Select...",c=function(t){function Dropdown(t){var o;return function _classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Dropdown),(o=function _possibleConstructorReturn(t,o){return!o||"object"!==_typeof(o)&&"function"!=typeof o?_assertThisInitialized(t):o}(this,_getPrototypeOf(Dropdown).call(this,t))).state={selected:o.parseValue(t.value,t.options)||{label:void 0===t.placeholder?l:t.placeholder,value:""},isOpen:!1},o.dropdownRef=(0,r.createRef)(),o.mounted=!0,o.handleDocumentClick=o.handleDocumentClick.bind(_assertThisInitialized(o)),o.fireChangeEvent=o.fireChangeEvent.bind(_assertThisInitialized(o)),o}return function _inherits(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&_setPrototypeOf(t,o)}(Dropdown,t),function _createClass(t,o,i){return o&&_defineProperties(t.prototype,o),i&&_defineProperties(t,i),t}(Dropdown,[{key:"componentDidUpdate",value:function componentDidUpdate(t){if(this.props.value!==t.value)if(this.props.value){var o=this.parseValue(this.props.value,this.props.options);o!==this.state.selected&&this.setState({selected:o})}else this.setState({selected:{label:void 0===this.props.placeholder?l:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function componentDidMount(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function handleMouseDown(t){this.props.onFocus&&"function"==typeof this.props.onFocus&&this.props.onFocus(this.state.isOpen),"mousedown"===t.type&&0!==t.button||(t.stopPropagation(),t.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function parseValue(t,o){var i;if("string"==typeof t)for(var r=0,a=o.length;r<a;r++)if("group"===o[r].type){var l=o[r].items.filter((function(o){return o.value===t}));l.length&&(i=l[0])}else void 0!==o[r].value&&o[r].value===t&&(i=o[r]);return i||t}},{key:"setValue",value:function setValue(t,o){var i={selected:{value:t,label:o},isOpen:!1};this.fireChangeEvent(i),this.setState(i)}},{key:"fireChangeEvent",value:function fireChangeEvent(t){t.selected!==this.state.selected&&this.props.onChange&&this.props.onChange(t.selected)}},{key:"renderOption",value:function renderOption(t){var o,i=t.value;void 0===i&&(i=t.label||t);var l=t.label||t.value||t,c=i===this.state.selected.value||i===this.state.selected,u=(_defineProperty(o={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(o,t.className,!!t.className),_defineProperty(o,"is-selected",c),o),d=(0,a.default)(u),p=Object.keys(t.data||{}).reduce((function(o,i){return function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(i,!0).forEach((function(o){_defineProperty(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(i).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}({},o,_defineProperty({},"data-".concat(i),t.data[i]))}),{});return r.default.createElement("div",_extends({key:i,className:d,onMouseDown:this.setValue.bind(this,i,l),onClick:this.setValue.bind(this,i,l),role:"option","aria-selected":c?"true":"false"},p),l)}},{key:"buildMenu",value:function buildMenu(){var t=this,o=this.props,i=o.options,a=o.baseClassName,l=i.map((function(o){if("group"===o.type){var i=r.default.createElement("div",{className:"".concat(a,"-title")},o.name),l=o.items.map((function(o){return t.renderOption(o)}));return r.default.createElement("div",{className:"".concat(a,"-group"),key:o.name,role:"listbox",tabIndex:"-1"},i,l)}return t.renderOption(o)}));return l.length?l:r.default.createElement("div",{className:"".concat(a,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function handleDocumentClick(t){this.mounted&&(this.dropdownRef.current.contains(t.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function isValueSelected(){return"string"==typeof this.state.selected||""!==this.state.selected.value}},{key:"render",value:function render(){var t,o,i,l,c,u=this.props,d=u.baseClassName,p=u.controlClassName,f=u.placeholderClassName,y=u.menuClassName,v=u.arrowClassName,m=u.arrowClosed,b=u.arrowOpen,g=u.className,w=this.props.disabled?"Dropdown-disabled":"",k="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,O=(0,a.default)((_defineProperty(t={},"".concat(d,"-root"),!0),_defineProperty(t,g,!!g),_defineProperty(t,"is-open",this.state.isOpen),t)),_=(0,a.default)((_defineProperty(o={},"".concat(d,"-control"),!0),_defineProperty(o,p,!!p),_defineProperty(o,w,!!w),o)),C=(0,a.default)((_defineProperty(i={},"".concat(d,"-placeholder"),!0),_defineProperty(i,f,!!f),_defineProperty(i,"is-selected",this.isValueSelected()),i)),P=(0,a.default)((_defineProperty(l={},"".concat(d,"-menu"),!0),_defineProperty(l,y,!!y),l)),D=(0,a.default)((_defineProperty(c={},"".concat(d,"-arrow"),!0),_defineProperty(c,v,!!v),c)),x=r.default.createElement("div",{className:C},k),S=this.state.isOpen?r.default.createElement("div",{className:P,"aria-expanded":"true"},this.buildMenu()):null;return r.default.createElement("div",{ref:this.dropdownRef,className:O},r.default.createElement("div",{className:_,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},x,r.default.createElement("div",{className:"".concat(d,"-arrow-wrapper")},b&&m?this.state.isOpen?b:m:r.default.createElement("span",{className:D}))),S)}}]),Dropdown}(r.Component);c.defaultProps={baseClassName:"Dropdown"};var u=c;o.Z=u},32142:(t,o,i)=>{i.r(o),i.d(o,{default:()=>P});var r=i(65515),a=i.n(r),l=(i(87363),i(68692)),c=i(93379),u=i.n(c),d=i(7795),p=i.n(d),f=i(90569),y=i.n(f),v=i(3565),m=i.n(v),b=i(19216),g=i.n(b),w=i(44589),k=i.n(w),O=i(75581),_={};_.styleTagTransform=k(),_.setAttributes=m(),_.insert=y().bind(null,"head"),_.domAPI=p(),_.insertStyleElement=g();u()(O.ZP,_);O.ZP&&O.ZP.locals&&O.ZP.locals;var C=i(47514);const P=function Toggle(t){var o,i=t.onChange,r=t.val,c=t.state,u=t.on,d=t.off,p=t.alwaysActiveColor,f=t.height,y=void 0===f?40:f,v=t.width,m=void 0===v?80:v,b=t.handleDiameter,g=void 0===b?32:b,w=null===(o=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===o?void 0:o.replace(/ /g,"");return(0,C.jsx)(l.Z,{checkedIcon:u?(0,C.jsx)("div",{className:a()(O.f6,O.co),children:u}):(0,C.jsx)(C.Fragment,{}),uncheckedIcon:d?(0,C.jsx)("div",{className:a()(O.f6,O.no),children:d}):(0,C.jsx)(C.Fragment,{}),onChange:function onChange(){return i(null!=r?r:!c)},checked:c,onColor:w,offColor:p?w:"#CACACA",height:y,width:m,handleDiameter:g})}},75581:(t,o,i)=>{i.d(o,{ZP:()=>f,co:()=>d,f6:()=>u,no:()=>p});var r=i(8081),a=i.n(r),l=i(23645),c=i.n(l)()(a());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--ciLne {\n padding-left: 16px;\n}\n\n.index-module--W1TLd {\n padding-left: 4px;\n}\n",""]);var u="index-module--D7_Ss",d="index-module--ciLne",p="index-module--W1TLd";const f=c},68692:(t,o,i)=>{i.d(o,{Z:()=>c});var r=i(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},s.apply(this,arguments)}var a=r.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},r.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=r.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},r.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var o="#",i=1;i<4;i+=1)o+=t[i]+t[i];return o}function e(t,o,i,r,a){return function(t,o,i,r,a){var l=(t-i)/(o-i);if(0===l)return r;if(1===l)return a;for(var c="#",u=1;u<6;u+=2){var d=parseInt(r.substr(u,2),16),p=parseInt(a.substr(u,2),16),f=Math.round((1-l)*d+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,o,i,h(r),h(a))}var c=function(t){function n(o){t.call(this,o);var i=o.height,r=o.width,a=o.checked;this.t=o.handleDiameter||i-2,this.i=Math.max(r-i,r-(i+this.t)/2),this.o=Math.max(0,(i-this.t)/2),this.state={h:a?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.g=this.g.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.W=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.W=!1},n.prototype.I=function(t){this.H.focus(),this.setState({R:t,j:!0,B:Date.now()})},n.prototype.L=function(t){var o=this.state,i=o.R,r=o.h,a=(this.props.checked?this.i:this.o)+t-i;o.N||t===i||this.setState({N:!0});var l=Math.min(this.i,Math.max(this.o,a));l!==r&&this.setState({h:l})},n.prototype.U=function(t){var o=this.state,i=o.h,r=o.N,a=o.B,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var u=Date.now()-a;(!r||u<250||l&&i<=c||!l&&i>=c)&&this.A(t),this.W&&this.setState({N:!1,j:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.I(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.g))},n.prototype.v=function(t){t.preventDefault(),this.L(t.clientX)},n.prototype.g=function(t){this.U(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.g)},n.prototype.k=function(t){this.X=null,this.I(t.touches[0].clientX)},n.prototype.m=function(t){this.L(t.touches[0].clientX)},n.prototype.M=function(t){t.preventDefault(),this.U(t)},n.prototype.$=function(t){Date.now()-this.l>50&&(this.A(t),Date.now()-this.u>50&&this.W&&this.setState({j:!1}))},n.prototype.C=function(){this.u=Date.now()},n.prototype.D=function(){this.setState({j:!0})},n.prototype.O=function(){this.setState({j:!1})},n.prototype.S=function(t){this.H=t},n.prototype.T=function(t){t.preventDefault(),this.H.focus(),this.A(t),this.W&&this.setState({j:!1})},n.prototype.A=function(t){var o=this.props;(0,o.onChange)(!o.checked,t,o.id)},n.prototype.render=function(){var t=this.props,o=t.checked,i=t.disabled,a=t.className,l=t.offColor,c=t.onColor,u=t.offHandleColor,d=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,y=t.checkedHandleIcon,v=t.uncheckedHandleIcon,m=t.boxShadow,b=t.activeBoxShadow,g=t.height,w=t.width,k=t.borderRadius,O=function(t,o){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===o.indexOf(r)&&(i[r]=t[r]);return i}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),_=this.state,C=_.h,P=_.N,D=_.j,x={position:"relative",display:"inline-block",textAlign:"left",opacity:i?.5:1,direction:"ltr",borderRadius:g/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},S={height:g,width:w,margin:Math.max(0,(this.t-g)/2),position:"relative",background:e(C,this.i,this.o,l,c),borderRadius:"number"==typeof k?k:g/2,cursor:i?"default":"pointer",WebkitTransition:P?null:"background 0.25s",MozTransition:P?null:"background 0.25s",transition:P?null:"background 0.25s"},E={height:g,width:Math.min(1.5*g,w-(this.t+g)/2+1),position:"relative",opacity:(C-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},j={height:g,width:Math.min(1.5*g,w-(this.t+g)/2+1),position:"absolute",opacity:1-(C-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},M={height:this.t,width:this.t,background:e(C,this.i,this.o,u,d),display:"inline-block",cursor:i?"default":"pointer",borderRadius:"number"==typeof k?k-1:"50%",position:"absolute",transform:"translateX("+C+"px)",top:Math.max(0,(g-this.t)/2),outline:0,boxShadow:D?b:m,border:0,WebkitTransition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},T={height:this.t,width:this.t,opacity:Math.max(2*(1-(C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},N={height:this.t,width:this.t,opacity:Math.max(2*((C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"};return r.createElement("div",{className:a,style:x},r.createElement("div",{className:"react-switch-bg",style:S,onClick:i?null:this.T,onMouseDown:function(t){return t.preventDefault()}},p&&r.createElement("div",{style:E},p),f&&r.createElement("div",{style:j},f)),r.createElement("div",{className:"react-switch-handle",style:M,onClick:function(t){return t.preventDefault()},onMouseDown:i?null:this.p,onTouchStart:i?null:this.k,onTouchMove:i?null:this.m,onTouchEnd:i?null:this.M,onTouchCancel:i?null:this.O},v&&r.createElement("div",{style:T},v),y&&r.createElement("div",{style:N},y)),r.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":o,checked:o,disabled:i,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},O,{ref:this.S,onFocus:this.D,onBlur:this.O,onKeyUp:this.C,onChange:this.$})))},n}(r.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[1707,2142,8692,430],{10304:(t,o,i)=>{o.Z=void 0;var r=function _interopRequireWildcard(t){if(t&&t.__esModule)return t;if(null===t||"object"!==_typeof(t)&&"function"!=typeof t)return{default:t};var o=_getRequireWildcardCache();if(o&&o.has(t))return o.get(t);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var l=r?Object.getOwnPropertyDescriptor(t,a):null;l&&(l.get||l.set)?Object.defineProperty(i,a,l):i[a]=t[a]}i.default=t,o&&o.set(t,i);return i}(i(87363)),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(65515));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return t},t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _extends(){return _extends=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},_extends.apply(this,arguments)}function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _defineProperty(t,o,i){return o in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}function _defineProperties(t,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _setPrototypeOf(t,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,o){return t.__proto__=o,t},_setPrototypeOf(t,o)}var l="Select...",c=function(t){function Dropdown(t){var o;return function _classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Dropdown),(o=function _possibleConstructorReturn(t,o){return!o||"object"!==_typeof(o)&&"function"!=typeof o?_assertThisInitialized(t):o}(this,_getPrototypeOf(Dropdown).call(this,t))).state={selected:o.parseValue(t.value,t.options)||{label:void 0===t.placeholder?l:t.placeholder,value:""},isOpen:!1},o.dropdownRef=(0,r.createRef)(),o.mounted=!0,o.handleDocumentClick=o.handleDocumentClick.bind(_assertThisInitialized(o)),o.fireChangeEvent=o.fireChangeEvent.bind(_assertThisInitialized(o)),o}return function _inherits(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&_setPrototypeOf(t,o)}(Dropdown,t),function _createClass(t,o,i){return o&&_defineProperties(t.prototype,o),i&&_defineProperties(t,i),t}(Dropdown,[{key:"componentDidUpdate",value:function componentDidUpdate(t){if(this.props.value!==t.value)if(this.props.value){var o=this.parseValue(this.props.value,this.props.options);o!==this.state.selected&&this.setState({selected:o})}else this.setState({selected:{label:void 0===this.props.placeholder?l:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function componentDidMount(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function handleMouseDown(t){this.props.onFocus&&"function"==typeof this.props.onFocus&&this.props.onFocus(this.state.isOpen),"mousedown"===t.type&&0!==t.button||(t.stopPropagation(),t.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function parseValue(t,o){var i;if("string"==typeof t)for(var r=0,a=o.length;r<a;r++)if("group"===o[r].type){var l=o[r].items.filter((function(o){return o.value===t}));l.length&&(i=l[0])}else void 0!==o[r].value&&o[r].value===t&&(i=o[r]);return i||t}},{key:"setValue",value:function setValue(t,o){var i={selected:{value:t,label:o},isOpen:!1};this.fireChangeEvent(i),this.setState(i)}},{key:"fireChangeEvent",value:function fireChangeEvent(t){t.selected!==this.state.selected&&this.props.onChange&&this.props.onChange(t.selected)}},{key:"renderOption",value:function renderOption(t){var o,i=t.value;void 0===i&&(i=t.label||t);var l=t.label||t.value||t,c=i===this.state.selected.value||i===this.state.selected,u=(_defineProperty(o={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(o,t.className,!!t.className),_defineProperty(o,"is-selected",c),o),d=(0,a.default)(u),p=Object.keys(t.data||{}).reduce((function(o,i){return function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(i,!0).forEach((function(o){_defineProperty(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(i).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}({},o,_defineProperty({},"data-".concat(i),t.data[i]))}),{});return r.default.createElement("div",_extends({key:i,className:d,onMouseDown:this.setValue.bind(this,i,l),onClick:this.setValue.bind(this,i,l),role:"option","aria-selected":c?"true":"false"},p),l)}},{key:"buildMenu",value:function buildMenu(){var t=this,o=this.props,i=o.options,a=o.baseClassName,l=i.map((function(o){if("group"===o.type){var i=r.default.createElement("div",{className:"".concat(a,"-title")},o.name),l=o.items.map((function(o){return t.renderOption(o)}));return r.default.createElement("div",{className:"".concat(a,"-group"),key:o.name,role:"listbox",tabIndex:"-1"},i,l)}return t.renderOption(o)}));return l.length?l:r.default.createElement("div",{className:"".concat(a,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function handleDocumentClick(t){this.mounted&&(this.dropdownRef.current.contains(t.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function isValueSelected(){return"string"==typeof this.state.selected||""!==this.state.selected.value}},{key:"render",value:function render(){var t,o,i,l,c,u=this.props,d=u.baseClassName,p=u.controlClassName,f=u.placeholderClassName,y=u.menuClassName,v=u.arrowClassName,m=u.arrowClosed,b=u.arrowOpen,g=u.className,w=this.props.disabled?"Dropdown-disabled":"",k="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,_=(0,a.default)((_defineProperty(t={},"".concat(d,"-root"),!0),_defineProperty(t,g,!!g),_defineProperty(t,"is-open",this.state.isOpen),t)),O=(0,a.default)((_defineProperty(o={},"".concat(d,"-control"),!0),_defineProperty(o,p,!!p),_defineProperty(o,w,!!w),o)),C=(0,a.default)((_defineProperty(i={},"".concat(d,"-placeholder"),!0),_defineProperty(i,f,!!f),_defineProperty(i,"is-selected",this.isValueSelected()),i)),P=(0,a.default)((_defineProperty(l={},"".concat(d,"-menu"),!0),_defineProperty(l,y,!!y),l)),D=(0,a.default)((_defineProperty(c={},"".concat(d,"-arrow"),!0),_defineProperty(c,v,!!v),c)),x=r.default.createElement("div",{className:C},k),S=this.state.isOpen?r.default.createElement("div",{className:P,"aria-expanded":"true"},this.buildMenu()):null;return r.default.createElement("div",{ref:this.dropdownRef,className:_},r.default.createElement("div",{className:O,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},x,r.default.createElement("div",{className:"".concat(d,"-arrow-wrapper")},b&&m?this.state.isOpen?b:m:r.default.createElement("span",{className:D}))),S)}}]),Dropdown}(r.Component);c.defaultProps={baseClassName:"Dropdown"};var u=c;o.Z=u},32142:(t,o,i)=>{i.r(o),i.d(o,{default:()=>P});var r=i(65515),a=i.n(r),l=(i(87363),i(68692)),c=i(93379),u=i.n(c),d=i(7795),p=i.n(d),f=i(90569),y=i.n(f),v=i(3565),m=i.n(v),b=i(19216),g=i.n(b),w=i(44589),k=i.n(w),_=i(75581),O={};O.styleTagTransform=k(),O.setAttributes=m(),O.insert=y().bind(null,"head"),O.domAPI=p(),O.insertStyleElement=g();u()(_.ZP,O);_.ZP&&_.ZP.locals&&_.ZP.locals;var C=i(47514);const P=function Toggle(t){var o,i=t.onChange,r=t.val,c=t.state,u=t.on,d=t.off,p=t.alwaysActiveColor,f=t.height,y=void 0===f?40:f,v=t.width,m=void 0===v?80:v,b=t.handleDiameter,g=void 0===b?32:b,w=null===(o=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===o?void 0:o.replace(/ /g,"");return(0,C.jsx)(l.Z,{checkedIcon:u?(0,C.jsx)("div",{className:a()(_.f6,_.co),children:u}):(0,C.jsx)(C.Fragment,{}),uncheckedIcon:d?(0,C.jsx)("div",{className:a()(_.f6,_.no),children:d}):(0,C.jsx)(C.Fragment,{}),onChange:function onChange(){return i(null!=r?r:!c)},checked:c,onColor:w,offColor:p?w:"#CACACA",height:y,width:m,handleDiameter:g})}},75581:(t,o,i)=>{i.d(o,{ZP:()=>f,co:()=>d,f6:()=>u,no:()=>p});var r=i(8081),a=i.n(r),l=i(23645),c=i.n(l)()(a());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--ciLne {\n padding-left: 16px;\n}\n\n.index-module--W1TLd {\n padding-left: 4px;\n}\n",""]);var u="index-module--D7_Ss",d="index-module--ciLne",p="index-module--W1TLd";const f=c},68692:(t,o,i)=>{i.d(o,{Z:()=>c});var r=i(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},s.apply(this,arguments)}var a=r.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},r.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=r.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},r.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var o="#",i=1;i<4;i+=1)o+=t[i]+t[i];return o}function e(t,o,i,r,a){return function(t,o,i,r,a){var l=(t-i)/(o-i);if(0===l)return r;if(1===l)return a;for(var c="#",u=1;u<6;u+=2){var d=parseInt(r.substr(u,2),16),p=parseInt(a.substr(u,2),16),f=Math.round((1-l)*d+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,o,i,h(r),h(a))}var c=function(t){function n(o){t.call(this,o);var i=o.height,r=o.width,a=o.checked;this.t=o.handleDiameter||i-2,this.i=Math.max(r-i,r-(i+this.t)/2),this.o=Math.max(0,(i-this.t)/2),this.state={h:a?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var o=this.state,i=o.j,r=o.h,a=(this.props.checked?this.i:this.o)+t-i;o.U||t===i||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,a));l!==r&&this.setState({h:l})},n.prototype.A=function(t){var o=this.state,i=o.h,r=o.U,a=o.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var u=Date.now()-a;(!r||u<250||l&&i<=c||!l&&i>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var o=this.props;(0,o.onChange)(!o.checked,t,o.id)},n.prototype.render=function(){var t=this.props,o=t.checked,i=t.disabled,a=t.className,l=t.offColor,c=t.onColor,u=t.offHandleColor,d=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,y=t.checkedHandleIcon,v=t.uncheckedHandleIcon,m=t.boxShadow,b=t.activeBoxShadow,g=t.height,w=t.width,k=t.borderRadius,_=function(t,o){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===o.indexOf(r)&&(i[r]=t[r]);return i}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),O=this.state,C=O.h,P=O.U,D=O.B,x={position:"relative",display:"inline-block",textAlign:"left",opacity:i?.5:1,direction:"ltr",borderRadius:g/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},S={height:g,width:w,margin:Math.max(0,(this.t-g)/2),position:"relative",background:e(C,this.i,this.o,l,c),borderRadius:"number"==typeof k?k:g/2,cursor:i?"default":"pointer",WebkitTransition:P?null:"background 0.25s",MozTransition:P?null:"background 0.25s",transition:P?null:"background 0.25s"},E={height:g,width:Math.min(1.5*g,w-(this.t+g)/2+1),position:"relative",opacity:(C-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},M={height:g,width:Math.min(1.5*g,w-(this.t+g)/2+1),position:"absolute",opacity:1-(C-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},j={height:this.t,width:this.t,background:e(C,this.i,this.o,u,d),display:"inline-block",cursor:i?"default":"pointer",borderRadius:"number"==typeof k?k-1:"50%",position:"absolute",transform:"translateX("+C+"px)",top:Math.max(0,(g-this.t)/2),outline:0,boxShadow:D?b:m,border:0,WebkitTransition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},T={height:this.t,width:this.t,opacity:Math.max(2*(1-(C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},N={height:this.t,width:this.t,opacity:Math.max(2*((C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"};return r.createElement("div",{className:a,style:x},r.createElement("div",{className:"react-switch-bg",style:S,onClick:i?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&r.createElement("div",{style:E},p),f&&r.createElement("div",{style:M},f)),r.createElement("div",{className:"react-switch-handle",style:j,onClick:function(t){return t.preventDefault()},onMouseDown:i?null:this.p,onTouchStart:i?null:this.m,onTouchMove:i?null:this.M,onTouchEnd:i?null:this.T,onTouchCancel:i?null:this.S},v&&r.createElement("div",{style:T},v),y&&r.createElement("div",{style:N},y)),r.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":o,checked:o,disabled:i,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},_,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(r.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 2142.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[2142,8692,430],{32142:(t,i,o)=>{o.r(i),o.d(i,{default:()=>M});var a=o(65515),r=o.n(a),l=(o(87363),o(68692)),c=o(93379),d=o.n(c),u=o(7795),p=o.n(u),f=o(90569),b=o.n(f),v=o(3565),m=o.n(v),y=o(19216),g=o.n(y),k=o(44589),w=o.n(k),x=o(75581),C={};C.styleTagTransform=w(),C.setAttributes=m(),C.insert=b().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=g();d()(x.ZP,C);x.ZP&&x.ZP.locals&&x.ZP.locals;var S=o(47514);const M=function Toggle(t){var i,o=t.onChange,a=t.val,c=t.state,d=t.on,u=t.off,p=t.alwaysActiveColor,f=t.height,b=void 0===f?40:f,v=t.width,m=void 0===v?80:v,y=t.handleDiameter,g=void 0===y?32:y,k=null===(i=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===i?void 0:i.replace(/ /g,"");return(0,S.jsx)(l.Z,{checkedIcon:d?(0,S.jsx)("div",{className:r()(x.f6,x.co),children:d}):(0,S.jsx)(S.Fragment,{}),uncheckedIcon:u?(0,S.jsx)("div",{className:r()(x.f6,x.no),children:u}):(0,S.jsx)(S.Fragment,{}),onChange:function onChange(){return o(null!=a?a:!c)},checked:c,onColor:k,offColor:p?k:"#CACACA",height:b,width:m,handleDiameter:g})}},75581:(t,i,o)=>{o.d(i,{ZP:()=>f,co:()=>u,f6:()=>d,no:()=>p});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--ciLne {\n padding-left: 16px;\n}\n\n.index-module--W1TLd {\n padding-left: 4px;\n}\n",""]);var d="index-module--D7_Ss",u="index-module--ciLne",p="index-module--W1TLd";const f=c},68692:(t,i,o)=>{o.d(i,{Z:()=>c});var a=o(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},s.apply(this,arguments)}var r=a.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},a.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=a.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},a.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var i="#",o=1;o<4;o+=1)i+=t[o]+t[o];return i}function e(t,i,o,a,r){return function(t,i,o,a,r){var l=(t-o)/(i-o);if(0===l)return a;if(1===l)return r;for(var c="#",d=1;d<6;d+=2){var u=parseInt(a.substr(d,2),16),p=parseInt(r.substr(d,2),16),f=Math.round((1-l)*u+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,i,o,h(a),h(r))}var c=function(t){function n(i){t.call(this,i);var o=i.height,a=i.width,r=i.checked;this.t=i.handleDiameter||o-2,this.i=Math.max(a-o,a-(o+this.t)/2),this.o=Math.max(0,(o-this.t)/2),this.state={h:r?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[2142,8692,430],{32142:(t,i,o)=>{o.r(i),o.d(i,{default:()=>M});var a=o(65515),r=o.n(a),l=(o(87363),o(68692)),c=o(93379),d=o.n(c),u=o(7795),p=o.n(u),f=o(90569),b=o.n(f),v=o(3565),m=o.n(v),y=o(19216),g=o.n(y),k=o(44589),w=o.n(k),x=o(75581),C={};C.styleTagTransform=w(),C.setAttributes=m(),C.insert=b().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=g();d()(x.ZP,C);x.ZP&&x.ZP.locals&&x.ZP.locals;var S=o(47514);const M=function Toggle(t){var i,o=t.onChange,a=t.val,c=t.state,d=t.on,u=t.off,p=t.alwaysActiveColor,f=t.height,b=void 0===f?40:f,v=t.width,m=void 0===v?80:v,y=t.handleDiameter,g=void 0===y?32:y,k=null===(i=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===i?void 0:i.replace(/ /g,"");return(0,S.jsx)(l.Z,{checkedIcon:d?(0,S.jsx)("div",{className:r()(x.f6,x.co),children:d}):(0,S.jsx)(S.Fragment,{}),uncheckedIcon:u?(0,S.jsx)("div",{className:r()(x.f6,x.no),children:u}):(0,S.jsx)(S.Fragment,{}),onChange:function onChange(){return o(null!=a?a:!c)},checked:c,onColor:k,offColor:p?k:"#CACACA",height:b,width:m,handleDiameter:g})}},75581:(t,i,o)=>{o.d(i,{ZP:()=>f,co:()=>u,f6:()=>d,no:()=>p});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--ciLne {\n padding-left: 16px;\n}\n\n.index-module--W1TLd {\n padding-left: 4px;\n}\n",""]);var d="index-module--D7_Ss",u="index-module--ciLne",p="index-module--W1TLd";const f=c},68692:(t,i,o)=>{o.d(i,{Z:()=>c});var a=o(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},s.apply(this,arguments)}var r=a.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},a.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=a.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},a.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var i="#",o=1;o<4;o+=1)i+=t[o]+t[o];return i}function e(t,i,o,a,r){return function(t,i,o,a,r){var l=(t-o)/(i-o);if(0===l)return a;if(1===l)return r;for(var c="#",d=1;d<6;d+=2){var u=parseInt(a.substr(d,2),16),p=parseInt(r.substr(d,2),16),f=Math.round((1-l)*u+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,i,o,h(a),h(r))}var c=function(t){function n(i){t.call(this,i);var o=i.height,a=i.width,r=i.checked;this.t=i.handleDiameter||o-2,this.i=Math.max(a-o,a-(o+this.t)/2),this.o=Math.max(0,(o-this.t)/2),this.state={h:r?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var i=this.state,o=i.j,a=i.h,r=(this.props.checked?this.i:this.o)+t-o;i.U||t===o||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,r));l!==a&&this.setState({h:l})},n.prototype.A=function(t){var i=this.state,o=i.h,a=i.U,r=i.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var d=Date.now()-r;(!a||d<250||l&&o<=c||!l&&o>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var i=this.props;(0,i.onChange)(!i.checked,t,i.id)},n.prototype.render=function(){var t=this.props,i=t.checked,o=t.disabled,r=t.className,l=t.offColor,c=t.onColor,d=t.offHandleColor,u=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,b=t.checkedHandleIcon,v=t.uncheckedHandleIcon,m=t.boxShadow,y=t.activeBoxShadow,g=t.height,k=t.width,w=t.borderRadius,x=function(t,i){var o={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&-1===i.indexOf(a)&&(o[a]=t[a]);return o}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),C=this.state,S=C.h,M=C.U,D=C.B,T={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:g/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},E={height:g,width:k,margin:Math.max(0,(this.t-g)/2),position:"relative",background:e(S,this.i,this.o,l,c),borderRadius:"number"==typeof w?w:g/2,cursor:o?"default":"pointer",WebkitTransition:M?null:"background 0.25s",MozTransition:M?null:"background 0.25s",transition:M?null:"background 0.25s"},I={height:g,width:Math.min(1.5*g,k-(this.t+g)/2+1),position:"relative",opacity:(S-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:M?null:"opacity 0.25s",MozTransition:M?null:"opacity 0.25s",transition:M?null:"opacity 0.25s"},W={height:g,width:Math.min(1.5*g,k-(this.t+g)/2+1),position:"absolute",opacity:1-(S-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:M?null:"opacity 0.25s",MozTransition:M?null:"opacity 0.25s",transition:M?null:"opacity 0.25s"},H={height:this.t,width:this.t,background:e(S,this.i,this.o,d,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:"number"==typeof w?w-1:"50%",position:"absolute",transform:"translateX("+S+"px)",top:Math.max(0,(g-this.t)/2),outline:0,boxShadow:D?y:m,border:0,WebkitTransition:M?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:M?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:M?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},L={height:this.t,width:this.t,opacity:Math.max(2*(1-(S-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:M?null:"opacity 0.25s",MozTransition:M?null:"opacity 0.25s",transition:M?null:"opacity 0.25s"},B={height:this.t,width:this.t,opacity:Math.max(2*((S-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:M?null:"opacity 0.25s",MozTransition:M?null:"opacity 0.25s",transition:M?null:"opacity 0.25s"};return a.createElement("div",{className:r,style:T},a.createElement("div",{className:"react-switch-bg",style:E,onClick:o?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&a.createElement("div",{style:I},p),f&&a.createElement("div",{style:W},f)),a.createElement("div",{className:"react-switch-handle",style:H,onClick:function(t){return t.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.m,onTouchMove:o?null:this.M,onTouchEnd:o?null:this.T,onTouchCancel:o?null:this.S},v&&a.createElement("div",{style:L},v),b&&a.createElement("div",{style:B},b)),a.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":i,checked:i,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},x,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(a.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:r,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 2208.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[2208,9523,2142,1707,5983,5301,8692,430,8291,8488],{10304:(t,o,i)=>{o.Z=void 0;var r=function _interopRequireWildcard(t){if(t&&t.__esModule)return t;if(null===t||"object"!==_typeof(t)&&"function"!=typeof t)return{default:t};var o=_getRequireWildcardCache();if(o&&o.has(t))return o.get(t);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var l=r?Object.getOwnPropertyDescriptor(t,a):null;l&&(l.get||l.set)?Object.defineProperty(i,a,l):i[a]=t[a]}i.default=t,o&&o.set(t,i);return i}(i(87363)),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(65515));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return t},t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _extends(){return _extends=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},_extends.apply(this,arguments)}function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _defineProperty(t,o,i){return o in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}function _defineProperties(t,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _setPrototypeOf(t,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,o){return t.__proto__=o,t},_setPrototypeOf(t,o)}var l="Select...",c=function(t){function Dropdown(t){var o;return function _classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Dropdown),(o=function _possibleConstructorReturn(t,o){return!o||"object"!==_typeof(o)&&"function"!=typeof o?_assertThisInitialized(t):o}(this,_getPrototypeOf(Dropdown).call(this,t))).state={selected:o.parseValue(t.value,t.options)||{label:void 0===t.placeholder?l:t.placeholder,value:""},isOpen:!1},o.dropdownRef=(0,r.createRef)(),o.mounted=!0,o.handleDocumentClick=o.handleDocumentClick.bind(_assertThisInitialized(o)),o.fireChangeEvent=o.fireChangeEvent.bind(_assertThisInitialized(o)),o}return function _inherits(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&_setPrototypeOf(t,o)}(Dropdown,t),function _createClass(t,o,i){return o&&_defineProperties(t.prototype,o),i&&_defineProperties(t,i),t}(Dropdown,[{key:"componentDidUpdate",value:function componentDidUpdate(t){if(this.props.value!==t.value)if(this.props.value){var o=this.parseValue(this.props.value,this.props.options);o!==this.state.selected&&this.setState({selected:o})}else this.setState({selected:{label:void 0===this.props.placeholder?l:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function componentDidMount(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function handleMouseDown(t){this.props.onFocus&&"function"==typeof this.props.onFocus&&this.props.onFocus(this.state.isOpen),"mousedown"===t.type&&0!==t.button||(t.stopPropagation(),t.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function parseValue(t,o){var i;if("string"==typeof t)for(var r=0,a=o.length;r<a;r++)if("group"===o[r].type){var l=o[r].items.filter((function(o){return o.value===t}));l.length&&(i=l[0])}else void 0!==o[r].value&&o[r].value===t&&(i=o[r]);return i||t}},{key:"setValue",value:function setValue(t,o){var i={selected:{value:t,label:o},isOpen:!1};this.fireChangeEvent(i),this.setState(i)}},{key:"fireChangeEvent",value:function fireChangeEvent(t){t.selected!==this.state.selected&&this.props.onChange&&this.props.onChange(t.selected)}},{key:"renderOption",value:function renderOption(t){var o,i=t.value;void 0===i&&(i=t.label||t);var l=t.label||t.value||t,c=i===this.state.selected.value||i===this.state.selected,u=(_defineProperty(o={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(o,t.className,!!t.className),_defineProperty(o,"is-selected",c),o),d=(0,a.default)(u),p=Object.keys(t.data||{}).reduce((function(o,i){return function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(i,!0).forEach((function(o){_defineProperty(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(i).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}({},o,_defineProperty({},"data-".concat(i),t.data[i]))}),{});return r.default.createElement("div",_extends({key:i,className:d,onMouseDown:this.setValue.bind(this,i,l),onClick:this.setValue.bind(this,i,l),role:"option","aria-selected":c?"true":"false"},p),l)}},{key:"buildMenu",value:function buildMenu(){var t=this,o=this.props,i=o.options,a=o.baseClassName,l=i.map((function(o){if("group"===o.type){var i=r.default.createElement("div",{className:"".concat(a,"-title")},o.name),l=o.items.map((function(o){return t.renderOption(o)}));return r.default.createElement("div",{className:"".concat(a,"-group"),key:o.name,role:"listbox",tabIndex:"-1"},i,l)}return t.renderOption(o)}));return l.length?l:r.default.createElement("div",{className:"".concat(a,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function handleDocumentClick(t){this.mounted&&(this.dropdownRef.current.contains(t.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function isValueSelected(){return"string"==typeof this.state.selected||""!==this.state.selected.value}},{key:"render",value:function render(){var t,o,i,l,c,u=this.props,d=u.baseClassName,p=u.controlClassName,f=u.placeholderClassName,g=u.menuClassName,m=u.arrowClassName,y=u.arrowClosed,v=u.arrowOpen,b=u.className,N=this.props.disabled?"Dropdown-disabled":"",D="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,w=(0,a.default)((_defineProperty(t={},"".concat(d,"-root"),!0),_defineProperty(t,b,!!b),_defineProperty(t,"is-open",this.state.isOpen),t)),M=(0,a.default)((_defineProperty(o={},"".concat(d,"-control"),!0),_defineProperty(o,p,!!p),_defineProperty(o,N,!!N),o)),x=(0,a.default)((_defineProperty(i={},"".concat(d,"-placeholder"),!0),_defineProperty(i,f,!!f),_defineProperty(i,"is-selected",this.isValueSelected()),i)),j=(0,a.default)((_defineProperty(l={},"".concat(d,"-menu"),!0),_defineProperty(l,g,!!g),l)),k=(0,a.default)((_defineProperty(c={},"".concat(d,"-arrow"),!0),_defineProperty(c,m,!!m),c)),C=r.default.createElement("div",{className:x},D),O=this.state.isOpen?r.default.createElement("div",{className:j,"aria-expanded":"true"},this.buildMenu()):null;return r.default.createElement("div",{ref:this.dropdownRef,className:w},r.default.createElement("div",{className:M,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},C,r.default.createElement("div",{className:"".concat(d,"-arrow-wrapper")},v&&y?this.state.isOpen?v:y:r.default.createElement("span",{className:k}))),O)}}]),Dropdown}(r.Component);c.defaultProps={baseClassName:"Dropdown"};var u=c;o.Z=u},77452:(t,o,i)=>{i.r(o),i.d(o,{default:()=>C});var r=i(87363),a=i(93379),l=i.n(a),c=i(7795),u=i.n(c),d=i(90569),p=i.n(d),f=i(3565),g=i.n(f),m=i(19216),y=i.n(m),v=i(44589),b=i.n(v),N=i(59318),D={};D.styleTagTransform=b(),D.setAttributes=g(),D.insert=p().bind(null,"head"),D.domAPI=u(),D.insertStyleElement=y();l()(N.ZP,D);N.ZP&&N.ZP.locals&&N.ZP.locals;var w=i(91923),M=i(9420),x=i(89603),j=i(88683),k=i(47514);const C=(0,M.Pi)((function Toolbar(t){var o,i,a=(0,w.NP)(),l=(0,j.useDivaCore)().state.organization.settings.wwsClient,c=function changeVal(t){var o=t===a.uiState.activeCatalogSection?"3D/2D":t;localStorage.setItem("lastWindow",o),a.uiState.setActiveCatalogSection(o)},u=!!Object.values(null!==(o=null===(i=a.divaWebPlanner.actSet())||void 0===i?void 0:i.CatalogData.allCatalogArticles)&&void 0!==o?o:{}).find((function(t){return t.partlistArticlesRules}));return(0,r.useEffect)((function(){("Pfister"!=l&&"ekText"==a.uiState.activeCatalogSection||!u&&"PartList"==a.uiState.activeCatalogSection||"3D/2D"!==a.uiState.activeCatalogSection)&&c("3D/2D")}),[]),(0,k.jsxs)(k.Fragment,{children:["3D/2D"!=a.uiState.activeCatalogSection&&(0,k.jsx)(x.default,{}),(0,k.jsxs)("div",{className:N.nC,children:[(0,k.jsx)("div",{className:N.wc,children:a.productState.formatedTotalPrice}),u&&(0,k.jsx)("div",{className:N.wc,onClick:function onClick(){return c("PartList")},children:"Stückliste"}),(0,k.jsx)("div",{className:N.wc,onClick:function onClick(){return c("PriceAnalyzer")},children:"Preise"}),(0,k.jsx)("div",{className:N.wc,onClick:function onClick(){return c("DecisionAnalyzer")},children:"Decisions"}),"Pfister"==l&&(0,k.jsx)("div",{className:N.wc,onClick:function onClick(){return c("ekText")},children:"Ek Text"})]})]})}))},85983:(t,o,i)=>{i.r(o),i.d(o,{default:()=>k});var r=i(72874),a=(i(87363),i(93379)),l=i.n(a),c=i(7795),u=i.n(c),d=i(90569),p=i.n(d),f=i(3565),g=i.n(f),m=i(19216),y=i.n(m),v=i(44589),b=i.n(v),N=i(8368),D={};D.styleTagTransform=b(),D.setAttributes=g(),D.insert=p().bind(null,"head"),D.domAPI=u(),D.insertStyleElement=y();l()(N.ZP,D);N.ZP&&N.ZP.locals&&N.ZP.locals;var w=i(65515),M=i.n(w),x=i(47514),j=["onClick","iconAsDelete","open"];const k=function Arrow(t){var o=t.onClick,i=t.iconAsDelete,a=t.open,l=(0,r.Z)(t,j);return(0,x.jsx)("span",{onClick:o,onTouchEnd:o,className:M()(N.xX,i?N.zl:void 0,i?void 0:a?N.h1:N.Oe,l.className)})}},32142:(t,o,i)=>{i.r(o),i.d(o,{default:()=>j});var r=i(65515),a=i.n(r),l=(i(87363),i(68692)),c=i(93379),u=i.n(c),d=i(7795),p=i.n(d),f=i(90569),g=i.n(f),m=i(3565),y=i.n(m),v=i(19216),b=i.n(v),N=i(44589),D=i.n(N),w=i(75581),M={};M.styleTagTransform=D(),M.setAttributes=y(),M.insert=g().bind(null,"head"),M.domAPI=p(),M.insertStyleElement=b();u()(w.ZP,M);w.ZP&&w.ZP.locals&&w.ZP.locals;var x=i(47514);const j=function Toggle(t){var o,i=t.onChange,r=t.val,c=t.state,u=t.on,d=t.off,p=t.alwaysActiveColor,f=t.height,g=void 0===f?40:f,m=t.width,y=void 0===m?80:m,v=t.handleDiameter,b=void 0===v?32:v,N=null===(o=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===o?void 0:o.replace(/ /g,"");return(0,x.jsx)(l.Z,{checkedIcon:u?(0,x.jsx)("div",{className:a()(w.f6,w.co),children:u}):(0,x.jsx)(x.Fragment,{}),uncheckedIcon:d?(0,x.jsx)("div",{className:a()(w.f6,w.no),children:d}):(0,x.jsx)(x.Fragment,{}),onChange:function onChange(){return i(null!=r?r:!c)},checked:c,onColor:N,offColor:p?N:"#CACACA",height:g,width:y,handleDiameter:b})}},59318:(t,o,i)=>{i.d(o,{ZP:()=>p,nC:()=>u,wc:()=>d});var r=i(8081),a=i.n(r),l=i(23645),c=i.n(l)()(a());c.push([t.id,".index-module--lxloL {\n display: flex;\n height: 42px;\n gap: 12px;\n justify-content: space-around;\n overflow: auto;\n align-items: center;\n background-color: #f3f3f3;\n}\n\n.index-module--CjTaL {\n cursor: pointer;\n min-width: 80px;\n padding-left: 12px;\n padding-right: 12px;\n text-align: center;\n}\n",""]);var u="index-module--lxloL",d="index-module--CjTaL";const p=c},8368:(t,o,i)=>{i.d(o,{Oe:()=>D,ZP:()=>w,h1:()=>N,xX:()=>v,zl:()=>b});var r=i(8081),a=i.n(r),l=i(23645),c=i.n(l),u=i(61667),d=i.n(u),p=new URL(i(49797),i.b),f=new URL(i(24827),i.b),g=c()(a()),m=d()(p),y=d()(f);g.push([t.id,".index-module--kpDq_ {\n transition: transform 0.35s ease, width 0.5s ease, height 0.5s ease;\n background-repeat: no-repeat;\n background-position: center center;\n position: absolute;\n background-size: contain;\n right: 10px;\n top: 8px;\n width: 12px;\n height: 12px;\n transform: rotateZ(0deg);\n}\n.index-module--qA_2S {\n background-image: url("+m+");\n}\n\n.index-module--qA_2S:hover {\n transform: rotateZ(90deg);\n}\n\n.index-module--GLLUM {\n transform: rotateZ(180deg);\n background-image: url("+y+");\n}\n\n.index-module--ctBIw {\n background-image: url("+y+");\n}\n",""]);var v="index-module--kpDq_",b="index-module--qA_2S",N="index-module--GLLUM",D="index-module--ctBIw";const w=g},75581:(t,o,i)=>{i.d(o,{ZP:()=>f,co:()=>d,f6:()=>u,no:()=>p});var r=i(8081),a=i.n(r),l=i(23645),c=i.n(l)()(a());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--ciLne {\n padding-left: 16px;\n}\n\n.index-module--W1TLd {\n padding-left: 4px;\n}\n",""]);var u="index-module--D7_Ss",d="index-module--ciLne",p="index-module--W1TLd";const f=c},49797:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEgMUw5IDlNOSAxTDEgOSIgc3Ryb2tlPSIjNkY2RjZGIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPC9zdmc+Cg=="},76380:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEuMzUzNTUgMC42NDY0NDdDMS4xNTgyOSAwLjQ1MTE4NCAwLjg0MTcwOSAwLjQ1MTE4NCAwLjY0NjQ0NyAwLjY0NjQ0N0MwLjQ1MTE4NCAwLjg0MTcwOSAwLjQ1MTE4NCAxLjE1ODI5IDAuNjQ2NDQ3IDEuMzUzNTVMMS4zNTM1NSAwLjY0NjQ0N1pNOC42NDY0NSA5LjM1MzU1QzguODQxNzEgOS41NDg4MiA5LjE1ODI5IDkuNTQ4ODIgOS4zNTM1NSA5LjM1MzU1QzkuNTQ4ODIgOS4xNTgyOSA5LjU0ODgyIDguODQxNzEgOS4zNTM1NSA4LjY0NjQ1TDguNjQ2NDUgOS4zNTM1NVpNOS4zNTM1NSAxLjM1MzU1QzkuNTQ4ODIgMS4xNTgyOSA5LjU0ODgyIDAuODQxNzA5IDkuMzUzNTUgMC42NDY0NDdDOS4xNTgyOSAwLjQ1MTE4NCA4Ljg0MTcxIDAuNDUxMTg0IDguNjQ2NDUgMC42NDY0NDdMOS4zNTM1NSAxLjM1MzU1Wk0wLjY0NjQ0NyA4LjY0NjQ1QzAuNDUxMTg1IDguODQxNzEgMC40NTExODUgOS4xNTgyOSAwLjY0NjQ0NyA5LjM1MzU1QzAuODQxNzA5IDkuNTQ4ODEgMS4xNTgyOSA5LjU0ODgxIDEuMzUzNTUgOS4zNTM1NUwwLjY0NjQ0NyA4LjY0NjQ1Wk0wLjY0NjQ0NyAxLjM1MzU1TDguNjQ2NDUgOS4zNTM1NUw5LjM1MzU1IDguNjQ2NDVMMS4zNTM1NSAwLjY0NjQ0N0wwLjY0NjQ0NyAxLjM1MzU1Wk04LjY0NjQ1IDAuNjQ2NDQ3TDAuNjQ2NDQ3IDguNjQ2NDVMMS4zNTM1NSA5LjM1MzU1TDkuMzUzNTUgMS4zNTM1NUw4LjY0NjQ1IDAuNjQ2NDQ3WiIgZmlsbD0iIzRGNEY0RiIvPgo8L3N2Zz4K"},24827:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDExIDciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMC40Mzc1IDAuNjg4MzU0TDYuMTUxNzkgNS42ODgzNUwxLjQzNzUgMC42ODgzNTQiIHN0cm9rZT0iIzZGNkY2RiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo="},88291:(t,o,i)=>{function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t)}i.d(o,{Z:()=>_objectDestructuringEmpty})},68692:(t,o,i)=>{i.d(o,{Z:()=>c});var r=i(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},s.apply(this,arguments)}var a=r.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},r.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=r.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},r.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var o="#",i=1;i<4;i+=1)o+=t[i]+t[i];return o}function e(t,o,i,r,a){return function(t,o,i,r,a){var l=(t-i)/(o-i);if(0===l)return r;if(1===l)return a;for(var c="#",u=1;u<6;u+=2){var d=parseInt(r.substr(u,2),16),p=parseInt(a.substr(u,2),16),f=Math.round((1-l)*d+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,o,i,h(r),h(a))}var c=function(t){function n(o){t.call(this,o);var i=o.height,r=o.width,a=o.checked;this.t=o.handleDiameter||i-2,this.i=Math.max(r-i,r-(i+this.t)/2),this.o=Math.max(0,(i-this.t)/2),this.state={h:a?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.g=this.g.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.W=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.W=!1},n.prototype.I=function(t){this.H.focus(),this.setState({R:t,j:!0,B:Date.now()})},n.prototype.L=function(t){var o=this.state,i=o.R,r=o.h,a=(this.props.checked?this.i:this.o)+t-i;o.N||t===i||this.setState({N:!0});var l=Math.min(this.i,Math.max(this.o,a));l!==r&&this.setState({h:l})},n.prototype.U=function(t){var o=this.state,i=o.h,r=o.N,a=o.B,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var u=Date.now()-a;(!r||u<250||l&&i<=c||!l&&i>=c)&&this.A(t),this.W&&this.setState({N:!1,j:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.I(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.g))},n.prototype.v=function(t){t.preventDefault(),this.L(t.clientX)},n.prototype.g=function(t){this.U(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.g)},n.prototype.k=function(t){this.X=null,this.I(t.touches[0].clientX)},n.prototype.m=function(t){this.L(t.touches[0].clientX)},n.prototype.M=function(t){t.preventDefault(),this.U(t)},n.prototype.$=function(t){Date.now()-this.l>50&&(this.A(t),Date.now()-this.u>50&&this.W&&this.setState({j:!1}))},n.prototype.C=function(){this.u=Date.now()},n.prototype.D=function(){this.setState({j:!0})},n.prototype.O=function(){this.setState({j:!1})},n.prototype.S=function(t){this.H=t},n.prototype.T=function(t){t.preventDefault(),this.H.focus(),this.A(t),this.W&&this.setState({j:!1})},n.prototype.A=function(t){var o=this.props;(0,o.onChange)(!o.checked,t,o.id)},n.prototype.render=function(){var t=this.props,o=t.checked,i=t.disabled,a=t.className,l=t.offColor,c=t.onColor,u=t.offHandleColor,d=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,g=t.checkedHandleIcon,m=t.uncheckedHandleIcon,y=t.boxShadow,v=t.activeBoxShadow,b=t.height,N=t.width,D=t.borderRadius,w=function(t,o){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===o.indexOf(r)&&(i[r]=t[r]);return i}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),M=this.state,x=M.h,j=M.N,k=M.j,C={position:"relative",display:"inline-block",textAlign:"left",opacity:i?.5:1,direction:"ltr",borderRadius:b/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},O={height:b,width:N,margin:Math.max(0,(this.t-b)/2),position:"relative",background:e(x,this.i,this.o,l,c),borderRadius:"number"==typeof D?D:b/2,cursor:i?"default":"pointer",WebkitTransition:j?null:"background 0.25s",MozTransition:j?null:"background 0.25s",transition:j?null:"background 0.25s"},S={height:b,width:Math.min(1.5*b,N-(this.t+b)/2+1),position:"relative",opacity:(x-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:j?null:"opacity 0.25s",MozTransition:j?null:"opacity 0.25s",transition:j?null:"opacity 0.25s"},T={height:b,width:Math.min(1.5*b,N-(this.t+b)/2+1),position:"absolute",opacity:1-(x-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:j?null:"opacity 0.25s",MozTransition:j?null:"opacity 0.25s",transition:j?null:"opacity 0.25s"},P={height:this.t,width:this.t,background:e(x,this.i,this.o,u,d),display:"inline-block",cursor:i?"default":"pointer",borderRadius:"number"==typeof D?D-1:"50%",position:"absolute",transform:"translateX("+x+"px)",top:Math.max(0,(b-this.t)/2),outline:0,boxShadow:k?v:y,border:0,WebkitTransition:j?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:j?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:j?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},I={height:this.t,width:this.t,opacity:Math.max(2*(1-(x-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:j?null:"opacity 0.25s",MozTransition:j?null:"opacity 0.25s",transition:j?null:"opacity 0.25s"},A={height:this.t,width:this.t,opacity:Math.max(2*((x-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:j?null:"opacity 0.25s",MozTransition:j?null:"opacity 0.25s",transition:j?null:"opacity 0.25s"};return r.createElement("div",{className:a,style:C},r.createElement("div",{className:"react-switch-bg",style:O,onClick:i?null:this.T,onMouseDown:function(t){return t.preventDefault()}},p&&r.createElement("div",{style:S},p),f&&r.createElement("div",{style:T},f)),r.createElement("div",{className:"react-switch-handle",style:P,onClick:function(t){return t.preventDefault()},onMouseDown:i?null:this.p,onTouchStart:i?null:this.k,onTouchMove:i?null:this.m,onTouchEnd:i?null:this.M,onTouchCancel:i?null:this.O},m&&r.createElement("div",{style:I},m),g&&r.createElement("div",{style:A},g)),r.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":o,checked:o,disabled:i,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},w,{ref:this.S,onFocus:this.D,onBlur:this.O,onKeyUp:this.C,onChange:this.$})))},n}(r.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[2208,9523,2142,1707,5983,5301,8692,430,8291,8488],{10304:(t,o,i)=>{o.Z=void 0;var r=function _interopRequireWildcard(t){if(t&&t.__esModule)return t;if(null===t||"object"!==_typeof(t)&&"function"!=typeof t)return{default:t};var o=_getRequireWildcardCache();if(o&&o.has(t))return o.get(t);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var l=r?Object.getOwnPropertyDescriptor(t,a):null;l&&(l.get||l.set)?Object.defineProperty(i,a,l):i[a]=t[a]}i.default=t,o&&o.set(t,i);return i}(i(87363)),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(65515));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return t},t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _extends(){return _extends=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},_extends.apply(this,arguments)}function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _defineProperty(t,o,i){return o in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}function _defineProperties(t,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _setPrototypeOf(t,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,o){return t.__proto__=o,t},_setPrototypeOf(t,o)}var l="Select...",c=function(t){function Dropdown(t){var o;return function _classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Dropdown),(o=function _possibleConstructorReturn(t,o){return!o||"object"!==_typeof(o)&&"function"!=typeof o?_assertThisInitialized(t):o}(this,_getPrototypeOf(Dropdown).call(this,t))).state={selected:o.parseValue(t.value,t.options)||{label:void 0===t.placeholder?l:t.placeholder,value:""},isOpen:!1},o.dropdownRef=(0,r.createRef)(),o.mounted=!0,o.handleDocumentClick=o.handleDocumentClick.bind(_assertThisInitialized(o)),o.fireChangeEvent=o.fireChangeEvent.bind(_assertThisInitialized(o)),o}return function _inherits(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&_setPrototypeOf(t,o)}(Dropdown,t),function _createClass(t,o,i){return o&&_defineProperties(t.prototype,o),i&&_defineProperties(t,i),t}(Dropdown,[{key:"componentDidUpdate",value:function componentDidUpdate(t){if(this.props.value!==t.value)if(this.props.value){var o=this.parseValue(this.props.value,this.props.options);o!==this.state.selected&&this.setState({selected:o})}else this.setState({selected:{label:void 0===this.props.placeholder?l:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function componentDidMount(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function handleMouseDown(t){this.props.onFocus&&"function"==typeof this.props.onFocus&&this.props.onFocus(this.state.isOpen),"mousedown"===t.type&&0!==t.button||(t.stopPropagation(),t.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function parseValue(t,o){var i;if("string"==typeof t)for(var r=0,a=o.length;r<a;r++)if("group"===o[r].type){var l=o[r].items.filter((function(o){return o.value===t}));l.length&&(i=l[0])}else void 0!==o[r].value&&o[r].value===t&&(i=o[r]);return i||t}},{key:"setValue",value:function setValue(t,o){var i={selected:{value:t,label:o},isOpen:!1};this.fireChangeEvent(i),this.setState(i)}},{key:"fireChangeEvent",value:function fireChangeEvent(t){t.selected!==this.state.selected&&this.props.onChange&&this.props.onChange(t.selected)}},{key:"renderOption",value:function renderOption(t){var o,i=t.value;void 0===i&&(i=t.label||t);var l=t.label||t.value||t,c=i===this.state.selected.value||i===this.state.selected,u=(_defineProperty(o={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(o,t.className,!!t.className),_defineProperty(o,"is-selected",c),o),d=(0,a.default)(u),p=Object.keys(t.data||{}).reduce((function(o,i){return function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(i,!0).forEach((function(o){_defineProperty(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(i).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}({},o,_defineProperty({},"data-".concat(i),t.data[i]))}),{});return r.default.createElement("div",_extends({key:i,className:d,onMouseDown:this.setValue.bind(this,i,l),onClick:this.setValue.bind(this,i,l),role:"option","aria-selected":c?"true":"false"},p),l)}},{key:"buildMenu",value:function buildMenu(){var t=this,o=this.props,i=o.options,a=o.baseClassName,l=i.map((function(o){if("group"===o.type){var i=r.default.createElement("div",{className:"".concat(a,"-title")},o.name),l=o.items.map((function(o){return t.renderOption(o)}));return r.default.createElement("div",{className:"".concat(a,"-group"),key:o.name,role:"listbox",tabIndex:"-1"},i,l)}return t.renderOption(o)}));return l.length?l:r.default.createElement("div",{className:"".concat(a,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function handleDocumentClick(t){this.mounted&&(this.dropdownRef.current.contains(t.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function isValueSelected(){return"string"==typeof this.state.selected||""!==this.state.selected.value}},{key:"render",value:function render(){var t,o,i,l,c,u=this.props,d=u.baseClassName,p=u.controlClassName,f=u.placeholderClassName,g=u.menuClassName,m=u.arrowClassName,y=u.arrowClosed,v=u.arrowOpen,b=u.className,N=this.props.disabled?"Dropdown-disabled":"",D="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,w=(0,a.default)((_defineProperty(t={},"".concat(d,"-root"),!0),_defineProperty(t,b,!!b),_defineProperty(t,"is-open",this.state.isOpen),t)),M=(0,a.default)((_defineProperty(o={},"".concat(d,"-control"),!0),_defineProperty(o,p,!!p),_defineProperty(o,N,!!N),o)),x=(0,a.default)((_defineProperty(i={},"".concat(d,"-placeholder"),!0),_defineProperty(i,f,!!f),_defineProperty(i,"is-selected",this.isValueSelected()),i)),k=(0,a.default)((_defineProperty(l={},"".concat(d,"-menu"),!0),_defineProperty(l,g,!!g),l)),j=(0,a.default)((_defineProperty(c={},"".concat(d,"-arrow"),!0),_defineProperty(c,m,!!m),c)),C=r.default.createElement("div",{className:x},D),O=this.state.isOpen?r.default.createElement("div",{className:k,"aria-expanded":"true"},this.buildMenu()):null;return r.default.createElement("div",{ref:this.dropdownRef,className:w},r.default.createElement("div",{className:M,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},C,r.default.createElement("div",{className:"".concat(d,"-arrow-wrapper")},v&&y?this.state.isOpen?v:y:r.default.createElement("span",{className:j}))),O)}}]),Dropdown}(r.Component);c.defaultProps={baseClassName:"Dropdown"};var u=c;o.Z=u},77452:(t,o,i)=>{i.r(o),i.d(o,{default:()=>C});var r=i(87363),a=i(93379),l=i.n(a),c=i(7795),u=i.n(c),d=i(90569),p=i.n(d),f=i(3565),g=i.n(f),m=i(19216),y=i.n(m),v=i(44589),b=i.n(v),N=i(59318),D={};D.styleTagTransform=b(),D.setAttributes=g(),D.insert=p().bind(null,"head"),D.domAPI=u(),D.insertStyleElement=y();l()(N.ZP,D);N.ZP&&N.ZP.locals&&N.ZP.locals;var w=i(91923),M=i(9420),x=i(89603),k=i(88683),j=i(47514);const C=(0,M.Pi)((function Toolbar(t){var o,i,a=(0,w.NP)(),l=(0,k.useDivaCore)().state.organization.settings.wwsClient,c=function changeVal(t){var o=t===a.uiState.activeCatalogSection?"3D/2D":t;localStorage.setItem("lastWindow",o),a.uiState.setActiveCatalogSection(o)},u=!!Object.values(null!==(o=null===(i=a.divaWebPlanner.actSet())||void 0===i?void 0:i.CatalogData.allCatalogArticles)&&void 0!==o?o:{}).find((function(t){return t.partlistArticlesRules}));return(0,r.useEffect)((function(){("Pfister"!=l&&"ekText"==a.uiState.activeCatalogSection||!u&&"PartList"==a.uiState.activeCatalogSection||"3D/2D"!==a.uiState.activeCatalogSection)&&c("3D/2D")}),[]),(0,j.jsxs)(j.Fragment,{children:["3D/2D"!=a.uiState.activeCatalogSection&&(0,j.jsx)(x.default,{}),(0,j.jsxs)("div",{className:N.nC,children:[(0,j.jsx)("div",{className:N.wc,children:a.productState.formatedTotalPrice}),u&&(0,j.jsx)("div",{className:N.wc,onClick:function onClick(){return c("PartList")},children:"Stückliste"}),(0,j.jsx)("div",{className:N.wc,onClick:function onClick(){return c("PriceAnalyzer")},children:"Preise"}),(0,j.jsx)("div",{className:N.wc,onClick:function onClick(){return c("DecisionAnalyzer")},children:"Decisions"}),"Pfister"==l&&(0,j.jsx)("div",{className:N.wc,onClick:function onClick(){return c("ekText")},children:"Ek Text"})]})]})}))},85983:(t,o,i)=>{i.r(o),i.d(o,{default:()=>j});var r=i(72874),a=(i(87363),i(93379)),l=i.n(a),c=i(7795),u=i.n(c),d=i(90569),p=i.n(d),f=i(3565),g=i.n(f),m=i(19216),y=i.n(m),v=i(44589),b=i.n(v),N=i(8368),D={};D.styleTagTransform=b(),D.setAttributes=g(),D.insert=p().bind(null,"head"),D.domAPI=u(),D.insertStyleElement=y();l()(N.ZP,D);N.ZP&&N.ZP.locals&&N.ZP.locals;var w=i(65515),M=i.n(w),x=i(47514),k=["onClick","iconAsDelete","open"];const j=function Arrow(t){var o=t.onClick,i=t.iconAsDelete,a=t.open,l=(0,r.Z)(t,k);return(0,x.jsx)("span",{onClick:o,onTouchEnd:o,className:M()(N.xX,i?N.zl:void 0,i?void 0:a?N.h1:N.Oe,l.className)})}},32142:(t,o,i)=>{i.r(o),i.d(o,{default:()=>k});var r=i(65515),a=i.n(r),l=(i(87363),i(68692)),c=i(93379),u=i.n(c),d=i(7795),p=i.n(d),f=i(90569),g=i.n(f),m=i(3565),y=i.n(m),v=i(19216),b=i.n(v),N=i(44589),D=i.n(N),w=i(75581),M={};M.styleTagTransform=D(),M.setAttributes=y(),M.insert=g().bind(null,"head"),M.domAPI=p(),M.insertStyleElement=b();u()(w.ZP,M);w.ZP&&w.ZP.locals&&w.ZP.locals;var x=i(47514);const k=function Toggle(t){var o,i=t.onChange,r=t.val,c=t.state,u=t.on,d=t.off,p=t.alwaysActiveColor,f=t.height,g=void 0===f?40:f,m=t.width,y=void 0===m?80:m,v=t.handleDiameter,b=void 0===v?32:v,N=null===(o=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===o?void 0:o.replace(/ /g,"");return(0,x.jsx)(l.Z,{checkedIcon:u?(0,x.jsx)("div",{className:a()(w.f6,w.co),children:u}):(0,x.jsx)(x.Fragment,{}),uncheckedIcon:d?(0,x.jsx)("div",{className:a()(w.f6,w.no),children:d}):(0,x.jsx)(x.Fragment,{}),onChange:function onChange(){return i(null!=r?r:!c)},checked:c,onColor:N,offColor:p?N:"#CACACA",height:g,width:y,handleDiameter:b})}},59318:(t,o,i)=>{i.d(o,{ZP:()=>p,nC:()=>u,wc:()=>d});var r=i(8081),a=i.n(r),l=i(23645),c=i.n(l)()(a());c.push([t.id,".index-module--lxloL {\n display: flex;\n height: 42px;\n gap: 12px;\n justify-content: space-around;\n overflow: auto;\n align-items: center;\n background-color: #f3f3f3;\n}\n\n.index-module--CjTaL {\n cursor: pointer;\n min-width: 80px;\n padding-left: 12px;\n padding-right: 12px;\n text-align: center;\n}\n",""]);var u="index-module--lxloL",d="index-module--CjTaL";const p=c},8368:(t,o,i)=>{i.d(o,{Oe:()=>D,ZP:()=>w,h1:()=>N,xX:()=>v,zl:()=>b});var r=i(8081),a=i.n(r),l=i(23645),c=i.n(l),u=i(61667),d=i.n(u),p=new URL(i(49797),i.b),f=new URL(i(24827),i.b),g=c()(a()),m=d()(p),y=d()(f);g.push([t.id,".index-module--kpDq_ {\n transition: transform 0.35s ease, width 0.5s ease, height 0.5s ease;\n background-repeat: no-repeat;\n background-position: center center;\n position: absolute;\n background-size: contain;\n right: 10px;\n top: 8px;\n width: 12px;\n height: 12px;\n transform: rotateZ(0deg);\n}\n.index-module--qA_2S {\n background-image: url("+m+");\n}\n\n.index-module--qA_2S:hover {\n transform: rotateZ(90deg);\n}\n\n.index-module--GLLUM {\n transform: rotateZ(180deg);\n background-image: url("+y+");\n}\n\n.index-module--ctBIw {\n background-image: url("+y+");\n}\n",""]);var v="index-module--kpDq_",b="index-module--qA_2S",N="index-module--GLLUM",D="index-module--ctBIw";const w=g},75581:(t,o,i)=>{i.d(o,{ZP:()=>f,co:()=>d,f6:()=>u,no:()=>p});var r=i(8081),a=i.n(r),l=i(23645),c=i.n(l)()(a());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--ciLne {\n padding-left: 16px;\n}\n\n.index-module--W1TLd {\n padding-left: 4px;\n}\n",""]);var u="index-module--D7_Ss",d="index-module--ciLne",p="index-module--W1TLd";const f=c},49797:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEgMUw5IDlNOSAxTDEgOSIgc3Ryb2tlPSIjNkY2RjZGIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPC9zdmc+Cg=="},76380:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEuMzUzNTUgMC42NDY0NDdDMS4xNTgyOSAwLjQ1MTE4NCAwLjg0MTcwOSAwLjQ1MTE4NCAwLjY0NjQ0NyAwLjY0NjQ0N0MwLjQ1MTE4NCAwLjg0MTcwOSAwLjQ1MTE4NCAxLjE1ODI5IDAuNjQ2NDQ3IDEuMzUzNTVMMS4zNTM1NSAwLjY0NjQ0N1pNOC42NDY0NSA5LjM1MzU1QzguODQxNzEgOS41NDg4MiA5LjE1ODI5IDkuNTQ4ODIgOS4zNTM1NSA5LjM1MzU1QzkuNTQ4ODIgOS4xNTgyOSA5LjU0ODgyIDguODQxNzEgOS4zNTM1NSA4LjY0NjQ1TDguNjQ2NDUgOS4zNTM1NVpNOS4zNTM1NSAxLjM1MzU1QzkuNTQ4ODIgMS4xNTgyOSA5LjU0ODgyIDAuODQxNzA5IDkuMzUzNTUgMC42NDY0NDdDOS4xNTgyOSAwLjQ1MTE4NCA4Ljg0MTcxIDAuNDUxMTg0IDguNjQ2NDUgMC42NDY0NDdMOS4zNTM1NSAxLjM1MzU1Wk0wLjY0NjQ0NyA4LjY0NjQ1QzAuNDUxMTg1IDguODQxNzEgMC40NTExODUgOS4xNTgyOSAwLjY0NjQ0NyA5LjM1MzU1QzAuODQxNzA5IDkuNTQ4ODEgMS4xNTgyOSA5LjU0ODgxIDEuMzUzNTUgOS4zNTM1NUwwLjY0NjQ0NyA4LjY0NjQ1Wk0wLjY0NjQ0NyAxLjM1MzU1TDguNjQ2NDUgOS4zNTM1NUw5LjM1MzU1IDguNjQ2NDVMMS4zNTM1NSAwLjY0NjQ0N0wwLjY0NjQ0NyAxLjM1MzU1Wk04LjY0NjQ1IDAuNjQ2NDQ3TDAuNjQ2NDQ3IDguNjQ2NDVMMS4zNTM1NSA5LjM1MzU1TDkuMzUzNTUgMS4zNTM1NUw4LjY0NjQ1IDAuNjQ2NDQ3WiIgZmlsbD0iIzRGNEY0RiIvPgo8L3N2Zz4K"},24827:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDExIDciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMC40Mzc1IDAuNjg4MzU0TDYuMTUxNzkgNS42ODgzNUwxLjQzNzUgMC42ODgzNTQiIHN0cm9rZT0iIzZGNkY2RiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo="},88291:(t,o,i)=>{function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t)}i.d(o,{Z:()=>_objectDestructuringEmpty})},68692:(t,o,i)=>{i.d(o,{Z:()=>c});var r=i(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},s.apply(this,arguments)}var a=r.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},r.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=r.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},r.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var o="#",i=1;i<4;i+=1)o+=t[i]+t[i];return o}function e(t,o,i,r,a){return function(t,o,i,r,a){var l=(t-i)/(o-i);if(0===l)return r;if(1===l)return a;for(var c="#",u=1;u<6;u+=2){var d=parseInt(r.substr(u,2),16),p=parseInt(a.substr(u,2),16),f=Math.round((1-l)*d+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,o,i,h(r),h(a))}var c=function(t){function n(o){t.call(this,o);var i=o.height,r=o.width,a=o.checked;this.t=o.handleDiameter||i-2,this.i=Math.max(r-i,r-(i+this.t)/2),this.o=Math.max(0,(i-this.t)/2),this.state={h:a?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var o=this.state,i=o.j,r=o.h,a=(this.props.checked?this.i:this.o)+t-i;o.U||t===i||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,a));l!==r&&this.setState({h:l})},n.prototype.A=function(t){var o=this.state,i=o.h,r=o.U,a=o.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var u=Date.now()-a;(!r||u<250||l&&i<=c||!l&&i>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var o=this.props;(0,o.onChange)(!o.checked,t,o.id)},n.prototype.render=function(){var t=this.props,o=t.checked,i=t.disabled,a=t.className,l=t.offColor,c=t.onColor,u=t.offHandleColor,d=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,g=t.checkedHandleIcon,m=t.uncheckedHandleIcon,y=t.boxShadow,v=t.activeBoxShadow,b=t.height,N=t.width,D=t.borderRadius,w=function(t,o){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===o.indexOf(r)&&(i[r]=t[r]);return i}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),M=this.state,x=M.h,k=M.U,j=M.B,C={position:"relative",display:"inline-block",textAlign:"left",opacity:i?.5:1,direction:"ltr",borderRadius:b/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},O={height:b,width:N,margin:Math.max(0,(this.t-b)/2),position:"relative",background:e(x,this.i,this.o,l,c),borderRadius:"number"==typeof D?D:b/2,cursor:i?"default":"pointer",WebkitTransition:k?null:"background 0.25s",MozTransition:k?null:"background 0.25s",transition:k?null:"background 0.25s"},S={height:b,width:Math.min(1.5*b,N-(this.t+b)/2+1),position:"relative",opacity:(x-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"},T={height:b,width:Math.min(1.5*b,N-(this.t+b)/2+1),position:"absolute",opacity:1-(x-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"},P={height:this.t,width:this.t,background:e(x,this.i,this.o,u,d),display:"inline-block",cursor:i?"default":"pointer",borderRadius:"number"==typeof D?D-1:"50%",position:"absolute",transform:"translateX("+x+"px)",top:Math.max(0,(b-this.t)/2),outline:0,boxShadow:j?v:y,border:0,WebkitTransition:k?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:k?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:k?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},I={height:this.t,width:this.t,opacity:Math.max(2*(1-(x-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"},A={height:this.t,width:this.t,opacity:Math.max(2*((x-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"};return r.createElement("div",{className:a,style:C},r.createElement("div",{className:"react-switch-bg",style:O,onClick:i?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&r.createElement("div",{style:S},p),f&&r.createElement("div",{style:T},f)),r.createElement("div",{className:"react-switch-handle",style:P,onClick:function(t){return t.preventDefault()},onMouseDown:i?null:this.p,onTouchStart:i?null:this.m,onTouchMove:i?null:this.M,onTouchEnd:i?null:this.T,onTouchCancel:i?null:this.S},m&&r.createElement("div",{style:I},m),g&&r.createElement("div",{style:A},g)),r.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":o,checked:o,disabled:i,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},w,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(r.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 271.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[271],{60271:(e,r,t)=>{t.r(r),t.d(r,{default:()=>A});var n=t(80248),a=t(84658),o=t(34988),i=t(50747),c=t.n(i),u=t(87363),s=t(92122),p=t(61533),d=function useDraggableInPortal(){var e=(0,u.useRef)(document.createElement("div")).current;return(0,u.useEffect)((function(){if(e)return e.style.pointerEvents="none",e.style.position="absolute",e.style.height="100%",e.style.width="100%",e.style.top="0",e.style.left="0",document.body.appendChild(e),function(){document.body.removeChild(e)}}),[e]),function(r){return function(t){var n=r(t);return"fixed"===t.draggableProps.style.position?(0,p.createPortal)(n,e):n}}},l=t(93379),D=t.n(l),y=t(7795),M=t.n(y),b=t(90569),j=t.n(b),g=t(3565),f=t.n(g),N=t(19216),O=t.n(N),x=t(44589),T=t.n(x),h=t(94831),z={};z.styleTagTransform=T(),z.setAttributes=f(),z.insert=j().bind(null,"head"),z.domAPI=M(),z.insertStyleElement=O();D()(h.Z,z);h.Z&&h.Z.locals&&h.Z.locals;var I=t(88683),v=t(5482);function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,n.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function useApiInterface(){var e=(0,u.useMemo)((function(){return(0,I.getLogger)("ContentBox","UseApiInterface")}),[]),r=(0,u.useState)({}),t=(0,o.Z)(r,2),i=t[0],s=t[1],p=(0,I.useDivaCore)().state,d=p.apiConfig,l=d.catalogService,D=d.basketService,y=p.jwt,M=function(){var e=(0,a.Z)(c().mark((function _callee(e,r){var t,a;return c().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(t=(0,v.FB)(e.toLowerCase()).toUpperCase(),!i[t]){o.next=3;break}return o.abrupt("return",i[t]);case 3:return o.next=5,b(e,r);case 5:return a=o.sent,j((0,n.Z)({},t,a)),o.abrupt("return",a);case 8:case"end":return o.stop()}}),_callee)})));return function getDataCache(r,t){return e.apply(this,arguments)}}(),b=function(){var r=(0,a.Z)(c().mark((function _callee2(r,t){var n,a,o,i,u,s=arguments;return c().wrap((function _callee2$(c){for(;;)switch(c.prev=c.next){case 0:n=s.length>2&&void 0!==s[2]?s[2]:"GET",a=s.length>3?s[3]:void 0,c.t0=t,c.next="catalog"===c.t0?5:"basket"===c.t0?7:9;break;case 5:return o=l+r,c.abrupt("break",9);case 7:return o=D+r,c.abrupt("break",9);case 9:return c.next=11,fetch(o,_objectSpread({method:n,headers:{Authorization:"Bearer "+y,"content-type":"application/json"}},a?{body:JSON.stringify(a)}:{}));case 11:return i=c.sent,c.next=14,i.json();case 14:if(null!=(u=c.sent)&&u.Error&&e.error(new I.DivaError(u.Error,{code:"WC_0001",custom:{url:o}})),!(u.status>204)){c.next=18;break}throw new Error(JSON.parse(u.body).error);case 18:return c.abrupt("return",u);case 19:case"end":return c.stop()}}),_callee2)})));return function fetchData(e,t){return r.apply(this,arguments)}}(),j=function addJsonDataCache(e){for(var r in e)s(_objectSpread(_objectSpread({},i),{},(0,n.Z)({},r,e[r])))};return{getDataCache:M,fetchData:b,clearCache:function clearCache(){s({})}}}var k=t(3142),L=t(47514);function DragAndDropOptionValues_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function DragAndDropOptionValues_objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?DragAndDropOptionValues_ownKeys(Object(t),!0).forEach((function(r){(0,n.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):DragAndDropOptionValues_ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const E=function DragAndDropOptionValues(e){var r=e.variants,t=e.groups,n=e.currentProuduct,i=e.groupKey,p=e.setCurProduct,l=t[i],D=d(),y=(0,u.useState)(!1),M=(0,o.Z)(y,2),b=M[0],j=M[1],g=(0,I.useDivaCore)().state.dimensions.isMobile,f=useApiInterface().fetchData,N=(0,k.Z)({variants:r,groups:t,currentProuduct:n,groupKey:i,setCurProduct:p,isMobile:g,selectedClassification:n[i]}),O=function(){var e=(0,a.Z)(c().mark((function _callee(e){var t,a,o,u,s,d,D,y,M,b,g,N,O,x,T,h,z;return c().wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:if(t=!1,e.destination){c.next=3;break}return c.abrupt("return");case 3:if(e.source.index!=e.destination.index){c.next=5;break}return c.abrupt("return");case 5:e.source.index>e.destination.index&&(t=!0,j(!0)),a=e.source.index,o=e.destination.index,u=l[a].codex,s=l[o].codex,d={},D=!1,y=0;case 13:if(!(y<l.length)){c.next=43;break}if(M=l[y],b=M.codex,!t){c.next=31;break}if(s!=b){c.next=21;break}D=!0,c.next=25;break;case 21:if(u!=b){c.next=25;break}return D=!1,d[b]=l[o].position,c.abrupt("continue",40);case 25:if(D){c.next=28;break}return d[b]=l[y].position,c.abrupt("continue",40);case 28:d[b]=l[y+1].position,c.next=40;break;case 31:if(u!=b){c.next=35;break}return D=!0,d[b]=l[o].position,c.abrupt("continue",40);case 35:if(D){c.next=38;break}return d[b]=l[y].position,c.abrupt("continue",40);case 38:s==b&&(D=!1),d[b]=l[y-1].position;case 40:y++,c.next=13;break;case 43:for(g=r.map((function(e){for(var r in d)e[i].opv===r&&(e[i].position=d[r]);return e})),p(void 0,g.find((function(e){return e._id==n._id})),g),N=[],O=0;O<r.length;O++){for(h in x=r[O],T=[],d)x[i].opv===h&&T.push({op:"replace",path:"/"+i+"/position",value:d[h]});N.push(f("/products/"+x._id,"catalog","PATCH",{patch:T}))}return c.next=49,Promise.all(N);case 49:z=c.sent,p(void 0,z.find((function(e){return e._id==n._id})),r.map((function(e){var r;return null!==(r=z.find((function(r){return r._id==e._id})))&&void 0!==r?r:e}))),j(!1);case 52:case"end":return c.stop()}}),_callee)})));return function onDragEnd(r){return e.apply(this,arguments)}}();return(0,L.jsx)(s.Z5,{onDragEnd:O,children:(0,L.jsx)(s.bK,{droppableId:"droppable",isDropDisabled:b,direction:"vertical",children:function children(e,r){return(0,L.jsxs)("div",DragAndDropOptionValues_objectSpread(DragAndDropOptionValues_objectSpread({},e.droppableProps),{},{ref:e.innerRef,style:{height:"100%",display:"flex",flexDirection:"column"},children:[N.map((function(e,r){return(0,L.jsx)(s._l,{index:r,draggableId:l[r].codex,isDragDisabled:b,children:D((function(e){return(0,L.jsx)("div",DragAndDropOptionValues_objectSpread(DragAndDropOptionValues_objectSpread(DragAndDropOptionValues_objectSpread({ref:e.innerRef},e.draggableProps),e.dragHandleProps),{},{style:DragAndDropOptionValues_objectSpread(DragAndDropOptionValues_objectSpread({},e.draggableProps.style),{},{height:"fit-content"},b?{cursor:"wait"}:{}),children:N[r]}))}))},l[r].codex)})),e.placeholder]}))}})})};function DragAndDropOptions_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function DragAndDropOptions_objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?DragAndDropOptions_ownKeys(Object(t),!0).forEach((function(r){(0,n.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):DragAndDropOptions_ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const A=function DragAndDrop(e){var r=e.groups,t=e.variants,n=e.setCurProduct,i=e.currentProuduct,p=e.posOfOpt,l=d(),D=(0,u.useState)(!1),y=(0,o.Z)(D,2),M=y[0],b=y[1],j=useApiInterface().fetchData,g=function(){var e=(0,a.Z)(c().mark((function _callee(e){var a,u,s,d,l,D,y,M,g,f,N,O,x,T;return c().wrap((function _callee$(h){for(;;)switch(h.prev=h.next){case 0:if(a=!1,e.destination){h.next=3;break}return h.abrupt("return");case 3:if(e.source.index!=e.destination.index){h.next=5;break}return h.abrupt("return");case 5:if(e.source.index>e.destination.index&&(a=!0),b(!0),u=Object.keys(r),s=u[e.source.index],d=u[e.destination.index],l={},u.length>Object.keys(p).length)for(D=0;D<u.length;D++)p[u[D]]||(p[u[D]]=D);y=!1,h.t0=c().keys(r);case 14:if((h.t1=h.t0()).done){h.next=42;break}if(M=h.t1.value,!a){h.next=31;break}if(d!=M){h.next=21;break}y=!0,h.next=25;break;case 21:if(s!=M){h.next=25;break}return y=!1,l[M]=p[d],h.abrupt("continue",14);case 25:if(y){h.next=28;break}return l[M]=p[M],h.abrupt("continue",14);case 28:l[M]=p[u[u.indexOf(M)+1]],h.next=40;break;case 31:if(s!=M){h.next=35;break}return y=!0,l[M]=p[d],h.abrupt("continue",14);case 35:if(y){h.next=38;break}return l[M]=p[M],h.abrupt("continue",14);case 38:d==M&&(y=!1),l[M]=p[u[u.indexOf(M)-1]];case 40:h.next=14;break;case 42:for(g=t.map((function(e){for(var r in l)e[r].position=l[r];return e})),n(void 0,g.find((function(e){return e._id==i._id})),g),f={patch:Object.entries(l).map((function(e){var r=(0,o.Z)(e,2);return{op:"replace",path:"/"+r[0]+"/optionPosition",value:r[1]}}))},N=[],O=0;O<t.length;O++)x=t[O],N.push(j("/products/"+x._id,"catalog","PATCH",f));return h.next=49,Promise.all(N);case 49:T=h.sent,n(void 0,T.find((function(e){return e._id==i._id})),t.map((function(e){var r;return null!==(r=T.find((function(r){return r._id==e._id})))&&void 0!==r?r:e}))),b(!1);case 52:case"end":return h.stop()}}),_callee)})));return function onDragEnd(r){return e.apply(this,arguments)}}();return(0,L.jsx)("div",{style:{display:"flex",width:"100%",position:"relative"},children:(0,L.jsx)(s.Z5,{onDragEnd:g,children:(0,L.jsx)(s.bK,{droppableId:"droppable",isDropDisabled:M,direction:"horizontal",children:function children(e,a){return(0,L.jsxs)("div",DragAndDropOptions_objectSpread(DragAndDropOptions_objectSpread({},e.droppableProps),{},{ref:e.innerRef,style:{width:"calc("+100/Object.keys(r).length+"%)",height:"100%",display:"flex"},children:[Object.keys(r).map((function(e,a){return(0,L.jsx)(s._l,{index:a,draggableId:e,isDragDisabled:M,children:l((function(a){return(0,L.jsxs)("div",DragAndDropOptions_objectSpread(DragAndDropOptions_objectSpread({ref:a.innerRef},a.draggableProps),{},{style:DragAndDropOptions_objectSpread(DragAndDropOptions_objectSpread({paddingRight:5},a.draggableProps.style),M?{cursor:"wait"}:{}),children:[(0,L.jsx)("div",DragAndDropOptions_objectSpread({className:h.q},a.dragHandleProps)),(0,L.jsx)(E,{currentProuduct:i,groups:r,groupKey:e,posOfOpt:p,setCurProduct:n,variants:t})]}))}))},e)})),e.placeholder]}))}})})})}},94831:(e,r,t)=>{t.d(r,{Z:()=>D,q:()=>l});var n=t(8081),a=t.n(n),o=t(23645),i=t.n(o),c=t(61667),u=t.n(c),s=new URL(t(38133),t.b),p=i()(a()),d=u()(s);p.push([e.id,".index-module--dt7FX {\n width: 100%;\n height: 20px;\n background: center / 50% no-repeat url("+d+");\n}\n",""]);var l="index-module--dt7FX";const D=p},38133:e=>{e.exports="data:image/svg+xml;base64,CjxzdmcgY2xhc3M9InN2Zy1pY29uIiBzdHlsZT0id2lkdGg6IDFlbTsgaGVpZ2h0OiAxZW07dmVydGljYWwtYWxpZ246IG1pZGRsZTtmaWxsOiBjdXJyZW50Q29sb3I7b3ZlcmZsb3c6IGhpZGRlbjsiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMjE5LjQyODU3MSA1ODUuMTQyODU3Yy0zNi41NzE0MjkgMC03My4xNDI4NTcgMzYuNTcxNDI5LTczLjE0Mjg1NyA3My4xNDI4NTdzMzYuNTcxNDI5IDczLjE0Mjg1NyA3My4xNDI4NTcgNzMuMTQyODU3IDczLjE0Mjg1Ny0zNi41NzE0MjkgNzMuMTQyODU4LTczLjE0Mjg1Ny0zNi41NzE0MjktNzMuMTQyODU3LTczLjE0Mjg1OC03My4xNDI4NTd6IG01ODUuMTQyODU4LTE0Ni4yODU3MTRjMzYuNTcxNDI5IDAgNzMuMTQyODU3LTM2LjU3MTQyOSA3My4xNDI4NTctNzMuMTQyODU3cy0zNi41NzE0MjktNzMuMTQyODU3LTczLjE0Mjg1Ny03My4xNDI4NTctNzMuMTQyODU3IDM2LjU3MTQyOS03My4xNDI4NTggNzMuMTQyODU3IDM2LjU3MTQyOSA3My4xNDI4NTcgNzMuMTQyODU4IDczLjE0Mjg1N3pNMjE5LjQyODU3MSAyOTIuNTcxNDI5Yy0zNi41NzE0MjkgMC03My4xNDI4NTcgMzYuNTcxNDI5LTczLjE0Mjg1NyA3My4xNDI4NTdzMzYuNTcxNDI5IDczLjE0Mjg1NyA3My4xNDI4NTcgNzMuMTQyODU3IDczLjE0Mjg1Ny0zNi41NzE0MjkgNzMuMTQyODU4LTczLjE0Mjg1Ny0zNi41NzE0MjktNzMuMTQyODU3LTczLjE0Mjg1OC03My4xNDI4NTd6IG01ODUuMTQyODU4IDI5Mi41NzE0MjhjLTM2LjU3MTQyOSAwLTczLjE0Mjg1NyAzNi41NzE0MjktNzMuMTQyODU4IDczLjE0Mjg1N3MzNi41NzE0MjkgNzMuMTQyODU3IDczLjE0Mjg1OCA3My4xNDI4NTcgNzMuMTQyODU3LTM2LjU3MTQyOSA3My4xNDI4NTctNzMuMTQyODU3LTM2LjU3MTQyOS03My4xNDI4NTctNzMuMTQyODU3LTczLjE0Mjg1N3pNNTEyIDI5Mi41NzE0MjljLTM2LjU3MTQyOSAwLTczLjE0Mjg1NyAzNi41NzE0MjktNzMuMTQyODU3IDczLjE0Mjg1N3MzNi41NzE0MjkgNzMuMTQyODU3IDczLjE0Mjg1NyA3My4xNDI4NTcgNzMuMTQyODU3LTM2LjU3MTQyOSA3My4xNDI4NTctNzMuMTQyODU3LTM2LjU3MTQyOS03My4xNDI4NTctNzMuMTQyODU3LTczLjE0Mjg1N3ogbTAgMjkyLjU3MTQyOGMtMzYuNTcxNDI5IDAtNzMuMTQyODU3IDM2LjU3MTQyOS03My4xNDI4NTcgNzMuMTQyODU3czM2LjU3MTQyOSA3My4xNDI4NTcgNzMuMTQyODU3IDczLjE0Mjg1NyA3My4xNDI4NTctMzYuNTcxNDI5IDczLjE0Mjg1Ny03My4xNDI4NTctMzYuNTcxNDI5LTczLjE0Mjg1Ny03My4xNDI4NTctNzMuMTQyODU3eiIgIC8+PC9zdmc+"}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[271],{60271:(e,r,t)=>{t.r(r),t.d(r,{default:()=>A});var n=t(80248),a=t(84658),o=t(34988),i=t(50747),c=t.n(i),u=t(87363),s=t(49944),p=t(61533),d=function useDraggableInPortal(){var e=(0,u.useRef)(document.createElement("div")).current;return(0,u.useEffect)((function(){if(e)return e.style.pointerEvents="none",e.style.position="absolute",e.style.height="100%",e.style.width="100%",e.style.top="0",e.style.left="0",document.body.appendChild(e),function(){document.body.removeChild(e)}}),[e]),function(r){return function(t){var n=r(t);return"fixed"===t.draggableProps.style.position?(0,p.createPortal)(n,e):n}}},l=t(93379),D=t.n(l),y=t(7795),M=t.n(y),b=t(90569),j=t.n(b),g=t(3565),f=t.n(g),N=t(19216),O=t.n(N),x=t(44589),T=t.n(x),h=t(94831),z={};z.styleTagTransform=T(),z.setAttributes=f(),z.insert=j().bind(null,"head"),z.domAPI=M(),z.insertStyleElement=O();D()(h.Z,z);h.Z&&h.Z.locals&&h.Z.locals;var I=t(88683),v=t(5482);function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,n.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function useApiInterface(){var e=(0,u.useMemo)((function(){return(0,I.getLogger)("ContentBox","UseApiInterface")}),[]),r=(0,u.useState)({}),t=(0,o.Z)(r,2),i=t[0],s=t[1],p=(0,I.useDivaCore)().state,d=p.apiConfig,l=d.catalogService,D=d.basketService,y=p.jwt,M=function(){var e=(0,a.Z)(c().mark((function _callee(e,r){var t,a;return c().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(t=(0,v.FB)(e.toLowerCase()).toUpperCase(),!i[t]){o.next=3;break}return o.abrupt("return",i[t]);case 3:return o.next=5,b(e,r);case 5:return a=o.sent,j((0,n.Z)({},t,a)),o.abrupt("return",a);case 8:case"end":return o.stop()}}),_callee)})));return function getDataCache(r,t){return e.apply(this,arguments)}}(),b=function(){var r=(0,a.Z)(c().mark((function _callee2(r,t){var n,a,o,i,u,s=arguments;return c().wrap((function _callee2$(c){for(;;)switch(c.prev=c.next){case 0:n=s.length>2&&void 0!==s[2]?s[2]:"GET",a=s.length>3?s[3]:void 0,c.t0=t,c.next="catalog"===c.t0?5:"basket"===c.t0?7:9;break;case 5:return o=l+r,c.abrupt("break",9);case 7:return o=D+r,c.abrupt("break",9);case 9:return c.next=11,fetch(o,_objectSpread({method:n,headers:{Authorization:"Bearer "+y,"content-type":"application/json"}},a?{body:JSON.stringify(a)}:{}));case 11:return i=c.sent,c.next=14,i.json();case 14:if(null!=(u=c.sent)&&u.Error&&e.error(new I.DivaError(u.Error,{code:"WC_0001",custom:{url:o}})),!(u.status>204)){c.next=18;break}throw new Error(JSON.parse(u.body).error);case 18:return c.abrupt("return",u);case 19:case"end":return c.stop()}}),_callee2)})));return function fetchData(e,t){return r.apply(this,arguments)}}(),j=function addJsonDataCache(e){for(var r in e)s(_objectSpread(_objectSpread({},i),{},(0,n.Z)({},r,e[r])))};return{getDataCache:M,fetchData:b,clearCache:function clearCache(){s({})}}}var k=t(3142),L=t(47514);function DragAndDropOptionValues_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function DragAndDropOptionValues_objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?DragAndDropOptionValues_ownKeys(Object(t),!0).forEach((function(r){(0,n.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):DragAndDropOptionValues_ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const E=function DragAndDropOptionValues(e){var r=e.variants,t=e.groups,n=e.currentProuduct,i=e.groupKey,p=e.setCurProduct,l=t[i],D=d(),y=(0,u.useState)(!1),M=(0,o.Z)(y,2),b=M[0],j=M[1],g=(0,I.useDivaCore)().state.dimensions.isMobile,f=useApiInterface().fetchData,N=(0,k.Z)({variants:r,groups:t,currentProuduct:n,groupKey:i,setCurProduct:p,isMobile:g,selectedClassification:n[i]}),O=function(){var e=(0,a.Z)(c().mark((function _callee(e){var t,a,o,u,s,d,D,y,M,b,g,N,O,x,T,h,z;return c().wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:if(t=!1,e.destination){c.next=3;break}return c.abrupt("return");case 3:if(e.source.index!=e.destination.index){c.next=5;break}return c.abrupt("return");case 5:e.source.index>e.destination.index&&(t=!0,j(!0)),a=e.source.index,o=e.destination.index,u=l[a].codex,s=l[o].codex,d={},D=!1,y=0;case 13:if(!(y<l.length)){c.next=43;break}if(M=l[y],b=M.codex,!t){c.next=31;break}if(s!=b){c.next=21;break}D=!0,c.next=25;break;case 21:if(u!=b){c.next=25;break}return D=!1,d[b]=l[o].position,c.abrupt("continue",40);case 25:if(D){c.next=28;break}return d[b]=l[y].position,c.abrupt("continue",40);case 28:d[b]=l[y+1].position,c.next=40;break;case 31:if(u!=b){c.next=35;break}return D=!0,d[b]=l[o].position,c.abrupt("continue",40);case 35:if(D){c.next=38;break}return d[b]=l[y].position,c.abrupt("continue",40);case 38:s==b&&(D=!1),d[b]=l[y-1].position;case 40:y++,c.next=13;break;case 43:for(g=r.map((function(e){for(var r in d)e[i].opv===r&&(e[i].position=d[r]);return e})),p(void 0,g.find((function(e){return e._id==n._id})),g),N=[],O=0;O<r.length;O++){for(h in x=r[O],T=[],d)x[i].opv===h&&T.push({op:"replace",path:"/"+i+"/position",value:d[h]});N.push(f("/products/"+x._id,"catalog","PATCH",{patch:T}))}return c.next=49,Promise.all(N);case 49:z=c.sent,p(void 0,z.find((function(e){return e._id==n._id})),r.map((function(e){var r;return null!==(r=z.find((function(r){return r._id==e._id})))&&void 0!==r?r:e}))),j(!1);case 52:case"end":return c.stop()}}),_callee)})));return function onDragEnd(r){return e.apply(this,arguments)}}();return(0,L.jsx)(s.Z5,{onDragEnd:O,children:(0,L.jsx)(s.bK,{droppableId:"droppable",isDropDisabled:b,direction:"vertical",children:function children(e,r){return(0,L.jsxs)("div",DragAndDropOptionValues_objectSpread(DragAndDropOptionValues_objectSpread({},e.droppableProps),{},{ref:e.innerRef,style:{height:"100%",display:"flex",flexDirection:"column"},children:[N.map((function(e,r){return(0,L.jsx)(s._l,{index:r,draggableId:l[r].codex,isDragDisabled:b,children:D((function(e){return(0,L.jsx)("div",DragAndDropOptionValues_objectSpread(DragAndDropOptionValues_objectSpread(DragAndDropOptionValues_objectSpread({ref:e.innerRef},e.draggableProps),e.dragHandleProps),{},{style:DragAndDropOptionValues_objectSpread(DragAndDropOptionValues_objectSpread({},e.draggableProps.style),{},{height:"fit-content"},b?{cursor:"wait"}:{}),children:N[r]}))}))},l[r].codex)})),e.placeholder]}))}})})};function DragAndDropOptions_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function DragAndDropOptions_objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?DragAndDropOptions_ownKeys(Object(t),!0).forEach((function(r){(0,n.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):DragAndDropOptions_ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const A=function DragAndDrop(e){var r=e.groups,t=e.variants,n=e.setCurProduct,i=e.currentProuduct,p=e.posOfOpt,l=d(),D=(0,u.useState)(!1),y=(0,o.Z)(D,2),M=y[0],b=y[1],j=useApiInterface().fetchData,g=function(){var e=(0,a.Z)(c().mark((function _callee(e){var a,u,s,d,l,D,y,M,g,f,N,O,x,T;return c().wrap((function _callee$(h){for(;;)switch(h.prev=h.next){case 0:if(a=!1,e.destination){h.next=3;break}return h.abrupt("return");case 3:if(e.source.index!=e.destination.index){h.next=5;break}return h.abrupt("return");case 5:if(e.source.index>e.destination.index&&(a=!0),b(!0),u=Object.keys(r),s=u[e.source.index],d=u[e.destination.index],l={},u.length>Object.keys(p).length)for(D=0;D<u.length;D++)p[u[D]]||(p[u[D]]=D);y=!1,h.t0=c().keys(r);case 14:if((h.t1=h.t0()).done){h.next=42;break}if(M=h.t1.value,!a){h.next=31;break}if(d!=M){h.next=21;break}y=!0,h.next=25;break;case 21:if(s!=M){h.next=25;break}return y=!1,l[M]=p[d],h.abrupt("continue",14);case 25:if(y){h.next=28;break}return l[M]=p[M],h.abrupt("continue",14);case 28:l[M]=p[u[u.indexOf(M)+1]],h.next=40;break;case 31:if(s!=M){h.next=35;break}return y=!0,l[M]=p[d],h.abrupt("continue",14);case 35:if(y){h.next=38;break}return l[M]=p[M],h.abrupt("continue",14);case 38:d==M&&(y=!1),l[M]=p[u[u.indexOf(M)-1]];case 40:h.next=14;break;case 42:for(g=t.map((function(e){for(var r in l)e[r].position=l[r];return e})),n(void 0,g.find((function(e){return e._id==i._id})),g),f={patch:Object.entries(l).map((function(e){var r=(0,o.Z)(e,2);return{op:"replace",path:"/"+r[0]+"/optionPosition",value:r[1]}}))},N=[],O=0;O<t.length;O++)x=t[O],N.push(j("/products/"+x._id,"catalog","PATCH",f));return h.next=49,Promise.all(N);case 49:T=h.sent,n(void 0,T.find((function(e){return e._id==i._id})),t.map((function(e){var r;return null!==(r=T.find((function(r){return r._id==e._id})))&&void 0!==r?r:e}))),b(!1);case 52:case"end":return h.stop()}}),_callee)})));return function onDragEnd(r){return e.apply(this,arguments)}}();return(0,L.jsx)("div",{style:{display:"flex",width:"100%",position:"relative"},children:(0,L.jsx)(s.Z5,{onDragEnd:g,children:(0,L.jsx)(s.bK,{droppableId:"droppable",isDropDisabled:M,direction:"horizontal",children:function children(e,a){return(0,L.jsxs)("div",DragAndDropOptions_objectSpread(DragAndDropOptions_objectSpread({},e.droppableProps),{},{ref:e.innerRef,style:{width:"calc("+100/Object.keys(r).length+"%)",height:"100%",display:"flex"},children:[Object.keys(r).map((function(e,a){return(0,L.jsx)(s._l,{index:a,draggableId:e,isDragDisabled:M,children:l((function(a){return(0,L.jsxs)("div",DragAndDropOptions_objectSpread(DragAndDropOptions_objectSpread({ref:a.innerRef},a.draggableProps),{},{style:DragAndDropOptions_objectSpread(DragAndDropOptions_objectSpread({paddingRight:5},a.draggableProps.style),M?{cursor:"wait"}:{}),children:[(0,L.jsx)("div",DragAndDropOptions_objectSpread({className:h.q},a.dragHandleProps)),(0,L.jsx)(E,{currentProuduct:i,groups:r,groupKey:e,posOfOpt:p,setCurProduct:n,variants:t})]}))}))},e)})),e.placeholder]}))}})})})}},94831:(e,r,t)=>{t.d(r,{Z:()=>D,q:()=>l});var n=t(8081),a=t.n(n),o=t(23645),i=t.n(o),c=t(61667),u=t.n(c),s=new URL(t(38133),t.b),p=i()(a()),d=u()(s);p.push([e.id,".index-module--dt7FX {\n width: 100%;\n height: 20px;\n background: center / 50% no-repeat url("+d+");\n}\n",""]);var l="index-module--dt7FX";const D=p},38133:e=>{e.exports="data:image/svg+xml;base64,CjxzdmcgY2xhc3M9InN2Zy1pY29uIiBzdHlsZT0id2lkdGg6IDFlbTsgaGVpZ2h0OiAxZW07dmVydGljYWwtYWxpZ246IG1pZGRsZTtmaWxsOiBjdXJyZW50Q29sb3I7b3ZlcmZsb3c6IGhpZGRlbjsiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMjE5LjQyODU3MSA1ODUuMTQyODU3Yy0zNi41NzE0MjkgMC03My4xNDI4NTcgMzYuNTcxNDI5LTczLjE0Mjg1NyA3My4xNDI4NTdzMzYuNTcxNDI5IDczLjE0Mjg1NyA3My4xNDI4NTcgNzMuMTQyODU3IDczLjE0Mjg1Ny0zNi41NzE0MjkgNzMuMTQyODU4LTczLjE0Mjg1Ny0zNi41NzE0MjktNzMuMTQyODU3LTczLjE0Mjg1OC03My4xNDI4NTd6IG01ODUuMTQyODU4LTE0Ni4yODU3MTRjMzYuNTcxNDI5IDAgNzMuMTQyODU3LTM2LjU3MTQyOSA3My4xNDI4NTctNzMuMTQyODU3cy0zNi41NzE0MjktNzMuMTQyODU3LTczLjE0Mjg1Ny03My4xNDI4NTctNzMuMTQyODU3IDM2LjU3MTQyOS03My4xNDI4NTggNzMuMTQyODU3IDM2LjU3MTQyOSA3My4xNDI4NTcgNzMuMTQyODU4IDczLjE0Mjg1N3pNMjE5LjQyODU3MSAyOTIuNTcxNDI5Yy0zNi41NzE0MjkgMC03My4xNDI4NTcgMzYuNTcxNDI5LTczLjE0Mjg1NyA3My4xNDI4NTdzMzYuNTcxNDI5IDczLjE0Mjg1NyA3My4xNDI4NTcgNzMuMTQyODU3IDczLjE0Mjg1Ny0zNi41NzE0MjkgNzMuMTQyODU4LTczLjE0Mjg1Ny0zNi41NzE0MjktNzMuMTQyODU3LTczLjE0Mjg1OC03My4xNDI4NTd6IG01ODUuMTQyODU4IDI5Mi41NzE0MjhjLTM2LjU3MTQyOSAwLTczLjE0Mjg1NyAzNi41NzE0MjktNzMuMTQyODU4IDczLjE0Mjg1N3MzNi41NzE0MjkgNzMuMTQyODU3IDczLjE0Mjg1OCA3My4xNDI4NTcgNzMuMTQyODU3LTM2LjU3MTQyOSA3My4xNDI4NTctNzMuMTQyODU3LTM2LjU3MTQyOS03My4xNDI4NTctNzMuMTQyODU3LTczLjE0Mjg1N3pNNTEyIDI5Mi41NzE0MjljLTM2LjU3MTQyOSAwLTczLjE0Mjg1NyAzNi41NzE0MjktNzMuMTQyODU3IDczLjE0Mjg1N3MzNi41NzE0MjkgNzMuMTQyODU3IDczLjE0Mjg1NyA3My4xNDI4NTcgNzMuMTQyODU3LTM2LjU3MTQyOSA3My4xNDI4NTctNzMuMTQyODU3LTM2LjU3MTQyOS03My4xNDI4NTctNzMuMTQyODU3LTczLjE0Mjg1N3ogbTAgMjkyLjU3MTQyOGMtMzYuNTcxNDI5IDAtNzMuMTQyODU3IDM2LjU3MTQyOS03My4xNDI4NTcgNzMuMTQyODU3czM2LjU3MTQyOSA3My4xNDI4NTcgNzMuMTQyODU3IDczLjE0Mjg1NyA3My4xNDI4NTctMzYuNTcxNDI5IDczLjE0Mjg1Ny03My4xNDI4NTctMzYuNTcxNDI5LTczLjE0Mjg1Ny03My4xNDI4NTctNzMuMTQyODU3eiIgIC8+PC9zdmc+"}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 304.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[304,997,3222,8291],{59165:(e,n,t)=>{t.d(n,{_l:()=>l,gc:()=>JsonView});var o=t(87363);const isDate=e=>!!e&&e instanceof Date;function quoteString(e,n){return void 0===n&&(n=!1),!e||n?`"${e}"`:e}function ExpandableObject(e){let{field:n,value:t,data:i,lastElement:r,openBracket:l,closeBracket:a,level:s,style:d,shouldExpandNode:c,clickToExpandNode:u,outerRef:p}=e;const x=(0,o.useRef)(!1),[f,m,g]=function useBool(e){const[n,t]=(0,o.useState)(e());return[n,()=>t((e=>!e)),t]}((()=>c(s,t,n))),b=(0,o.useRef)(null);(0,o.useEffect)((()=>{x.current?g(c(s,t,n)):x.current=!0}),[c]);const h=f?d.collapseIcon:d.expandIcon,N=f?"collapse JSON":"expand JSON",v=(0,o.useId)(),j=s+1,y=i.length-1,onKeyDown=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),g("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();const n="ArrowUp"===e.key?-1:1;if(!p.current)return;const t=p.current.querySelectorAll("[role=button]");let o=-1;for(let e=0;e<t.length;e++)if(0===t[e].tabIndex){o=e;break}if(o<0)return;const i=(o+n+t.length)%t.length;t[o].tabIndex=-1,t[i].tabIndex=0,t[i].focus()}},onClick=()=>{var e;m();const n=b.current;if(!n)return;const t=null===(e=p.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');t&&(t.tabIndex=-1),n.tabIndex=0,n.focus()};return(0,o.createElement)("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":f,"aria-selected":void 0},(0,o.createElement)("span",{className:h,onClick,onKeyDown,role:"button","aria-label":N,"aria-expanded":f,"aria-controls":f?v:void 0,ref:b,tabIndex:0===s?0:-1}),(n||""===n)&&(u?(0,o.createElement)("span",{className:d.clickableLabel,onClick,onKeyDown},quoteString(n,d.quotesForFieldNames),":"):(0,o.createElement)("span",{className:d.label},quoteString(n,d.quotesForFieldNames),":")),(0,o.createElement)("span",{className:d.punctuation},l),f?(0,o.createElement)("ul",{id:v,role:"group"},i.map(((e,n)=>(0,o.createElement)(DataRender,{key:e[0]||n,field:e[0],value:e[1],style:d,lastElement:n===y,level:j,shouldExpandNode:c,clickToExpandNode:u,outerRef:p})))):(0,o.createElement)("span",{className:d.collapsedContent,onClick,onKeyDown}),(0,o.createElement)("span",{className:d.punctuation},a),!r&&(0,o.createElement)("span",{className:d.punctuation},","))}function EmptyObject(e){let{field:n,openBracket:t,closeBracket:i,lastElement:r,style:l}=e;return(0,o.createElement)("div",{className:l.basicChildStyle,role:"treeitem","aria-selected":void 0},(n||""===n)&&(0,o.createElement)("span",{className:l.label},quoteString(n,l.quotesForFieldNames),":"),(0,o.createElement)("span",{className:l.punctuation},t),(0,o.createElement)("span",{className:l.punctuation},i),!r&&(0,o.createElement)("span",{className:l.punctuation},","))}function JsonObject(e){let{field:n,value:t,style:o,lastElement:i,shouldExpandNode:r,clickToExpandNode:l,level:a,outerRef:s}=e;return 0===Object.keys(t).length?EmptyObject({field:n,openBracket:"{",closeBracket:"}",lastElement:i,style:o}):ExpandableObject({field:n,value:t,lastElement:i||!1,level:a,openBracket:"{",closeBracket:"}",style:o,shouldExpandNode:r,clickToExpandNode:l,data:Object.keys(t).map((e=>[e,t[e]])),outerRef:s})}function JsonArray(e){let{field:n,value:t,style:o,lastElement:i,level:r,shouldExpandNode:l,clickToExpandNode:a,outerRef:s}=e;return 0===t.length?EmptyObject({field:n,openBracket:"[",closeBracket:"]",lastElement:i,style:o}):ExpandableObject({field:n,value:t,lastElement:i||!1,level:r,openBracket:"[",closeBracket:"]",style:o,shouldExpandNode:l,clickToExpandNode:a,data:t.map((e=>[void 0,e])),outerRef:s})}function JsonPrimitiveValue(e){let n,{field:t,value:i,style:r,lastElement:l}=e,a=r.otherValue;var s;return null===i?(n="null",a=r.nullValue):void 0===i?(n="undefined",a=r.undefinedValue):"string"==typeof(s=i)||s instanceof String?(n=quoteString(i,!r.noQuotesForStringValues),a=r.stringValue):(e=>"boolean"==typeof e||e instanceof Boolean)(i)?(n=i?"true":"false",a=r.booleanValue):(e=>"number"==typeof e||e instanceof Number)(i)?(n=i.toString(),a=r.numberValue):(e=>"bigint"==typeof e||e instanceof BigInt)(i)?(n=`${i.toString()}n`,a=r.numberValue):n=isDate(i)?i.toISOString():i.toString(),(0,o.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,o.createElement)("span",{className:r.label},quoteString(t,r.quotesForFieldNames),":"),(0,o.createElement)("span",{className:a},n),!l&&(0,o.createElement)("span",{className:r.punctuation},","))}function DataRender(e){const n=e.value;return t=n,Array.isArray(t)?(0,o.createElement)(JsonArray,Object.assign({},e)):(e=>e instanceof Object&&null!==e)(n)&&!isDate(n)?(0,o.createElement)(JsonObject,Object.assign({},e)):(0,o.createElement)(JsonPrimitiveValue,Object.assign({},e));var t}var i="_2bkNM";const r={container:"_2IvMF _GzYRV",basicChildStyle:i,label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},l={container:"_11RoI _GzYRV",basicChildStyle:i,label:"_2bSDX",clickableLabel:"_1RQEj _2bSDX _1MFti",nullValue:"_LaAZe",undefinedValue:"_GTKgm",stringValue:"_Chy1W",booleanValue:"_2vRm-",numberValue:"_2bveF",otherValue:"_1prJR",punctuation:"_gsbQL _3eOF8",collapseIcon:"_3QHg2 _f10Tu _1MFti _1LId0",expandIcon:"_17H2C _f10Tu _1MFti _1UmXx",collapsedContent:"_3fDAz _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},allExpanded=()=>!0,JsonView=e=>{let{data:n,style:t=r,shouldExpandNode:i=allExpanded,clickToExpandNode:l=!1,...a}=e;const s=(0,o.useRef)(null);return(0,o.createElement)("div",Object.assign({"aria-label":"JSON view"},a,{className:t.container,ref:s,role:"tree"}),(0,o.createElement)(DataRender,{value:n,style:t,lastElement:!0,level:0,shouldExpandNode:i,clickToExpandNode:l,outerRef:s}))}},20997:(e,n,t)=>{t.r(n),t.d(n,{default:()=>j});var o=t(34988),i=t(91923),r=(t(87363),t(87668)),l=t(93379),a=t.n(l),s=t(7795),d=t.n(s),c=t(90569),u=t.n(c),p=t(3565),x=t.n(p),f=t(19216),m=t.n(f),g=t(44589),b=t.n(g),h=t(73751),N={};N.styleTagTransform=b(),N.setAttributes=x(),N.insert=u().bind(null,"head"),N.domAPI=d(),N.insertStyleElement=m();a()(h.Z,N);h.Z&&h.Z.locals&&h.Z.locals;var v=t(47514);const j=function ArticleSelector(e){var n,t=(0,o.Z)(e.articleState,2),l=t[0],a=t[1],s=(0,i.NP)(),d=Object.values(null!==(n=s.divaWebPlanner.getDivaArticles(void 0,!0))&&void 0!==n?n:{}),c=d.map((function(e){return{value:e.basketId,label:e.name+" "+e.posNr}}));return 1==c.length||0==c.length?(0,v.jsx)(v.Fragment,{}):(0,v.jsx)(r.ZP,{value:c.find((function(e){return e.value===(null==l?void 0:l.basketId)})),options:c,onChange:function onChange(e){a(d.find((function(n){return n.basketId==e.value})))},className:h.Y})}},13222:(e,n,t)=>{t.r(n),t.d(n,{default:()=>p});var o=t(34988),i=t(87363),r=t(36115),l=t(59165),a=t(65515),s=t.n(a),d=t(22976),c=t.n(d),u=t(47514);const p=function DecisionVisualization(e){var n=e.decision,t=e.snapshots,a=e.matchingOptions,d=void 0===a?{}:a,p=e.anyData,x=e.onClose,f=(0,i.useRef)(null),m=(0,i.useState)(),g=(0,o.Z)(m,2),b=g[0],h=g[1],N=function renderIfDefined(e,n){return null!=e&&""!==e?(0,u.jsxs)("p",{children:[(0,u.jsxs)("strong",{children:[n,n?":":""]}),Array.isArray(e)?e.join(", "):e]}):null};(0,i.useEffect)((function(){if(t){var e={},n=function _loop(){var n=t.before[o],i=t.after[o];e[o]={after:i,before:n,removedOpvs:n.visibleOPVs.filter((function(e){return!i.visibleOPVs.includes(e)}))}};for(var o in t.before)n();h(e)}else h(void 0)}),[t]);var v=function isExpanded(e,n,t){var o=t;return!(void 0!==t&&!["removedOpvs","after","before"].includes(t))||!!(b&&o&&b[o]&&JSON.stringify(b[o].before)!==JSON.stringify(b[o].after))};if(void 0!==n.priceFeatureGroupNo){var j,y,D=n;return(0,u.jsx)(c(),{nodeRef:f,handle:".handle",bounds:"parent",defaultPosition:void 0,children:(0,u.jsxs)("div",{className:r.ii,ref:f,children:[(0,u.jsxs)("h2",{className:s()(r.uR,"handle"),children:["PriceFeatureGroup #",D.priceFeatureGroupNo]}),(0,u.jsx)("div",{className:r.UF,onClick:function onClick(){return null==x?void 0:x()}}),(0,u.jsxs)("div",{children:[N(D.catalogId,"Catalog ID"),N(D._id,"priceFeatureGroup ID"),N(null===(j=D.priceFeatureGroupText)||void 0===j?void 0:j.DE,"priceFeatureGroupText"),N(D.percentageSurcharges,"percentageSurcharges"),N(D.isPercentage,"isPercentage"),N(D.comment,"comment"),N(D.featureNos,"Feature References"),N(D.additionalPrice,"Additional Price"),N(D.activeCombination,"Active Combination Seqence")]}),(0,u.jsx)("h3",{className:r.dY,children:"Option Combinations"}),(0,u.jsxs)("table",{className:r.ao,children:[(0,u.jsx)("thead",{children:(0,u.jsxs)("tr",{children:[(0,u.jsx)("th",{children:"Sequence"}),(0,u.jsx)("th",{children:"condition"}),(0,u.jsx)("th",{children:"priceField"})]})}),(0,u.jsx)("tbody",{children:null===(y=D.finishes)||void 0===y?void 0:y.map((function(e){return(0,u.jsxs)("tr",{className:s()(e.sequence===D.activeCombination?r.Se:void 0),children:[(0,u.jsx)("td",{children:e.sequence}),(0,u.jsx)("td",{children:JSON.stringify(e.optionsSetRefs)}),(0,u.jsxs)("td",{children:["PRFG",D.priceFeatureGroupNo+"_"+e.priceField]})]},e._id)}))})]}),(0,u.jsx)("br",{}),!!Object.values(d).length&&(0,u.jsxs)(u.Fragment,{children:["matching conditions",Object.keys(d).map((function(e){return N(e+": "+d[e],"")})),(0,u.jsx)("br",{})]}),!!b&&(0,u.jsxs)(u.Fragment,{children:["snapshot",(0,u.jsx)(l.gc,{shouldExpandNode:v,data:b,style:l._l})]}),!!p&&(0,u.jsx)(l.gc,{data:p,style:l._l})]})})}if(void 0!==n.Number){var _=n;return(0,u.jsx)(c(),{nodeRef:f,handle:".handle",bounds:"parent",defaultPosition:void 0,children:(0,u.jsxs)("div",{ref:f,style:{userSelect:"text"},children:[(0,u.jsx)("div",{className:r.UF,onClick:function onClick(){return null==x?void 0:x()}}),(0,u.jsxs)("h2",{className:"handle",children:[" Decision Details ",N(_.Number,"Number")]}),N(_.Type,"Type"),N(_.Prio,"Priority"),N(_.Options,"Options"),N(_.enabled?"Yes":"No","Enabled"),N(_.Number,"Decision Number"),N(_.activeCombination,"Active Combination Index"),N(_.disableHistory,"Disabled History"),_.DOC&&_.DOC.length>0&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("h3",{children:"Decision Option Combinations:"}),_.DOC.map((function(e,n){var t;return(0,u.jsxs)("div",{className:"decision-option-combination",children:[N(n,"doc Index"),N(e.JsFormula,"Formula"),Object.values(null!==(t=e.Row)&&void 0!==t?t:{}).map((function(e){return(0,u.jsx)(u.Fragment,{children:N(e.join(";"),"Doc Row")})})),e.DA&&e.DA.length>0&&(0,u.jsxs)("div",{children:[(0,u.jsx)("h6",{children:"Decision Actions:"}),(0,u.jsx)("ul",{children:e.DA.map((function(e,n){return(0,u.jsxs)("li",{children:[N(e.Type,"Action Type"),N(e.FeatureRef,"Feature Ref"),N(e.OptionCodex,"OptionCodex"),N(e.OptionRef,"OptionRef"),N(e.OptionRefCodex,"OptionRefCodex"),N(e.OptionValueRefCodex,"OptionValueRefCodex"),N(e.DecisionNr,"DecisionNr")]},n)}))})]}),N(e.ValidOptionValues,"Valid Option Values"),N(e.ValidOptions,"Valid Options")]},n)}))]}),N(_.disableHistory,"Disabled History"),(0,u.jsx)("strong",{children:"Is Valid DOC:"})," ",_.DOC&&_.DOC.length>0?"Yes":"No",(0,u.jsx)("br",{}),!!Object.values(d).length&&(0,u.jsxs)(u.Fragment,{children:["matching conditions",Object.keys(d).map((function(e){return N(e+": "+d[e],"")})),(0,u.jsx)("br",{})]}),!!b&&(0,u.jsxs)(u.Fragment,{children:["snapshot",(0,u.jsx)(l.gc,{shouldExpandNode:v,data:b,style:l._l})]}),!!p&&(0,u.jsx)(l.gc,{data:p,style:l._l})]})})}var O,S=n;return(0,u.jsx)(c(),{nodeRef:f,handle:".handle",bounds:"parent",defaultPosition:void 0,children:(0,u.jsxs)("div",{ref:f,className:r.ii,children:[(0,u.jsx)("div",{className:r.UF,onClick:function onClick(){return null==x?void 0:x()}}),(0,u.jsxs)("h2",{className:s()(r.uR,"handle"),children:["Decision #",S.decisionNo]}),(0,u.jsxs)("div",{children:[N(S.catalogId,"Catalog ID"),N(S._id,"Decision ID"),N(S.prio,"Priority"),N(S.decisionType,"Decision Type"),N(S.enabled?"Enabled":"Disabled","Status"),N(S.deleted?"Yes":"No","Deleted"),N(S.featureRefs,"Feature References"),N(S.disableHistory,"Disable History"),N(S.activeCombination,"Active Combination Seqence")]}),(0,u.jsx)("h3",{className:r.dY,children:"Option Combinations"}),(0,u.jsxs)("table",{className:r.ao,children:[(0,u.jsx)("thead",{children:(0,u.jsxs)("tr",{children:[(0,u.jsx)("th",{children:"Sequence"}),(0,u.jsx)("th",{children:"Actions"}),(0,u.jsx)("th",{children:"Options Set References"})]})}),(0,u.jsx)("tbody",{children:null===(O=S.optionCombinations)||void 0===O?void 0:O.map((function(e){return(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:e.sequence}),(0,u.jsx)("td",{children:e.actions.join(", ")}),(0,u.jsx)("td",{children:JSON.stringify(e.optionsSetRefs)})]},e._id)}))})]}),(0,u.jsx)("br",{}),!!Object.values(d).length&&(0,u.jsxs)(u.Fragment,{children:["matching conditions",Object.keys(d).map((function(e){return N(e+": "+d[e],"")})),(0,u.jsx)("br",{})]}),!!b&&(0,u.jsxs)(u.Fragment,{children:["snapshot",(0,u.jsx)(l.gc,{shouldExpandNode:v,data:b,style:l._l})]}),!!p&&(0,u.jsx)(l.gc,{data:p,style:l._l})]})})}},304:(e,n,t)=>{t.r(n),t.d(n,{default:()=>j});var o=t(12952),i=t(80248),r=t(84658),l=t(34988),a=t(88291),s=t(50747),d=t.n(s),c=t(87363),u=t(51203),p=t(36115),x=t(91923),f=t(9420),m=t(65515),g=t.n(m),b=t(88683),h=(t(76839),t(13222)),N=t(20997),v=t(47514);function ownKeys(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}const j=(0,f.Pi)((function DecisionAnalyzer(e){var n,t=Object.assign({},((0,a.Z)(e),e)),i=(0,x.NP)(),s=i.divaWebPlanner.getDivaArticles(),f=(0,c.useState)(!1),m=(0,l.Z)(f,2),j=m[0],y=m[1];(0,c.useEffect)((function(){var e=function(){var e=(0,r.Z)(d().mark((function _callee(){return d().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b.DivaUtils.Sleep(1e3);case 2:y(!j);case 3:case"end":return e.stop()}}),_callee)})));return function asyncFunct(){return e.apply(this,arguments)}}();e()}),[i.tabGroupState.allTabGroups]),(0,c.useEffect)((function(){var e=i.divaWebPlanner.actSet();return e&&!e.logDecisions&&(e.logDecisions=!0),function(){var e=i.divaWebPlanner.actSet();e&&(e.logDecisions=!1)}}),[i.uiState.isLoading]);var D=(0,c.useState)(Object.values(null!=s?s:{}).find((function(e){return 1==e.posNr}))),_=(0,l.Z)(D,2),O=_[0],S=_[1],w=(0,c.useState)(),k=(0,l.Z)(w,2),E=k[0],A=k[1],C=(0,c.useState)(),T=(0,l.Z)(C,2),M=T[0],z=T[1];if(!O)return(0,v.jsxs)("div",_objectSpread(_objectSpread({},t),{},{className:g()(t.className,p.fm),style:{zIndex:800},children:[(0,v.jsx)("a",{className:p.Fs,children:"Decision analyzer - plann article"}),(0,v.jsx)(N.default,{articleState:[O,S]})]}));var I=O.CatalogData.isIDMFormat,F=null===(n=O.decisionDebugStacks)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.stack)||void 0===n?void 0:n.length;if(!F)return(0,v.jsxs)("div",_objectSpread(_objectSpread({},t),{},{className:g()(t.className,p.fm),style:{zIndex:800},children:[(0,v.jsx)("a",{className:p.Fs,children:"Decision analyzer - change config"}),(0,v.jsx)(N.default,{articleState:[O,S]})]}));var Q=(0,o.Z)(Array(F).keys()),R=[];return R=I?O.decisionDebugStacks.map((function(e){return e.stack.map((function(e){var n,t;return _objectSpread(_objectSpread({},e),{},{bold:!(void 0===M||!(null!==(n=e.decision.featureRefs)&&void 0!==n&&n.includes(M)||null!==(t=e.decision.optionCombinations)&&void 0!==t&&t.find((function(e){var n;return null===(n=e.actions)||void 0===n?void 0:n.find((function(e){return function parseAction(e){try{var n,t,o=e.split(":"),i=(0,l.Z)(o,2),r=i[0],a=i[1].split("="),s=(0,l.Z)(a,2),d=s[0],c=s[1];if(c){var u=c.split("#"),p=(0,l.Z)(u,2);n=p[0],t=p[1]}return{actionType:r,target:d,ref:n,value:t}}catch(e){throw e}}(e).target==M||e==M}))}))))})}))})):O.decisionDebugStacks.map((function(e){return e.stack.map((function(e){var n,t;return _objectSpread(_objectSpread({},e),{},{bold:!(void 0===M||!(null!==(n=e.decision.DOC)&&void 0!==n&&n.find((function(e){var n,t;return(null===(n=e.DA)||void 0===n?void 0:n.find((function(e){return e.OptionCodex==M||e.DecisionNr==M})))||(null===(t=e.JsFormula)||void 0===t?void 0:t.includes("'OPT"+M+"'"))}))||null!==(t=e.decision.Options)&&void 0!==t&&t.includes("OPT"+M)))})}))})),(0,v.jsxs)("div",_objectSpread(_objectSpread({},t),{},{className:g()(t.className,p.fm,i.uiState.configSettingsIsExpanded?u.NF:void 0),style:{zIndex:800},children:[(0,v.jsxs)("a",{className:p.Fs,children:["Decision history",(0,v.jsx)("input",{value:M,onChange:function onChange(e){return z(e.target.value)},placeholder:"filter option ohne OPT",className:p.hX})]}),(0,v.jsx)(N.default,{articleState:[O,S]}),(0,v.jsxs)("table",{className:p.Kz,children:[(0,v.jsx)("thead",{children:(0,v.jsx)("tr",{className:p.$Q,children:R.map((function(e,n){return(0,v.jsx)("th",{children:n},n)}))})}),(0,v.jsx)("tbody",{children:Q.map((function(e,n){return(0,v.jsx)("tr",{className:p.$Q,children:R.map((function(e,t){var o,i;return(0,v.jsx)("th",{onClick:function onClick(){return function onClick(e,n){var t,o;e==((null==E||null===(t=E.decision)||void 0===t?void 0:t.Number)||(null==E||null===(o=E.decision)||void 0===o?void 0:o.decisionNo))?A(void 0):A(n)}(e[n].nr,e[n])},children:e[n].bold?(0,v.jsx)("strong",{children:null===(o=e[n])||void 0===o?void 0:o.text}):null===(i=e[n])||void 0===i?void 0:i.text},t)}))},n)}))})]}),E&&(0,v.jsx)("div",{className:p.EC,children:(0,v.jsx)(h.default,{decision:E.decision,snapshots:E.snapshots,onClose:function onClose(){return A(void 0)}})})]}))}))},73751:(e,n,t)=>{t.d(n,{Y:()=>a,Z:()=>s});var o=t(8081),i=t.n(o),r=t(23645),l=t.n(r)()(i());l.push([e.id,".index-module--_Tl9c {\n width: 200px;\n font-size: 12px;\n}\n.index-module--_Tl9c div {\n border-color: grey !important;\n}\n.index-module--_Tl9c div {\n box-shadow: none;\n box-shadow: initial;\n}\n",""]);var a="index-module--_Tl9c";const s=l},33981:(e,n,t)=>{t.d(n,{$Q:()=>x,EC:()=>N,Fs:()=>h,Kz:()=>p,Se:()=>f,UF:()=>g,ZP:()=>_,ao:()=>D,dY:()=>y,fm:()=>b,hX:()=>m,ii:()=>v,uR:()=>j});var o=t(8081),i=t.n(o),r=t(23645),l=t.n(r),a=t(61667),s=t.n(a),d=new URL(t(76380),t.b),c=l()(i()),u=s()(d);c.push([e.id,".index-module--sS9Y_ {\n position: relative;\n width: 100%;\n height: 100%;\n background-color: #ffffff;\n border-collapse: collapse;\n border-width: 0px;\n border-color: #e7eaf8;\n border-style: solid;\n color: #000000;\n font-weight: normal;\n font-family: var(--diva-typography-font-family);\n font-weight: 100;\n overflow-y: auto;\n top: 73px;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n.index-module--sS9Y_ thead {\n font-weight: bold !important;\n}\n.index-module--sS9Y_ thead {\n border-bottom: 1px solid;\n background-color: var(--thirdColor);\n font-size: 16px;\n padding-top: 1%;\n color: white;\n}\n.index-module--O5GJU {\n text-align: left;\n}\n.index-module--O5GJU:first-child {\n height: 20px;\n}\n.index-module--xNfvC {\n font-weight: bold;\n}\n.index-module--oALcg {\n height: 12px;\n font-size: 10px;\n}\n\n.index-module--HpoCh {\n position: absolute;\n right: 12px;\n top: 12px;\n z-index: 1002;\n width: -moz-max-content;\n width: max-content;\n width: 36px;\n height: 36px;\n background-repeat: no-repeat;\n background-position: center center;\n background-size: 28%;\n background-image: url("+u+");\n transition: background-size 100ms ease-in;\n cursor: pointer;\n}\n.index-module--O5GJU th {\n border-bottom: 1px solid;\n padding-right: 10px;\n margin-bottom: 1%;\n font-weight: normal;\n}\n.index-module--bBk4P {\n overflow: auto;\n left: 50px;\n}\n.index-module--sBWMs {\n height: 8%;\n width: 100%;\n padding-top: 0.7%;\n text-align: center;\n position: absolute;\n background-color: var(--primaryColor);\n font-size: 30px;\n color: white;\n font-weight: 600;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 10px;\n}\n\n.index-module--XrXfq {\n z-index: 100;\n position: fixed;\n top: 60px;\n left: 500px;\n z-index: 100000;\n width: calc(100vw - 500px);\n pointer-events: none;\n height: calc(100vh - 60px);\n overflow: auto;\n}\n\n.index-module--uzZoJ {\n padding: 16px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n border: 1px solid #ddd;\n border-radius: 8px;\n pointer-events: all;\n background-color: #fff;\n width: 600px;\n}\n\n.index-module--uzZoJ h2 {\n cursor: move;\n}\n\n.index-module--wrmAf {\n font-size: 1.5em;\n font-weight: bold;\n}\n\n.index-module--GsJQn {\n margin-top: 16px;\n font-size: 1.2em;\n font-weight: bold;\n}\n\n.index-module--gf_Q8 {\n width: 100%;\n border-collapse: collapse;\n margin-top: 8px;\n}\n\n.index-module--gf_Q8 th,\n.index-module--gf_Q8 td {\n border: 1px solid #ddd;\n padding: 8px;\n text-align: left;\n line-break: anywhere;\n}\n\n.index-module--gf_Q8 th {\n background-color: #f2f2f2;\n}\n",""]);var p="index-module--sS9Y_",x="index-module--O5GJU",f="index-module--xNfvC",m="index-module--oALcg",g="index-module--HpoCh",b="index-module--bBk4P",h="index-module--sBWMs",N="index-module--XrXfq",v="index-module--uzZoJ",j="index-module--wrmAf",y="index-module--GsJQn",D="index-module--gf_Q8";const _=c},89965:(e,n,t)=>{t.d(n,{NF:()=>s,ZP:()=>c,ec:()=>a,pb:()=>d});var o=t(8081),i=t.n(o),r=t(23645),l=t.n(r)()(i());l.push([e.id,".index-module--NA4Nc {\n position: absolute;\n margin-left: 50px;\n height: 92%;\n background-color: var(--settingsBackgroundColor);\n padding-left: 5px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n box-shadow: inset 0px 4px 40px 1px rgba(0, 0, 0, 0.1);\n border-right: 2px solid;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n.index-module--zxgl3 {\n width: calc(25.5%) !important;\n}\n.index-module--zxgl3 {\n background-color: white;\n}\n.index-module--WGNyK {\n z-index: 590;\n background-color: rgba(250, 250, 250, 0.5);\n width: calc(63% - 50px);\n /*width: calc(69% - 50px); pfister*/\n}\n",""]);var a="index-module--NA4Nc",s="index-module--zxgl3",d="index-module--WGNyK";const c=l},72035:(e,n,t)=>{t.d(n,{Z:()=>a});var o=t(8081),i=t.n(o),r=t(23645),l=t.n(r)()(i());l.push([e.id,"/* base styles */\n\n._GzYRV {\n line-height: 1.2;\n white-space: pre-wrap;\n white-space: -moz-pre-wrap;\n white-space: -pre-wrap;\n white-space: -o-pre-wrap;\n word-wrap: break-word;\n}\n\n._3eOF8 {\n margin-right: 5px;\n font-weight: bold;\n}\n\n._3eOF8 + ._3eOF8 {\n margin-left: -5px;\n}\n\n._1MFti {\n cursor: pointer;\n}\n\n._f10Tu {\n font-size: 1.2em;\n margin-right: 5px;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n._1UmXx::after {\n content: '\\25B8';\n}\n\n._1LId0::after {\n content: '\\25BE';\n}\n\n._1pNG9 {\n margin-right: 5px;\n}\n\n._1pNG9::after {\n content: '...';\n font-size: 0.8em;\n}\n\n._2IvMF {\n background: #eee;\n}\n\n._2bkNM {\n margin: 0 10px;\n padding: 0;\n}\n\n._2bkNM > ul {\n margin: 0;\n padding: 0;\n}\n\n/* default light style */\n._1MGIk {\n font-weight: 600;\n margin-right: 5px;\n color: #000000;\n}\n\n._2YKJg {\n}\n\n._3uHL6 {\n color: #000000;\n}\n\n._2T6PJ {\n color: #df113a;\n}\n\n._1Gho6 {\n color: #df113a;\n}\n\n._vGjyY {\n color: rgb(42, 63, 60);\n}\n\n._1bQdo {\n color: #0b75f5;\n}\n\n._3zQKs {\n color: rgb(70, 144, 56);\n}\n\n._1xvuR {\n color: #43413d;\n}\n\n._oLqym {\n color: #000000;\n}\n\n._2AXVT {\n color: #000000;\n}\n\n._2KJWg {\n color: #000000;\n}\n\n/* default dark style */\n._11RoI {\n background: rgb(0, 43, 54);\n}\n\n._17H2C {\n color: rgb(253, 246, 227);\n}\n\n._3QHg2 {\n color: rgb(253, 246, 227);\n}\n\n._3fDAz {\n color: rgb(253, 246, 227);\n}\n\n._2bSDX {\n font-weight: bolder;\n margin-right: 5px;\n color: rgb(253, 246, 227);\n}\n\n._1RQEj {\n}\n\n._gsbQL {\n color: rgb(253, 246, 227);\n}\n\n._LaAZe {\n color: rgb(129, 181, 172);\n}\n\n._GTKgm {\n color: rgb(129, 181, 172);\n}\n\n._Chy1W {\n color: rgb(203, 75, 22);\n}\n\n._2bveF {\n color: rgb(211, 54, 130);\n}\n\n._2vRm- {\n color: rgb(174, 129, 255);\n}\n\n._1prJR {\n color: rgb(38, 139, 210);\n}\n",""]);const a=l},36115:(e,n,t)=>{t.d(n,{$Q:()=>m.$Q,EC:()=>m.EC,Fs:()=>m.Fs,Kz:()=>m.Kz,Se:()=>m.Se,UF:()=>m.UF,ao:()=>m.ao,dY:()=>m.dY,fm:()=>m.fm,hX:()=>m.hX,ii:()=>m.ii,uR:()=>m.uR});var o=t(93379),i=t.n(o),r=t(7795),l=t.n(r),a=t(90569),s=t.n(a),d=t(3565),c=t.n(d),u=t(19216),p=t.n(u),x=t(44589),f=t.n(x),m=t(33981),g={};g.styleTagTransform=f(),g.setAttributes=c(),g.insert=s().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=p();i()(m.ZP,g),m.ZP&&m.ZP.locals&&m.ZP.locals},51203:(e,n,t)=>{t.d(n,{NF:()=>m.NF,ec:()=>m.ec,pb:()=>m.pb});var o=t(93379),i=t.n(o),r=t(7795),l=t.n(r),a=t(90569),s=t.n(a),d=t(3565),c=t.n(d),u=t(19216),p=t.n(u),x=t(44589),f=t.n(x),m=t(89965),g={};g.styleTagTransform=f(),g.setAttributes=c(),g.insert=s().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=p();i()(m.ZP,g),m.ZP&&m.ZP.locals&&m.ZP.locals},76839:(e,n,t)=>{var o=t(93379),i=t.n(o),r=t(7795),l=t.n(r),a=t(90569),s=t.n(a),d=t(3565),c=t.n(d),u=t(19216),p=t.n(u),x=t(44589),f=t.n(x),m=t(72035),g={};g.styleTagTransform=f(),g.setAttributes=c(),g.insert=s().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=p();i()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals},76380:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEuMzUzNTUgMC42NDY0NDdDMS4xNTgyOSAwLjQ1MTE4NCAwLjg0MTcwOSAwLjQ1MTE4NCAwLjY0NjQ0NyAwLjY0NjQ0N0MwLjQ1MTE4NCAwLjg0MTcwOSAwLjQ1MTE4NCAxLjE1ODI5IDAuNjQ2NDQ3IDEuMzUzNTVMMS4zNTM1NSAwLjY0NjQ0N1pNOC42NDY0NSA5LjM1MzU1QzguODQxNzEgOS41NDg4MiA5LjE1ODI5IDkuNTQ4ODIgOS4zNTM1NSA5LjM1MzU1QzkuNTQ4ODIgOS4xNTgyOSA5LjU0ODgyIDguODQxNzEgOS4zNTM1NSA4LjY0NjQ1TDguNjQ2NDUgOS4zNTM1NVpNOS4zNTM1NSAxLjM1MzU1QzkuNTQ4ODIgMS4xNTgyOSA5LjU0ODgyIDAuODQxNzA5IDkuMzUzNTUgMC42NDY0NDdDOS4xNTgyOSAwLjQ1MTE4NCA4Ljg0MTcxIDAuNDUxMTg0IDguNjQ2NDUgMC42NDY0NDdMOS4zNTM1NSAxLjM1MzU1Wk0wLjY0NjQ0NyA4LjY0NjQ1QzAuNDUxMTg1IDguODQxNzEgMC40NTExODUgOS4xNTgyOSAwLjY0NjQ0NyA5LjM1MzU1QzAuODQxNzA5IDkuNTQ4ODEgMS4xNTgyOSA5LjU0ODgxIDEuMzUzNTUgOS4zNTM1NUwwLjY0NjQ0NyA4LjY0NjQ1Wk0wLjY0NjQ0NyAxLjM1MzU1TDguNjQ2NDUgOS4zNTM1NUw5LjM1MzU1IDguNjQ2NDVMMS4zNTM1NSAwLjY0NjQ0N0wwLjY0NjQ0NyAxLjM1MzU1Wk04LjY0NjQ1IDAuNjQ2NDQ3TDAuNjQ2NDQ3IDguNjQ2NDVMMS4zNTM1NSA5LjM1MzU1TDkuMzUzNTUgMS4zNTM1NUw4LjY0NjQ1IDAuNjQ2NDQ3WiIgZmlsbD0iIzRGNEY0RiIvPgo8L3N2Zz4K"},88291:(e,n,t)=>{function _objectDestructuringEmpty(e){if(null==e)throw new TypeError("Cannot destructure "+e)}t.d(n,{Z:()=>_objectDestructuringEmpty})}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[304,997,3222,8291],{59165:(e,n,t)=>{t.d(n,{_l:()=>l,gc:()=>JsonView});var o=t(87363);const isDate=e=>!!e&&e instanceof Date;function quoteString(e,n){return void 0===n&&(n=!1),!e||n?`"${e}"`:e}function ExpandableObject(e){let{field:n,value:t,data:i,lastElement:r,openBracket:l,closeBracket:a,level:s,style:d,shouldExpandNode:c,clickToExpandNode:u,outerRef:p}=e;const x=(0,o.useRef)(!1),[f,m,g]=function useBool(e){const[n,t]=(0,o.useState)(e());return[n,()=>t((e=>!e)),t]}((()=>c(s,t,n))),b=(0,o.useRef)(null);(0,o.useEffect)((()=>{x.current?g(c(s,t,n)):x.current=!0}),[c]);const h=f?d.collapseIcon:d.expandIcon,N=f?"collapse JSON":"expand JSON",v=(0,o.useId)(),j=s+1,y=i.length-1,onKeyDown=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),g("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();const n="ArrowUp"===e.key?-1:1;if(!p.current)return;const t=p.current.querySelectorAll("[role=button]");let o=-1;for(let e=0;e<t.length;e++)if(0===t[e].tabIndex){o=e;break}if(o<0)return;const i=(o+n+t.length)%t.length;t[o].tabIndex=-1,t[i].tabIndex=0,t[i].focus()}},onClick=()=>{var e;m();const n=b.current;if(!n)return;const t=null===(e=p.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');t&&(t.tabIndex=-1),n.tabIndex=0,n.focus()};return(0,o.createElement)("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":f,"aria-selected":void 0},(0,o.createElement)("span",{className:h,onClick,onKeyDown,role:"button","aria-label":N,"aria-expanded":f,"aria-controls":f?v:void 0,ref:b,tabIndex:0===s?0:-1}),(n||""===n)&&(u?(0,o.createElement)("span",{className:d.clickableLabel,onClick,onKeyDown},quoteString(n,d.quotesForFieldNames),":"):(0,o.createElement)("span",{className:d.label},quoteString(n,d.quotesForFieldNames),":")),(0,o.createElement)("span",{className:d.punctuation},l),f?(0,o.createElement)("ul",{id:v,role:"group"},i.map(((e,n)=>(0,o.createElement)(DataRender,{key:e[0]||n,field:e[0],value:e[1],style:d,lastElement:n===y,level:j,shouldExpandNode:c,clickToExpandNode:u,outerRef:p})))):(0,o.createElement)("span",{className:d.collapsedContent,onClick,onKeyDown}),(0,o.createElement)("span",{className:d.punctuation},a),!r&&(0,o.createElement)("span",{className:d.punctuation},","))}function EmptyObject(e){let{field:n,openBracket:t,closeBracket:i,lastElement:r,style:l}=e;return(0,o.createElement)("div",{className:l.basicChildStyle,role:"treeitem","aria-selected":void 0},(n||""===n)&&(0,o.createElement)("span",{className:l.label},quoteString(n,l.quotesForFieldNames),":"),(0,o.createElement)("span",{className:l.punctuation},t),(0,o.createElement)("span",{className:l.punctuation},i),!r&&(0,o.createElement)("span",{className:l.punctuation},","))}function JsonObject(e){let{field:n,value:t,style:o,lastElement:i,shouldExpandNode:r,clickToExpandNode:l,level:a,outerRef:s}=e;return 0===Object.keys(t).length?EmptyObject({field:n,openBracket:"{",closeBracket:"}",lastElement:i,style:o}):ExpandableObject({field:n,value:t,lastElement:i||!1,level:a,openBracket:"{",closeBracket:"}",style:o,shouldExpandNode:r,clickToExpandNode:l,data:Object.keys(t).map((e=>[e,t[e]])),outerRef:s})}function JsonArray(e){let{field:n,value:t,style:o,lastElement:i,level:r,shouldExpandNode:l,clickToExpandNode:a,outerRef:s}=e;return 0===t.length?EmptyObject({field:n,openBracket:"[",closeBracket:"]",lastElement:i,style:o}):ExpandableObject({field:n,value:t,lastElement:i||!1,level:r,openBracket:"[",closeBracket:"]",style:o,shouldExpandNode:l,clickToExpandNode:a,data:t.map((e=>[void 0,e])),outerRef:s})}function JsonPrimitiveValue(e){let n,{field:t,value:i,style:r,lastElement:l}=e,a=r.otherValue;var s;return null===i?(n="null",a=r.nullValue):void 0===i?(n="undefined",a=r.undefinedValue):"string"==typeof(s=i)||s instanceof String?(n=quoteString(i,!r.noQuotesForStringValues),a=r.stringValue):(e=>"boolean"==typeof e||e instanceof Boolean)(i)?(n=i?"true":"false",a=r.booleanValue):(e=>"number"==typeof e||e instanceof Number)(i)?(n=i.toString(),a=r.numberValue):(e=>"bigint"==typeof e||e instanceof BigInt)(i)?(n=`${i.toString()}n`,a=r.numberValue):n=isDate(i)?i.toISOString():i.toString(),(0,o.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,o.createElement)("span",{className:r.label},quoteString(t,r.quotesForFieldNames),":"),(0,o.createElement)("span",{className:a},n),!l&&(0,o.createElement)("span",{className:r.punctuation},","))}function DataRender(e){const n=e.value;return t=n,Array.isArray(t)?(0,o.createElement)(JsonArray,Object.assign({},e)):(e=>e instanceof Object&&null!==e)(n)&&!isDate(n)?(0,o.createElement)(JsonObject,Object.assign({},e)):(0,o.createElement)(JsonPrimitiveValue,Object.assign({},e));var t}var i="_2bkNM";const r={container:"_2IvMF _GzYRV",basicChildStyle:i,label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},l={container:"_11RoI _GzYRV",basicChildStyle:i,label:"_2bSDX",clickableLabel:"_1RQEj _2bSDX _1MFti",nullValue:"_LaAZe",undefinedValue:"_GTKgm",stringValue:"_Chy1W",booleanValue:"_2vRm-",numberValue:"_2bveF",otherValue:"_1prJR",punctuation:"_gsbQL _3eOF8",collapseIcon:"_3QHg2 _f10Tu _1MFti _1LId0",expandIcon:"_17H2C _f10Tu _1MFti _1UmXx",collapsedContent:"_3fDAz _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},allExpanded=()=>!0,JsonView=e=>{let{data:n,style:t=r,shouldExpandNode:i=allExpanded,clickToExpandNode:l=!1,...a}=e;const s=(0,o.useRef)(null);return(0,o.createElement)("div",Object.assign({"aria-label":"JSON view"},a,{className:t.container,ref:s,role:"tree"}),(0,o.createElement)(DataRender,{value:n,style:t,lastElement:!0,level:0,shouldExpandNode:i,clickToExpandNode:l,outerRef:s}))}},20997:(e,n,t)=>{t.r(n),t.d(n,{default:()=>j});var o=t(34988),i=t(91923),r=(t(87363),t(71393)),l=t(93379),a=t.n(l),s=t(7795),d=t.n(s),c=t(90569),u=t.n(c),p=t(3565),x=t.n(p),f=t(19216),m=t.n(f),g=t(44589),b=t.n(g),h=t(73751),N={};N.styleTagTransform=b(),N.setAttributes=x(),N.insert=u().bind(null,"head"),N.domAPI=d(),N.insertStyleElement=m();a()(h.Z,N);h.Z&&h.Z.locals&&h.Z.locals;var v=t(47514);const j=function ArticleSelector(e){var n,t=(0,o.Z)(e.articleState,2),l=t[0],a=t[1],s=(0,i.NP)(),d=Object.values(null!==(n=s.divaWebPlanner.getDivaArticles(void 0,!0))&&void 0!==n?n:{}),c=d.map((function(e){return{value:e.basketId,label:e.name+" "+e.posNr}}));return 1==c.length||0==c.length?(0,v.jsx)(v.Fragment,{}):(0,v.jsx)(r.ZP,{value:c.find((function(e){return e.value===(null==l?void 0:l.basketId)})),options:c,onChange:function onChange(e){a(d.find((function(n){return n.basketId==e.value})))},className:h.Y})}},13222:(e,n,t)=>{t.r(n),t.d(n,{default:()=>p});var o=t(34988),i=t(87363),r=t(36115),l=t(59165),a=t(65515),s=t.n(a),d=t(22976),c=t.n(d),u=t(47514);const p=function DecisionVisualization(e){var n=e.decision,t=e.snapshots,a=e.matchingOptions,d=void 0===a?{}:a,p=e.anyData,x=e.onClose,f=(0,i.useRef)(null),m=(0,i.useState)(),g=(0,o.Z)(m,2),b=g[0],h=g[1],N=function renderIfDefined(e,n){return null!=e&&""!==e?(0,u.jsxs)("p",{children:[(0,u.jsxs)("strong",{children:[n,n?":":""]}),Array.isArray(e)?e.join(", "):e]}):null};(0,i.useEffect)((function(){if(t){var e={},n=function _loop(){var n=t.before[o],i=t.after[o];e[o]={after:i,before:n,removedOpvs:n.visibleOPVs.filter((function(e){return!i.visibleOPVs.includes(e)}))}};for(var o in t.before)n();h(e)}else h(void 0)}),[t]);var v=function isExpanded(e,n,t){var o=t;return!(void 0!==t&&!["removedOpvs","after","before"].includes(t))||!!(b&&o&&b[o]&&JSON.stringify(b[o].before)!==JSON.stringify(b[o].after))};if(void 0!==n.priceFeatureGroupNo){var j,y,D=n;return(0,u.jsx)(c(),{nodeRef:f,handle:".handle",bounds:"parent",defaultPosition:void 0,children:(0,u.jsxs)("div",{className:r.ii,ref:f,children:[(0,u.jsxs)("h2",{className:s()(r.uR,"handle"),children:["PriceFeatureGroup #",D.priceFeatureGroupNo]}),(0,u.jsx)("div",{className:r.UF,onClick:function onClick(){return null==x?void 0:x()}}),(0,u.jsxs)("div",{children:[N(D.catalogId,"Catalog ID"),N(D._id,"priceFeatureGroup ID"),N(null===(j=D.priceFeatureGroupText)||void 0===j?void 0:j.DE,"priceFeatureGroupText"),N(D.percentageSurcharges,"percentageSurcharges"),N(D.isPercentage,"isPercentage"),N(D.comment,"comment"),N(D.featureNos,"Feature References"),N(D.additionalPrice,"Additional Price"),N(D.activeCombination,"Active Combination Seqence")]}),(0,u.jsx)("h3",{className:r.dY,children:"Option Combinations"}),(0,u.jsxs)("table",{className:r.ao,children:[(0,u.jsx)("thead",{children:(0,u.jsxs)("tr",{children:[(0,u.jsx)("th",{children:"Sequence"}),(0,u.jsx)("th",{children:"condition"}),(0,u.jsx)("th",{children:"priceField"})]})}),(0,u.jsx)("tbody",{children:null===(y=D.finishes)||void 0===y?void 0:y.map((function(e){return(0,u.jsxs)("tr",{className:s()(e.sequence===D.activeCombination?r.Se:void 0),children:[(0,u.jsx)("td",{children:e.sequence}),(0,u.jsx)("td",{children:JSON.stringify(e.optionsSetRefs)}),(0,u.jsxs)("td",{children:["PRFG",D.priceFeatureGroupNo+"_"+e.priceField]})]},e._id)}))})]}),(0,u.jsx)("br",{}),!!Object.values(d).length&&(0,u.jsxs)(u.Fragment,{children:["matching conditions",Object.keys(d).map((function(e){return N(e+": "+d[e],"")})),(0,u.jsx)("br",{})]}),!!b&&(0,u.jsxs)(u.Fragment,{children:["snapshot",(0,u.jsx)(l.gc,{shouldExpandNode:v,data:b,style:l._l})]}),!!p&&(0,u.jsx)(l.gc,{data:p,style:l._l})]})})}if(void 0!==n.Number){var _=n;return(0,u.jsx)(c(),{nodeRef:f,handle:".handle",bounds:"parent",defaultPosition:void 0,children:(0,u.jsxs)("div",{ref:f,style:{userSelect:"text"},children:[(0,u.jsx)("div",{className:r.UF,onClick:function onClick(){return null==x?void 0:x()}}),(0,u.jsxs)("h2",{className:"handle",children:[" Decision Details ",N(_.Number,"Number")]}),N(_.Type,"Type"),N(_.Prio,"Priority"),N(_.Options,"Options"),N(_.enabled?"Yes":"No","Enabled"),N(_.Number,"Decision Number"),N(_.activeCombination,"Active Combination Index"),N(_.disableHistory,"Disabled History"),_.DOC&&_.DOC.length>0&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("h3",{children:"Decision Option Combinations:"}),_.DOC.map((function(e,n){var t;return(0,u.jsxs)("div",{className:"decision-option-combination",children:[N(n,"doc Index"),N(e.JsFormula,"Formula"),Object.values(null!==(t=e.Row)&&void 0!==t?t:{}).map((function(e){return(0,u.jsx)(u.Fragment,{children:N(e.join(";"),"Doc Row")})})),e.DA&&e.DA.length>0&&(0,u.jsxs)("div",{children:[(0,u.jsx)("h6",{children:"Decision Actions:"}),(0,u.jsx)("ul",{children:e.DA.map((function(e,n){return(0,u.jsxs)("li",{children:[N(e.Type,"Action Type"),N(e.FeatureRef,"Feature Ref"),N(e.OptionCodex,"OptionCodex"),N(e.OptionRef,"OptionRef"),N(e.OptionRefCodex,"OptionRefCodex"),N(e.OptionValueRefCodex,"OptionValueRefCodex"),N(e.DecisionNr,"DecisionNr")]},n)}))})]}),N(e.ValidOptionValues,"Valid Option Values"),N(e.ValidOptions,"Valid Options")]},n)}))]}),N(_.disableHistory,"Disabled History"),(0,u.jsx)("strong",{children:"Is Valid DOC:"})," ",_.DOC&&_.DOC.length>0?"Yes":"No",(0,u.jsx)("br",{}),!!Object.values(d).length&&(0,u.jsxs)(u.Fragment,{children:["matching conditions",Object.keys(d).map((function(e){return N(e+": "+d[e],"")})),(0,u.jsx)("br",{})]}),!!b&&(0,u.jsxs)(u.Fragment,{children:["snapshot",(0,u.jsx)(l.gc,{shouldExpandNode:v,data:b,style:l._l})]}),!!p&&(0,u.jsx)(l.gc,{data:p,style:l._l})]})})}var O,S=n;return(0,u.jsx)(c(),{nodeRef:f,handle:".handle",bounds:"parent",defaultPosition:void 0,children:(0,u.jsxs)("div",{ref:f,className:r.ii,children:[(0,u.jsx)("div",{className:r.UF,onClick:function onClick(){return null==x?void 0:x()}}),(0,u.jsxs)("h2",{className:s()(r.uR,"handle"),children:["Decision #",S.decisionNo]}),(0,u.jsxs)("div",{children:[N(S.catalogId,"Catalog ID"),N(S._id,"Decision ID"),N(S.prio,"Priority"),N(S.decisionType,"Decision Type"),N(S.enabled?"Enabled":"Disabled","Status"),N(S.deleted?"Yes":"No","Deleted"),N(S.featureRefs,"Feature References"),N(S.disableHistory,"Disable History"),N(S.activeCombination,"Active Combination Seqence")]}),(0,u.jsx)("h3",{className:r.dY,children:"Option Combinations"}),(0,u.jsxs)("table",{className:r.ao,children:[(0,u.jsx)("thead",{children:(0,u.jsxs)("tr",{children:[(0,u.jsx)("th",{children:"Sequence"}),(0,u.jsx)("th",{children:"Actions"}),(0,u.jsx)("th",{children:"Options Set References"})]})}),(0,u.jsx)("tbody",{children:null===(O=S.optionCombinations)||void 0===O?void 0:O.map((function(e){return(0,u.jsxs)("tr",{children:[(0,u.jsx)("td",{children:e.sequence}),(0,u.jsx)("td",{children:e.actions.join(", ")}),(0,u.jsx)("td",{children:JSON.stringify(e.optionsSetRefs)})]},e._id)}))})]}),(0,u.jsx)("br",{}),!!Object.values(d).length&&(0,u.jsxs)(u.Fragment,{children:["matching conditions",Object.keys(d).map((function(e){return N(e+": "+d[e],"")})),(0,u.jsx)("br",{})]}),!!b&&(0,u.jsxs)(u.Fragment,{children:["snapshot",(0,u.jsx)(l.gc,{shouldExpandNode:v,data:b,style:l._l})]}),!!p&&(0,u.jsx)(l.gc,{data:p,style:l._l})]})})}},304:(e,n,t)=>{t.r(n),t.d(n,{default:()=>j});var o=t(12952),i=t(80248),r=t(84658),l=t(34988),a=t(88291),s=t(50747),d=t.n(s),c=t(87363),u=t(51203),p=t(36115),x=t(91923),f=t(9420),m=t(65515),g=t.n(m),b=t(88683),h=(t(76839),t(13222)),N=t(20997),v=t(47514);function ownKeys(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}const j=(0,f.Pi)((function DecisionAnalyzer(e){var n,t=Object.assign({},((0,a.Z)(e),e)),i=(0,x.NP)(),s=i.divaWebPlanner.getDivaArticles(),f=(0,c.useState)(!1),m=(0,l.Z)(f,2),j=m[0],y=m[1];(0,c.useEffect)((function(){var e=function(){var e=(0,r.Z)(d().mark((function _callee(){return d().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b.DivaUtils.Sleep(1e3);case 2:y(!j);case 3:case"end":return e.stop()}}),_callee)})));return function asyncFunct(){return e.apply(this,arguments)}}();e()}),[i.tabGroupState.allTabGroups]),(0,c.useEffect)((function(){var e=i.divaWebPlanner.actSet();return e&&!e.logDecisions&&(e.logDecisions=!0),function(){var e=i.divaWebPlanner.actSet();e&&(e.logDecisions=!1)}}),[i.uiState.isLoading]);var D=(0,c.useState)(Object.values(null!=s?s:{}).find((function(e){return 1==e.posNr}))),_=(0,l.Z)(D,2),O=_[0],S=_[1],w=(0,c.useState)(),k=(0,l.Z)(w,2),E=k[0],A=k[1],C=(0,c.useState)(),T=(0,l.Z)(C,2),M=T[0],z=T[1];if(!O)return(0,v.jsxs)("div",_objectSpread(_objectSpread({},t),{},{className:g()(t.className,p.fm),style:{zIndex:800},children:[(0,v.jsx)("a",{className:p.Fs,children:"Decision analyzer - plann article"}),(0,v.jsx)(N.default,{articleState:[O,S]})]}));var I=O.CatalogData.isIDMFormat,F=null===(n=O.decisionDebugStacks)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.stack)||void 0===n?void 0:n.length;if(!F)return(0,v.jsxs)("div",_objectSpread(_objectSpread({},t),{},{className:g()(t.className,p.fm),style:{zIndex:800},children:[(0,v.jsx)("a",{className:p.Fs,children:"Decision analyzer - change config"}),(0,v.jsx)(N.default,{articleState:[O,S]})]}));var Q=(0,o.Z)(Array(F).keys()),R=[];return R=I?O.decisionDebugStacks.map((function(e){return e.stack.map((function(e){var n,t;return _objectSpread(_objectSpread({},e),{},{bold:!(void 0===M||!(null!==(n=e.decision.featureRefs)&&void 0!==n&&n.includes(M)||null!==(t=e.decision.optionCombinations)&&void 0!==t&&t.find((function(e){var n;return null===(n=e.actions)||void 0===n?void 0:n.find((function(e){return function parseAction(e){try{var n,t,o=e.split(":"),i=(0,l.Z)(o,2),r=i[0],a=i[1].split("="),s=(0,l.Z)(a,2),d=s[0],c=s[1];if(c){var u=c.split("#"),p=(0,l.Z)(u,2);n=p[0],t=p[1]}return{actionType:r,target:d,ref:n,value:t}}catch(e){throw e}}(e).target==M||e==M}))}))))})}))})):O.decisionDebugStacks.map((function(e){return e.stack.map((function(e){var n,t;return _objectSpread(_objectSpread({},e),{},{bold:!(void 0===M||!(null!==(n=e.decision.DOC)&&void 0!==n&&n.find((function(e){var n,t;return(null===(n=e.DA)||void 0===n?void 0:n.find((function(e){return e.OptionCodex==M||e.DecisionNr==M})))||(null===(t=e.JsFormula)||void 0===t?void 0:t.includes("'OPT"+M+"'"))}))||null!==(t=e.decision.Options)&&void 0!==t&&t.includes("OPT"+M)))})}))})),(0,v.jsxs)("div",_objectSpread(_objectSpread({},t),{},{className:g()(t.className,p.fm,i.uiState.configSettingsIsExpanded?u.NF:void 0),style:{zIndex:800},children:[(0,v.jsxs)("a",{className:p.Fs,children:["Decision history",(0,v.jsx)("input",{value:M,onChange:function onChange(e){return z(e.target.value)},placeholder:"filter option ohne OPT",className:p.hX})]}),(0,v.jsx)(N.default,{articleState:[O,S]}),(0,v.jsxs)("table",{className:p.Kz,children:[(0,v.jsx)("thead",{children:(0,v.jsx)("tr",{className:p.$Q,children:R.map((function(e,n){return(0,v.jsx)("th",{children:n},n)}))})}),(0,v.jsx)("tbody",{children:Q.map((function(e,n){return(0,v.jsx)("tr",{className:p.$Q,children:R.map((function(e,t){var o,i;return(0,v.jsx)("th",{onClick:function onClick(){return function onClick(e,n){var t,o;e==((null==E||null===(t=E.decision)||void 0===t?void 0:t.Number)||(null==E||null===(o=E.decision)||void 0===o?void 0:o.decisionNo))?A(void 0):A(n)}(e[n].nr,e[n])},children:e[n].bold?(0,v.jsx)("strong",{children:null===(o=e[n])||void 0===o?void 0:o.text}):null===(i=e[n])||void 0===i?void 0:i.text},t)}))},n)}))})]}),E&&(0,v.jsx)("div",{className:p.EC,children:(0,v.jsx)(h.default,{decision:E.decision,snapshots:E.snapshots,onClose:function onClose(){return A(void 0)}})})]}))}))},73751:(e,n,t)=>{t.d(n,{Y:()=>a,Z:()=>s});var o=t(8081),i=t.n(o),r=t(23645),l=t.n(r)()(i());l.push([e.id,".index-module--_Tl9c {\n width: 200px;\n font-size: 12px;\n}\n.index-module--_Tl9c div {\n border-color: grey !important;\n}\n.index-module--_Tl9c div {\n box-shadow: none;\n box-shadow: initial;\n}\n",""]);var a="index-module--_Tl9c";const s=l},33981:(e,n,t)=>{t.d(n,{$Q:()=>x,EC:()=>N,Fs:()=>h,Kz:()=>p,Se:()=>f,UF:()=>g,ZP:()=>_,ao:()=>D,dY:()=>y,fm:()=>b,hX:()=>m,ii:()=>v,uR:()=>j});var o=t(8081),i=t.n(o),r=t(23645),l=t.n(r),a=t(61667),s=t.n(a),d=new URL(t(76380),t.b),c=l()(i()),u=s()(d);c.push([e.id,".index-module--sS9Y_ {\n position: relative;\n width: 100%;\n height: 100%;\n background-color: #ffffff;\n border-collapse: collapse;\n border-width: 0px;\n border-color: #e7eaf8;\n border-style: solid;\n color: #000000;\n font-weight: normal;\n font-family: var(--diva-typography-font-family);\n font-weight: 100;\n overflow-y: auto;\n top: 73px;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n.index-module--sS9Y_ thead {\n font-weight: bold !important;\n}\n.index-module--sS9Y_ thead {\n border-bottom: 1px solid;\n background-color: var(--thirdColor);\n font-size: 16px;\n padding-top: 1%;\n color: white;\n}\n.index-module--O5GJU {\n text-align: left;\n}\n.index-module--O5GJU:first-child {\n height: 20px;\n}\n.index-module--xNfvC {\n font-weight: bold;\n}\n.index-module--oALcg {\n height: 12px;\n font-size: 10px;\n}\n\n.index-module--HpoCh {\n position: absolute;\n right: 12px;\n top: 12px;\n z-index: 1002;\n width: -moz-max-content;\n width: max-content;\n width: 36px;\n height: 36px;\n background-repeat: no-repeat;\n background-position: center center;\n background-size: 28%;\n background-image: url("+u+");\n transition: background-size 100ms ease-in;\n cursor: pointer;\n}\n.index-module--O5GJU th {\n border-bottom: 1px solid;\n padding-right: 10px;\n margin-bottom: 1%;\n font-weight: normal;\n}\n.index-module--bBk4P {\n overflow: auto;\n left: 50px;\n}\n.index-module--sBWMs {\n height: 8%;\n width: 100%;\n padding-top: 0.7%;\n text-align: center;\n position: absolute;\n background-color: var(--primaryColor);\n font-size: 30px;\n color: white;\n font-weight: 600;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 10px;\n}\n\n.index-module--XrXfq {\n z-index: 100;\n position: fixed;\n top: 60px;\n left: 500px;\n z-index: 100000;\n width: calc(100vw - 500px);\n pointer-events: none;\n height: calc(100vh - 60px);\n overflow: auto;\n}\n\n.index-module--uzZoJ {\n padding: 16px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n border: 1px solid #ddd;\n border-radius: 8px;\n pointer-events: all;\n background-color: #fff;\n width: 600px;\n}\n\n.index-module--uzZoJ h2 {\n cursor: move;\n}\n\n.index-module--wrmAf {\n font-size: 1.5em;\n font-weight: bold;\n}\n\n.index-module--GsJQn {\n margin-top: 16px;\n font-size: 1.2em;\n font-weight: bold;\n}\n\n.index-module--gf_Q8 {\n width: 100%;\n border-collapse: collapse;\n margin-top: 8px;\n}\n\n.index-module--gf_Q8 th,\n.index-module--gf_Q8 td {\n border: 1px solid #ddd;\n padding: 8px;\n text-align: left;\n line-break: anywhere;\n}\n\n.index-module--gf_Q8 th {\n background-color: #f2f2f2;\n}\n",""]);var p="index-module--sS9Y_",x="index-module--O5GJU",f="index-module--xNfvC",m="index-module--oALcg",g="index-module--HpoCh",b="index-module--bBk4P",h="index-module--sBWMs",N="index-module--XrXfq",v="index-module--uzZoJ",j="index-module--wrmAf",y="index-module--GsJQn",D="index-module--gf_Q8";const _=c},89965:(e,n,t)=>{t.d(n,{NF:()=>s,ZP:()=>c,ec:()=>a,pb:()=>d});var o=t(8081),i=t.n(o),r=t(23645),l=t.n(r)()(i());l.push([e.id,".index-module--NA4Nc {\n position: absolute;\n margin-left: 50px;\n height: 92%;\n background-color: var(--settingsBackgroundColor);\n padding-left: 5px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n box-shadow: inset 0px 4px 40px 1px rgba(0, 0, 0, 0.1);\n border-right: 2px solid;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n.index-module--zxgl3 {\n width: calc(25.5%) !important;\n}\n.index-module--zxgl3 {\n background-color: white;\n}\n.index-module--WGNyK {\n z-index: 590;\n background-color: rgba(250, 250, 250, 0.5);\n width: calc(63% - 50px);\n /*width: calc(69% - 50px); pfister*/\n}\n",""]);var a="index-module--NA4Nc",s="index-module--zxgl3",d="index-module--WGNyK";const c=l},72035:(e,n,t)=>{t.d(n,{Z:()=>a});var o=t(8081),i=t.n(o),r=t(23645),l=t.n(r)()(i());l.push([e.id,"/* base styles */\n\n._GzYRV {\n line-height: 1.2;\n white-space: pre-wrap;\n white-space: -moz-pre-wrap;\n white-space: -pre-wrap;\n white-space: -o-pre-wrap;\n word-wrap: break-word;\n}\n\n._3eOF8 {\n margin-right: 5px;\n font-weight: bold;\n}\n\n._3eOF8 + ._3eOF8 {\n margin-left: -5px;\n}\n\n._1MFti {\n cursor: pointer;\n}\n\n._f10Tu {\n font-size: 1.2em;\n margin-right: 5px;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n._1UmXx::after {\n content: '\\25B8';\n}\n\n._1LId0::after {\n content: '\\25BE';\n}\n\n._1pNG9 {\n margin-right: 5px;\n}\n\n._1pNG9::after {\n content: '...';\n font-size: 0.8em;\n}\n\n._2IvMF {\n background: #eee;\n}\n\n._2bkNM {\n margin: 0 10px;\n padding: 0;\n}\n\n._2bkNM > ul {\n margin: 0;\n padding: 0;\n}\n\n/* default light style */\n._1MGIk {\n font-weight: 600;\n margin-right: 5px;\n color: #000000;\n}\n\n._2YKJg {\n}\n\n._3uHL6 {\n color: #000000;\n}\n\n._2T6PJ {\n color: #df113a;\n}\n\n._1Gho6 {\n color: #df113a;\n}\n\n._vGjyY {\n color: rgb(42, 63, 60);\n}\n\n._1bQdo {\n color: #0b75f5;\n}\n\n._3zQKs {\n color: rgb(70, 144, 56);\n}\n\n._1xvuR {\n color: #43413d;\n}\n\n._oLqym {\n color: #000000;\n}\n\n._2AXVT {\n color: #000000;\n}\n\n._2KJWg {\n color: #000000;\n}\n\n/* default dark style */\n._11RoI {\n background: rgb(0, 43, 54);\n}\n\n._17H2C {\n color: rgb(253, 246, 227);\n}\n\n._3QHg2 {\n color: rgb(253, 246, 227);\n}\n\n._3fDAz {\n color: rgb(253, 246, 227);\n}\n\n._2bSDX {\n font-weight: bolder;\n margin-right: 5px;\n color: rgb(253, 246, 227);\n}\n\n._1RQEj {\n}\n\n._gsbQL {\n color: rgb(253, 246, 227);\n}\n\n._LaAZe {\n color: rgb(129, 181, 172);\n}\n\n._GTKgm {\n color: rgb(129, 181, 172);\n}\n\n._Chy1W {\n color: rgb(203, 75, 22);\n}\n\n._2bveF {\n color: rgb(211, 54, 130);\n}\n\n._2vRm- {\n color: rgb(174, 129, 255);\n}\n\n._1prJR {\n color: rgb(38, 139, 210);\n}\n",""]);const a=l},36115:(e,n,t)=>{t.d(n,{$Q:()=>m.$Q,EC:()=>m.EC,Fs:()=>m.Fs,Kz:()=>m.Kz,Se:()=>m.Se,UF:()=>m.UF,ao:()=>m.ao,dY:()=>m.dY,fm:()=>m.fm,hX:()=>m.hX,ii:()=>m.ii,uR:()=>m.uR});var o=t(93379),i=t.n(o),r=t(7795),l=t.n(r),a=t(90569),s=t.n(a),d=t(3565),c=t.n(d),u=t(19216),p=t.n(u),x=t(44589),f=t.n(x),m=t(33981),g={};g.styleTagTransform=f(),g.setAttributes=c(),g.insert=s().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=p();i()(m.ZP,g),m.ZP&&m.ZP.locals&&m.ZP.locals},51203:(e,n,t)=>{t.d(n,{NF:()=>m.NF,ec:()=>m.ec,pb:()=>m.pb});var o=t(93379),i=t.n(o),r=t(7795),l=t.n(r),a=t(90569),s=t.n(a),d=t(3565),c=t.n(d),u=t(19216),p=t.n(u),x=t(44589),f=t.n(x),m=t(89965),g={};g.styleTagTransform=f(),g.setAttributes=c(),g.insert=s().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=p();i()(m.ZP,g),m.ZP&&m.ZP.locals&&m.ZP.locals},76839:(e,n,t)=>{var o=t(93379),i=t.n(o),r=t(7795),l=t.n(r),a=t(90569),s=t.n(a),d=t(3565),c=t.n(d),u=t(19216),p=t.n(u),x=t(44589),f=t.n(x),m=t(72035),g={};g.styleTagTransform=f(),g.setAttributes=c(),g.insert=s().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=p();i()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals},76380:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEuMzUzNTUgMC42NDY0NDdDMS4xNTgyOSAwLjQ1MTE4NCAwLjg0MTcwOSAwLjQ1MTE4NCAwLjY0NjQ0NyAwLjY0NjQ0N0MwLjQ1MTE4NCAwLjg0MTcwOSAwLjQ1MTE4NCAxLjE1ODI5IDAuNjQ2NDQ3IDEuMzUzNTVMMS4zNTM1NSAwLjY0NjQ0N1pNOC42NDY0NSA5LjM1MzU1QzguODQxNzEgOS41NDg4MiA5LjE1ODI5IDkuNTQ4ODIgOS4zNTM1NSA5LjM1MzU1QzkuNTQ4ODIgOS4xNTgyOSA5LjU0ODgyIDguODQxNzEgOS4zNTM1NSA4LjY0NjQ1TDguNjQ2NDUgOS4zNTM1NVpNOS4zNTM1NSAxLjM1MzU1QzkuNTQ4ODIgMS4xNTgyOSA5LjU0ODgyIDAuODQxNzA5IDkuMzUzNTUgMC42NDY0NDdDOS4xNTgyOSAwLjQ1MTE4NCA4Ljg0MTcxIDAuNDUxMTg0IDguNjQ2NDUgMC42NDY0NDdMOS4zNTM1NSAxLjM1MzU1Wk0wLjY0NjQ0NyA4LjY0NjQ1QzAuNDUxMTg1IDguODQxNzEgMC40NTExODUgOS4xNTgyOSAwLjY0NjQ0NyA5LjM1MzU1QzAuODQxNzA5IDkuNTQ4ODEgMS4xNTgyOSA5LjU0ODgxIDEuMzUzNTUgOS4zNTM1NUwwLjY0NjQ0NyA4LjY0NjQ1Wk0wLjY0NjQ0NyAxLjM1MzU1TDguNjQ2NDUgOS4zNTM1NUw5LjM1MzU1IDguNjQ2NDVMMS4zNTM1NSAwLjY0NjQ0N0wwLjY0NjQ0NyAxLjM1MzU1Wk04LjY0NjQ1IDAuNjQ2NDQ3TDAuNjQ2NDQ3IDguNjQ2NDVMMS4zNTM1NSA5LjM1MzU1TDkuMzUzNTUgMS4zNTM1NUw4LjY0NjQ1IDAuNjQ2NDQ3WiIgZmlsbD0iIzRGNEY0RiIvPgo8L3N2Zz4K"},88291:(e,n,t)=>{function _objectDestructuringEmpty(e){if(null==e)throw new TypeError("Cannot destructure "+e)}t.d(n,{Z:()=>_objectDestructuringEmpty})}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 430.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[430,2142,8692],{32142:(t,i,o)=>{o.r(i),o.d(i,{default:()=>M});var a=o(65515),r=o.n(a),l=(o(87363),o(68692)),c=o(93379),d=o.n(c),u=o(7795),p=o.n(u),f=o(90569),b=o.n(f),v=o(3565),m=o.n(v),y=o(19216),g=o.n(y),k=o(44589),w=o.n(k),x=o(75581),C={};C.styleTagTransform=w(),C.setAttributes=m(),C.insert=b().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=g();d()(x.ZP,C);x.ZP&&x.ZP.locals&&x.ZP.locals;var S=o(47514);const M=function Toggle(t){var i,o=t.onChange,a=t.val,c=t.state,d=t.on,u=t.off,p=t.alwaysActiveColor,f=t.height,b=void 0===f?40:f,v=t.width,m=void 0===v?80:v,y=t.handleDiameter,g=void 0===y?32:y,k=null===(i=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===i?void 0:i.replace(/ /g,"");return(0,S.jsx)(l.Z,{checkedIcon:d?(0,S.jsx)("div",{className:r()(x.f6,x.co),children:d}):(0,S.jsx)(S.Fragment,{}),uncheckedIcon:u?(0,S.jsx)("div",{className:r()(x.f6,x.no),children:u}):(0,S.jsx)(S.Fragment,{}),onChange:function onChange(){return o(null!=a?a:!c)},checked:c,onColor:k,offColor:p?k:"#CACACA",height:b,width:m,handleDiameter:g})}},75581:(t,i,o)=>{o.d(i,{ZP:()=>f,co:()=>u,f6:()=>d,no:()=>p});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--ciLne {\n padding-left: 16px;\n}\n\n.index-module--W1TLd {\n padding-left: 4px;\n}\n",""]);var d="index-module--D7_Ss",u="index-module--ciLne",p="index-module--W1TLd";const f=c},68692:(t,i,o)=>{o.d(i,{Z:()=>c});var a=o(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},s.apply(this,arguments)}var r=a.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},a.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=a.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},a.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var i="#",o=1;o<4;o+=1)i+=t[o]+t[o];return i}function e(t,i,o,a,r){return function(t,i,o,a,r){var l=(t-o)/(i-o);if(0===l)return a;if(1===l)return r;for(var c="#",d=1;d<6;d+=2){var u=parseInt(a.substr(d,2),16),p=parseInt(r.substr(d,2),16),f=Math.round((1-l)*u+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,i,o,h(a),h(r))}var c=function(t){function n(i){t.call(this,i);var o=i.height,a=i.width,r=i.checked;this.t=i.handleDiameter||o-2,this.i=Math.max(a-o,a-(o+this.t)/2),this.o=Math.max(0,(o-this.t)/2),this.state={h:r?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[430,2142,8692],{32142:(t,i,o)=>{o.r(i),o.d(i,{default:()=>M});var a=o(65515),r=o.n(a),l=(o(87363),o(68692)),c=o(93379),d=o.n(c),u=o(7795),p=o.n(u),f=o(90569),b=o.n(f),v=o(3565),m=o.n(v),y=o(19216),g=o.n(y),k=o(44589),w=o.n(k),x=o(75581),C={};C.styleTagTransform=w(),C.setAttributes=m(),C.insert=b().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=g();d()(x.ZP,C);x.ZP&&x.ZP.locals&&x.ZP.locals;var S=o(47514);const M=function Toggle(t){var i,o=t.onChange,a=t.val,c=t.state,d=t.on,u=t.off,p=t.alwaysActiveColor,f=t.height,b=void 0===f?40:f,v=t.width,m=void 0===v?80:v,y=t.handleDiameter,g=void 0===y?32:y,k=null===(i=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===i?void 0:i.replace(/ /g,"");return(0,S.jsx)(l.Z,{checkedIcon:d?(0,S.jsx)("div",{className:r()(x.f6,x.co),children:d}):(0,S.jsx)(S.Fragment,{}),uncheckedIcon:u?(0,S.jsx)("div",{className:r()(x.f6,x.no),children:u}):(0,S.jsx)(S.Fragment,{}),onChange:function onChange(){return o(null!=a?a:!c)},checked:c,onColor:k,offColor:p?k:"#CACACA",height:b,width:m,handleDiameter:g})}},75581:(t,i,o)=>{o.d(i,{ZP:()=>f,co:()=>u,f6:()=>d,no:()=>p});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--ciLne {\n padding-left: 16px;\n}\n\n.index-module--W1TLd {\n padding-left: 4px;\n}\n",""]);var d="index-module--D7_Ss",u="index-module--ciLne",p="index-module--W1TLd";const f=c},68692:(t,i,o)=>{o.d(i,{Z:()=>c});var a=o(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},s.apply(this,arguments)}var r=a.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},a.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=a.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},a.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var i="#",o=1;o<4;o+=1)i+=t[o]+t[o];return i}function e(t,i,o,a,r){return function(t,i,o,a,r){var l=(t-o)/(i-o);if(0===l)return a;if(1===l)return r;for(var c="#",d=1;d<6;d+=2){var u=parseInt(a.substr(d,2),16),p=parseInt(r.substr(d,2),16),f=Math.round((1-l)*u+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,i,o,h(a),h(r))}var c=function(t){function n(i){t.call(this,i);var o=i.height,a=i.width,r=i.checked;this.t=i.handleDiameter||o-2,this.i=Math.max(a-o,a-(o+this.t)/2),this.o=Math.max(0,(o-this.t)/2),this.state={h:r?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var i=this.state,o=i.j,a=i.h,r=(this.props.checked?this.i:this.o)+t-o;i.U||t===o||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,r));l!==a&&this.setState({h:l})},n.prototype.A=function(t){var i=this.state,o=i.h,a=i.U,r=i.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var d=Date.now()-r;(!a||d<250||l&&o<=c||!l&&o>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var i=this.props;(0,i.onChange)(!i.checked,t,i.id)},n.prototype.render=function(){var t=this.props,i=t.checked,o=t.disabled,r=t.className,l=t.offColor,c=t.onColor,d=t.offHandleColor,u=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,b=t.checkedHandleIcon,v=t.uncheckedHandleIcon,m=t.boxShadow,y=t.activeBoxShadow,g=t.height,k=t.width,w=t.borderRadius,x=function(t,i){var o={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&-1===i.indexOf(a)&&(o[a]=t[a]);return o}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),C=this.state,S=C.h,M=C.U,D=C.B,T={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:g/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},E={height:g,width:k,margin:Math.max(0,(this.t-g)/2),position:"relative",background:e(S,this.i,this.o,l,c),borderRadius:"number"==typeof w?w:g/2,cursor:o?"default":"pointer",WebkitTransition:M?null:"background 0.25s",MozTransition:M?null:"background 0.25s",transition:M?null:"background 0.25s"},I={height:g,width:Math.min(1.5*g,k-(this.t+g)/2+1),position:"relative",opacity:(S-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:M?null:"opacity 0.25s",MozTransition:M?null:"opacity 0.25s",transition:M?null:"opacity 0.25s"},W={height:g,width:Math.min(1.5*g,k-(this.t+g)/2+1),position:"absolute",opacity:1-(S-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:M?null:"opacity 0.25s",MozTransition:M?null:"opacity 0.25s",transition:M?null:"opacity 0.25s"},H={height:this.t,width:this.t,background:e(S,this.i,this.o,d,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:"number"==typeof w?w-1:"50%",position:"absolute",transform:"translateX("+S+"px)",top:Math.max(0,(g-this.t)/2),outline:0,boxShadow:D?y:m,border:0,WebkitTransition:M?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:M?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:M?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},L={height:this.t,width:this.t,opacity:Math.max(2*(1-(S-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:M?null:"opacity 0.25s",MozTransition:M?null:"opacity 0.25s",transition:M?null:"opacity 0.25s"},B={height:this.t,width:this.t,opacity:Math.max(2*((S-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:M?null:"opacity 0.25s",MozTransition:M?null:"opacity 0.25s",transition:M?null:"opacity 0.25s"};return a.createElement("div",{className:r,style:T},a.createElement("div",{className:"react-switch-bg",style:E,onClick:o?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&a.createElement("div",{style:I},p),f&&a.createElement("div",{style:W},f)),a.createElement("div",{className:"react-switch-handle",style:H,onClick:function(t){return t.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.m,onTouchMove:o?null:this.M,onTouchEnd:o?null:this.T,onTouchCancel:o?null:this.S},v&&a.createElement("div",{style:L},v),b&&a.createElement("div",{style:B},b)),a.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":i,checked:i,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},x,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(a.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:r,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|