@crystaldesign/diva-web-planner-react 25.6.0-beta.16 → 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 1386.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[1386,5301,8692,8291,8488],{10304:(t,o,r)=>{o.Z=void 0;var i=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 r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var u=i?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(r,a,u):r[a]=t[a]}r.default=t,o&&o.set(t,r);return r}(r(87363)),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(r(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 r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},_extends.apply(this,arguments)}function ownKeys(t,o){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.push.apply(r,i)}return r}function _defineProperty(t,o,r){return o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function _defineProperties(t,o){for(var r=0;r<o.length;r++){var i=o[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}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 u="Select...",p=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?u:t.placeholder,value:""},isOpen:!1},o.dropdownRef=(0,i.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,r){return o&&_defineProperties(t.prototype,o),r&&_defineProperties(t,r),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?u: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 r;if("string"==typeof t)for(var i=0,a=o.length;i<a;i++)if("group"===o[i].type){var u=o[i].items.filter((function(o){return o.value===t}));u.length&&(r=u[0])}else void 0!==o[i].value&&o[i].value===t&&(r=o[i]);return r||t}},{key:"setValue",value:function setValue(t,o){var r={selected:{value:t,label:o},isOpen:!1};this.fireChangeEvent(r),this.setState(r)}},{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,r=t.value;void 0===r&&(r=t.label||t);var u=t.label||t.value||t,p=r===this.state.selected.value||r===this.state.selected,c=(_defineProperty(o={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(o,t.className,!!t.className),_defineProperty(o,"is-selected",p),o),l=(0,a.default)(c),f=Object.keys(t.data||{}).reduce((function(o,r){return function _objectSpread(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(r,!0).forEach((function(o){_defineProperty(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(r).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}({},o,_defineProperty({},"data-".concat(r),t.data[r]))}),{});return i.default.createElement("div",_extends({key:r,className:l,onMouseDown:this.setValue.bind(this,r,u),onClick:this.setValue.bind(this,r,u),role:"option","aria-selected":p?"true":"false"},f),u)}},{key:"buildMenu",value:function buildMenu(){var t=this,o=this.props,r=o.options,a=o.baseClassName,u=r.map((function(o){if("group"===o.type){var r=i.default.createElement("div",{className:"".concat(a,"-title")},o.name),u=o.items.map((function(o){return t.renderOption(o)}));return i.default.createElement("div",{className:"".concat(a,"-group"),key:o.name,role:"listbox",tabIndex:"-1"},r,u)}return t.renderOption(o)}));return u.length?u:i.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,r,u,p,c=this.props,l=c.baseClassName,f=c.controlClassName,d=c.placeholderClassName,y=c.menuClassName,v=c.arrowClassName,m=c.arrowClosed,b=c.arrowOpen,_=c.className,w=this.props.disabled?"Dropdown-disabled":"",O="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,g=(0,a.default)((_defineProperty(t={},"".concat(l,"-root"),!0),_defineProperty(t,_,!!_),_defineProperty(t,"is-open",this.state.isOpen),t)),k=(0,a.default)((_defineProperty(o={},"".concat(l,"-control"),!0),_defineProperty(o,f,!!f),_defineProperty(o,w,!!w),o)),x=(0,a.default)((_defineProperty(r={},"".concat(l,"-placeholder"),!0),_defineProperty(r,d,!!d),_defineProperty(r,"is-selected",this.isValueSelected()),r)),$=(0,a.default)((_defineProperty(u={},"".concat(l,"-menu"),!0),_defineProperty(u,y,!!y),u)),E=(0,a.default)((_defineProperty(p={},"".concat(l,"-arrow"),!0),_defineProperty(p,v,!!v),p)),N=i.default.createElement("div",{className:x},O),P=this.state.isOpen?i.default.createElement("div",{className:$,"aria-expanded":"true"},this.buildMenu()):null;return i.default.createElement("div",{ref:this.dropdownRef,className:g},i.default.createElement("div",{className:k,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},N,i.default.createElement("div",{className:"".concat(l,"-arrow-wrapper")},b&&m?this.state.isOpen?b:m:i.default.createElement("span",{className:E}))),P)}}]),Dropdown}(i.Component);p.defaultProps={baseClassName:"Dropdown"};var c=p;o.Z=c},86468:(t,o,r)=>{r.d(o,{ZP:()=>createDefaultQueryTester});var i=r(34155),extendStatics=function(t,o){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])},extendStatics(t,o)};function __extends(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function __(){this.constructor=t}extendStatics(t,o),t.prototype=null===o?Object.create(o):(__.prototype=o.prototype,new __)}"function"==typeof SuppressedError&&SuppressedError;var typeChecker=function(t){var o="[object "+t+"]";return function(t){return getClassName(t)===o}},getClassName=function(t){return Object.prototype.toString.call(t)},comparable=function(t){return t instanceof Date?t.getTime():a(t)?t.map(comparable):t&&"function"==typeof t.toJSON?t.toJSON():t},a=typeChecker("Array"),u=typeChecker("Object"),p=typeChecker("Function"),equals=function(t,o){if(null==t&&t==o)return!0;if(t===o)return!0;if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(o))return!1;if(a(t)){if(t.length!==o.length)return!1;for(var r=0,i=t.length;r<i;r++)if(!equals(t[r],o[r]))return!1;return!0}if(u(t)){if(Object.keys(t).length!==Object.keys(o).length)return!1;for(var p in t)if(!equals(t[p],o[p]))return!1;return!0}return!1},walkKeyPathValues=function(t,o,r,i,u,c){var l=o[i];if(a(t)&&isNaN(Number(l))&&!function(t,o){return t.hasOwnProperty(o)&&!p(t[o])}(t,l))for(var f=0,d=t.length;f<d;f++)if(!walkKeyPathValues(t[f],o,r,i,f,t))return!1;return i===o.length||null==t?r(t,u,c,0===i,i===o.length):walkKeyPathValues(t[l],o,r,i+1,l,t)},c=function(){function BaseOperation(t,o,r,i){this.params=t,this.owneryQuery=o,this.options=r,this.name=i,this.init()}return BaseOperation.prototype.init=function(){},BaseOperation.prototype.reset=function(){this.done=!1,this.keep=!1},BaseOperation}(),l=function(t){function GroupOperation(o,r,i,a){var u=t.call(this,o,r,i)||this;return u.children=a,u}return __extends(GroupOperation,t),GroupOperation.prototype.reset=function(){this.keep=!1,this.done=!1;for(var t=0,o=this.children.length;t<o;t++)this.children[t].reset()},GroupOperation.prototype.childrenNext=function(t,o,r,i,a){for(var u=!0,p=!0,c=0,l=this.children.length;c<l;c++){var f=this.children[c];if(f.done||f.next(t,o,r,i,a),f.keep||(p=!1),f.done){if(!f.keep)break}else u=!1}this.done=u,this.keep=p},GroupOperation}(c),f=function(t){function NamedGroupOperation(o,r,i,a,u){var p=t.call(this,o,r,i,a)||this;return p.name=u,p}return __extends(NamedGroupOperation,t),NamedGroupOperation}(l),d=function(t){function QueryOperation(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends(QueryOperation,t),QueryOperation.prototype.next=function(t,o,r,i){this.childrenNext(t,o,r,i)},QueryOperation}(l),y=function(t){function NestedOperation(o,r,i,a,u){var p=t.call(this,r,i,a,u)||this;return p.keyPath=o,p.propop=!0,p._nextNestedValue=function(t,o,r,i,a){return p.childrenNext(t,o,r,i,a),!p.done},p}return __extends(NestedOperation,t),NestedOperation.prototype.next=function(t,o,r){walkKeyPathValues(t,this.keyPath,this._nextNestedValue,0,o,r)},NestedOperation}(l),createTester=function(t,o){if(t instanceof Function)return t;if(t instanceof RegExp)return function(o){var r="string"==typeof o&&t.test(o);return t.lastIndex=0,r};var r=comparable(t);return function(t){return o(r,comparable(t))}},v=function(t){function EqualsOperation(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends(EqualsOperation,t),EqualsOperation.prototype.init=function(){this._test=createTester(this.params,this.options.compare)},EqualsOperation.prototype.next=function(t,o,r){Array.isArray(r)&&!r.hasOwnProperty(o)||this._test(t,o,r)&&(this.done=!0,this.keep=!0)},EqualsOperation}(c),numericalOperation=function(t){return o=function(o,r,i,a){var u=typeof comparable(o),p=t(o);return new v((function(t){var o,r=null==(o=t)?null:o;return typeof comparable(r)===u&&p(r)}),r,i,a)},function(t,r,i,a){return o(t,r,i,a)};var o},createNamedOperation=function(t,o,r,i){var a=i.operations[t];return a||throwUnsupportedOperation(t),a(o,r,i,t)},throwUnsupportedOperation=function(t){throw new Error("Unsupported operation: ".concat(t))},containsOperation=function(t,o){for(var r in t)if(o.operations.hasOwnProperty(r)||"$"===r.charAt(0))return!0;return!1},createNestedOperation=function(t,o,r,i,a){if(containsOperation(o,a)){var u=createQueryOperations(o,r,a),p=u[0];if(u[1].length)throw new Error("Property queries must contain only operations, or exact objects.");return new y(t,o,i,a,p)}return new y(t,o,i,a,[new v(o,i,a)])},createQueryOperation=function(t,o,r){void 0===o&&(o=null);var i=void 0===r?{}:r,a=i.compare,u=i.operations,p={compare:a||equals,operations:Object.assign({},u||{})},c=createQueryOperations(t,null,p),l=c[0],f=c[1],v=[];return l.length&&v.push(new y([],t,o,p,l)),v.push.apply(v,f),1===v.length?v[0]:new d(t,o,p,v)},createQueryOperations=function(t,o,r){var i,a=[],u=[];if(!(i=t)||i.constructor!==Object&&i.constructor!==Array&&"function Object() { [native code] }"!==i.constructor.toString()&&"function Array() { [native code] }"!==i.constructor.toString()||i.toJSON)return a.push(new v(t,t,r)),[a,u];for(var p in t)if(r.operations.hasOwnProperty(p)){var c=createNamedOperation(p,t[p],t,r);if(c&&!c.propop&&o&&!r.operations[o])throw new Error("Malformed query. ".concat(p," cannot be matched against property."));null!=c&&a.push(c)}else"$"===p.charAt(0)?throwUnsupportedOperation(p):u.push(createNestedOperation(p.split("."),t[p],p,t,r));return[a,u]},createOperationTester=function(t){return function(o,r,i){return t.reset(),t.next(o,r,i),t.keep}},m=function(t){function $Ne(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($Ne,t),$Ne.prototype.init=function(){this._test=createTester(this.params,this.options.compare)},$Ne.prototype.reset=function(){t.prototype.reset.call(this),this.keep=!0},$Ne.prototype.next=function(t){this._test(t)&&(this.done=!0,this.keep=!1)},$Ne}(c),b=function(t){function $ElemMatch(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($ElemMatch,t),$ElemMatch.prototype.init=function(){if(!this.params||"object"!=typeof this.params)throw new Error("Malformed query. $elemMatch must by an object.");this._queryOperation=createQueryOperation(this.params,this.owneryQuery,this.options)},$ElemMatch.prototype.reset=function(){t.prototype.reset.call(this),this._queryOperation.reset()},$ElemMatch.prototype.next=function(t){if(a(t)){for(var o=0,r=t.length;o<r;o++){this._queryOperation.reset();var i=t[o];this._queryOperation.next(i,o,t,!1),this.keep=this.keep||this._queryOperation.keep}this.done=!0}else this.done=!1,this.keep=!1},$ElemMatch}(c),_=function(t){function $Not(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($Not,t),$Not.prototype.init=function(){this._queryOperation=createQueryOperation(this.params,this.owneryQuery,this.options)},$Not.prototype.reset=function(){t.prototype.reset.call(this),this._queryOperation.reset()},$Not.prototype.next=function(t,o,r,i){this._queryOperation.next(t,o,r,i),this.done=this._queryOperation.done,this.keep=!this._queryOperation.keep},$Not}(c),w=function(t){function $Size(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($Size,t),$Size.prototype.init=function(){},$Size.prototype.next=function(t){a(t)&&t.length===this.params&&(this.done=!0,this.keep=!0)},$Size}(c),assertGroupNotEmpty=function(t){if(0===t.length)throw new Error("$and/$or/$nor must be a nonempty array")},O=function(t){function $Or(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!1,o}return __extends($Or,t),$Or.prototype.init=function(){var t=this;assertGroupNotEmpty(this.params),this._ops=this.params.map((function(o){return createQueryOperation(o,null,t.options)}))},$Or.prototype.reset=function(){this.done=!1,this.keep=!1;for(var t=0,o=this._ops.length;t<o;t++)this._ops[t].reset()},$Or.prototype.next=function(t,o,r){for(var i=!1,a=!1,u=0,p=this._ops.length;u<p;u++){var c=this._ops[u];if(c.next(t,o,r),c.keep){i=!0,a=c.keep;break}}this.keep=a,this.done=i},$Or}(c),g=function(t){function $Nor(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!1,o}return __extends($Nor,t),$Nor.prototype.next=function(o,r,i){t.prototype.next.call(this,o,r,i),this.keep=!this.keep},$Nor}(O),k=function(t){function $In(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($In,t),$In.prototype.init=function(){var t=this,o=Array.isArray(this.params)?this.params:[this.params];this._testers=o.map((function(o){if(containsOperation(o,t.options))throw new Error("cannot nest $ under ".concat(t.name.toLowerCase()));return createTester(o,t.options.compare)}))},$In.prototype.next=function(t,o,r){for(var i=!1,a=!1,u=0,p=this._testers.length;u<p;u++){if((0,this._testers[u])(t)){i=!0,a=!0;break}}this.keep=a,this.done=i},$In}(c),x=function(t){function $Nin(o,r,i,a){var u=t.call(this,o,r,i,a)||this;return u.propop=!0,u._in=new k(o,r,i,a),u}return __extends($Nin,t),$Nin.prototype.next=function(t,o,r,i){this._in.next(t,o,r),a(r)&&!i?this._in.keep?(this.keep=!1,this.done=!0):o==r.length-1&&(this.keep=!0,this.done=!0):(this.keep=!this._in.keep,this.done=!0)},$Nin.prototype.reset=function(){t.prototype.reset.call(this),this._in.reset()},$Nin}(c),$=function(t){function $Exists(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($Exists,t),$Exists.prototype.next=function(t,o,r,i,a){a?r.hasOwnProperty(o)===this.params&&(this.done=!0,this.keep=!0):(this.done=!0,this.keep=!this.params)},$Exists}(c),E=function(t){function $And(o,r,i,a){var u=t.call(this,o,r,i,o.map((function(t){return createQueryOperation(t,r,i)})),a)||this;return u.propop=!1,assertGroupNotEmpty(o),u}return __extends($And,t),$And.prototype.next=function(t,o,r,i){this.childrenNext(t,o,r,i)},$And}(f),N=function(t){function $All(o,r,i,a){var u=t.call(this,o,r,i,o.map((function(t){return createQueryOperation(t,r,i)})),a)||this;return u.propop=!0,u}return __extends($All,t),$All.prototype.next=function(t,o,r,i){this.childrenNext(t,o,r,i)},$All}(f),P=numericalOperation((function(t){return function(o){return null!=o&&o<t}})),C=numericalOperation((function(t){return function(o){return o===t||o<=t}})),S=numericalOperation((function(t){return function(o){return null!=o&&o>t}})),D=numericalOperation((function(t){return function(o){return o===t||o>=t}})),j={number:function(t){return"number"==typeof t},string:function(t){return"string"==typeof t},bool:function(t){return"boolean"==typeof t},array:function(t){return Array.isArray(t)},null:function(t){return null===t},timestamp:function(t){return t instanceof Date}},M=Object.freeze({__proto__:null,$Size:w,$all:function(t,o,r,i){return new N(t,o,r,i)},$and:function(t,o,r,i){return new E(t,o,r,i)},$elemMatch:function(t,o,r,i){return new b(t,o,r,i)},$eq:function(t,o,r){return new v(t,o,r)},$exists:function(t,o,r,i){return new $(t,o,r,i)},$gt:S,$gte:D,$in:function(t,o,r,i){return new k(t,o,r,i)},$lt:P,$lte:C,$mod:function(t,o,r){var i=t[0],a=t[1];return new v((function(t){return comparable(t)%i===a}),o,r)},$ne:function(t,o,r,i){return new m(t,o,r,i)},$nin:function(t,o,r,i){return new x(t,o,r,i)},$nor:function(t,o,r,i){return new g(t,o,r,i)},$not:function(t,o,r,i){return new _(t,o,r,i)},$options:function(){return null},$or:function(t,o,r,i){return new O(t,o,r,i)},$regex:function(t,o,r){return new v(new RegExp(t,o.$options),o,r)},$size:function(t,o,r){return new w(t,o,r,"$size")},$type:function(t,o,r){return new v((function(o){if("string"==typeof t){if(!j[t])throw new Error("Type alias does not exist");return j[t](o)}return null!=o&&(o instanceof t||o.constructor===t)}),o,r)},$where:function(t,o,r){var a;if(p(t))a=t;else{if(i.env.CSP_ENABLED)throw new Error('In CSP mode, sift does not support strings in "$where" condition');a=new Function("obj","return "+t)}return new v((function(t){return a.bind(t)(t)}),o,r)}}),createDefaultQueryTester=function(t,o){void 0===o&&(o={});var r=function(t,o,r){var i=void 0===r?{}:r,a=i.compare,u=i.operations;return createQueryOperation(t,o,{compare:a,operations:Object.assign({},M,u||{})})}(t,null,o);return createOperationTester(r)}},88291:(t,o,r)=>{function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t)}r.d(o,{Z:()=>_objectDestructuringEmpty})},68692:(t,o,r)=>{r.d(o,{Z:()=>p});var i=r(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},s.apply(this,arguments)}var a=i.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},i.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"})),u=i.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},i.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="#",r=1;r<4;r+=1)o+=t[r]+t[r];return o}function e(t,o,r,i,a){return function(t,o,r,i,a){var u=(t-r)/(o-r);if(0===u)return i;if(1===u)return a;for(var p="#",c=1;c<6;c+=2){var l=parseInt(i.substr(c,2),16),f=parseInt(a.substr(c,2),16),d=Math.round((1-u)*l+u*f).toString(16);1===d.length&&(d="0"+d),p+=d}return p}(t,o,r,h(i),h(a))}var p=function(t){function n(o){t.call(this,o);var r=o.height,i=o.width,a=o.checked;this.t=o.handleDiameter||r-2,this.i=Math.max(i-r,i-(r+this.t)/2),this.o=Math.max(0,(r-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,r=o.R,i=o.h,a=(this.props.checked?this.i:this.o)+t-r;o.N||t===r||this.setState({N:!0});var u=Math.min(this.i,Math.max(this.o,a));u!==i&&this.setState({h:u})},n.prototype.U=function(t){var o=this.state,r=o.h,i=o.N,a=o.B,u=this.props.checked,p=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var c=Date.now()-a;(!i||c<250||u&&r<=p||!u&&r>=p)&&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,r=t.disabled,a=t.className,u=t.offColor,p=t.onColor,c=t.offHandleColor,l=t.onHandleColor,f=t.checkedIcon,d=t.uncheckedIcon,y=t.checkedHandleIcon,v=t.uncheckedHandleIcon,m=t.boxShadow,b=t.activeBoxShadow,_=t.height,w=t.width,O=t.borderRadius,g=function(t,o){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===o.indexOf(i)&&(r[i]=t[i]);return r}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),k=this.state,x=k.h,$=k.N,E=k.j,N={position:"relative",display:"inline-block",textAlign:"left",opacity:r?.5:1,direction:"ltr",borderRadius:_/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"},P={height:_,width:w,margin:Math.max(0,(this.t-_)/2),position:"relative",background:e(x,this.i,this.o,u,p),borderRadius:"number"==typeof O?O:_/2,cursor:r?"default":"pointer",WebkitTransition:$?null:"background 0.25s",MozTransition:$?null:"background 0.25s",transition:$?null:"background 0.25s"},C={height:_,width:Math.min(1.5*_,w-(this.t+_)/2+1),position:"relative",opacity:(x-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:$?null:"opacity 0.25s",MozTransition:$?null:"opacity 0.25s",transition:$?null:"opacity 0.25s"},S={height:_,width:Math.min(1.5*_,w-(this.t+_)/2+1),position:"absolute",opacity:1-(x-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:$?null:"opacity 0.25s",MozTransition:$?null:"opacity 0.25s",transition:$?null:"opacity 0.25s"},D={height:this.t,width:this.t,background:e(x,this.i,this.o,c,l),display:"inline-block",cursor:r?"default":"pointer",borderRadius:"number"==typeof O?O-1:"50%",position:"absolute",transform:"translateX("+x+"px)",top:Math.max(0,(_-this.t)/2),outline:0,boxShadow:E?b:m,border:0,WebkitTransition:$?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:$?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:$?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},j={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:$?null:"opacity 0.25s",MozTransition:$?null:"opacity 0.25s",transition:$?null:"opacity 0.25s"},M={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:$?null:"opacity 0.25s",MozTransition:$?null:"opacity 0.25s",transition:$?null:"opacity 0.25s"};return i.createElement("div",{className:a,style:N},i.createElement("div",{className:"react-switch-bg",style:P,onClick:r?null:this.T,onMouseDown:function(t){return t.preventDefault()}},f&&i.createElement("div",{style:C},f),d&&i.createElement("div",{style:S},d)),i.createElement("div",{className:"react-switch-handle",style:D,onClick:function(t){return t.preventDefault()},onMouseDown:r?null:this.p,onTouchStart:r?null:this.k,onTouchMove:r?null:this.m,onTouchEnd:r?null:this.M,onTouchCancel:r?null:this.O},v&&i.createElement("div",{style:j},v),y&&i.createElement("div",{style:M},y)),i.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":o,checked:o,disabled:r,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},g,{ref:this.S,onFocus:this.D,onBlur:this.O,onKeyUp:this.C,onChange:this.$})))},n}(i.Component);p.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:u,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[1386,5301,8692,8291,8488],{10304:(t,o,r)=>{o.Z=void 0;var i=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 r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var u=i?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(r,a,u):r[a]=t[a]}r.default=t,o&&o.set(t,r);return r}(r(87363)),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(r(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 r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},_extends.apply(this,arguments)}function ownKeys(t,o){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),r.push.apply(r,i)}return r}function _defineProperty(t,o,r){return o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function _defineProperties(t,o){for(var r=0;r<o.length;r++){var i=o[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}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 u="Select...",p=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?u:t.placeholder,value:""},isOpen:!1},o.dropdownRef=(0,i.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,r){return o&&_defineProperties(t.prototype,o),r&&_defineProperties(t,r),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?u: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 r;if("string"==typeof t)for(var i=0,a=o.length;i<a;i++)if("group"===o[i].type){var u=o[i].items.filter((function(o){return o.value===t}));u.length&&(r=u[0])}else void 0!==o[i].value&&o[i].value===t&&(r=o[i]);return r||t}},{key:"setValue",value:function setValue(t,o){var r={selected:{value:t,label:o},isOpen:!1};this.fireChangeEvent(r),this.setState(r)}},{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,r=t.value;void 0===r&&(r=t.label||t);var u=t.label||t.value||t,p=r===this.state.selected.value||r===this.state.selected,c=(_defineProperty(o={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(o,t.className,!!t.className),_defineProperty(o,"is-selected",p),o),l=(0,a.default)(c),f=Object.keys(t.data||{}).reduce((function(o,r){return function _objectSpread(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(r,!0).forEach((function(o){_defineProperty(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(r).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}({},o,_defineProperty({},"data-".concat(r),t.data[r]))}),{});return i.default.createElement("div",_extends({key:r,className:l,onMouseDown:this.setValue.bind(this,r,u),onClick:this.setValue.bind(this,r,u),role:"option","aria-selected":p?"true":"false"},f),u)}},{key:"buildMenu",value:function buildMenu(){var t=this,o=this.props,r=o.options,a=o.baseClassName,u=r.map((function(o){if("group"===o.type){var r=i.default.createElement("div",{className:"".concat(a,"-title")},o.name),u=o.items.map((function(o){return t.renderOption(o)}));return i.default.createElement("div",{className:"".concat(a,"-group"),key:o.name,role:"listbox",tabIndex:"-1"},r,u)}return t.renderOption(o)}));return u.length?u:i.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,r,u,p,c=this.props,l=c.baseClassName,f=c.controlClassName,d=c.placeholderClassName,y=c.menuClassName,v=c.arrowClassName,m=c.arrowClosed,b=c.arrowOpen,_=c.className,w=this.props.disabled?"Dropdown-disabled":"",O="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,g=(0,a.default)((_defineProperty(t={},"".concat(l,"-root"),!0),_defineProperty(t,_,!!_),_defineProperty(t,"is-open",this.state.isOpen),t)),k=(0,a.default)((_defineProperty(o={},"".concat(l,"-control"),!0),_defineProperty(o,f,!!f),_defineProperty(o,w,!!w),o)),x=(0,a.default)((_defineProperty(r={},"".concat(l,"-placeholder"),!0),_defineProperty(r,d,!!d),_defineProperty(r,"is-selected",this.isValueSelected()),r)),$=(0,a.default)((_defineProperty(u={},"".concat(l,"-menu"),!0),_defineProperty(u,y,!!y),u)),E=(0,a.default)((_defineProperty(p={},"".concat(l,"-arrow"),!0),_defineProperty(p,v,!!v),p)),N=i.default.createElement("div",{className:x},O),P=this.state.isOpen?i.default.createElement("div",{className:$,"aria-expanded":"true"},this.buildMenu()):null;return i.default.createElement("div",{ref:this.dropdownRef,className:g},i.default.createElement("div",{className:k,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},N,i.default.createElement("div",{className:"".concat(l,"-arrow-wrapper")},b&&m?this.state.isOpen?b:m:i.default.createElement("span",{className:E}))),P)}}]),Dropdown}(i.Component);p.defaultProps={baseClassName:"Dropdown"};var c=p;o.Z=c},86468:(t,o,r)=>{r.d(o,{ZP:()=>createDefaultQueryTester});var i=r(34155),extendStatics=function(t,o){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])},extendStatics(t,o)};function __extends(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function __(){this.constructor=t}extendStatics(t,o),t.prototype=null===o?Object.create(o):(__.prototype=o.prototype,new __)}"function"==typeof SuppressedError&&SuppressedError;var typeChecker=function(t){var o="[object "+t+"]";return function(t){return getClassName(t)===o}},getClassName=function(t){return Object.prototype.toString.call(t)},comparable=function(t){return t instanceof Date?t.getTime():a(t)?t.map(comparable):t&&"function"==typeof t.toJSON?t.toJSON():t},a=typeChecker("Array"),u=typeChecker("Object"),p=typeChecker("Function"),equals=function(t,o){if(null==t&&t==o)return!0;if(t===o)return!0;if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(o))return!1;if(a(t)){if(t.length!==o.length)return!1;for(var r=0,i=t.length;r<i;r++)if(!equals(t[r],o[r]))return!1;return!0}if(u(t)){if(Object.keys(t).length!==Object.keys(o).length)return!1;for(var p in t)if(!equals(t[p],o[p]))return!1;return!0}return!1},walkKeyPathValues=function(t,o,r,i,u,c){var l=o[i];if(a(t)&&isNaN(Number(l))&&!function(t,o){return t.hasOwnProperty(o)&&!p(t[o])}(t,l))for(var f=0,d=t.length;f<d;f++)if(!walkKeyPathValues(t[f],o,r,i,f,t))return!1;return i===o.length||null==t?r(t,u,c,0===i,i===o.length):walkKeyPathValues(t[l],o,r,i+1,l,t)},c=function(){function BaseOperation(t,o,r,i){this.params=t,this.owneryQuery=o,this.options=r,this.name=i,this.init()}return BaseOperation.prototype.init=function(){},BaseOperation.prototype.reset=function(){this.done=!1,this.keep=!1},BaseOperation}(),l=function(t){function GroupOperation(o,r,i,a){var u=t.call(this,o,r,i)||this;return u.children=a,u}return __extends(GroupOperation,t),GroupOperation.prototype.reset=function(){this.keep=!1,this.done=!1;for(var t=0,o=this.children.length;t<o;t++)this.children[t].reset()},GroupOperation.prototype.childrenNext=function(t,o,r,i,a){for(var u=!0,p=!0,c=0,l=this.children.length;c<l;c++){var f=this.children[c];if(f.done||f.next(t,o,r,i,a),f.keep||(p=!1),f.done){if(!f.keep)break}else u=!1}this.done=u,this.keep=p},GroupOperation}(c),f=function(t){function NamedGroupOperation(o,r,i,a,u){var p=t.call(this,o,r,i,a)||this;return p.name=u,p}return __extends(NamedGroupOperation,t),NamedGroupOperation}(l),d=function(t){function QueryOperation(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends(QueryOperation,t),QueryOperation.prototype.next=function(t,o,r,i){this.childrenNext(t,o,r,i)},QueryOperation}(l),y=function(t){function NestedOperation(o,r,i,a,u){var p=t.call(this,r,i,a,u)||this;return p.keyPath=o,p.propop=!0,p._nextNestedValue=function(t,o,r,i,a){return p.childrenNext(t,o,r,i,a),!p.done},p}return __extends(NestedOperation,t),NestedOperation.prototype.next=function(t,o,r){walkKeyPathValues(t,this.keyPath,this._nextNestedValue,0,o,r)},NestedOperation}(l),createTester=function(t,o){if(t instanceof Function)return t;if(t instanceof RegExp)return function(o){var r="string"==typeof o&&t.test(o);return t.lastIndex=0,r};var r=comparable(t);return function(t){return o(r,comparable(t))}},v=function(t){function EqualsOperation(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends(EqualsOperation,t),EqualsOperation.prototype.init=function(){this._test=createTester(this.params,this.options.compare)},EqualsOperation.prototype.next=function(t,o,r){Array.isArray(r)&&!r.hasOwnProperty(o)||this._test(t,o,r)&&(this.done=!0,this.keep=!0)},EqualsOperation}(c),numericalOperation=function(t){return o=function(o,r,i,a){var u=typeof comparable(o),p=t(o);return new v((function(t){var o,r=null==(o=t)?null:o;return typeof comparable(r)===u&&p(r)}),r,i,a)},function(t,r,i,a){return o(t,r,i,a)};var o},createNamedOperation=function(t,o,r,i){var a=i.operations[t];return a||throwUnsupportedOperation(t),a(o,r,i,t)},throwUnsupportedOperation=function(t){throw new Error("Unsupported operation: ".concat(t))},containsOperation=function(t,o){for(var r in t)if(o.operations.hasOwnProperty(r)||"$"===r.charAt(0))return!0;return!1},createNestedOperation=function(t,o,r,i,a){if(containsOperation(o,a)){var u=createQueryOperations(o,r,a),p=u[0];if(u[1].length)throw new Error("Property queries must contain only operations, or exact objects.");return new y(t,o,i,a,p)}return new y(t,o,i,a,[new v(o,i,a)])},createQueryOperation=function(t,o,r){void 0===o&&(o=null);var i=void 0===r?{}:r,a=i.compare,u=i.operations,p={compare:a||equals,operations:Object.assign({},u||{})},c=createQueryOperations(t,null,p),l=c[0],f=c[1],v=[];return l.length&&v.push(new y([],t,o,p,l)),v.push.apply(v,f),1===v.length?v[0]:new d(t,o,p,v)},createQueryOperations=function(t,o,r){var i,a=[],u=[];if(!(i=t)||i.constructor!==Object&&i.constructor!==Array&&"function Object() { [native code] }"!==i.constructor.toString()&&"function Array() { [native code] }"!==i.constructor.toString()||i.toJSON)return a.push(new v(t,t,r)),[a,u];for(var p in t)if(r.operations.hasOwnProperty(p)){var c=createNamedOperation(p,t[p],t,r);if(c&&!c.propop&&o&&!r.operations[o])throw new Error("Malformed query. ".concat(p," cannot be matched against property."));null!=c&&a.push(c)}else"$"===p.charAt(0)?throwUnsupportedOperation(p):u.push(createNestedOperation(p.split("."),t[p],p,t,r));return[a,u]},createOperationTester=function(t){return function(o,r,i){return t.reset(),t.next(o,r,i),t.keep}},m=function(t){function $Ne(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($Ne,t),$Ne.prototype.init=function(){this._test=createTester(this.params,this.options.compare)},$Ne.prototype.reset=function(){t.prototype.reset.call(this),this.keep=!0},$Ne.prototype.next=function(t){this._test(t)&&(this.done=!0,this.keep=!1)},$Ne}(c),b=function(t){function $ElemMatch(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($ElemMatch,t),$ElemMatch.prototype.init=function(){if(!this.params||"object"!=typeof this.params)throw new Error("Malformed query. $elemMatch must by an object.");this._queryOperation=createQueryOperation(this.params,this.owneryQuery,this.options)},$ElemMatch.prototype.reset=function(){t.prototype.reset.call(this),this._queryOperation.reset()},$ElemMatch.prototype.next=function(t){if(a(t)){for(var o=0,r=t.length;o<r;o++){this._queryOperation.reset();var i=t[o];this._queryOperation.next(i,o,t,!1),this.keep=this.keep||this._queryOperation.keep}this.done=!0}else this.done=!1,this.keep=!1},$ElemMatch}(c),_=function(t){function $Not(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($Not,t),$Not.prototype.init=function(){this._queryOperation=createQueryOperation(this.params,this.owneryQuery,this.options)},$Not.prototype.reset=function(){t.prototype.reset.call(this),this._queryOperation.reset()},$Not.prototype.next=function(t,o,r,i){this._queryOperation.next(t,o,r,i),this.done=this._queryOperation.done,this.keep=!this._queryOperation.keep},$Not}(c),w=function(t){function $Size(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($Size,t),$Size.prototype.init=function(){},$Size.prototype.next=function(t){a(t)&&t.length===this.params&&(this.done=!0,this.keep=!0)},$Size}(c),assertGroupNotEmpty=function(t){if(0===t.length)throw new Error("$and/$or/$nor must be a nonempty array")},O=function(t){function $Or(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!1,o}return __extends($Or,t),$Or.prototype.init=function(){var t=this;assertGroupNotEmpty(this.params),this._ops=this.params.map((function(o){return createQueryOperation(o,null,t.options)}))},$Or.prototype.reset=function(){this.done=!1,this.keep=!1;for(var t=0,o=this._ops.length;t<o;t++)this._ops[t].reset()},$Or.prototype.next=function(t,o,r){for(var i=!1,a=!1,u=0,p=this._ops.length;u<p;u++){var c=this._ops[u];if(c.next(t,o,r),c.keep){i=!0,a=c.keep;break}}this.keep=a,this.done=i},$Or}(c),g=function(t){function $Nor(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!1,o}return __extends($Nor,t),$Nor.prototype.next=function(o,r,i){t.prototype.next.call(this,o,r,i),this.keep=!this.keep},$Nor}(O),k=function(t){function $In(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($In,t),$In.prototype.init=function(){var t=this,o=Array.isArray(this.params)?this.params:[this.params];this._testers=o.map((function(o){if(containsOperation(o,t.options))throw new Error("cannot nest $ under ".concat(t.name.toLowerCase()));return createTester(o,t.options.compare)}))},$In.prototype.next=function(t,o,r){for(var i=!1,a=!1,u=0,p=this._testers.length;u<p;u++){if((0,this._testers[u])(t)){i=!0,a=!0;break}}this.keep=a,this.done=i},$In}(c),x=function(t){function $Nin(o,r,i,a){var u=t.call(this,o,r,i,a)||this;return u.propop=!0,u._in=new k(o,r,i,a),u}return __extends($Nin,t),$Nin.prototype.next=function(t,o,r,i){this._in.next(t,o,r),a(r)&&!i?this._in.keep?(this.keep=!1,this.done=!0):o==r.length-1&&(this.keep=!0,this.done=!0):(this.keep=!this._in.keep,this.done=!0)},$Nin.prototype.reset=function(){t.prototype.reset.call(this),this._in.reset()},$Nin}(c),$=function(t){function $Exists(){var o=null!==t&&t.apply(this,arguments)||this;return o.propop=!0,o}return __extends($Exists,t),$Exists.prototype.next=function(t,o,r,i,a){a?r.hasOwnProperty(o)===this.params&&(this.done=!0,this.keep=!0):(this.done=!0,this.keep=!this.params)},$Exists}(c),E=function(t){function $And(o,r,i,a){var u=t.call(this,o,r,i,o.map((function(t){return createQueryOperation(t,r,i)})),a)||this;return u.propop=!1,assertGroupNotEmpty(o),u}return __extends($And,t),$And.prototype.next=function(t,o,r,i){this.childrenNext(t,o,r,i)},$And}(f),N=function(t){function $All(o,r,i,a){var u=t.call(this,o,r,i,o.map((function(t){return createQueryOperation(t,r,i)})),a)||this;return u.propop=!0,u}return __extends($All,t),$All.prototype.next=function(t,o,r,i){this.childrenNext(t,o,r,i)},$All}(f),P=numericalOperation((function(t){return function(o){return null!=o&&o<t}})),C=numericalOperation((function(t){return function(o){return o===t||o<=t}})),S=numericalOperation((function(t){return function(o){return null!=o&&o>t}})),D=numericalOperation((function(t){return function(o){return o===t||o>=t}})),j={number:function(t){return"number"==typeof t},string:function(t){return"string"==typeof t},bool:function(t){return"boolean"==typeof t},array:function(t){return Array.isArray(t)},null:function(t){return null===t},timestamp:function(t){return t instanceof Date}},M=Object.freeze({__proto__:null,$Size:w,$all:function(t,o,r,i){return new N(t,o,r,i)},$and:function(t,o,r,i){return new E(t,o,r,i)},$elemMatch:function(t,o,r,i){return new b(t,o,r,i)},$eq:function(t,o,r){return new v(t,o,r)},$exists:function(t,o,r,i){return new $(t,o,r,i)},$gt:S,$gte:D,$in:function(t,o,r,i){return new k(t,o,r,i)},$lt:P,$lte:C,$mod:function(t,o,r){var i=t[0],a=t[1];return new v((function(t){return comparable(t)%i===a}),o,r)},$ne:function(t,o,r,i){return new m(t,o,r,i)},$nin:function(t,o,r,i){return new x(t,o,r,i)},$nor:function(t,o,r,i){return new g(t,o,r,i)},$not:function(t,o,r,i){return new _(t,o,r,i)},$options:function(){return null},$or:function(t,o,r,i){return new O(t,o,r,i)},$regex:function(t,o,r){return new v(new RegExp(t,o.$options),o,r)},$size:function(t,o,r){return new w(t,o,r,"$size")},$type:function(t,o,r){return new v((function(o){if("string"==typeof t){if(!j[t])throw new Error("Type alias does not exist");return j[t](o)}return null!=o&&(o instanceof t||o.constructor===t)}),o,r)},$where:function(t,o,r){var a;if(p(t))a=t;else{if(i.env.CSP_ENABLED)throw new Error('In CSP mode, sift does not support strings in "$where" condition');a=new Function("obj","return "+t)}return new v((function(t){return a.bind(t)(t)}),o,r)}}),createDefaultQueryTester=function(t,o){void 0===o&&(o={});var r=function(t,o,r){var i=void 0===r?{}:r,a=i.compare,u=i.operations;return createQueryOperation(t,o,{compare:a,operations:Object.assign({},M,u||{})})}(t,null,o);return createOperationTester(r)}},88291:(t,o,r)=>{function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t)}r.d(o,{Z:()=>_objectDestructuringEmpty})},68692:(t,o,r)=>{r.d(o,{Z:()=>p});var i=r(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},s.apply(this,arguments)}var a=i.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},i.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"})),u=i.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},i.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="#",r=1;r<4;r+=1)o+=t[r]+t[r];return o}function e(t,o,r,i,a){return function(t,o,r,i,a){var u=(t-r)/(o-r);if(0===u)return i;if(1===u)return a;for(var p="#",c=1;c<6;c+=2){var l=parseInt(i.substr(c,2),16),f=parseInt(a.substr(c,2),16),d=Math.round((1-u)*l+u*f).toString(16);1===d.length&&(d="0"+d),p+=d}return p}(t,o,r,h(i),h(a))}var p=function(t){function n(o){t.call(this,o);var r=o.height,i=o.width,a=o.checked;this.t=o.handleDiameter||r-2,this.i=Math.max(i-r,i-(r+this.t)/2),this.o=Math.max(0,(r-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,r=o.j,i=o.h,a=(this.props.checked?this.i:this.o)+t-r;o.U||t===r||this.setState({U:!0});var u=Math.min(this.i,Math.max(this.o,a));u!==i&&this.setState({h:u})},n.prototype.A=function(t){var o=this.state,r=o.h,i=o.U,a=o.L,u=this.props.checked,p=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var c=Date.now()-a;(!i||c<250||u&&r<=p||!u&&r>=p)&&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,r=t.disabled,a=t.className,u=t.offColor,p=t.onColor,c=t.offHandleColor,l=t.onHandleColor,f=t.checkedIcon,d=t.uncheckedIcon,y=t.checkedHandleIcon,v=t.uncheckedHandleIcon,m=t.boxShadow,b=t.activeBoxShadow,_=t.height,w=t.width,O=t.borderRadius,g=function(t,o){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===o.indexOf(i)&&(r[i]=t[i]);return r}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),k=this.state,x=k.h,$=k.U,E=k.B,N={position:"relative",display:"inline-block",textAlign:"left",opacity:r?.5:1,direction:"ltr",borderRadius:_/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"},P={height:_,width:w,margin:Math.max(0,(this.t-_)/2),position:"relative",background:e(x,this.i,this.o,u,p),borderRadius:"number"==typeof O?O:_/2,cursor:r?"default":"pointer",WebkitTransition:$?null:"background 0.25s",MozTransition:$?null:"background 0.25s",transition:$?null:"background 0.25s"},C={height:_,width:Math.min(1.5*_,w-(this.t+_)/2+1),position:"relative",opacity:(x-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:$?null:"opacity 0.25s",MozTransition:$?null:"opacity 0.25s",transition:$?null:"opacity 0.25s"},S={height:_,width:Math.min(1.5*_,w-(this.t+_)/2+1),position:"absolute",opacity:1-(x-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:$?null:"opacity 0.25s",MozTransition:$?null:"opacity 0.25s",transition:$?null:"opacity 0.25s"},D={height:this.t,width:this.t,background:e(x,this.i,this.o,c,l),display:"inline-block",cursor:r?"default":"pointer",borderRadius:"number"==typeof O?O-1:"50%",position:"absolute",transform:"translateX("+x+"px)",top:Math.max(0,(_-this.t)/2),outline:0,boxShadow:E?b:m,border:0,WebkitTransition:$?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:$?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:$?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},j={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:$?null:"opacity 0.25s",MozTransition:$?null:"opacity 0.25s",transition:$?null:"opacity 0.25s"},M={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:$?null:"opacity 0.25s",MozTransition:$?null:"opacity 0.25s",transition:$?null:"opacity 0.25s"};return i.createElement("div",{className:a,style:N},i.createElement("div",{className:"react-switch-bg",style:P,onClick:r?null:this.$,onMouseDown:function(t){return t.preventDefault()}},f&&i.createElement("div",{style:C},f),d&&i.createElement("div",{style:S},d)),i.createElement("div",{className:"react-switch-handle",style:D,onClick:function(t){return t.preventDefault()},onMouseDown:r?null:this.p,onTouchStart:r?null:this.m,onTouchMove:r?null:this.M,onTouchEnd:r?null:this.T,onTouchCancel:r?null:this.S},v&&i.createElement("div",{style:j},v),y&&i.createElement("div",{style:M},y)),i.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":o,checked:o,disabled:r,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},g,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(i.Component);p.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:u,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|