@clickview/curator 0.0.4-rc.9 → 0.0.4

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.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("ReactBootstrap"),require("Formik"),require("Backbone"),require("SortableHOC"),require("Cropper"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","@clickview/shared","@clickview/common","ReactBootstrap","Formik","Backbone","SortableHOC","Cropper","Handlebars"],t):"object"==typeof exports?exports.curator=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("ReactBootstrap"),require("Formik"),require("Backbone"),require("SortableHOC"),require("Cropper"),require("Handlebars")):e.curator=t(e.React,e["@clickview/shared"],e["@clickview/common"],e.ReactBootstrap,e.Formik,e.Backbone,e.SortableHOC,e.Cropper,e.Handlebars)}(window,(function(e,t,n,r,i,a,o,c,u){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=232)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.addMethod=function(e,t,n){if(!e||!(0,m.default)(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if("string"!=typeof t)throw new TypeError("A Method name must be provided");if("function"!=typeof n)throw new TypeError("Method function must be provided");e.prototype[t]=n},t.lazy=t.ref=t.boolean=void 0;var i=r(n(11));t.mixed=i.default;var a=r(n(204));t.bool=a.default;var o=r(n(205));t.string=o.default;var c=r(n(206));t.number=c.default;var u=r(n(207));t.date=u.default;var s=r(n(209));t.object=s.default;var l=r(n(229));t.array=l.default;var f=r(n(25)),p=r(n(230)),d=r(n(55));t.ValidationError=d.default;var v=r(n(92));t.reach=v.default;var m=r(n(14));t.isSchema=m.default;var h=r(n(231));t.setLocale=h.default;var b=a.default;t.boolean=b;t.ref=function(e,t){return new f.default(e,t)};t.lazy=function(e){return new p.default(e)}},function(e,t){e.exports=i},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){e.exports={tree:"_1abau",text:"f13wK",chevron:"_25eVA",disabled:"_1qyCo",parentOfSelected:"_1fgN6",selected:"cVZit",actions:"_2BGWp",node:"rJVbQ",collapsed:"vc2by"}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(59),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();e.exports=a},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=y;var i=r(n(16)),a=r(n(17)),o=r(n(134)),c=r(n(173)),u=n(13),s=r(n(180)),l=r(n(54)),f=r(n(181)),p=r(n(14)),d=r(n(182)),v=r(n(33)),m=r(n(25)),h=n(92),b=function(){function e(){this.list=new Set,this.refs=new Map}var t=e.prototype;return t.toArray=function(){return(0,c.default)(this.list).concat((0,c.default)(this.refs.values()))},t.add=function(e){m.default.isRef(e)?this.refs.set(e.key,e):this.list.add(e)},t.delete=function(e){m.default.isRef(e)?this.refs.delete(e.key,e):this.list.delete(e)},t.has=function(e,t){if(this.list.has(e))return!0;for(var n,r=this.refs.values();!(n=r.next()).done;)if(t(n.value)===e)return!0;return!1},e}();function y(e){var t=this;if(void 0===e&&(e={}),!(this instanceof y))return new y;this._deps=[],this._conditions=[],this._options={abortEarly:!0,recursive:!0},this._exclusive=Object.create(null),this._whitelist=new b,this._blacklist=new b,this.tests=[],this.transforms=[],this.withMutation((function(){t.typeError(u.mixed.notType)})),(0,a.default)(e,"default")&&(this._defaultDefault=e.default),this._type=e.type||"mixed"}for(var g=y.prototype={__isYupSchema__:!0,constructor:y,clone:function(){var e=this;return this._mutate?this:(0,o.default)(this,(function(t){if((0,p.default)(t)&&t!==e)return t}))},label:function(e){var t=this.clone();return t._label=e,t},meta:function(e){if(0===arguments.length)return this._meta;var t=this.clone();return t._meta=(0,i.default)(t._meta||{},e),t},withMutation:function(e){var t=this._mutate;this._mutate=!0;var n=e(this);return this._mutate=t,n},concat:function(e){if(!e||e===this)return this;if(e._type!==this._type&&"mixed"!==this._type)throw new TypeError("You cannot `concat()` schema's of different types: "+this._type+" and "+e._type);var t=(0,f.default)(e.clone(),this);return(0,a.default)(e,"_default")&&(t._default=e._default),t.tests=this.tests,t._exclusive=this._exclusive,t.withMutation((function(t){e.tests.forEach((function(e){t.test(e.OPTIONS)}))})),t},isType:function(e){return!(!this._nullable||null!==e)||(!this._typeCheck||this._typeCheck(e))},resolve:function(e){var t=this;if(t._conditions.length){var n=t._conditions;(t=t.clone())._conditions=[],t=(t=n.reduce((function(t,n){return n.resolve(t,e)}),t)).resolve(e)}return t},cast:function(e,t){void 0===t&&(t={});var n=this.resolve((0,i.default)({},t,{value:e})),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){var a=(0,v.default)(e),o=(0,v.default)(r);throw new TypeError("The value of "+(t.path||"field")+' could not be cast to a value that satisfies the schema type: "'+n._type+'". \n\nattempted value: '+a+" \n"+(o!==a?"result of cast: "+o:""))}return r},_cast:function(e){var t=this,n=void 0===e?e:this.transforms.reduce((function(n,r){return r.call(t,n,e)}),e);return void 0===n&&(0,a.default)(this,"_default")&&(n=this.default()),n},_validate:function(e,t){var n=this;void 0===t&&(t={});var r=e,a=null!=t.originalValue?t.originalValue:e,o=this._option("strict",t),c=this._option("abortEarly",t),u=t.sync,s=t.path,f=this._label;o||(r=this._cast(r,(0,i.default)({assert:!1},t)));var p={value:r,path:s,schema:this,options:t,label:f,originalValue:a,sync:u},d=[];return this._typeError&&d.push(this._typeError(p)),this._whitelistError&&d.push(this._whitelistError(p)),this._blacklistError&&d.push(this._blacklistError(p)),(0,l.default)({validations:d,endEarly:c,value:r,path:s,sync:u}).then((function(e){return(0,l.default)({path:s,sync:u,value:e,endEarly:c,validations:n.tests.map((function(e){return e(p)}))})}))},validate:function(e,t){return void 0===t&&(t={}),this.resolve((0,i.default)({},t,{value:e}))._validate(e,t)},validateSync:function(e,t){var n,r;if(void 0===t&&(t={}),this.resolve((0,i.default)({},t,{value:e}))._validate(e,(0,i.default)({},t,{sync:!0})).then((function(e){return n=e})).catch((function(e){return r=e})),r)throw r;return n},isValid:function(e,t){return this.validate(e,t).then((function(){return!0})).catch((function(e){if("ValidationError"===e.name)return!1;throw e}))},isValidSync:function(e,t){try{return this.validateSync(e,t),!0}catch(e){if("ValidationError"===e.name)return!1;throw e}},getDefault:function(e){return void 0===e&&(e={}),this.resolve(e).default()},default:function(e){if(0===arguments.length){var t=(0,a.default)(this,"_default")?this._default:this._defaultDefault;return"function"==typeof t?t.call(this):(0,o.default)(t)}var n=this.clone();return n._default=e,n},strict:function(e){void 0===e&&(e=!0);var t=this.clone();return t._options.strict=e,t},_isPresent:function(e){return null!=e},required:function(e){return void 0===e&&(e=u.mixed.required),this.test({message:e,name:"required",exclusive:!0,test:function(e){return this.schema._isPresent(e)}})},notRequired:function(){var e=this.clone();return e.tests=e.tests.filter((function(e){return"required"!==e.OPTIONS.name})),e},nullable:function(e){void 0===e&&(e=!0);var t=this.clone();return t._nullable=e,t},transform:function(e){var t=this.clone();return t.transforms.push(e),t},test:function(){var e;if(void 0===(e=1===arguments.length?"function"==typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]}).message&&(e.message=u.mixed.default),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");var t=this.clone(),n=(0,d.default)(e),r=e.exclusive||e.name&&!0===t._exclusive[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t._exclusive[e.name]=!!e.exclusive,t.tests=t.tests.filter((function(t){if(t.OPTIONS.name===e.name){if(r)return!1;if(t.OPTIONS.test===n.OPTIONS.test)return!1}return!0})),t.tests.push(n),t},when:function(e,t){1===arguments.length&&(t=e,e=".");var n=this.clone(),r=[].concat(e).map((function(e){return new m.default(e)}));return r.forEach((function(e){e.isSibling&&n._deps.push(e.key)})),n._conditions.push(new s.default(r,t)),n},typeError:function(e){var t=this.clone();return t._typeError=(0,d.default)({message:e,name:"typeError",test:function(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t},oneOf:function(e,t){void 0===t&&(t=u.mixed.oneOf);var n=this.clone();return e.forEach((function(e){n._whitelist.add(e),n._blacklist.delete(e)})),n._whitelistError=(0,d.default)({message:t,name:"oneOf",test:function(e){if(void 0===e)return!0;var t=this.schema._whitelist;return!!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n},notOneOf:function(e,t){void 0===t&&(t=u.mixed.notOneOf);var n=this.clone();return e.forEach((function(e){n._blacklist.add(e),n._whitelist.delete(e)})),n._blacklistError=(0,d.default)({message:t,name:"notOneOf",test:function(e){var t=this.schema._blacklist;return!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n},strip:function(e){void 0===e&&(e=!0);var t=this.clone();return t._strip=e,t},_option:function(e,t){return(0,a.default)(t,e)?t[e]:this._options[e]},describe:function(){var e=this.clone();return{type:e._type,meta:e._meta,label:e._label,tests:e.tests.map((function(e){return{name:e.OPTIONS.name,params:e.OPTIONS.params}})).filter((function(e,t,n){return n.findIndex((function(t){return t.name===e.name}))===t}))}}},S=["validate","validateSync"],E=function(){var e=S[j];g[e+"At"]=function(t,n,r){void 0===r&&(r={});var a=(0,h.getIn)(this,t,n,r.context),o=a.parent,c=a.parentPath;return a.schema[e](o&&o[c],(0,i.default)({},r,{parent:o,path:t}))}},j=0;j<S.length;j++)E();for(var O=["equals","is"],T=0;T<O.length;T++){g[O[T]]=g.oneOf}for(var A=["not","nope"],C=0;C<A.length;C++){g[A[C]]=g.notOneOf}g.optional=g.notRequired,e.exports=t.default},function(e,t,n){var r=n(114),i=n(117);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=t.array=t.object=t.boolean=t.date=t.number=t.string=t.mixed=void 0;var i=r(n(33)),a={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:function(e){var t=e.path,n=e.type,r=e.value,a=e.originalValue,o=null!=a&&a!==r,c=t+" must be a `"+n+"` type, but the final value was: `"+(0,i.default)(r,!0)+"`"+(o?" (cast from the value `"+(0,i.default)(a,!0)+"`).":".");return null===r&&(c+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),c}};t.mixed=a;var o={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"};t.string=o;var c={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",notEqual:"${path} must be not equal to ${notEqual}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"};t.number=c;var u={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"};t.date=u;var s={};t.boolean=s;var l={noUnknown:"${path} field cannot have keys not specified in the object shape"};t.object=l;var f={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items"};t.array=f;var p={mixed:a,string:o,number:c,date:u,object:l,array:f,boolean:s};t.default=p},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;t.default=function(e){return e&&e.__isYupSchema__},e.exports=t.default},function(e,t,n){e.exports={draggableVideoItem:"_1JMCe",draggedVideoItem:"_3jjle"}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(104),i=n(57);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t,n){var r=n(19),i=n(106),a=n(107),o="[object Null]",c="[object Undefined]",u=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?c:o:u&&u in Object(e)?i(e):a(e)}},function(e,t,n){var r=n(9).Symbol;e.exports=r},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(66),i=n(147),a=n(51);e.exports=function(e){return a(e)?r(e):i(e)}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=function(e,t,n){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),(0,i.default)(e.prototype,n)};var i=r(n(16));e.exports=t.default},function(e,t,n){var r=n(132);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(157),i=n(43),a=n(158),o=n(159),c=n(160),u=n(18),s=n(61),l=s(r),f=s(i),p=s(a),d=s(o),v=s(c),m=u;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||a&&"[object Promise]"!=m(a.resolve())||o&&"[object Set]"!=m(new o)||c&&"[object WeakMap]"!=m(new c))&&(m=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?s(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case v:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var i=r(n(16)),a=n(34),o={context:"$",value:"."},c=function(){function e(e,t){if(void 0===t&&(t={}),"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===o.context,this.isValue=this.key[0]===o.value,this.isSibling=!this.isContext&&!this.isValue;var n=this.isContext?o.context:this.isValue?o.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,a.getter)(this.path,!0),this.map=t.map}var t=e.prototype;return t.getValue=function(e){var t=this.isContext?e.context:this.isValue?e.value:e.parent;return this.getter&&(t=this.getter(t||{})),this.map&&(t=this.map(t)),t},t.cast=function(e,t){return this.getValue((0,i.default)({},t,{value:e}))},t.resolve=function(){return this},t.describe=function(){return{type:"ref",key:this.key}},t.toString=function(){return"Ref("+this.key+")"},e.isRef=function(e){return e&&e.__isYupRef},e}();t.default=c,c.prototype.__isYupRef=!0,e.exports=t.default},function(e,t,n){var r=n(12)(Object,"create");e.exports=r},function(e,t,n){var r=n(122),i=n(123),a=n(124),o=n(125),c=n(126);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=c,e.exports=u},function(e,t,n){var r=n(42);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(128);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(40),i=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},function(e,t,n){var r=n(142);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(65),i=n(31);e.exports=function(e,t,n,a){var o=!n;n||(n={});for(var c=-1,u=t.length;++c<u;){var s=t[c],l=a?a(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?i(n,s,l):r(n,s,l)}return n}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=u(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){var r=u(this[e],t);return null!==r?r:n}),2)};var r=Object.prototype.toString,i=Error.prototype.toString,a=RegExp.prototype.toString,o="undefined"!=typeof Symbol?Symbol.prototype.toString:function(){return""},c=/^Symbol\((.*)\)(.*)$/;function u(e,t){if(void 0===t&&(t=!1),null==e||!0===e||!1===e)return""+e;var n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?'"'+e+'"':e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return o.call(e).replace(c,"Symbol($1)");var u=r.call(e).slice(8,-1);return"Date"===u?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===u||e instanceof Error?"["+i.call(e)+"]":"RegExp"===u?a.call(e):null}e.exports=t.default},function(e,t,n){"use strict";function r(e){this._maxSize=e,this.clear()}r.prototype.clear=function(){this._size=0,this._values={}},r.prototype.get=function(e){return this._values[e]},r.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),this._values.hasOwnProperty(e)||this._size++,this._values[e]=t};var i=/[^.^\]^[]+|(?=\[\]|\.\.)/g,a=/^\d+$/,o=/^\d/,c=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,u=/^\s*(['"]?)(.*?)(\1)\s*$/,s=!1,l=new r(512),f=new r(512),p=new r(512);try{new Function("")}catch(e){s=!0}function d(e){return l.get(e)||l.set(e,v(e).map((function(e){return e.replace(u,"$2")})))}function v(e){return e.match(i)}function m(e,t,n){return"string"==typeof t&&(n=t,t=!1),n=n||"data",(e=e||"")&&"["!==e.charAt(0)&&(e="."+e),t?function(e,t){var n,r=t,i=v(e);return h(i,(function(e,t,i,a,o){n=a===o.length-1,r+=(e=t||i?"["+e+"]":"."+e)+(n?")":" || {})")})),new Array(i.length+1).join("(")+r}(e,n):n+e}function h(e,t,n){var r,i,a,o,c=e.length;for(i=0;i<c;i++)(r=e[i])&&(y(r)&&(r='"'+r+'"'),a=!(o=b(r))&&/^\d+$/.test(r),t.call(n,r,o,a,i,e))}function b(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function y(e){return!b(e)&&(function(e){return e.match(o)&&!e.match(a)}(e)||function(e){return c.test(e)}(e))}e.exports={Cache:r,expr:m,split:v,normalizePath:d,setter:s?function(e){var t=d(e);return function(e,n){return function(e,t,n){var r=0,i=e.length;for(;r<i-1;)t=t[e[r++]];t[e[r]]=n}(t,e,n)}}:function(e){return f.get(e)||f.set(e,new Function("data, value",m(e,"data")+" = value"))},getter:s?function(e,t){var n=d(e);return function(e){return function(e,t,n){var r=0,i=e.length;for(;r<i;){if(null==n&&t)return;n=n[e[r++]]}return n}(n,t,e)}}:function(e,t){var n=e+"_"+t;return p.get(n)||p.set(n,new Function("data","return "+m(e,t,"data")))},join:function(e){return e.reduce((function(e,t){return e+(b(t)||a.test(t)?"["+t+"]":(e?".":"")+t)}),"")},forEach:function(e,t,n){h(v(e),t,n)}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;t.default=function(e){return null==e},e.exports=t.default},function(e,t){e.exports=a},function(e,t){e.exports=o},function(e,t,n){e.exports={curatorLayout:"XayF7",topNavRegion:"_3ewaZ",leftNavRegion:"_2c2o6"}},function(e,t,n){var r=n(8),i=n(40),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(o.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(18),i=n(10),a="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||i(e)&&r(e)==a}},function(e,t,n){var r=n(111),i=n(127),a=n(129),o=n(130),c=n(131);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=c,e.exports=u},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(12)(n(9),"Map");e.exports=r},function(e,t){var n=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t,n){var r=n(27),i=n(136),a=n(137),o=n(138),c=n(139),u=n(140);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=i,s.prototype.delete=a,s.prototype.get=o,s.prototype.has=c,s.prototype.set=u,e.exports=s},function(e,t,n){(function(e){var r=n(9),i=n(145),a=t&&!t.nodeType&&t,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,c=o&&o.exports===a?r.Buffer:void 0,u=(c?c.isBuffer:void 0)||i;e.exports=u}).call(this,n(47)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(59),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i&&r.process,c=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=c}).call(this,n(47)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(60),i=n(44);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){var r=n(154),i=n(71),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,c=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return a.call(e,t)})))}:i;e.exports=c},function(e,t,n){var r=n(77);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.propagateErrors=function(e,t){return e?null:function(e){return t.push(e),e.value}},t.settled=s,t.collectErrors=l,t.default=function(e){var t=e.endEarly,n=(0,i.default)(e,["endEarly"]);return t?function(e,t,n){return c(n).all(e).catch((function(e){throw"ValidationError"===e.name&&(e.value=t),e})).then((function(){return t}))}(n.validations,n.value,n.sync):l(n)};var i=r(n(82)),a=n(83),o=r(n(55)),c=function(e){return e?a.SynchronousPromise:Promise},u=function(e){return void 0===e&&(e=[]),e.inner&&e.inner.length?e.inner:[].concat(e)};function s(e,t){var n=c(t);return n.all(e.map((function(e){return n.resolve(e).then((function(e){return{fulfilled:!0,value:e}}),(function(e){return{fulfilled:!1,value:e}}))})))}function l(e){var t=e.validations,n=e.value,r=e.path,i=e.sync,a=e.errors,c=e.sort;return a=u(a),s(t,i).then((function(e){var t=e.filter((function(e){return!e.fulfilled})).reduce((function(e,t){var n=t.value;if(!o.default.isError(n))throw n;return e.concat(n)}),[]);if(c&&t.sort(c),(a=t.concat(a)).length)throw new o.default(a,n,r);return n}))}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=c;var i=r(n(33)),a=/\$\{\s*(\w+)\s*\}/g,o=function(e){return function(t){return e.replace(a,(function(e,n){return(0,i.default)(t[n])}))}};function c(e,t,n,r){var i=this;this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],e&&[].concat(e).forEach((function(e){i.errors=i.errors.concat(e.errors||e),e.inner&&(i.inner=i.inner.concat(e.inner.length?e.inner:e))})),this.message=this.errors.length>1?this.errors.length+" errors occurred":this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,c)}c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,c.isError=function(e){return e&&"ValidationError"===e.name},c.formatError=function(e,t){"string"==typeof e&&(e=o(e));var n=function(t){return t.path=t.label||t.path||"this","function"==typeof e?e(t):e};return 1===arguments.length?n:n(t)},e.exports=t.default},function(e,t,n){e.exports={dropdown:"_3SSd3",dropdownToggle:"GL7MR"}},function(e,t,n){var r=n(58),i=n(63),a=n(8),o=n(64),c=n(44),u=n(30);e.exports=function(e,t,n){for(var s=-1,l=(t=r(t,e)).length,f=!1;++s<l;){var p=u(t[s]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++s!=l?f:!!(l=null==e?0:e.length)&&c(l)&&o(p,l)&&(a(e)||i(e))}},function(e,t,n){var r=n(8),i=n(39),a=n(108),o=n(23);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:a(o(e))}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(105))},function(e,t,n){var r=n(18),i=n(20),a="[object AsyncFunction]",o="[object Function]",c="[object GeneratorFunction]",u="[object Proxy]";e.exports=function(e){if(!i(e))return!1;var t=r(e);return t==o||t==c||t==a||t==u}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){var r=n(133),i=n(10),a=Object.prototype,o=a.hasOwnProperty,c=a.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,"callee")&&!c.call(e,"callee")};e.exports=u},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=typeof e;return!!(t=null==t?n:t)&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(31),i=n(42),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];a.call(e,t)&&i(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(144),i=n(63),a=n(8),o=n(46),c=n(64),u=n(67),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&i(e),f=!n&&!l&&o(e),p=!n&&!l&&!f&&u(e),d=n||l||f||p,v=d?r(e.length,String):[],m=v.length;for(var h in e)!t&&!s.call(e,h)||d&&("length"==h||f&&("offset"==h||"parent"==h)||p&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||c(h,m))||v.push(h);return v}},function(e,t,n){var r=n(146),i=n(48),a=n(49),o=a&&a.isTypedArray,c=o?i(o):r;e.exports=c},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(66),i=n(150),a=n(51);e.exports=function(e){return a(e)?r(e,!0):i(e)}},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(73),i=n(74),a=n(52),o=n(71),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,a(e)),e=i(e);return t}:o;e.exports=c},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(68)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(76),i=n(52),a=n(21);e.exports=function(e){return r(e,a,i)}},function(e,t,n){var r=n(73),i=n(8);e.exports=function(e,t,n){var a=t(e);return i(e)?a:r(a,n(e))}},function(e,t,n){var r=n(9).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(176),i=n(81),a=n(177);e.exports=function(e){return i(e)?a(e):r(e)}},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}},function(e,t,n){"use strict";function r(e){return Array.prototype.slice.apply(e)}var i="pending";function a(e){this.status=i,this._continuations=[],this._parent=null,this._paused=!1,e&&e.call(this,this._continueWith.bind(this),this._failWith.bind(this))}function o(e){return e&&"function"==typeof e.then}if(a.prototype={then:function(e,t){var n=a.unresolved()._setParent(this);if(this._isRejected()){if(this._paused)return this._continuations.push({promise:n,nextFn:e,catchFn:t}),n;if(t)try{var r=t(this._error);return o(r)?(this._chainPromiseData(r,n),n):a.resolve(r)._setParent(this)}catch(e){return a.reject(e)._setParent(this)}return a.reject(this._error)._setParent(this)}return this._continuations.push({promise:n,nextFn:e,catchFn:t}),this._runResolutions(),n},catch:function(e){if(this._isResolved())return a.resolve(this._data)._setParent(this);var t=a.unresolved()._setParent(this);return this._continuations.push({promise:t,catchFn:e}),this._runRejections(),t},finally:function(e){var t=!1;function n(){if(!t)return t=!0,e()}return this.then(n).catch(n)},pause:function(){return this._paused=!0,this},resume:function(){var e=this._findFirstPaused();return e&&(e._paused=!1,e._runResolutions(),e._runRejections()),this},_findAncestry:function(){return this._continuations.reduce((function(e,t){if(t.promise){var n={promise:t.promise,children:t.promise._findAncestry()};e.push(n)}return e}),[])},_setParent:function(e){if(this._parent)throw new Error("parent already set");return this._parent=e,this},_continueWith:function(e){var t=this._findFirstPending();t&&(t._data=e,t._setResolved())},_findFirstPending:function(){return this._findFirstAncestor((function(e){return e._isPending&&e._isPending()}))},_findFirstPaused:function(){return this._findFirstAncestor((function(e){return e._paused}))},_findFirstAncestor:function(e){for(var t,n=this;n;)e(n)&&(t=n),n=n._parent;return t},_failWith:function(e){var t=this._findFirstPending();t&&(t._error=e,t._setRejected())},_takeContinuations:function(){return this._continuations.splice(0,this._continuations.length)},_runRejections:function(){if(!this._paused&&this._isRejected()){var e=this._error,t=this._takeContinuations(),n=this;t.forEach((function(t){if(t.catchFn)try{var r=t.catchFn(e);n._handleUserFunctionResult(r,t.promise)}catch(e){e.message;t.promise.reject(e)}else t.promise.reject(e)}))}},_runResolutions:function(){if(!this._paused&&this._isResolved()&&!this._isPending()){var e=this._takeContinuations();if(o(this._data))return this._handleWhenResolvedDataIsPromise(this._data);var t=this._data,n=this;e.forEach((function(e){if(e.nextFn)try{var r=e.nextFn(t);n._handleUserFunctionResult(r,e.promise)}catch(t){n._handleResolutionError(t,e)}else e.promise&&e.promise.resolve(t)}))}},_handleResolutionError:function(e,t){if(this._setRejected(),t.catchFn)try{return void t.catchFn(e)}catch(t){e=t}t.promise&&t.promise.reject(e)},_handleWhenResolvedDataIsPromise:function(e){var t=this;return e.then((function(e){t._data=e,t._runResolutions()})).catch((function(e){t._error=e,t._setRejected(),t._runRejections()}))},_handleUserFunctionResult:function(e,t){o(e)?this._chainPromiseData(e,t):t.resolve(e)},_chainPromiseData:function(e,t){e.then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)}))},_setResolved:function(){this.status="resolved",this._paused||this._runResolutions()},_setRejected:function(){this.status="rejected",this._paused||this._runRejections()},_isPending:function(){return this.status===i},_isResolved:function(){return"resolved"===this.status},_isRejected:function(){return"rejected"===this.status}},a.resolve=function(e){return new a((function(t,n){o(e)?e.then((function(e){t(e)})).catch((function(e){n(e)})):t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},a.unresolved=function(){return new a((function(e,t){this.resolve=e,this.reject=t}))},a.all=function(){var e=r(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new a((function(t,n){var r=[],i=0,o=!1;e.forEach((function(c,u){a.resolve(c).then((function(n){r[u]=n,(i+=1)===e.length&&t(r)})).catch((function(e){!function(e){o||(o=!0,n(e))}(e)}))}))})):a.resolve([])},Promise===a)throw new Error("Please use SynchronousPromise.installGlobally() to install globally");var c=Promise;a.installGlobally=function(e){if(Promise===a)return e;var t=function(e){if(void 0===e||e.__patched)return e;var t=e;return(e=function(){t.apply(this,r(arguments))}).__patched=!0,e}(e);return Promise=a,t},a.uninstallGlobally=function(){Promise===a&&(Promise=c)},e.exports={SynchronousPromise:a}},function(e,t,n){var r=n(31),i=n(85),a=n(86);e.exports=function(e,t){var n={};return t=a(t,3),i(e,(function(e,i,a){r(n,i,t(e,i,a))})),n}},function(e,t,n){var r=n(183),i=n(21);e.exports=function(e,t){return e&&r(e,t,i)}},function(e,t,n){var r=n(185),i=n(196),a=n(200),o=n(8),c=n(201);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?o(e)?i(e[0],e[1]):r(e):c(e)}},function(e,t,n){var r=n(187),i=n(10);e.exports=function e(t,n,a,o,c){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,a,o,e,c))}},function(e,t,n){var r=n(188),i=n(191),a=n(192),o=1,c=2;e.exports=function(e,t,n,u,s,l){var f=n&o,p=e.length,d=t.length;if(p!=d&&!(f&&d>p))return!1;var v=l.get(e);if(v&&l.get(t))return v==t;var m=-1,h=!0,b=n&c?new r:void 0;for(l.set(e,t),l.set(t,e);++m<p;){var y=e[m],g=t[m];if(u)var S=f?u(g,y,m,t,e,l):u(y,g,m,e,t,l);if(void 0!==S){if(S)continue;h=!1;break}if(b){if(!i(t,(function(e,t){if(!a(b,t)&&(y===e||s(y,e,n,u,l)))return b.push(t)}))){h=!1;break}}else if(y!==g&&!s(y,g,n,u,l)){h=!1;break}}return l.delete(e),l.delete(t),h}},function(e,t,n){var r=n(20);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(58),i=n(30);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[i(t[n++])];return n&&n==a?e:void 0}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.getIn=c,t.default=void 0;var i=n(34),a=r(n(17)),o=function(e){return e.substr(0,e.length-1).substr(1)};function c(e,t,n,r){var c,u,s;return r=r||n,t?((0,i.forEach)(t,(function(i,l,f){var p=l?o(i):i;if(f||(0,a.default)(e,"_subType")){var d=f?parseInt(p,10):0;if(e=e.resolve({context:r,parent:c,value:n})._subType,n){if(f&&d>=n.length)throw new Error("Yup.reach cannot resolve an array item at index: "+i+", in the path: "+t+". because there is no value at that index. ");n=n[d]}}if(!f){if(e=e.resolve({context:r,parent:c,value:n}),!(0,a.default)(e,"fields")||!(0,a.default)(e.fields,p))throw new Error("The schema does not contain the path: "+t+". (failed at: "+s+' which is a type: "'+e._type+'") ');e=e.fields[p],c=n,n=n&&n[p],u=p,s=l?"["+i+"]":"."+i}})),{schema:e,parent:c,parentPath:u}):{parent:c,parentPath:t,schema:e}}var u=function(e,t,n,r){return c(e,t,n,r).schema};t.default=u},function(e,t){function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}}return r.default=e,t&&t.set(e,r),r}},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),e.raw=t,e}},function(e,t,n){var r=n(211),i=n(212),a=n(215),o=RegExp("['’]","g");e.exports=function(e){return function(t){return r(a(i(t).replace(o,"")),e,"")}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((function(e,t){var r=n.shift();return e+(null==r?"":r)+t})).replace(/^\./,"")},e.exports=t.default},function(e,t,n){var r=n(103);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region"></div>'},useData:!0})},function(e,t){e.exports=c},function(e,t,n){e.exports={btnContainer:"_1r87F"}},function(e,t,n){e.exports={active:"ZzIxD"}},function(e,t,n){e.exports={navContainer:"_11O8h"}},function(e,t,n){e.exports={navContainer:"_3vLoN"}},function(e,t){e.exports=u},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e,t){return null!=e&&n.call(e,t)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(19),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var i=o.call(e);return r&&(t?e[c]=n:delete e[c]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(109),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}));e.exports=o},function(e,t,n){var r=n(110),i=500;e.exports=function(e){var t=r(e,(function(e){return n.size===i&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(41),i="Expected a function";function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(a.Cache||r),n}a.Cache=r,e.exports=a},function(e,t,n){var r=n(112),i=n(27),a=n(43);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(e,t,n){var r=n(113),i=n(118),a=n(119),o=n(120),c=n(121);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=c,e.exports=u},function(e,t,n){var r=n(26);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t,n){var r=n(60),i=n(115),a=n(20),o=n(61),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,l=u.toString,f=s.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||i(e))&&(r(e)?p:c).test(o(e))}},function(e,t,n){var r,i=n(116),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(9)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(26),i="__lodash_hash_undefined__",a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return n===i?void 0:n}return a.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(26),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},function(e,t,n){var r=n(26),i="__lodash_hash_undefined__";e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?i:t,this}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(28),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(28);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(28);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(28);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(29);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(29);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(29);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(29);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},function(e,t,n){var r=n(19),i=n(62),a=n(8),o=n(40),c=1/0,u=r?r.prototype:void 0,s=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return i(t,e)+"";if(o(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-c?"-0":n}},function(e,t,n){var r=n(18),i=n(10),a="[object Arguments]";e.exports=function(e){return i(e)&&r(e)==a}},function(e,t,n){var r=n(135),i=1,a=4;e.exports=function(e,t){return r(e,i|a,t="function"==typeof t?t:void 0)}},function(e,t,n){var r=n(45),i=n(141),a=n(65),o=n(143),c=n(149),u=n(152),s=n(70),l=n(153),f=n(155),p=n(75),d=n(156),v=n(24),m=n(161),h=n(162),b=n(167),y=n(8),g=n(46),S=n(169),E=n(20),j=n(171),O=n(21),T=1,A=2,C=4,I="[object Arguments]",_="[object Function]",w="[object GeneratorFunction]",x="[object Object]",F={};F[I]=F["[object Array]"]=F["[object ArrayBuffer]"]=F["[object DataView]"]=F["[object Boolean]"]=F["[object Date]"]=F["[object Float32Array]"]=F["[object Float64Array]"]=F["[object Int8Array]"]=F["[object Int16Array]"]=F["[object Int32Array]"]=F["[object Map]"]=F["[object Number]"]=F[x]=F["[object RegExp]"]=F["[object Set]"]=F["[object String]"]=F["[object Symbol]"]=F["[object Uint8Array]"]=F["[object Uint8ClampedArray]"]=F["[object Uint16Array]"]=F["[object Uint32Array]"]=!0,F["[object Error]"]=F[_]=F["[object WeakMap]"]=!1,e.exports=function e(t,n,L,P,k,N){var D,R=n&T,U=n&A,B=n&C;if(L&&(D=k?L(t,P,k,N):L(t)),void 0!==D)return D;if(!E(t))return t;var V=y(t);if(V){if(D=m(t),!R)return s(t,D)}else{var M=v(t),J=M==_||M==w;if(g(t))return u(t,R);if(M==x||M==I||J&&!k){if(D=U||J?{}:b(t),!R)return U?f(t,c(D,t)):l(t,o(D,t))}else{if(!F[M])return k?t:{};D=h(t,M,R)}}N||(N=new r);var z=N.get(t);if(z)return z;N.set(t,D),j(t)?t.forEach((function(r){D.add(e(r,n,L,r,t,N))})):S(t)&&t.forEach((function(r,i){D.set(i,e(r,n,L,i,t,N))}));var H=B?U?d:p:U?keysIn:O,Y=V?void 0:H(t);return i(Y||t,(function(r,i){Y&&(r=t[i=r]),a(D,i,e(r,n,L,i,t,N))})),D}},function(e,t,n){var r=n(27);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(27),i=n(43),a=n(41),o=200;e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var c=n.__data__;if(!i||c.length<o-1)return c.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(c)}return n.set(e,t),this.size=n.size,this}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(12),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,n){var r=n(32),i=n(21);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(18),i=n(44),a=n(10),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&i(e.length)&&!!o[r(e)]}},function(e,t,n){var r=n(50),i=n(148),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(68)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(32),i=n(69);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){var r=n(20),i=n(50),a=n(151),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=i(e),n=[];for(var c in e)("constructor"!=c||!t&&o.call(e,c))&&n.push(c);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(9),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.Buffer:void 0,c=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=c?c(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(47)(e))},function(e,t,n){var r=n(32),i=n(52);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}},function(e,t,n){var r=n(32),i=n(72);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t,n){var r=n(76),i=n(72),a=n(69);e.exports=function(e){return r(e,a,i)}},function(e,t,n){var r=n(12)(n(9),"DataView");e.exports=r},function(e,t,n){var r=n(12)(n(9),"Promise");e.exports=r},function(e,t,n){var r=n(12)(n(9),"Set");e.exports=r},function(e,t,n){var r=n(12)(n(9),"WeakMap");e.exports=r},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(53),i=n(163),a=n(164),o=n(165),c=n(166),u="[object Boolean]",s="[object Date]",l="[object Map]",f="[object Number]",p="[object RegExp]",d="[object Set]",v="[object String]",m="[object Symbol]",h="[object ArrayBuffer]",b="[object DataView]",y="[object Float32Array]",g="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",j="[object Int32Array]",O="[object Uint8Array]",T="[object Uint8ClampedArray]",A="[object Uint16Array]",C="[object Uint32Array]";e.exports=function(e,t,n){var I=e.constructor;switch(t){case h:return r(e);case u:case s:return new I(+e);case b:return i(e,n);case y:case g:case S:case E:case j:case O:case T:case A:case C:return c(e,n);case l:return new I;case f:case v:return new I(e);case p:return a(e);case d:return new I;case m:return o(e)}}},function(e,t,n){var r=n(53);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(19),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;e.exports=function(e){return a?Object(a.call(e)):{}}},function(e,t,n){var r=n(53);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(168),i=n(74),a=n(50);e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:r(i(e))}},function(e,t,n){var r=n(20),i=Object.create,a=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=a},function(e,t,n){var r=n(170),i=n(48),a=n(49),o=a&&a.isMap,c=o?i(o):r;e.exports=c},function(e,t,n){var r=n(24),i=n(10),a="[object Map]";e.exports=function(e){return i(e)&&r(e)==a}},function(e,t,n){var r=n(172),i=n(48),a=n(49),o=a&&a.isSet,c=o?i(o):r;e.exports=c},function(e,t,n){var r=n(24),i=n(10),a="[object Set]";e.exports=function(e){return i(e)&&r(e)==a}},function(e,t,n){var r=n(19),i=n(70),a=n(24),o=n(51),c=n(174),u=n(175),s=n(78),l=n(79),f=n(80),p=n(178),d="[object Map]",v="[object Set]",m=r?r.iterator:void 0;e.exports=function(e){if(!e)return[];if(o(e))return c(e)?f(e):i(e);if(m&&e[m])return u(e[m]());var t=a(e);return(t==d?s:t==v?l:p)(e)}},function(e,t,n){var r=n(18),i=n(8),a=n(10),o="[object String]";e.exports=function(e){return"string"==typeof e||!i(e)&&a(e)&&r(e)==o}},function(e,t){e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",s="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[a,o,c].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[a+r+"?",r,o,c,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+s,"g");e.exports=function(e){return e.match(f)||[]}},function(e,t,n){var r=n(179),i=n(21);e.exports=function(e){return null==e?[]:r(e,i(e))}},function(e,t,n){var r=n(62);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var i=r(n(17)),a=r(n(14)),o=function(){function e(e,t){if(this.refs=e,"function"!=typeof t){if(!(0,i.default)(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");var n=t.is,r=t.then,a=t.otherwise,o="function"==typeof n?n:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.every((function(e){return e===n}))};this.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.pop(),c=t.pop(),u=o.apply(void 0,t)?r:a;if(u)return"function"==typeof u?u(c):c.concat(u.resolve(i))}}else this.fn=t}return e.prototype.resolve=function(e,t){var n=this.refs.map((function(e){return e.getValue(t)})),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!(0,a.default)(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)},e}();t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=function e(t,n){for(var r in n)if((0,i.default)(n,r)){var c=n[r],u=t[r];if(void 0===u)t[r]=c;else{if(u===c)continue;(0,a.default)(u)?(0,a.default)(c)&&(t[r]=c.concat(u)):o(u)?o(c)&&(t[r]=e(u,c)):Array.isArray(u)&&Array.isArray(c)&&(t[r]=c.concat(u))}}return t};var i=r(n(17)),a=r(n(14)),o=function(e){return"[object Object]"===Object.prototype.toString.call(e)};e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.createErrorFactory=p,t.default=function(e){var t=e.name,n=e.message,r=e.test,o=e.params;function l(e){var l=e.value,d=e.path,v=e.label,m=e.options,h=e.originalValue,b=e.sync,y=(0,i.default)(e,["value","path","label","options","originalValue","sync"]),g=m.parent,S=function(e){return u.default.isRef(e)?e.getValue({value:l,parent:g,context:m.context}):e},E=p({message:n,path:d,value:l,originalValue:h,params:o,label:v,resolve:S,name:t}),j=(0,a.default)({path:d,parent:g,type:t,createError:E,resolve:S,options:m},y);return function(e,t,n,r){var i=e.call(t,n);if(!r)return Promise.resolve(i);if(f(i))throw new Error('Validation test of type: "'+t.type+'" returned a Promise during a synchronous validate. This test will finish after the validate call has returned');return s.SynchronousPromise.resolve(i)}(r,j,l,b).then((function(e){if(c.default.isError(e))throw e;if(!e)throw E()}))}return l.OPTIONS=e,l};var i=r(n(82)),a=r(n(16)),o=r(n(84)),c=r(n(55)),u=r(n(25)),s=n(83),l=c.default.formatError,f=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch};function p(e){var t=e.value,n=e.label,r=e.resolve,u=e.originalValue,s=(0,i.default)(e,["value","label","resolve","originalValue"]);return function(e){var i=void 0===e?{}:e,f=i.path,p=void 0===f?s.path:f,d=i.message,v=void 0===d?s.message:d,m=i.type,h=void 0===m?s.name:m,b=i.params;return b=(0,a.default)({path:p,value:t,originalValue:u,label:n},function(e,t,n){return(0,o.default)((0,a.default)({},e,t),n)}(s.params,b,r)),(0,a.default)(new c.default(l(v,b),t,p,h),{params:b})}}},function(e,t,n){var r=n(184)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),c=o.length;c--;){var u=o[e?c:++i];if(!1===n(a[u],u,a))break}return t}}},function(e,t,n){var r=n(186),i=n(195),a=n(90);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(45),i=n(87),a=1,o=2;e.exports=function(e,t,n,c){var u=n.length,s=u,l=!c;if(null==e)return!s;for(e=Object(e);u--;){var f=n[u];if(l&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++u<s;){var p=(f=n[u])[0],d=e[p],v=f[1];if(l&&f[2]){if(void 0===d&&!(p in e))return!1}else{var m=new r;if(c)var h=c(d,v,p,e,t,m);if(!(void 0===h?i(v,d,a|o,c,m):h))return!1}}return!0}},function(e,t,n){var r=n(45),i=n(88),a=n(193),o=n(194),c=n(24),u=n(8),s=n(46),l=n(67),f=1,p="[object Arguments]",d="[object Array]",v="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,h,b,y){var g=u(e),S=u(t),E=g?d:c(e),j=S?d:c(t),O=(E=E==p?v:E)==v,T=(j=j==p?v:j)==v,A=E==j;if(A&&s(e)){if(!s(t))return!1;g=!0,O=!1}if(A&&!O)return y||(y=new r),g||l(e)?i(e,t,n,h,b,y):a(e,t,E,n,h,b,y);if(!(n&f)){var C=O&&m.call(e,"__wrapped__"),I=T&&m.call(t,"__wrapped__");if(C||I){var _=C?e.value():e,w=I?t.value():t;return y||(y=new r),b(_,w,n,h,y)}}return!!A&&(y||(y=new r),o(e,t,n,h,b,y))}},function(e,t,n){var r=n(41),i=n(189),a=n(190);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,e.exports=o},function(e,t){var n="__lodash_hash_undefined__";e.exports=function(e){return this.__data__.set(e,n),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(19),i=n(77),a=n(42),o=n(88),c=n(78),u=n(79),s=1,l=2,f="[object Boolean]",p="[object Date]",d="[object Error]",v="[object Map]",m="[object Number]",h="[object RegExp]",b="[object Set]",y="[object String]",g="[object Symbol]",S="[object ArrayBuffer]",E="[object DataView]",j=r?r.prototype:void 0,O=j?j.valueOf:void 0;e.exports=function(e,t,n,r,j,T,A){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!T(new i(e),new i(t)));case f:case p:case m:return a(+e,+t);case d:return e.name==t.name&&e.message==t.message;case h:case y:return e==t+"";case v:var C=c;case b:var I=r&s;if(C||(C=u),e.size!=t.size&&!I)return!1;var _=A.get(e);if(_)return _==t;r|=l,A.set(e,t);var w=o(C(e),C(t),r,j,T,A);return A.delete(e),w;case g:if(O)return O.call(e)==O.call(t)}return!1}},function(e,t,n){var r=n(75),i=1,a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,c,u){var s=n&i,l=r(e),f=l.length;if(f!=r(t).length&&!s)return!1;for(var p=f;p--;){var d=l[p];if(!(s?d in t:a.call(t,d)))return!1}var v=u.get(e);if(v&&u.get(t))return v==t;var m=!0;u.set(e,t),u.set(t,e);for(var h=s;++p<f;){var b=e[d=l[p]],y=t[d];if(o)var g=s?o(y,b,d,t,e,u):o(b,y,d,e,t,u);if(!(void 0===g?b===y||c(b,y,n,o,u):g)){m=!1;break}h||(h="constructor"==d)}if(m&&!h){var S=e.constructor,E=t.constructor;S!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof S&&S instanceof S&&"function"==typeof E&&E instanceof E)&&(m=!1)}return u.delete(e),u.delete(t),m}},function(e,t,n){var r=n(89),i=n(21);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var a=t[n],o=e[a];t[n]=[a,o,r(o)]}return t}},function(e,t,n){var r=n(87),i=n(197),a=n(198),o=n(39),c=n(89),u=n(90),s=n(30),l=1,f=2;e.exports=function(e,t){return o(e)&&c(t)?u(s(e),t):function(n){var o=i(n,e);return void 0===o&&o===t?a(n,e):r(t,o,l|f)}}},function(e,t,n){var r=n(91);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t,n){var r=n(199),i=n(57);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(202),i=n(203),a=n(39),o=n(30);e.exports=function(e){return a(e)?r(o(e)):i(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(91);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var i=r(n(22)),a=r(n(11)),o=c;function c(){var e=this;if(!(this instanceof c))return new c;a.default.call(this,{type:"boolean"}),this.withMutation((function(){e.transform((function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(e))return!0;if(/^(false|0)$/i.test(e))return!1}return e}))}))}t.default=o,(0,i.default)(c,a.default,{_typeCheck:function(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e}}),e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=f;var i=r(n(22)),a=r(n(11)),o=n(13),c=r(n(35)),u=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,s=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,l=function(e){return(0,c.default)(e)||e===e.trim()};function f(){var e=this;if(!(this instanceof f))return new f;a.default.call(this,{type:"string"}),this.withMutation((function(){e.transform((function(e){return this.isType(e)?e:null!=e&&e.toString?e.toString():e}))}))}(0,i.default)(f,a.default,{_typeCheck:function(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e},_isPresent:function(e){return a.default.prototype._cast.call(this,e)&&e.length>0},length:function(e,t){return void 0===t&&(t=o.string.length),this.test({message:t,name:"length",exclusive:!0,params:{length:e},test:function(t){return(0,c.default)(t)||t.length===this.resolve(e)}})},min:function(e,t){return void 0===t&&(t=o.string.min),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return(0,c.default)(t)||t.length>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=o.string.max),this.test({name:"max",exclusive:!0,message:t,params:{max:e},test:function(t){return(0,c.default)(t)||t.length<=this.resolve(e)}})},matches:function(e,t){var n,r=!1;return t&&(t.message||t.hasOwnProperty("excludeEmptyString")?(r=t.excludeEmptyString,n=t.message):n=t),this.test({message:n||o.string.matches,params:{regex:e},test:function(t){return(0,c.default)(t)||""===t&&r||e.test(t)}})},email:function(e){return void 0===e&&(e=o.string.email),this.matches(u,{message:e,excludeEmptyString:!0})},url:function(e){return void 0===e&&(e=o.string.url),this.matches(s,{message:e,excludeEmptyString:!0})},ensure:function(){return this.default("").transform((function(e){return null===e?"":e}))},trim:function(e){return void 0===e&&(e=o.string.trim),this.transform((function(e){return null!=e?e.trim():e})).test({message:e,name:"trim",test:l})},lowercase:function(e){return void 0===e&&(e=o.string.lowercase),this.transform((function(e){return(0,c.default)(e)?e:e.toLowerCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return(0,c.default)(e)||e===e.toLowerCase()}})},uppercase:function(e){return void 0===e&&(e=o.string.uppercase),this.transform((function(e){return(0,c.default)(e)?e:e.toUpperCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return(0,c.default)(e)||e===e.toUpperCase()}})}}),e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=s;var i=r(n(22)),a=r(n(11)),o=n(13),c=r(n(35)),u=function(e){return(0,c.default)(e)||e===(0|e)};function s(){var e=this;if(!(this instanceof s))return new s;a.default.call(this,{type:"number"}),this.withMutation((function(){e.transform((function(e){var t=e;if("string"==typeof t){if(""===(t=t.replace(/\s/g,"")))return NaN;t=+t}return this.isType(t)?t:parseFloat(t)}))}))}(0,i.default)(s,a.default,{_typeCheck:function(e){return e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!function(e){return e!=+e}(e)},min:function(e,t){return void 0===t&&(t=o.number.min),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return(0,c.default)(t)||t>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=o.number.max),this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return(0,c.default)(t)||t<=this.resolve(e)}})},lessThan:function(e,t){return void 0===t&&(t=o.number.lessThan),this.test({message:t,name:"max",exclusive:!0,params:{less:e},test:function(t){return(0,c.default)(t)||t<this.resolve(e)}})},moreThan:function(e,t){return void 0===t&&(t=o.number.moreThan),this.test({message:t,name:"min",exclusive:!0,params:{more:e},test:function(t){return(0,c.default)(t)||t>this.resolve(e)}})},positive:function(e){return void 0===e&&(e=o.number.positive),this.moreThan(0,e)},negative:function(e){return void 0===e&&(e=o.number.negative),this.lessThan(0,e)},integer:function(e){return void 0===e&&(e=o.number.integer),this.test({name:"integer",message:e,test:u})},truncate:function(){return this.transform((function(e){return(0,c.default)(e)?e:0|e}))},round:function(e){var t=["ceil","floor","round","trunc"];if("trunc"===(e=e&&e.toLowerCase()||"round"))return this.truncate();if(-1===t.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+t.join(", "));return this.transform((function(t){return(0,c.default)(t)?t:Math[e](t)}))}}),e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var i=r(n(11)),a=r(n(22)),o=r(n(208)),c=n(13),u=r(n(35)),s=r(n(25)),l=new Date(""),f=p;function p(){var e=this;if(!(this instanceof p))return new p;i.default.call(this,{type:"date"}),this.withMutation((function(){e.transform((function(e){return this.isType(e)?e:(e=(0,o.default)(e))?new Date(e):l}))}))}t.default=f,(0,a.default)(p,i.default,{_typeCheck:function(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t},min:function(e,t){void 0===t&&(t=c.date.min);var n=e;if(!s.default.isRef(n)&&(n=this.cast(e),!this._typeCheck(n)))throw new TypeError("`min` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(e){return(0,u.default)(e)||e>=this.resolve(n)}})},max:function(e,t){void 0===t&&(t=c.date.max);var n=e;if(!s.default.isRef(n)&&(n=this.cast(e),!this._typeCheck(n)))throw new TypeError("`max` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(e){return(0,u.default)(e)||e<=this.resolve(n)}})}}),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t,n,i=[1,4,5,6,7,10,11],a=0;if(n=r.exec(e)){for(var o,c=0;o=i[c];++c)n[o]=+n[o]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(a=60*n[10]+n[11],"+"===n[9]&&(a=0-a)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+a,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t};var r=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;e.exports=t.default},function(e,t,n){"use strict";var r=n(93),i=n(6);t.__esModule=!0,t.default=O;var a=i(n(94)),o=i(n(16)),c=i(n(17)),u=i(n(210)),s=i(n(219)),l=i(n(225)),f=i(n(84)),p=n(34),d=i(n(11)),v=n(13),m=i(n(226)),h=i(n(228)),b=i(n(22)),y=i(n(96)),g=r(n(54));function S(){var e=(0,a.default)(["",".",""]);return S=function(){return e},e}function E(){var e=(0,a.default)(["",".",""]);return E=function(){return e},e}var j=function(e){return"[object Object]"===Object.prototype.toString.call(e)};function O(e){var t=this;if(!(this instanceof O))return new O(e);d.default.call(this,{type:"object",default:function(){var e=this;if(this._nodes.length){var t={};return this._nodes.forEach((function(n){t[n]=e.fields[n].default?e.fields[n].default():void 0})),t}}}),this.fields=Object.create(null),this._nodes=[],this._excludedEdges=[],this.withMutation((function(){t.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),e&&t.shape(e)}))}(0,b.default)(O,d.default,{_typeCheck:function(e){return j(e)||"function"==typeof e},_cast:function(e,t){var n=this;void 0===t&&(t={});var r=d.default.prototype._cast.call(this,e,t);if(void 0===r)return this.default();if(!this._typeCheck(r))return r;var i=this.fields,a=!0===this._option("stripUnknown",t),u=this._nodes.concat(Object.keys(r).filter((function(e){return-1===n._nodes.indexOf(e)}))),s={},l=(0,o.default)({},t,{parent:s,__validating:!1}),f=!1;return u.forEach((function(e){var n=i[e],o=(0,c.default)(r,e);if(n){var u,p=n._options&&n._options.strict;if(l.path=(0,y.default)(E(),t.path,e),l.value=r[e],!0===(n=n.resolve(l))._strip)return void(f=f||e in r);void 0!==(u=t.__validating&&p?r[e]:n.cast(r[e],l))&&(s[e]=u)}else o&&!a&&(s[e]=r[e]);s[e]!==r[e]&&(f=!0)})),f?s:r},_validate:function(e,t){var n,r,i=this;void 0===t&&(t={});var a=t.sync,c=[],u=null!=t.originalValue?t.originalValue:e;return n=this._option("abortEarly",t),r=this._option("recursive",t),t=(0,o.default)({},t,{__validating:!0,originalValue:u}),d.default.prototype._validate.call(this,e,t).catch((0,g.propagateErrors)(n,c)).then((function(e){if(!r||!j(e)){if(c.length)throw c[0];return e}u=u||e;var s=i._nodes.map((function(n){var r=(0,y.default)(S(),t.path,n),a=i.fields[n],c=(0,o.default)({},t,{path:r,parent:e,originalValue:u[n]});return a&&a.validate?(c.strict=!0,a.validate(e[n],c)):Promise.resolve(!0)}));return(0,g.default)({sync:a,validations:s,value:e,errors:c,endEarly:n,path:t.path,sort:(0,h.default)(i.fields)})}))},concat:function(e){var t=d.default.prototype.concat.call(this,e);return t._nodes=(0,m.default)(t.fields,t._excludedEdges),t},shape:function(e,t){void 0===t&&(t=[]);var n=this.clone(),r=(0,o.default)(n.fields,e);if(n.fields=r,t.length){Array.isArray(t[0])||(t=[t]);var i=t.map((function(e){return e[0]+"-"+e[1]}));n._excludedEdges=n._excludedEdges.concat(i)}return n._nodes=(0,m.default)(r,n._excludedEdges),n},from:function(e,t,n){var r=(0,p.getter)(e,!0);return this.transform((function(i){if(null==i)return i;var a=i;return(0,c.default)(i,e)&&(a=(0,o.default)({},i),n||delete a[e],a[t]=r(i)),a}))},noUnknown:function(e,t){void 0===e&&(e=!0),void 0===t&&(t=v.object.noUnknown),"string"==typeof e&&(t=e,e=!0);var n=this.test({name:"noUnknown",exclusive:!0,message:t,test:function(t){return null==t||!e||0===function(e,t){var n=Object.keys(e.fields);return Object.keys(t).filter((function(e){return-1===n.indexOf(e)}))}(this.schema,t).length}});return n._options.stripUnknown=e,n},unknown:function(e,t){return void 0===e&&(e=!0),void 0===t&&(t=v.object.noUnknown),this.noUnknown(!e,t)},transformKeys:function(e){return this.transform((function(t){return t&&(0,l.default)(t,(function(t,n){return e(n)}))}))},camelCase:function(){return this.transformKeys(s.default)},snakeCase:function(){return this.transformKeys(u.default)},constantCase:function(){return this.transformKeys((function(e){return(0,u.default)(e).toUpperCase()}))},describe:function(){var e=d.default.prototype.describe.call(this);return e.fields=(0,f.default)(this.fields,(function(e){return e.describe()})),e}}),e.exports=t.default},function(e,t,n){var r=n(95)((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));e.exports=r},function(e,t){e.exports=function(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}},function(e,t,n){var r=n(213),i=n(23),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(a,r).replace(o,"")}},function(e,t,n){var r=n(214)({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});e.exports=r},function(e,t){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},function(e,t,n){var r=n(216),i=n(217),a=n(23),o=n(218);e.exports=function(e,t,n){return e=a(e),void 0===(t=n?void 0:t)?i(e)?o(e):r(e):e.match(t)||[]}},function(e,t){var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(n)||[]}},function(e,t){var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return n.test(e)}},function(e,t){var n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="["+n+"]",i="\\d+",a="[\\u2700-\\u27bf]",o="[a-z\\xdf-\\xf6\\xf8-\\xff]",c="[^\\ud800-\\udfff"+n+i+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="[A-Z\\xc0-\\xd6\\xd8-\\xde]",f="(?:"+o+"|"+c+")",p="(?:"+l+"|"+c+")",d="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",v="[\\ufe0e\\ufe0f]?"+d+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",u,s].join("|")+")[\\ufe0e\\ufe0f]?"+d+")*"),m="(?:"+[a,u,s].join("|")+")"+v,h=RegExp([l+"?"+o+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[r,l,"$"].join("|")+")",p+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[r,l+f,"$"].join("|")+")",l+"?"+f+"+(?:['’](?:d|ll|m|re|s|t|ve))?",l+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,m].join("|"),"g");e.exports=function(e){return e.match(h)||[]}},function(e,t,n){var r=n(220),i=n(95)((function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)}));e.exports=i},function(e,t,n){var r=n(23),i=n(221);e.exports=function(e){return i(r(e).toLowerCase())}},function(e,t,n){var r=n(222)("toUpperCase");e.exports=r},function(e,t,n){var r=n(223),i=n(81),a=n(80),o=n(23);e.exports=function(e){return function(t){t=o(t);var n=i(t)?a(t):void 0,c=n?n[0]:t.charAt(0),u=n?r(n,1).join(""):t.slice(1);return c[e]()+u}}},function(e,t,n){var r=n(224);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},function(e,t){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}},function(e,t,n){var r=n(31),i=n(85),a=n(86);e.exports=function(e,t){var n={};return t=a(t,3),i(e,(function(e,i,a){r(n,t(e,i,a),e)})),n}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=function(e,t){void 0===t&&(t=[]);var n=[],r=[];function s(e,i){var a=(0,o.split)(e)[0];~r.indexOf(a)||r.push(a),~t.indexOf(i+"-"+a)||n.push([i,a])}for(var l in e)if((0,i.default)(e,l)){var f=e[l];~r.indexOf(l)||r.push(l),c.default.isRef(f)&&f.isSibling?s(f.path,l):(0,u.default)(f)&&f._deps&&f._deps.forEach((function(e){return s(e,l)}))}return a.default.array(r,n).reverse()};var i=r(n(17)),a=r(n(227)),o=n(34),c=r(n(25)),u=r(n(14));e.exports=t.default},function(e,t){function n(e,t){var n=e.length,r=new Array(n),i={},a=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),c=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach((function(e){if(!c.has(e[0])||!c.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));a--;)i[a]||u(e[a],a,new Set);return r;function u(e,t,a){if(a.has(e)){var s;try{s=", node was:"+JSON.stringify(e)}catch(e){s=""}throw new Error("Cyclic dependency"+s)}if(!c.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var l=o.get(e)||new Set;if(t=(l=Array.from(l)).length){a.add(e);do{var f=l[--t];u(f,c.get(f),a)}while(t);a.delete(e)}r[--n]=e}}}e.exports=function(e){return n(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)},e.exports.array=n},function(e,t,n){"use strict";function r(e,t){var n=1/0;return e.some((function(e,r){if(-1!==t.path.indexOf(e))return n=r,!0})),n}t.__esModule=!0,t.default=function(e){var t=Object.keys(e);return function(e,n){return r(t,e)-r(t,n)}},e.exports=t.default},function(e,t,n){"use strict";var r=n(93),i=n(6);t.__esModule=!0,t.default=void 0;var a=i(n(16)),o=i(n(94)),c=i(n(22)),u=i(n(35)),s=i(n(14)),l=i(n(96)),f=i(n(33)),p=i(n(11)),d=n(13),v=r(n(54));function m(){var e=(0,o.default)(["","[","]"]);return m=function(){return e},e}var h=b;function b(e){var t=this;if(!(this instanceof b))return new b(e);p.default.call(this,{type:"array"}),this._subType=void 0,this.withMutation((function(){t.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),e&&t.of(e)}))}t.default=h,(0,c.default)(b,p.default,{_typeCheck:function(e){return Array.isArray(e)},_cast:function(e,t){var n=this,r=p.default.prototype._cast.call(this,e,t);if(!this._typeCheck(r)||!this._subType)return r;var i=!1,a=r.map((function(e){var r=n._subType.cast(e,t);return r!==e&&(i=!0),r}));return i?a:r},_validate:function(e,t){var n=this;void 0===t&&(t={});var r=[],i=t.sync,o=t.path,c=this._subType,u=this._option("abortEarly",t),s=this._option("recursive",t),f=null!=t.originalValue?t.originalValue:e;return p.default.prototype._validate.call(this,e,t).catch((0,v.propagateErrors)(u,r)).then((function(e){if(!s||!c||!n._typeCheck(e)){if(r.length)throw r[0];return e}f=f||e;var p=e.map((function(n,r){var i=(0,l.default)(m(),t.path,r),o=(0,a.default)({},t,{path:i,strict:!0,parent:e,originalValue:f[r]});return!c.validate||c.validate(n,o)}));return(0,v.default)({sync:i,path:o,value:e,errors:r,endEarly:u,validations:p})}))},_isPresent:function(e){return p.default.prototype._cast.call(this,e)&&e.length>0},of:function(e){var t=this.clone();if(!1!==e&&!(0,s.default)(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema, or `false` to negate a current sub-schema. not: "+(0,f.default)(e));return t._subType=e,t},min:function(e,t){return t=t||d.array.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return(0,u.default)(t)||t.length>=this.resolve(e)}})},max:function(e,t){return t=t||d.array.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return(0,u.default)(t)||t.length<=this.resolve(e)}})},ensure:function(){var e=this;return this.default((function(){return[]})).transform((function(t){return e.isType(t)?t:null===t?[]:[].concat(t)}))},compact:function(e){var t=e?function(t,n,r){return!e(t,n,r)}:function(e){return!!e};return this.transform((function(e){return null!=e?e.filter(t):e}))},describe:function(){var e=p.default.prototype.describe.call(this);return this._subType&&(e.innerType=this._subType.describe()),e}}),e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var i=r(n(14)),a=function(){function e(e){this._resolve=function(t,n){var r=e(t,n);if(!(0,i.default)(r))throw new TypeError("lazy() functions must return a valid schema");return r.resolve(n)}}var t=e.prototype;return t.resolve=function(e){return this._resolve(e.value,e)},t.cast=function(e,t){return this._resolve(e,t).cast(e,t)},t.validate=function(e,t){return this._resolve(e,t).validate(e,t)},t.validateSync=function(e,t){return this._resolve(e,t).validateSync(e,t)},t.validateAt=function(e,t,n){return this._resolve(t,n).validateAt(e,t,n)},t.validateSyncAt=function(e,t,n){return this._resolve(t,n).validateSyncAt(e,t,n)},e}();a.prototype.__isYupSchema__=!0;var o=a;t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=function(e){Object.keys(e).forEach((function(t){Object.keys(e[t]).forEach((function(n){i.default[t][n]=e[t][n]}))}))};var i=r(n(13));e.exports=t.default},function(e,t,n){"use strict";n.r(t);var r={UPLOAD_IMAGE:"upload:image",VIDEO:"video",SERIES:"series",PLAYLIST:"playlist"},i={Subjects:Object.assign({SUBJECTS:"subjects",NEW_SUBJECT:"new:subject",EDIT_SUBJECT:"edit:subject",EDIT_SUBJECT_PLAYLISTS:"edit:subject:playlists",EDIT_SUBJECT_SERIES:"edit:subject:series",EDIT_SUBJECT_VIDEOS:"edit:subject:videos",DELETE_SUBJECT:"delete:subject",ADD_SUBJECT_MEMBERS:"add:subject:members",REMOVE_SUBJECT_MEMBER:"remove:subject:member",CLASSIFICATIONS:"classifications",PRESENTATION_CLASSIFICATIONS:"presentation:classifications",NEW_CLASSIFICATION:"new:classification",EDIT_CLASSIFICATION:"edit:classification",EDIT_CLASSIFICATION_PLAYLISTS:"edit:classification:playlists",EDIT_CLASSIFICATION_SERIES:"edit:classification:series",EDIT_CLASSIFICATION_VIDEOS:"edit:classification:videos",DELETE_CLASSIFICATION:"delete:classification",REMOVE_CLASSIFICATION_MEMBER:"remove:classification:member",LEVELS:"levels",NEW_LEVEL:"new:level",EDIT_LEVEL:"edit:level",AUDIENCES:"audiences",PRESENTATION_AUDIENCES:"presentation:audiences",NEW_AUDIENCE:"new:audience",EDIT_AUDIENCE:"edit:audience",DELETE_AUDIENCE:"delete:audience",PRESENTATIONS:"presentations",NEW_PRESENTATION:"new:presentation",EDIT_PRESENTATION:"edit:presentation"},r),Playlists:Object.assign({PLAYLISTS:"index",NEW_PLAYLIST:"new:playlist",EDIT_PLAYLIST:"edit:playlist",EDIT_PLAYLIST_VIDEOS:"edit:playlist:videos",EDIT_PLAYLIST_SUBJECTS:"edit:playlist:subjects",DELETE_PLAYLIST:"delete:playlist",REMOVE_VIDEO:"remove:video",SUBJECT:"subject",ADD_SUBJECT_MEMBERS:"add:subject:members",REMOVE_FROM_SUBJECT:"remove:from:subject"},r)},a={SUBJECT:"subject",SUBJECTS:"subjects",UPDATE_SUBJECT:"update:subject",DELETE_SUBJECT:"delete:subject",ADD_TO_SUBJECT:"add:to:subject",REMOVE_FROM_SUBJECT:"remove:from:subject",CLASSIFICATION:"classification",CLASSIFICATIONS:"classifications",UPDATE_CLASSIFICATION:"update:classification",DELETE_CLASSIFICATION:"delete:classification",ADD_TO_CLASSIFICATION:"add:to:classification",REMOVE_FROM_CLASSIFICATION:"remove:from:classification",PRESENTATION:"presentation",PRESENTATIONS:"presentations",UPDATE_PRESENTATION:"update:presentation",LEVEL:"level",LEVELS:"levels",UPDATE_LEVEL:"update:level",AUDIENCE:"audience",AUDIENCES:"audiences",UPDATE_AUDIENCE:"update:audience",DELETE_AUDIENCE:"delete:audience",PLAYLIST:"playlist",PLAYLISTS:"playlists",UPDATE_PLAYLIST:"update:playlist",DELETE_PLAYLIST:"delete:playlist",PLAYLIST_VIDEOS:"playlist:videos",REORDER_PLAYLIST_VIDEOS:"reorder:playlist:videos",REMOVE_PLAYLIST_VIDEO:"remove:playlist:video",VIDEO:"video",SERIES:"series",CURRENT_USER:"current:user",UPLOAD_IMAGE:"upload:image"},o={IMAGES:".".concat(["jpg","tif","png","bmp","gif","jpeg"].join(",."))},c={CURATOR_LAYOUT:"CuratorLayout"},u={PLAYLISTS:"playlists:application",SUBJECTS:"subjects:application"},s={IMAGE_UPLOAD:"image:upload:data:service",PLAYLIST:"playlist:data:service",SUBJECT:"subject:data:service",USER:"user:data:service",VIDEO:"video:data:service",SERIES:"series:data:service"},l={IMAGE_UPLOAD:"ImageUploadDataService",PLAYLIST:"PlaylistDataService",SUBJECT:"SubjectDataService",USER:"UserDataService",VIDEO:"VideoDataService",SERIES:"SeriesDataService"},f=n(0),p=n(2),d=n(1),v=n(97),m=n.n(v),h=n(38),b=n.n(h);function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return!t||"object"!==y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e,t,n){return(E="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=j(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=S(this,j(t).call(this,e))).childComponents={},n}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}(t,e),n=t,i=[{key:"getCacheKey",value:function(){return c.CURATOR_LAYOUT}}],(r=[{key:"regions",value:function(){return{layout:".layout-region"}}},{key:"getChildComponents",value:function(){return{topNav:{component:this.childComponents[d.LayoutRegions.TOP_NAV],className:b.a.topNavRegion},leftNav:{component:this.childComponents[d.LayoutRegions.LEFT_NAV],className:"py-3 ".concat(b.a.leftNavRegion)},content:{component:this.childComponents[d.LayoutRegions.CONTENT],className:"position-relative container py-3"},popup:{component:this.childComponents[d.LayoutRegions.POPUP]},alert:{component:this.childComponents[d.LayoutRegions.ALERT]}}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"renderTopNav",value:function(){p.FunctionHelper.isFunction(this.options.getTopNavView)&&(this.childComponents[d.LayoutRegions.TOP_NAV]=this.options.getTopNavView(p.Core.AppLinkHelper.getCurrentAppLink()))}},{key:"hideLeftNav",value:function(){this.unsetRegion(d.LayoutRegions.LEFT_NAV)}},{key:"closePopup",value:function(){this.unsetRegion(d.LayoutRegions.POPUP)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderTopNav(),this.renderLayout()}},{key:"renderLayout",value:function(){var e=Object.assign({provider:this.options.provider},this.getChildComponents());E(j(t.prototype),"showChildView",this).call(this,"layout",f.createElement(k,Object.assign({},e)))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"CuratorLayoutView"}},{key:"template",get:function(){return m.a}},{key:"className",get:function(){return"container-fluid ".concat(b.a.curatorLayout)}}])&&g(n.prototype,r),i&&g(n,i),t}(p.Core.LayoutView),A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},C=function(e){var t=e.className,n=e.children;return f.createElement("div",{className:t},n)},I=function(e,t){return"".concat(e).concat(t?" ".concat(t):"")},_=function(e){return f.createElement(C,{className:I("top-nav-region",e.className)},e.children)},w=function(e){return f.createElement(C,{className:I("left-nav-region",e.className)},e.children)},x=function(e){return f.createElement("div",{className:"content-container"},f.createElement(C,{className:I("content-region",e.className)},e.children))},F=function(e){return f.createElement(C,{className:I("popup-region",e.className)},e.children)},L=function(e){return f.createElement(C,{className:I("alert-region",e.className)},e.children)},P=function(e){var t=e.topNav,n=e.leftNav,r=e.content,i=e.popup,a=e.alert;return f.createElement(f.Fragment,null,f.createElement("div",{className:"position-relative"},!!t.component&&f.createElement(_,{className:t.className},t.component),!!n.component&&f.createElement(w,{className:n.className},n.component),!!r.component&&f.createElement(x,{className:r.className},r.component)),!!i.component&&f.createElement(F,{className:i.className},i.component),!!a.component&&f.createElement(L,{className:a.className},a.component))},k=function(e){var t=e.provider,n=A(e,["provider"]);return t?f.createElement(t,null,f.createElement(P,Object.assign({},n))):f.createElement(P,Object.assign({},n))};function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t){return!t||"object"!==N(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var V=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),R(this,U(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(t,e),n=t,(r=[{key:"uploadBase64Image",value:function(e,t,n,r){return this.create({resource:"/api/image/upload?type=".concat(t),eventPrefix:a.UPLOAD_IMAGE,data:e,callback:n,errorCallback:r})}},{key:"name",get:function(){return l.IMAGE_UPLOAD}},{key:"channelName",get:function(){return s.IMAGE_UPLOAD}}])&&D(n.prototype,r),i&&D(n,i),t}(p.BaseDataService);function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function J(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function z(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $=function(e){return"/api/master/v2/objects/".concat(e)},q=function(e){return"/api/master/v2/objects?".concat(e.map((function(e){return"id=".concat(e)})).join("&"))},W=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),z(this,H(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}(t,e),n=t,(r=[{key:"getSeries",value:function(e,t,n){return this.get({resource:$(e),eventPrefix:"".concat(a.SERIES,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getSeriesById",value:function(e,t,n){return this.get({resource:q(e),eventPrefix:"".concat(a.SERIES,":").concat(e.join(",")),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"name",get:function(){return l.SERIES}},{key:"channelName",get:function(){return s.SERIES}}])&&J(n.prototype,r),i&&J(n,i),t}(p.BaseDataService),K={dataServiceName:l.SERIES,dataChannelName:s.SERIES},G={getSeriesFetchOptions:function(e,t,n){return Object.assign(Object.assign({},K),{eventPrefix:"".concat(a.SERIES,":").concat(e),fetchData:function(t){return t.getSeries(e)},setData:t,onError:n})},getSeriesByIdFetchOptions:function(e,t,n){return Object.assign(Object.assign({},K),{eventPrefix:"".concat(a.SERIES,":").concat(e.join(",")),fetchData:function(t){return t.getSeriesById(e)},setData:t,onError:n})}};function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function X(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ne=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),X(this,ee(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&te(e,t)}(t,e),n=t,(r=[{key:"getCurrentUser",value:function(e,t){return this.get({resource:"/api/currentuser",eventPrefix:a.CURRENT_USER,expiryTime:d.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"name",get:function(){return l.USER}},{key:"channelName",get:function(){return s.USER}}])&&Q(n.prototype,r),i&&Q(n,i),t}(p.BaseDataService),re={dataServiceName:l.USER,dataChannelName:s.USER},ie={getCurrentUserFetchOptions:function(e,t){return Object.assign(Object.assign({},re),{eventPrefix:a.CURRENT_USER,fetchData:function(e){return e.getCurrentUser()},setData:e,onError:t})}};function ae(e){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ce(e,t){return!t||"object"!==ae(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function se(e,t){return(se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var le,fe,pe,de,ve=function(e){return"/api/master/v2/objects/".concat(e)},me=function(e){return"/api/master/v2/objects?".concat(e.map((function(e){return"id=".concat(e)})).join("&"))},he=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ce(this,ue(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&se(e,t)}(t,e),n=t,(r=[{key:"getVideo",value:function(e,t,n){return this.get({resource:ve(e),eventPrefix:"".concat(a.VIDEO,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getVideosById",value:function(e,t,n){return this.get({resource:me(e),eventPrefix:"".concat(a.VIDEO,":").concat(e.join(",")),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"name",get:function(){return l.VIDEO}},{key:"channelName",get:function(){return s.VIDEO}}])&&oe(n.prototype,r),i&&oe(n,i),t}(p.BaseDataService),be={dataServiceName:l.VIDEO,dataChannelName:s.VIDEO},ye={getVideoFetchOptions:function(e,t,n){return Object.assign(Object.assign({},be),{eventPrefix:"".concat(a.VIDEO,":").concat(e),fetchData:function(t){return t.getVideo(e)},setData:t,onError:n})},getVideosByIdFetchOptions:function(e,t,n){return Object.assign(Object.assign({},be),{eventPrefix:"".concat(a.VIDEO,":").concat(e.join(",")),fetchData:function(t){return t.getVideosById(e)},setData:t,onError:n})}};!function(e){e[e.Subject=0]="Subject",e[e.Classification=1]="Classification"}(le||(le={})),function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos"}(fe||(fe={})),function(e){e.Root="0"}(pe||(pe={})),function(e){e.Root="root"}(de||(de={}));var ge=n(4),Se=ge.object().shape({name:ge.string().max(255,"Name is too long").required("Name is required"),levelIds:ge.array().of(ge.string()).required("A level is required")}),Ee=ge.object().shape({name:ge.string().max(255,"Name is too long").required("Name is required"),parentIds:ge.array().of(ge.string()),subjectIds:ge.array().of(ge.string()).min(1,"A classification must be mapped to at least one subject").required("A classification must be mapped to at least one subject"),type:ge.string().required("Type is required")}),je=ge.object().shape({name:ge.string().max(255,"Name is too long").required("Name is required")}),Oe=ge.object().shape({name:ge.string().max(255,"Name is too long").required("Name is required"),description:ge.string().max(65535,"Description is too long").required("Description is required")}),Te=ge.object().shape({name:ge.string().max(255,"Name is too long").required("Name is required"),parentId:ge.string()}),Ae={singularizeMemberType:function(e){switch(e){case fe.Playlists:return"playlist";case fe.Series:return"series";case fe.Videos:return"video"}},getMemberAppLink:function(e,t){var n=[t];switch(e){case fe.Playlists:return{application:u.SUBJECTS,action:i.Subjects.PLAYLIST,args:n};case fe.Series:return{application:u.SUBJECTS,action:i.Subjects.SERIES,args:n};case fe.Videos:return{application:u.SUBJECTS,action:i.Subjects.VIDEO,args:n}}},getMemberActions:function(e,t,n,r){return[{name:"Remove ".concat(Ae.singularizeMemberType(n)),appLink:{application:u.SUBJECTS,action:t===le.Subject?i.Subjects.REMOVE_SUBJECT_MEMBER:i.Subjects.REMOVE_CLASSIFICATION_MEMBER,args:[e,r,n]},className:"text-danger"}]}},Ce={isItemActive:function(e,t){return t||(t=p.Core.AppLinkHelper.getCurrentAppLink()),t.application===e.appLink.application&&(Array.isArray(e.activeActions)?e.activeActions.includes(t.action):t.action===e.appLink.action)},getTopNavItems:function(){var e=u.SUBJECTS,t=i.Subjects;return[{label:"Classifications",appLink:{application:e,action:t.CLASSIFICATIONS},activeActions:[t.CLASSIFICATIONS,t.PRESENTATION_CLASSIFICATIONS,t.NEW_CLASSIFICATION,t.EDIT_CLASSIFICATION,t.EDIT_CLASSIFICATION_PLAYLISTS,t.EDIT_CLASSIFICATION_SERIES,t.EDIT_CLASSIFICATION_VIDEOS,t.DELETE_CLASSIFICATION,t.REMOVE_CLASSIFICATION_MEMBER]},{label:"Subjects",appLink:{application:e,action:t.SUBJECTS},activeActions:[t.SUBJECTS,t.NEW_SUBJECT,t.EDIT_SUBJECT,t.EDIT_SUBJECT_PLAYLISTS,t.EDIT_SUBJECT_SERIES,t.EDIT_SUBJECT_VIDEOS,t.DELETE_SUBJECT,t.ADD_SUBJECT_MEMBERS,t.REMOVE_SUBJECT_MEMBER]},{label:"Audiences",appLink:{application:e,action:t.AUDIENCES},activeActions:[t.AUDIENCES,t.PRESENTATION_AUDIENCES,t.NEW_AUDIENCE,t.EDIT_AUDIENCE]},{label:"Levels",appLink:{application:e,action:t.LEVELS},activeActions:[t.LEVELS,t.NEW_LEVEL,t.EDIT_LEVEL]},{label:"Presentations",appLink:{application:e,action:t.PRESENTATIONS},activeActions:[t.PRESENTATIONS,t.NEW_PRESENTATION,t.EDIT_PRESENTATION]}]},getEditSubjectTabs:function(e){var t=u.SUBJECTS,n=i.Subjects;return[{label:"Edit Subject Details",appLink:{application:t,action:n.EDIT_SUBJECT,args:[e]}},{label:"Playlists",appLink:{application:t,action:n.EDIT_SUBJECT_PLAYLISTS,args:[e]}},{label:"Series",appLink:{application:t,action:n.EDIT_SUBJECT_SERIES,args:[e]}},{label:"Videos",appLink:{application:t,action:n.EDIT_SUBJECT_VIDEOS,args:[e]}}]},getEditClassificationTabs:function(e,t){var n=u.SUBJECTS,r=i.Subjects;return[{label:"Edit Classification Details",appLink:{application:n,action:r.EDIT_CLASSIFICATION,args:[e,t]}},{label:"Playlists",appLink:{application:n,action:r.EDIT_CLASSIFICATION_PLAYLISTS,args:[e,t]}},{label:"Series",appLink:{application:n,action:r.EDIT_CLASSIFICATION_SERIES,args:[e,t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_CLASSIFICATION_VIDEOS,args:[e,t]}}]}};function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _e(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function we(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xe(e,t){return!t||"object"!==Ie(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Le(e,t){return(Le=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Pe=function(){return"/api/subjects/v1/subjects/tree"},ke=function(e){return"/api/subjects/v1/subjects/".concat(e)},Ne=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/").concat(t,"?query={limit:100}")},De=function(e,t,n){var r="/api/subjects/v1/subjects/".concat(e,"/classifications"),i=[];return t&&i.push("presentationId=".concat(t)),n&&i.push("query=".concat(n,"{limit:100}")),i.length?"".concat(r,"?").concat(i.join("&")):r},Re=function(){return"/api/subjects/v1/subjects"},Ue=function(e){return"/api/subjects/v1/subjects/".concat(e)},Be=function(e){return"/api/subjects/v1/subjects/".concat(e)},Ve=function(e){return"/api/subjects/v1/objects/".concat(e,"/subjects")},Me=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?addToClassifications=").concat(!!t)},Je=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},ze=function(){return"/api/subjects/v1/presentations"},He=function(e){return"/api/subjects/v1/presentations/".concat(e)},Ye=function(){return"/api/subjects/v1/presentations"},$e=function(e){return"/api/subjects/v1/presentations/".concat(e)},qe=function(e){return"/api/subjects/v1/presentations/".concat(e,"/classifications/tree")},We=function(e){return"/api/subjects/v1/classifications/".concat(e,"?query=thumbnail,banner")},Ke=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/").concat(t,"?query={limit:100}")},Ge=function(){return"/api/subjects/v1/classifications"},Ze=function(e){return"/api/subjects/v1/classifications/".concat(e)},Qe=function(e){return"/api/subjects/v1/classifications/".concat(e)},Xe=function(e){return"/api/subjects/v1/classifications/".concat(e,"/objects")},et=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},tt=function(){return"/api/subjects/v1/levels"},nt=function(e){return"/api/subjects/v1/levels/".concat(e)},rt=function(){return"/api/subjects/v1/levels"},it=function(e){return"/api/subjects/v1/levels/".concat(e)},at=function(e){return"/api/subjects/v1/presentations/".concat(e,"/audiences")},ot=function(e){return"/api/subjects/v1/audiences/".concat(e)},ct=function(){return"/api/subjects/v1/audiences"},ut=function(e){return"/api/subjects/v1/audiences/".concat(e)},st=function(e){return"/api/subjects/v1/audiences/".concat(e)},lt=function(e){return e.data},ft=function(e){return Object.assign(Object.assign({},e),{id:e.masterId})},pt=function(e,t,n){var r="".concat(a.SUBJECT,":").concat(e);return t&&(r+=":".concat(t)),r+=":".concat(a.CLASSIFICATIONS),n&&(r+=":".concat(n)),r},dt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),xe(this,Fe(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Le(e,t)}(t,e),n=t,(r=[{key:"getSubjectTree",value:function(e,t){return this.get({resource:Pe(),formatData:function(e){return{children:e.data,name:pe.Root,id:null}},eventPrefix:a.SUBJECTS,expiryTime:d.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"getSubject",value:function(e,t,n){return this.get({resource:ke(e),formatData:lt,eventPrefix:"".concat(a.SUBJECT,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getSubjectMemberIds",value:function(e,t,n,r){return this.get({resource:Ne(e,t),formatData:lt,eventPrefix:"".concat(a.SUBJECT,":").concat(e,":").concat(t),expiryTime:d.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"getSubjectClassifications",value:function(e,t,n,r,i){return this.get({resource:De(e,t,n),eventPrefix:pt(e,t,n),expiryTime:d.CacheDurations.STANDARD,callback:r,errorCallback:i})}},{key:"createSubject",value:function(e,t,n){return this.create({resource:Re(),data:e,formatData:lt,callback:t,errorCallback:n,eventPrefix:a.SUBJECT,invalidationKeys:[a.SUBJECTS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created subject."),errorHandler:this.alertService.error("Failed to create subject.")})}},{key:"updateSubject",value:function(e,t,n,r){return this.update({resource:Ue(e),data:t,formatData:lt,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_SUBJECT,":").concat(e),invalidationKeys:["".concat(a.SUBJECT,":").concat(e),a.SUBJECTS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated subject."),errorHandler:this.alertService.error("Failed to save subject.")})}},{key:"deleteSubject",value:function(e,t,n){return this.delete({resource:Be(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_SUBJECT,invalidationKeys:["".concat(a.SUBJECT,":").concat(e),a.SUBJECTS],successHandler:this.alertService.success("Successfully deleted subject"),errorHandler:this.alertService.error("Failed to delete subject")})}},{key:"getObjectSubjects",value:function(e,t,n,r){return this.get({resource:Ve(e),formatData:lt,eventPrefix:"".concat(t,":").concat(e,":").concat(a.SUBJECTS),expiryTime:d.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"addObjectsToSubject",value:function(e,t,n,r,i,o){var c=1===t.length?Ae.singularizeMemberType(n):n,u=["".concat(a.SUBJECT,":").concat(e,":").concat(n)].concat(_e(t.map((function(e){return"".concat(n,":").concat(e,":").concat(a.SUBJECTS)}))));return this.create({resource:Me(e,r),data:t,formatData:lt,callback:i,errorCallback:o,eventPrefix:"".concat(a.ADD_TO_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:u,expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(c," to subject.")),errorHandler:this.alertService.error("Failed to add ".concat(c," to subject."))})}},{key:"removeObjectsFromSubject",value:function(e,t,n,r,i){var o=1===t.length?Ae.singularizeMemberType(n):n,c=["".concat(a.SUBJECT,":").concat(e,":").concat(n)].concat(_e(t.map((function(e){return"".concat(n,":").concat(e,":").concat(a.SUBJECTS)}))));return this.delete({resource:Je(e,t),callback:r,errorCallback:i,eventPrefix:"".concat(a.REMOVE_FROM_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:c,expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(o," from subject.")),errorHandler:this.alertService.error("Failed to remove ".concat(o," from subject."))})}},{key:"getPresentations",value:function(e,t){return this.get({resource:ze(),formatData:lt,eventPrefix:a.PRESENTATIONS,expiryTime:d.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"getPresentation",value:function(e,t,n){return this.get({resource:He(e),formatData:lt,eventPrefix:"".concat(a.PRESENTATION,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"createPresentation",value:function(e,t,n){return this.create({resource:Ye(),data:e,formatData:lt,callback:t,errorCallback:n,eventPrefix:a.PRESENTATION,invalidationKeys:[a.PRESENTATIONS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created presentation."),errorHandler:this.alertService.error("Failed to create presentation.")})}},{key:"updatePresentation",value:function(e,t,n,r){return this.update({resource:$e(e),data:t,formatData:lt,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_PRESENTATION,":").concat(e),invalidationKeys:["".concat(a.PRESENTATION,":").concat(e),a.PRESENTATIONS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated presentation."),errorHandler:this.alertService.error("Failed to update presentation.")})}},{key:"getClassificationTree",value:function(e,t,n){return this.get({resource:qe(e),formatData:function(e){return{children:e.data,name:de.Root,id:null}},eventPrefix:"".concat(a.CLASSIFICATIONS,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getClassification",value:function(e,t,n){return this.get({resource:We(e),formatData:lt,eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getClassificationMembers",value:function(e,t,n,r){return this.get({resource:Ke(e,t),formatData:lt,eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e,":").concat(t),expiryTime:d.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"createClassification",value:function(e,t,n){return this.create({resource:Ge(),data:e,formatData:lt,callback:t,errorCallback:n,eventPrefix:a.CLASSIFICATION,invalidationKeys:[a.CLASSIFICATIONS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created classification."),errorHandler:this.alertService.error("Failed to create classification.")})}},{key:"updateClassification",value:function(e,t,n,r){return this.update({resource:Ze(e),data:t,formatData:lt,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_CLASSIFICATION,":").concat(e),invalidationKeys:["".concat(a.CLASSIFICATION,":").concat(e),a.CLASSIFICATIONS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated classification."),errorHandler:this.alertService.error("Failed to save classification.")})}},{key:"deleteClassification",value:function(e,t,n){return this.delete({resource:Qe(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_CLASSIFICATION,invalidationKeys:["".concat(a.CLASSIFICATION,":").concat(e),a.CLASSIFICATIONS],successHandler:this.alertService.success("Successfully deleted classification"),errorHandler:this.alertService.error("Failed to delete classification")})}},{key:"addObjectsToClassification",value:function(e,t,n,r,i,o,c){var u=1===t.length?Ae.singularizeMemberType(n):n,s=["".concat(a.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&s.push(pt(r,i,n)),this.create({resource:Xe(e),data:t,formatData:lt,callback:o,errorCallback:c,eventPrefix:"".concat(a.ADD_TO_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:s,expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(u," to classification.")),errorHandler:this.alertService.error("Failed to add ".concat(u," to classification."))})}},{key:"removeObjectsFromClassification",value:function(e,t,n,r,i,o,c){var u=1===t.length?Ae.singularizeMemberType(n):n,s=["".concat(a.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&s.push(pt(r,i,n)),this.delete({resource:et(e,t),callback:o,errorCallback:c,eventPrefix:"".concat(a.REMOVE_FROM_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:s,expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(u," from classification.")),errorHandler:this.alertService.error("Failed to remove ".concat(u," from classification."))})}},{key:"getLevels",value:function(e,t){return this.get({resource:tt(),formatData:lt,eventPrefix:a.LEVELS,expiryTime:d.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"getLevel",value:function(e,t,n){return this.get({resource:nt(e),formatData:lt,eventPrefix:"".concat(a.LEVEL,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"createLevel",value:function(e,t,n){return this.create({resource:rt(),data:e,formatData:lt,callback:t,errorCallback:n,eventPrefix:a.LEVEL,invalidationKeys:[a.LEVELS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created level."),errorHandler:this.alertService.error("Failed to create level.")})}},{key:"updateLevel",value:function(e,t,n,r){return this.update({resource:it(e),data:t,formatData:lt,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_LEVEL,":").concat(e),invalidationKeys:["".concat(a.LEVEL,":").concat(e),a.LEVELS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated level."),errorHandler:this.alertService.error("Failed to save level.")})}},{key:"getAudiences",value:function(e,t,n){return this.get({resource:at(e),formatData:function(e){return lt(e).map(ft)},callback:t,errorCallback:n,eventPrefix:"".concat(a.AUDIENCES,":").concat(e),expiryTime:d.CacheDurations.STANDARD})}},{key:"getAudience",value:function(e,t,n){return this.get({resource:ot(e),formatData:function(e){return ft(lt(e))},callback:t,errorCallback:n,eventPrefix:"".concat(a.AUDIENCE,":").concat(e),expiryTime:d.CacheDurations.STANDARD})}},{key:"createAudience",value:function(e,t,n){return this.create({resource:ct(),data:e,formatData:function(e){return ft(lt(e))},callback:t,errorCallback:n,eventPrefix:a.AUDIENCE,invalidationKeys:[a.AUDIENCES],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created audience."),errorHandler:this.alertService.error("Failed to create audience.")})}},{key:"updateAudience",value:function(e,t,n,r){return this.update({resource:ut(e),data:t,formatData:function(e){return ft(lt(e))},callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_AUDIENCE,":").concat(e),invalidationKeys:["".concat(a.AUDIENCE,":").concat(e),a.AUDIENCES],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated audience."),errorHandler:this.alertService.error("Failed to update audience.")})}},{key:"deleteAudience",value:function(e,t,n){return this.delete({resource:st(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_AUDIENCE,invalidationKeys:["".concat(a.AUDIENCE,":").concat(e),a.AUDIENCES],successHandler:this.alertService.success("Successfully deleted audience"),errorHandler:this.alertService.error("Failed to delete audience")})}},{key:"name",get:function(){return l.SUBJECT}},{key:"channelName",get:function(){return s.SUBJECT}}])&&we(n.prototype,r),i&&we(n,i),t}(p.BaseDataService),vt={dataServiceName:l.SUBJECT,dataChannelName:s.SUBJECT},mt={getSubjectTreeFetchOptions:function(e,t){return Object.assign(Object.assign({},vt),{eventPrefix:a.SUBJECTS,fetchData:function(e){return e.getSubjectTree()},setData:e,onError:t})},getSubjectFetchOptions:function(e,t,n){return Object.assign(Object.assign({},vt),{eventPrefix:"".concat(a.SUBJECT,":").concat(e),fetchData:function(t){return t.getSubject(e)},setData:t,onError:n,deleteEventPrefix:a.DELETE_SUBJECT})},getSubjectMemberIdsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},vt),{eventPrefix:"".concat(a.SUBJECT,":").concat(e,":").concat(t),fetchData:function(n){return n.getSubjectMemberIds(e,t)},setData:n,onError:r})},getSubjectClassificationFetchOptions:function(e,t,n,r,i){return Object.assign(Object.assign({},vt),{eventPrefix:pt(e,n,r),fetchData:function(t){return t.getSubjectClassifications(e,n,r)},setData:t,onError:i})},getObjectSubjectsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},vt),{eventPrefix:"".concat(t,":").concat(e,":").concat(a.SUBJECTS),fetchData:function(n){return n.getObjectSubjects(e,t)},setData:n,onError:r})},getPresentationsFetchOptions:function(e,t){return Object.assign(Object.assign({},vt),{eventPrefix:a.PRESENTATIONS,fetchData:function(e){return e.getPresentations()},setData:e,onError:t})},getPresentationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},vt),{eventPrefix:"".concat(a.PRESENTATION,":").concat(e),fetchData:function(t){return t.getPresentation(e)},setData:t,onError:n})},getClassificationTreeFetchOptions:function(e,t,n){return Object.assign(Object.assign({},vt),{eventPrefix:"".concat(a.CLASSIFICATIONS,":").concat(e),fetchData:function(t){return t.getClassificationTree(e)},setData:t,onError:n})},getClassificationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},vt),{eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e),fetchData:function(t){return t.getClassification(e)},setData:t,onError:n,deleteEventPrefix:a.DELETE_CLASSIFICATION})},getClassificationMembersFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},vt),{eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e,":").concat(t),fetchData:function(n){return n.getClassificationMembers(e,t)},setData:n,onError:r})},getLevelsFetchOptions:function(e,t){return Object.assign(Object.assign({},vt),{eventPrefix:a.LEVELS,fetchData:function(e){return e.getLevels()},setData:e,onError:t})},getLevelFetchOptions:function(e,t,n){return Object.assign(Object.assign({},vt),{eventPrefix:"".concat(a.LEVEL,":").concat(e),fetchData:function(t){return t.getLevel(e)},setData:t,onError:n})},getAudiencesFetchOptions:function(e,t,n){return Object.assign(Object.assign({},vt),{eventPrefix:"".concat(a.AUDIENCES,":").concat(e),fetchData:function(t){return t.getAudiences(e)},setData:t,onError:n})},getAudienceFetchOptions:function(e,t,n){return Object.assign(Object.assign({},vt),{eventPrefix:"".concat(a.AUDIENCE,":").concat(e),fetchData:function(t){return t.getAudience(e)},setData:t,onError:n})}},ht=n(36);function bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var yt=f.createContext(void 0),gt=function(e){var t=e.children,n=bt(f.useState(),2),r=n[0],i=n[1],a=bt(f.useState(!1),2),o=a[0],c=a[1],u=bt(f.useState(),2),s=u[0],l=u[1],p={getDataUrl:function(){var e=r;return i(null),e},setDataUrl:i,imageUploaded:o,getImage:function(){var e=s;return l(null),c(!1),e},setImage:function(e){l(e),c(!0)}};return f.createElement(yt.Provider,{value:p},t)},St=n(3),Et=n(56),jt=n.n(Et);function Ot(e){var t=e.className,n=void 0===t?"":t,r=e.actions,i=e.alignLeft;if(!r||!r.length)return f.createElement(f.Fragment,null);var a="".concat(jt.a.dropdown," rounded-circle");n&&(a+=" ".concat(n));var o="actions-dropdown-".concat(p.RandomHelper.getRandomInt());return f.createElement(St.Dropdown,{className:a,alignRight:!i},f.createElement(St.Dropdown.Toggle,{as:"a",id:o,className:jt.a.dropdownToggle},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.More,size:d.SvgContainerSize.Standard})),f.createElement(St.Dropdown.Menu,null,r.map((function(e,t){return f.createElement(St.Dropdown.Item,{key:t,as:d.AppLink,appLink:e.appLink,className:e.className||""},e.name)}))))}function Tt(e){var t=e.backToName,n=e.appLink;return f.createElement(d.AppLink,{appLink:n,className:"d-inline-flex align-items-center"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.ArrowLeft,size:d.SvgContainerSize.Small}),f.createElement("span",{className:"ml-1"},"Back to ".concat(t)))}function At(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ct(e){var t=e.selected,n=e.onToggle,r=At(f.useState(t),2),i=r[0],a=r[1];f.useEffect((function(){return a(t)}),[t]);return f.createElement(St.Form.Check,{type:"checkbox",checked:i,onChange:function(){a(!i),n(!i)}})}function It(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function _t(e){var t=e.title,n=e.onClickConfirm,r=e.confirmButtonText,i=e.cancelButtonText,a=e.closePopup,o=It(f.useState(!1),2),c=o[0],u=o[1],s=[{variant:"link",onClick:a,buttonText:i},{variant:"primary",onClick:function(){u(!0),n()},buttonText:r,isSpinnerButton:!0,showSpinner:c}];return f.createElement(Xt,{title:t,closePopup:a},f.createElement(f.Fragment,null,e.children,f.createElement(on,{buttons:s})))}_t.defaultProps={confirmButtonText:"Confirm",cancelButtonText:"Cancel"};var wt=n(5),xt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Ft(e){var t=e.onFileSelect,n=e.acceptMultiple,r=e.mimeType,i=e.label,a=e.error,o=e.touched,c=xt(e,["onFileSelect","acceptMultiple","mimeType","label","error","touched"]),u="custom-file-input cursor-pointer";a&&o&&(u+=" is-invalid");var s=Object.assign({type:"file",className:u,onChange:function(e){var n=e.currentTarget.files;n&&n.length&&p.FunctionHelper.isFunction(t)&&t(n)},autoComplete:"off",value:"",multiple:!!n},r?{accept:r}:{});return f.createElement("div",{className:"form-group"},f.createElement("div",{className:"custom-file"},f.createElement(wt.Field,Object.assign({},s,c),e.children),f.createElement(St.Form.Label,{className:"custom-file-label",htmlFor:c.id},i)))}var Lt={onFileSelect:function(e,t,n){if(t&&t.length){var r=new FileReader;r.addEventListener("load",(function(){return Lt.onReaderLoad(r,e,n)})),r.readAsDataURL(t[0])}},onReaderLoad:function(e,t,n){var r=new Image;r.src=e.result;var i=d.ImageMinDimensions[t].width,a=d.ImageMinDimensions[t].height;r.addEventListener("load",(function(){Lt.isImageValid(t,r)&&p.FunctionHelper.isFunction(n)?n(r):alert("Image too small: minimum dimensions are ".concat(i," x ").concat(a))}))},isImageValid:function(e,t){var n=d.ImageMinDimensions[e].width,r=d.ImageMinDimensions[e].height;return!(n&&t.width<n)&&!(r&&t.height<r)}},Pt=function(){return[{value:"protected",access:"r"}]},kt={propsLoaded:function(e){return Object.values(e).every((function(e){return!!e}))}},Nt={isEqual:function(e,t){return!!e&&!!t&&e.toString()===t.toString()},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}};function Dt(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Rt,Ut={find:function(e,t){if(e&&e.children&&e.children.length)for(var n=function e(n){if(Nt.isEqual(n.id,t))return n;var r=n.children;if(r&&r.length)for(var i=0;i<r.length;i++){var a=e(r[i]);if(a)return a}},r=0;r<e.children.length;r++){var i=n(e.children[r]);if(i)return i}},getPath:function(e,t){for(var n=[t],r=function(e){return e.hasOwnProperty("parentIds")&&Array.isArray(e.parentIds)&&e.parentIds.length?e.parentIds[0]:e.hasOwnProperty("parentId")?e.parentId:null},i=r(t);i;){var a=Ut.find(e,i);a&&(n=[a].concat(Dt(n))),i=a?r(a):null}return n}};function Bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Mt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Jt=(Vt(Rt={},d.ImageType.Thumbnails,"Thumbnail"),Vt(Rt,d.ImageType.Banners,"Banner"),Vt(Rt,d.ImageType.Avatars,"Avatar"),Vt(Rt,d.ImageType.Logos,"Logo"),Vt(Rt,d.ImageType.Covers,"Cover"),Rt);function zt(e){var t=e.imageType,n=e.currentImage,r=e.setNewImage,i=e.application,a=e.uploadAction,c=Mt(e,["imageType","currentImage","setNewImage","application","uploadAction"]),u=f.useContext(yt),s=u.setDataUrl,l=u.getImage,v=u.imageUploaded,m=Bt(f.useState(!1),2),h=m[0],b=m[1],y=Bt(f.useState(n),2),g=y[0],S=y[1],E=Bt(f.useState(!1),2),j=E[0],O=E[1],T=function(e){b(!0),s(e.src),p.Core.AppLinkHelper.trigger({application:i,action:a,args:[t]})};return f.useEffect((function(){if(h){var e=l();e&&(b(!1),S(e),r({fileId:e.id,fileIdType:d.FileIdType.ImageAPIv2}))}}),[v]),f.createElement("div",{className:"form-group"},f.createElement("div",{className:"form-control h-auto py-2"},f.createElement("label",null,Jt[t]),f.createElement(Ft,Object.assign({label:"Choose a ".concat(Jt[t].toLowerCase()),name:"thumbnail",mimeType:o.IMAGES,onFileSelect:function(e){return Lt.onFileSelect(t,e,T)}},c)),!!g&&!!g.url&&f.createElement(f.Fragment,null,!j&&f.createElement("div",{className:"pb-2 ".concat(t===d.ImageType.Banners?"w-100":"w-50")},f.createElement("img",{src:d.ImageHelper.createUrl(g.url),className:"img img-fluid"})),f.createElement("div",{className:"d-flex justify-content-center"},f.createElement(d.SvgContainer,{svgName:j?d.cvSvgLibrary.ChevronDown:d.cvSvgLibrary.ChevronUp,size:d.SvgContainerSize.Large,className:"svg-container cursor-pointer",onClick:function(){return O(!j)},title:j?"Show image":"Hide image",tooltipPlacement:"top"})))))}var Ht,Yt=n(98),$t=n.n(Yt);function qt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}!function(e){e[e.NoRestrictions=0]="NoRestrictions",e[e.RestrictToCanvas=1]="RestrictToCanvas"}(Ht||(Ht={}));var Wt=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/,Kt=function(e){var t=e.match(Wt);if(t)return t[1]};function Gt(e){var t=e.dataUrl,n=e.minHeight,r=e.minWidth,i=e.onCrop,a=e.onCancel,o=f.useRef(),c=f.useRef(),u=qt(f.useState(!1),2),s=u[0],l=u[1],v=qt(f.useState(!1),2),m=v[0],h=v[1];return f.useEffect((function(){var e=new Image;e.src=t;var i=o.current.offsetWidth/e.width;return c.current=new $t.a(o.current,{viewMode:Ht.RestrictToCanvas,autoCropArea:1,aspectRatio:r/n,minCropBoxWidth:r*i,minCropBoxHeight:n*i,ready:function(){return l(!0)}}),function(){return c.current.destroy()}}),[]),f.createElement(f.Fragment,null,f.createElement("div",{className:"pb-3"},f.createElement("img",{ref:o,src:t,className:"img img-fluid mw-100"})),f.createElement("div",{className:"d-flex justify-content-end border-top pt-3"},f.createElement(St.Button,{variant:"link",onClick:a},"Cancel"),f.createElement(d.SpinnerButton,{onClick:function(){if(s){h(!0);var e=c.current.getCroppedCanvas().toDataURL(Kt(t));p.FunctionHelper.isFunction(i)&&i(e)}},disabled:!s,showSpinner:m},"Crop")))}var Zt=function(e){var t=e.object,n=e.actions;return f.createElement("div",{className:"d-flex justify-content-between py-2"},!!t&&f.createElement("h6",null,t.name),!!n&&f.createElement("span",null,f.createElement(Ot,{actions:n})))};function Qt(){return f.createElement("div",{className:"text-center p-5"},f.createElement(St.Spinner,{as:"div",animation:"border",role:"status"}))}function Xt(e){var t=e.title,n=e.closeButton,r=void 0===n||n,i=e.closePopup,a=e.onEntered,o=e.showLoadingSpinner,c=Object.assign({show:!0,onHide:i},p.FunctionHelper.isFunction(a)?{onEntered:a}:{});return f.createElement(St.Modal,Object.assign({},c),!!t&&f.createElement(St.Modal.Header,{closeButton:r},f.createElement(St.Modal.Title,null,t)),o?f.createElement(Qt,null):f.createElement(St.Modal.Body,null,e.children))}var en,tn=n(99),nn=n.n(tn),rn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};!function(e){e.Button="button",e.Reset="reset",e.Submit="submit"}(en||(en={}));var an=function(e,t){var n=e.buttonText,r=e.type,i=void 0===r?en.Button:r,a=e.isSpinnerButton,o=e.showSpinner,c=void 0!==o&&o,u=e.className,s=rn(e,["buttonText","type","isSpinnerButton","showSpinner","className"]),l=Object.assign({key:t,type:i,className:"ml-2".concat(u?" ".concat(u):"")},s);return a?f.createElement(d.SpinnerButton,Object.assign({showSpinner:c},l),n):f.createElement(St.Button,Object.assign({},l),n)};function on(e){var t=e.buttons;return f.createElement("div",{className:"".concat(nn.a.btnContainer," d-flex justify-content-end border-top")},t.map((function(e,t){return an(e,t)})))}var cn=function(e){var t=e.subject,n=e.getSubjectAppLink,r=e.getActions;return f.createElement("tr",null,f.createElement("td",null,f.createElement(d.AppLink,{appLink:n(t)},t.name)),p.FunctionHelper.isFunction(r)&&f.createElement("td",null,f.createElement("span",{className:"d-flex justify-content-end"},f.createElement(Ot,{actions:r(t)}))))},un=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},sn=function(e){var t=e.getActions;return f.createElement("thead",null,f.createElement("tr",null,f.createElement("th",null,"Subject Name"),!!t&&f.createElement("th",null)))},ln=function(e){var t=e.subjects,n=un(e,["subjects"]);return f.createElement("tbody",null,t.map((function(e){return f.createElement(cn,Object.assign({key:e.id,subject:e},n))})))};function fn(e){var t=e.emptyMessage,n=un(e,["emptyMessage"]);return n.subjects.length?f.createElement(St.Table,{responsive:!0},f.createElement(sn,Object.assign({},n)),f.createElement(ln,Object.assign({},n))):f.createElement("div",null,t)}function pn(e){var t=e.tabs,n=e.isItemActive;return f.createElement(St.Nav,{fill:!0,variant:"tabs"},t.map((function(e,t){return f.createElement(St.Nav.Item,{key:t},f.createElement(St.Nav.Link,{as:d.AppLink,appLink:e.appLink,active:n(e)},e.label))})))}fn.defaultProps={emptyMessage:"There are no subjects in this list."},pn.defaultProps={isItemActive:Ce.isItemActive};var dn=n(7),vn=n.n(dn);function mn(e){var t=e.name,n=e.appLink,r=e.onSelect,i=e.isDisabled,a=e.className,o=e.actions,c=vn.a.text;return a&&(c+=" ".concat(a)),i?f.createElement("a",{className:"".concat(c," text-muted ").concat(vn.a.disabled)},t):f.createElement(f.Fragment,null,n?f.createElement(d.AppLink,{appLink:n,className:c},t):f.createElement("a",{onClick:r,className:c},t),!!o&&f.createElement(Ot,{className:vn.a.actions,actions:o}))}function hn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function bn(e){var t=e.tree,n=e.selectedIds,r=e.getAppLink,i=e.onSelect,a=e.isDisabled,o=e.actions,c=Array.isArray(n)&&n.some((function(e){return Nt.isEqual(t.id,e)})),u=f.useMemo((function(){return!c&&Array.isArray(n)&&n.some((function(e){return Ut.find(t,e)}))}),[n]),s=hn(f.useState(u),2),l=s[0],v=s[1],m=!!t.children&&!!t.children.length,h={name:t.name,appLink:p.FunctionHelper.isFunction(r)?r(t):null,onSelect:p.FunctionHelper.isFunction(i)?function(){return i(t)}:null,isDisabled:!!p.FunctionHelper.isFunction(a)&&a(t),className:c&&vn.a.selected||u&&vn.a.parentOfSelected,actions:!!o&&o.map((function(e){return Object.assign(Object.assign({},e),{appLink:e.getAppLink(t)})}))};return f.createElement("li",{className:"position-relative".concat(l?"":" ".concat(vn.a.collapsed))},f.createElement("div",{className:"position-relative"},f.createElement("span",{className:vn.a.node},m&&f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.ChevronDown,size:d.SvgContainerSize.Small,className:"svg-container ".concat(vn.a.chevron),onClick:function(){return v(!l)}}),f.createElement(mn,Object.assign({},h))),l&&f.createElement(gn,Object.assign({},e))))}var yn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function gn(e){var t=e.tree,n=yn(e,["tree"]);return t&&t.children?f.createElement("ul",{className:"m-0 p-0 ".concat(vn.a.tree)},t.children.map((function(e){return f.createElement(bn,Object.assign({key:e.id,tree:e},n))}))):f.createElement(f.Fragment,null)}var Sn={getChord:function(e,t){return Ut.getPath(e,t).map((function(e){return e.name})).join(" -> ")},getState:function(e,t){var n={};return Array.isArray(e)&&e.forEach((function(e){var r,i,a,o=Ut.find(t,e);o&&(n=Object.assign((r={},i=e,a=Sn.getChord(t,o),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r),n))})),n},isNodeDisabled:function(e,t,n,r){return r?n.some((function(n){if(n===e.id)return!0;var r=Ut.find(t,n);return!!Ut.find(r,e.id)})):n.includes(e.id)}};function En(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var jn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function On(e){var t=e.onSelect,n=e.label,r=e.hideCollapseBtn,i=e.collapse,a=e.noSelectionMessage,o=e.disabledIds,c=void 0===o?[]:o,u=e.disableChildren,s=e.getSelectedItemAppLink,l=jn(e,["onSelect","label","hideCollapseBtn","collapse","noSelectionMessage","disabledIds","disableChildren","getSelectedItemAppLink"]),v=l.tree,m=l.selectedIds,h=En(f.useState(Sn.getState(m,v)),2),b=h[0],y=h[1];f.useEffect((function(){return y(Sn.getState(m,v))}),[m]);var g=En(f.useState(!!i),2),S=g[0],E=g[1];f.useEffect((function(){return E(!!i)}),[i]);var j=f.useCallback((function(e){return p.FunctionHelper.isFunction(t)&&t(e)}),[t]),O=f.useCallback((function(e){return Sn.isNodeDisabled(e,v,c,u)}),[v,c,u]),T=!r||!!n;return f.createElement(f.Fragment,null,T&&f.createElement("div",{className:"pb-2"},!!n&&f.createElement("label",{className:"m-0"},n),!r&&f.createElement("a",{className:"float-right cursor-pointer",onClick:function(){return E(!S)}},S?"Expand":"Collapse")),!S&&f.createElement("div",{className:"py-2 border-top"},f.createElement(gn,Object.assign({onSelect:j,isDisabled:O},l))),(!p.ObjectHelper.isEmpty(b)||!!a)&&f.createElement("div",{className:"py-2 border-top"},f.createElement("label",null,"Selected:"),f.createElement("ul",{className:"m-0"},p.ObjectHelper.isEmpty(b)?f.createElement("li",null,a):Object.keys(b).map((function(e,t){return f.createElement("li",{key:t},p.FunctionHelper.isFunction(s)?f.createElement(d.AppLink,{appLink:s(e)},b[e]):b[e])})))))}var Tn=n(37),An=function(e){var t="bg-white";return e&&(t+=" ".concat(e)),t};function Cn(e){var t=e.video,n=e.getVideoAppLink,r=e.getVideoActions,i=e.className,a=void 0===i?"":i,o=e.itemNumber,c=p.FunctionHelper.isFunction(n)&&n(t);return f.createElement("tr",{className:An(a)},!!o&&f.createElement("td",null,f.createElement("span",null,o)),f.createElement("td",null,c?f.createElement(d.AppLink,{appLink:c},t.name):t.name),p.FunctionHelper.isFunction(r)&&f.createElement("td",null,f.createElement("span",{className:"d-flex justify-content-end"},f.createElement(Ot,{actions:r(t)}))))}var In=Object(Tn.SortableElement)((function(e){return f.createElement(Cn,Object.assign({sortable:!0},e))})),_n=n(15),wn=n.n(_n),xn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Fn=function(e){var t=e.sortable,n=e.getVideoActions;return f.createElement("thead",null,f.createElement("tr",null,!!t&&f.createElement("th",null,"#"),f.createElement("th",null,"Name"),!!n&&f.createElement("th",null)))},Ln=f.forwardRef((function(e,t){var n=e.videos,r=e.sortable,i=xn(e,["videos","sortable"]);return f.createElement("tbody",{ref:t},!d.CollectionHelper.isEmpty(n)&&n.data.map((function(e,t){return r?f.createElement(In,Object.assign({key:e.id,index:t,itemNumber:t+1,video:e,className:wn.a.draggableVideoItem},i)):f.createElement(Cn,Object.assign({video:e},i))})))}));var Pn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},kn=Object(Tn.SortableContainer)((function(e){var t=e.forwardedRef,n=Pn(e,["forwardedRef"]);return f.createElement(Ln,Object.assign({sortable:!0,ref:t},n))})),Nn=function(e){return function(t){var n=t.node,r=e.current;if(r){r.classList.add(wn.a.sortingContainer);var i=r.querySelector(".".concat(wn.a.draggedVideoItem));n.childNodes.forEach((function(e,t){return i.childNodes[t].style.width="".concat(e.offsetWidth,"px")}))}}},Dn=function(e,t){return function(n){var r=e.current;r&&r.classList.remove(wn.a.sortingContainer),t(n.oldIndex,n.newIndex)}};function Rn(e){var t=e.onSortEnd,n=e.emptyMessage,r=Pn(e,["onSortEnd","emptyMessage"]),i=f.useRef();return d.CollectionHelper.isEmpty(e.videos)?f.createElement("div",null,n):f.createElement(St.Table,{responsive:!0},f.createElement(Fn,Object.assign({sortable:!0},e)),f.createElement(kn,Object.assign({forwardedRef:i,onSortStart:Nn(i),onSortEnd:Dn(i,t),lockAxis:"y",lockToContainerEdges:!0,distance:1,helperClass:wn.a.draggedVideoItem,helperContainer:function(){return i.current}},r)))}function Un(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Bn(e){var t=e.imageType,n=e.closePopup,r=f.useContext(yt),i=r.getDataUrl,a=r.setImage,o=Un(f.useState(i()),1)[0],c=Un(f.useState(!1),2),u=c[0],s=c[1],v=Object(p.useService)(l.IMAGE_UPLOAD),m=function(e){a(e),n()},h={dataUrl:o,imageType:t,minWidth:d.ImageMinDimensions[t].width,minHeight:d.ImageMinDimensions[t].height,onCrop:function(e){return v.uploadBase64Image(e,t,m,n)},onCancel:n};return f.createElement(Xt,{title:"Crop Image",closePopup:n,onEntered:function(){return s(!0)}},u&&f.createElement(Gt,Object.assign({},h)))}function Vn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Rn.defaultProps={emptyMessage:"There are no videos in this list."};var Mn=function(e,t,n){return[{variant:"link",onClick:t,buttonText:"Cancel"},{variant:"danger",onClick:e,buttonText:"Yes, delete this audience",isSpinnerButton:!0,showSpinner:n}]};function Jn(e){var t=e.id,n=e.routeToOnDelete,r=e.closePopup,i=Vn(f.useState(),2),a=i[0],o=i[1],c=Vn(f.useState(!1),2),u=c[0],s=c[1],d=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(mt.getAudienceFetchOptions(t,o),[t]);return f.createElement(Xt,{title:"Delete Audience",closePopup:r,showLoadingSpinner:!a},!!a&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to delete ",f.createElement("strong",null,a.name),"?")),f.createElement(on,{buttons:Mn((function(){s(!0);d.deleteAudience(t,(function(){r(),n&&p.Core.AppLinkHelper.trigger(n)}),r)}),r,u)})))}function zn(e){var t=e.memberType,n=e.subjectTree,r=e.objects,i=e.subjectId,a=e.onSelectSubject,o=e.onClickAddToSubject;return f.createElement(f.Fragment,null,f.createElement("h4",null,"".concat(Nt.capitalizeFirstLetter(t))),f.createElement(St.Table,{responsive:!0},f.createElement("tbody",null,r&&r.map((function(e){return f.createElement("tr",{key:e.id},f.createElement("td",null,f.createElement(d.AppLink,{appLink:Ae.getMemberAppLink(t,e.id)},e.name)))})))),f.createElement("div",{className:"form-control h-auto py-2"},f.createElement(On,{label:"Select a subject:",tree:n,selectedIds:[i],onSelect:function(e){return a(e)}})),f.createElement("div",{className:"py-3"},f.createElement(St.Button,{onClick:o,disabled:!i},"Add to subject")))}function Hn(e){var t=e.item,n=e.getItemAppLink,r=e.actions;return f.createElement("tr",null,f.createElement("td",null,f.createElement(d.AppLink,{appLink:n(t)},t.name)),r&&f.createElement("td",null,f.createElement("span",{className:"d-flex justify-content-end"},f.createElement(Ot,{actions:r}))))}function Yn(e){var t=e.items,n=e.memberType,r=e.getItemAppLink,i=e.getActions;if(!t.length)return f.createElement("div",{className:"py-5"},"No ".concat(n," in this classification."));var a="".concat(Nt.capitalizeFirstLetter(Ae.singularizeMemberType(n))," Name");return f.createElement(St.Table,{responsive:!0},f.createElement("thead",null,f.createElement("tr",null,f.createElement("th",null,a),p.FunctionHelper.isFunction(i)&&f.createElement("th",null))),f.createElement("tbody",null,t.map((function(e){return f.createElement(Hn,{item:e,key:e.id,getItemAppLink:r,actions:p.FunctionHelper.isFunction(i)&&i(e)})}))))}var $n=function(e,t,n){var r=e.target.value,i=t.map((function(e){return e.toString()})),a=i.indexOf(r);-1===a?i.push(r):i.splice(a,1),n("levelIds",i)};function qn(e){var t=e.values,n=t.name,r=t.levelIds,a=e.id,o=e.presentationId,c=e.levels,s=e.setFieldValue,l=e.isSubmitting,p=null===a;return f.createElement(wt.Form,null,f.createElement(d.FormField,{label:"Name",name:"name",id:"name",value:n,placeholder:"Enter a name for this audience",autoFocus:!0}),f.createElement(d.FormField,{label:"Mapped Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:c.length,value:r,onChange:function(e){return $n(e,r,s)}},c.map((function(e){return f.createElement("option",{key:e.id,value:e.id},e.name)}))),f.createElement("div",{className:"d-flex justify-content-between"},f.createElement(d.SpinnerButton,{showSpinner:l,type:"submit"},p?"Create":"Save"),!p&&f.createElement(St.Button,{as:d.AppLink,variant:"danger",appLink:{application:u.SUBJECTS,action:i.Subjects.DELETE_AUDIENCE,args:[o,a]}},"Delete")))}var Wn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Kn(e){var t=e.audience,n=(t=void 0===t?{}:t).id,r=void 0===n?null:n,i=t.name,a=void 0===i?"":i,o=t.levelIds,c=void 0===o?[]:o,u=e.saveAudience,s=Wn(e,["audience","saveAudience"]);return f.createElement(wt.Formik,{initialValues:{name:a,levelIds:c},validationSchema:Se,onSubmit:u},(function(e){return f.createElement(qn,Object.assign({id:r},s,e))}))}function Gn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Zn(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Qn=function(e,t,n,r){var i=n.indexOf(r.id),a=Zn(n);i>-1?a.splice(i,1):a.push(r.id),t(e,a)},Xn=function(e){return{application:u.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[e]}},er=function(e,t,n){var r="form-control h-auto py-2";return n[e]&&t[e]&&(r+=" is-invalid"),r};function tr(e){var t=e.values,n=t.name,r=t.parentIds,a=t.subjectIds,o=t.type,c=t.emphasize,s=t.thumbnail,l=t.banner,v=e.id,m=e.presentationId,h=e.classificationTree,b=e.subjectTree,y=e.setFieldValue,g=e.setFieldTouched,S=e.errors,E=e.touched,j=e.isSubmitting,O=null===v,T=!O||!(!r||!r.length),A=Gn(f.useState(T),2),C=A[0],I=A[1];return f.useEffect((function(){return I(T)}),[v,r]),f.useEffect((function(){a.length&&!E.subjectIds&&g("subjectIds",!0)}),[a]),f.createElement(wt.Form,null,f.createElement(d.FormField,{label:"Name",name:"name",id:"name",value:n,placeholder:"Enter a name for this classification",autoFocus:!0}),f.createElement(d.FormField,{as:"select",label:"Type",name:"type",id:"type",value:o},p.ObjectHelper.getEnumKeys(d.ClassificationType).map((function(e){return f.createElement("option",{key:e,value:d.ClassificationType[e]},e)}))),f.createElement(d.FormField,{label:"Emphasize",name:"emphasize",id:"emphasize",type:"checkbox",checked:c}),f.createElement(d.FormField,{name:"parentIds"},(function(){return f.createElement("div",{className:er("parentIds",S,E)},f.createElement(On,{label:"Parent Classification(s)",tree:h,selectedIds:r,onSelect:function(e){return Qn("parentIds",y,r,e)},collapse:C,noSelectionMessage:"No parent selected, this will be a root classification.",disabledIds:[v],disableChildren:!0}))})),f.createElement(d.FormField,{name:"subjectIds"},(function(){return f.createElement("div",{className:er("subjectIds",S,E)},f.createElement(On,{label:"Mapped Subject(s)",tree:b,selectedIds:a,onSelect:function(e){return Qn("subjectIds",y,a,e)},collapse:!O,getSelectedItemAppLink:Xn}))})),f.createElement(zt,{imageType:d.ImageType.Thumbnails,currentImage:s,setNewImage:function(e){return y("thumbnail",e)},application:u.SUBJECTS,uploadAction:i.Subjects.UPLOAD_IMAGE}),f.createElement(zt,{imageType:d.ImageType.Banners,currentImage:l,setNewImage:function(e){return y("banner",e)},application:u.SUBJECTS,uploadAction:i.Subjects.UPLOAD_IMAGE}),f.createElement("div",{className:"d-flex justify-content-between"},f.createElement(d.SpinnerButton,{showSpinner:j,type:"submit"},O?"Create":"Save"),!O&&f.createElement(St.Button,{as:d.AppLink,variant:"danger",appLink:{application:u.SUBJECTS,action:i.Subjects.DELETE_CLASSIFICATION,args:[m,v]}},"Delete")))}var nr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function rr(e){var t=e.classification,n=t.id,r=t.name,i=void 0===r?"":r,a=t.parentIds,o=void 0===a?[]:a,c=t.subjectIds,u=void 0===c?[]:c,s=t.type,l=void 0===s?d.ClassificationType.Subject:s,p=t.emphasize,v=t.thumbnail,m=void 0===v?{}:v,h=t.banner,b=void 0===h?{}:h,y=e.saveClassification,g={id:n,presentationId:e.presentationId,classificationTree:e.classificationTree,subjectTree:e.subjectTree};return f.createElement(wt.Formik,{initialValues:{name:i,parentIds:o,subjectIds:u,type:l,emphasize:p,thumbnail:m,banner:b},validationSchema:Ee,onSubmit:function(e,t){var n=e.parentIds,r=nr(e,["parentIds"]);n.length||n.push(de.Root),y(Object.assign(Object.assign({},r),{parentIds:n}),t)}},(function(e){return f.createElement(tr,Object.assign({},g,e))}))}var ir=function(e){return function(t){if(!e)return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION;switch(e){case fe.Playlists:return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;case fe.Series:return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION_SERIES;case fe.Videos:return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION_VIDEOS}}};function ar(e){var t=e.presentation,n=e.classificationId,r=e.memberType;return t?f.createElement(f.Fragment,null,f.createElement("h6",null,"Presentation: ".concat(!!t&&t.name)),f.createElement("div",{className:"py-2"},f.createElement(pn,{tabs:Ce.getEditClassificationTabs(t.id,n),isItemActive:ir(r)}))):f.createElement(f.Fragment,null)}function or(e){var t=e.values.name,n=e.id,r=e.isSubmitting,i=null===n;return f.createElement(wt.Form,null,f.createElement(d.FormField,{label:"Name",type:"text",name:"name",id:"name",value:t,placeholder:"Enter a name for this level",autoFocus:!0}),f.createElement(d.SpinnerButton,{showSpinner:r,type:"submit"},i?"Create":"Save"))}function cr(e){var t=e.level,n=(t=void 0===t?{}:t).id,r=void 0===n?null:n,i=t.name,a=void 0===i?"":i,o=e.saveLevel;return f.createElement(wt.Formik,{initialValues:{name:a},validationSchema:je,onSubmit:o},(function(e){return f.createElement(or,Object.assign({id:r},e))}))}function ur(e){var t=e.values,n=t.name,r=t.description,i=e.id,a=e.isSubmitting,o=!i;return f.createElement(wt.Form,null,f.createElement(d.FormField,{label:"Name",type:"text",name:"name",id:"name",value:n,placeholder:"Enter a name for this presentation",autoFocus:!0}),f.createElement(d.FormField,{label:"Description",type:"textarea",name:"description",id:"description",value:r,placeholder:"Describe this presentation here"}),f.createElement(d.SpinnerButton,{showSpinner:a,type:"submit"},o?"Create":"Save"))}function sr(e){var t=e.presentation,n=(t=void 0===t?{}:t).id,r=void 0===n?null:n,i=t.name,a=void 0===i?"":i,o=t.description,c=void 0===o?"":o,u=e.savePresentation;return f.createElement(wt.Formik,{initialValues:{name:a,description:c},validationSchema:Oe,onSubmit:u},(function(e){return f.createElement(ur,Object.assign({id:r},e))}))}function lr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var fr=function(e,t){var n="form-control h-auto py-2";return t.parentId&&e.parentId&&(n+=" is-invalid"),n};function pr(e){var t=e.values,n=t.name,r=t.parentId,a=e.id,o=e.subjectTree,c=e.setFieldValue,s=e.errors,l=e.touched,p=e.isSubmitting,v=!a,m=!v||!!r,h=lr(f.useState(m),2),b=h[0],y=h[1];f.useEffect((function(){return y(m)}),[a,r]);var g=function(e){var t=e.id===r?null:e.id;c("parentId",t)};return f.createElement(wt.Form,null,f.createElement(d.FormField,{label:"Name",name:"name",id:"name",value:n,placeholder:"Enter a name for this subject",autoFocus:!0}),f.createElement(d.FormField,{name:"parentId"},(function(){return f.createElement("div",{className:fr(s,l)},f.createElement(On,{label:"Parent Subject",tree:o,selectedIds:[r],onSelect:g,collapse:b,noSelectionMessage:"No parent selected, this will be a root subject.",disabledIds:[a],disableChildren:!0}))})),f.createElement("div",{className:"d-flex justify-content-between"},f.createElement(d.SpinnerButton,{showSpinner:p,type:"submit"},v?"Create":"Save"),!v&&f.createElement(St.Button,{as:d.AppLink,variant:"danger",appLink:{application:u.SUBJECTS,action:i.Subjects.DELETE_SUBJECT,args:[a]}},"Delete")))}var dr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function vr(e){var t=e.subject,n=t.id,r=t.name,i=void 0===r?"":r,a=t.parentId,o=e.saveSubject,c={id:n,subjectTree:e.subjectTree};return f.createElement(wt.Formik,{initialValues:{name:i,parentId:a},validationSchema:Te,onSubmit:function(e,t){var n=e.parentId,r=dr(e,["parentId"]);o(Object.assign(Object.assign({},r),{parentId:n||pe.Root}),t)}},(function(e){return f.createElement(pr,Object.assign({},c,e))}))}var mr=function(e){return function(t){if(!e)return t.appLink.action===i.Subjects.EDIT_SUBJECT;switch(e){case fe.Playlists:return t.appLink.action===i.Subjects.EDIT_SUBJECT_PLAYLISTS;case fe.Series:return t.appLink.action===i.Subjects.EDIT_SUBJECT_SERIES;case fe.Videos:return t.appLink.action===i.Subjects.EDIT_SUBJECT_VIDEOS}}};function hr(e){var t=e.subjectId,n=e.memberType;return f.createElement(f.Fragment,null,f.createElement(St.Alert,{variant:"danger"},"Warning: You are editing the backbone subjects."),f.createElement("div",{className:"py-2"},f.createElement(pn,{tabs:Ce.getEditSubjectTabs(t),isItemActive:mr(n)})))}function br(e){var t=e.objects,n=e.getAppLink,r=e.emptyMessage;return t?t.length?f.createElement("ul",{className:"list-unstyled"},t.map((function(e){return f.createElement("li",{key:e.id,className:"border rounded mb-3"},f.createElement(d.AppLink,{appLink:n(e.id),className:"d-block p-3"},e.name))}))):f.createElement("div",{className:"py-3"},f.createElement("p",null,r)):f.createElement(f.Fragment,null)}br.defaultProps={emptyMessage:"There is nothing here."};var yr=function(e,t){return p.ArrayHelper.first(t.filter((function(t){return t.id.toString()===e.toString()})))};function gr(e){var t=e.presentations,n=e.currentPresentation,r=e.setCurrentPresentation,i=e.label;return f.useEffect((function(){t&&!n&&r(t[0])}),[t]),f.createElement(f.Fragment,null,!!n&&f.createElement(f.Fragment,null,f.createElement(St.Form.Label,null,i),f.createElement(St.Form.Control,{as:"select",value:n.id,onChange:function(e){return n=e.target.value,i=yr(n,t),void r(i);var n,i},className:"cursor-pointer"},t.map((function(e){return f.createElement("option",{value:e.id,key:e.id},e.name)})))))}gr.defaultProps={label:"Presentation"};var Sr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Er=function(e,t){return t?e.name:"Classification: ".concat(e.name)};function jr(e){return f.createElement(f.Fragment,null,e.classifications.map((function(t){return f.createElement("th",{key:t.id},f.createElement("span",{className:"d-inline-block"},f.createElement(Ct,{selected:e.getIsClassificationSelected(t),onToggle:function(n){return e.onToggleClassification(t.id,n)}})),f.createElement(d.AppLink,{appLink:e.getClassificationAppLink(t.id)},Er(t,e.showClassificationSubHeader)))})))}function Or(e){var t=e.memberType,n=e.hasActions,r=e.classifications,i=Sr(e,["memberType","hasActions","classifications"]),a="".concat(Nt.capitalizeFirstLetter(Ae.singularizeMemberType(t))," Name"),o=!!r&&!!r.length,c=o&&r.length>1,u=o?2:1,s=Object.assign({classifications:r,showClassificationSubHeader:c},i);return f.createElement("thead",null,f.createElement("tr",null,f.createElement("th",{rowSpan:u},a),o&&(c?f.createElement("th",{colSpan:r.length,className:"text-center"},"Classifications"):f.createElement(jr,Object.assign({},s))),n&&f.createElement("th",{rowSpan:u})),o&&c&&f.createElement("tr",null,f.createElement(jr,Object.assign({},s))))}function Tr(e){var t=e.member,n=t.id,r=t.name,i=t.classifications,a=void 0===i?[]:i,o=e.getMemberAppLink,c=e.onToggleClassification,u=e.actions,s=p.FunctionHelper.isFunction(o)&&o(n);return a.length&&!p.FunctionHelper.isFunction(c)&&p.Core.ErrorHelper.throw(new p.DevError("onToggleClassification must be passed to SubjectMemberItem")),f.createElement("tr",null,f.createElement("td",null,s?f.createElement(d.AppLink,{appLink:o(n)},r):r),!!a.length&&a.map((function(e){return f.createElement("td",{key:e.id},f.createElement(Ct,{selected:e.selected,onToggle:function(t){return c(e.id,t,n)}}))})),u&&f.createElement("td",null,f.createElement("span",{className:"d-flex justify-content-end"},f.createElement(Ot,{actions:u}))))}var Ar=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Cr=function(e,t,n){return t[e]&&t[e].data.length===n.length};function Ir(e){var t=e.members,n=e.memberType,r=e.getActions,i=e.classifications,a=e.getClassificationAppLink,o=e.onToggleClassification,c=Ar(e,["members","memberType","getActions","classifications","getClassificationAppLink","onToggleClassification"]);if(!t.length)return f.createElement("div",{className:"py-5"},"No ".concat(n," in this subject."));var u=p.FunctionHelper.isFunction(r),s={memberType:n,classifications:i,getClassificationAppLink:a,getIsClassificationSelected:function(e){return Cr(n,e,t)},onToggleClassification:o,hasActions:u};return f.createElement(St.Table,{responsive:!0,bordered:!0},f.createElement(Or,Object.assign({},s)),f.createElement("tbody",null,t.map((function(e,t){return f.createElement(Tr,Object.assign({key:t,member:e,actions:u&&r(e.id),onToggleClassification:o},c))}))))}var _r=n(100),wr=n.n(_r);function xr(e){var t=e.navItems,n=e.currentAppLink;return f.createElement(St.Container,null,f.createElement(St.Navbar,{className:"justify-content-between align-items-center"},f.createElement(St.Nav,null,!!t&&t.map((function(e,t){return f.createElement(St.Nav.Item,{key:t},f.createElement(St.Nav.Link,{as:d.AppLink,appLink:e.appLink,active:Ce.isItemActive(e,n),className:Ce.isItemActive(e,n)?wr.a.active:""},e.label))})))))}function Fr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Lr=function(e){return{application:u.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function Pr(e){var t=e.presentationId,n=e.audienceId,r=Fr(f.useState(),2),i=r[0],a=r[1],o=Fr(f.useState(),2),c=o[0],u=o[1],s=Fr(f.useState(),2),d=s[0],v=s[1],m=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(mt.getAudienceFetchOptions(n,a),[n]),Object(p.useFetch)(mt.getLevelsFetchOptions(u),[]),Object(p.useFetch)(mt.getPresentationFetchOptions(t,v),[t]);var h={audience:i,levels:c,saveAudience:function(e,r){var i=r.setSubmitting;return m.updateAudience(n,Object.assign(Object.assign({},e),{presentationId:t}),(function(){return i(!1)}),(function(){return i(!1)}))},presentationId:t},b=kt.propsLoaded(h);return f.createElement(f.Fragment,null,f.createElement("div",{className:"pb-3"},f.createElement(Tt,{appLink:Lr(t),backToName:"audiences"})),!!d&&f.createElement("h6",null,"Presentation: ".concat(d.name)),b&&f.createElement(Kn,Object.assign({},h)))}function kr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Nr=function(e,t){return{application:u.SUBJECTS,action:i.Subjects.EDIT_AUDIENCE,args:[e,t]}},Dr=function(e){return{application:u.SUBJECTS,action:i.Subjects.NEW_AUDIENCE,args:[e]}},Rr={application:u.SUBJECTS,action:i.Subjects.AUDIENCES};function Ur(e){var t=e.presentationId,n=kr(f.useState(),2),r=n[0],i=n[1];return Object(p.useFetch)(mt.getAudiencesFetchOptions(t,i),[]),f.createElement(f.Fragment,null,f.createElement("div",{className:"pb-3"},f.createElement(Tt,{appLink:Rr,backToName:"presentations"})),f.createElement("div",{className:"d-flex justify-content-between mb-2"},f.createElement("h5",{className:"d-inline-block m-0"},"Select an audience to edit:"),f.createElement(d.AppLink,{appLink:Dr(t),className:"d-block"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Plus,size:d.SvgContainerSize.Small}),f.createElement("span",null,"New Audience"))),f.createElement(br,{objects:r,getAppLink:function(e){return Nr(t,e)},emptyMessage:"There are no audiences in this presentation yet. Click '+ New Audience' to create one."}))}function Br(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Vr=function(e){return{application:u.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e]}},Mr=function(e,t,n){n(!1),p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_AUDIENCE,args:[e,t.id]})};function Jr(e){var t=e.presentationId,n=Br(f.useState(),2),r=n[0],i=n[1],a=Br(f.useState(),2),o=a[0],c=a[1],u=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(mt.getLevelsFetchOptions(i),[]),Object(p.useFetch)(mt.getPresentationFetchOptions(t,c),[t]);return f.createElement(f.Fragment,null,f.createElement("div",{className:"pb-2"},f.createElement(Tt,{appLink:Vr(t),backToName:"audiences"})),!!o&&f.createElement("h6",null,"Presentation: ".concat(o.name)),!!r&&f.createElement(Kn,{levels:r,presentationId:t,saveAudience:function(e,n){var r=n.setSubmitting;return u.createAudience(Object.assign(Object.assign({},e),{presentationId:t}),(function(e){return Mr(t,e,r)}),(function(){return r(!1)}))}}))}function zr(e){return{application:u.SUBJECTS,action:i.Subjects.NEW_CLASSIFICATION,args:[e]}}function Hr(e){return[{name:"Add child",getAppLink:function(t){return Object.assign(Object.assign({},zr(e)),{args:[e],params:{parentId:t.id}})}},{name:"Delete classification",getAppLink:function(t){return{application:u.SUBJECTS,action:i.Subjects.DELETE_CLASSIFICATION,args:[e,t.id]}},className:"text-danger"}]}var Yr=n(101),$r=n.n(Yr);function qr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Wr(e){var t=e.presentationId,n=e.selectedClassificationId,r=qr(f.useState(),2),a=r[0],o=r[1],c=qr(f.useState(),2),s=c[0],l=c[1];return function(e,t,n){var r=mt.getClassificationTreeFetchOptions(e,t),i=mt.getPresentationFetchOptions(e,n);Object(p.useBulkFetch)([r,i],[e])}(t,o,l),f.createElement("div",{className:"".concat($r.a.navContainer," pr-2 border-right")},!!s&&f.createElement("h6",{className:"border-bottom pb-2"},"Classifications (".concat(s.name,")")),f.createElement(d.AppLink,{appLink:zr(t),className:"d-inline-block pb-2"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Plus,size:d.SvgContainerSize.Small}),f.createElement("span",null,"New Classification")),!!a&&f.createElement("div",{className:"border-top pt-1"},f.createElement(gn,{tree:a,getAppLink:function(e){return function(e,t){return{application:u.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[e,t.id]}}(t,e)},selectedIds:[n],actions:Hr(t)})))}function Kr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Gr(e){var t=e.classificationId,n=e.routeToOnDelete,r=e.closePopup,i=Kr(f.useState(),2),a=i[0],o=i[1],c=Kr(f.useState(!1),2),u=c[0],s=c[1];Object(p.useFetch)(mt.getClassificationFetchOptions(t,o),[]);var d=Object(p.useService)(l.SUBJECT),v=[{variant:"link",onClick:r,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0);d.deleteClassification(t,(function(){r(),n&&p.Core.AppLinkHelper.trigger(n)}),r)},buttonText:"Yes, delete this classification",isSpinnerButton:!0,showSpinner:u}];return f.createElement(Xt,{title:"Delete Classification",closePopup:r,showLoadingSpinner:!a},!!a&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to delete ",f.createElement("strong",null,a.name),"?")),f.createElement(on,{buttons:v})))}function Zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Qr(e){var t=e.presentationId,n=e.classificationId,r=Zr(f.useState(),2),i=r[0],a=r[1],o=Zr(f.useState(),2),c=o[0],u=o[1],s=Zr(f.useState(),2),d=s[0],v=s[1],m=Zr(f.useState(),2),h=m[0],b=m[1],y=Object(p.useService)(l.SUBJECT),g=mt.getClassificationFetchOptions(n,a),S=mt.getPresentationFetchOptions(t,u),E=mt.getClassificationTreeFetchOptions(t,v),j=mt.getSubjectTreeFetchOptions(b);Object(p.useFetch)(j,[]),Object(p.useFetch)(g,[n]),Object(p.useBulkFetch)([S,E],[t]);var O={presentation:c,classificationId:n},T={classification:i,presentationId:t,saveClassification:function(e,t){var r=t.setSubmitting;return y.updateClassification(n,e,(function(){return r(!1)}),(function(){return r(!1)}))},classificationTree:d,subjectTree:h},A=kt.propsLoaded(T);return f.createElement("div",null,f.createElement(ar,Object.assign({},O)),!!A&&f.createElement(rr,Object.assign({},T)))}function Xr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ei(e){var t=e.presentationId,n=e.classificationId,r=e.memberType,i=Xr(f.useState(),2),a=i[0],o=i[1],c=Xr(f.useState(),2),u=c[0],s=c[1];Object(p.useFetch)(mt.getPresentationFetchOptions(t,o),[]),Object(p.useFetch)(mt.getClassificationMembersFetchOptions(n,r,s),[n,r]);var l={items:u&&u.data,memberType:r,getItemAppLink:function(e){return Ae.getMemberAppLink(r,e.id)},getActions:function(e){return Ae.getMemberActions(n,le.Classification,r,e.id)}},d={presentation:a,classificationId:n},v=kt.propsLoaded(l);return f.createElement(f.Fragment,null,f.createElement(ar,Object.assign({},d,{memberType:r})),v&&f.createElement(Yn,Object.assign({},l)))}function ti(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ni(e){var t=e.presentationId,n=e.parentId,r=ti(f.useState(),2),a=r[0],o=r[1],c=ti(f.useState(),2),s=c[0],d=c[1],v=Object(p.useService)(l.SUBJECT),m=mt.getClassificationTreeFetchOptions(t,o),h=mt.getSubjectTreeFetchOptions(d);Object(p.useFetch)(h,[]),Object(p.useFetch)(m,[t]);var b={saveClassification:function(e,n){var r=n.setSubmitting;return v.createClassification(Object.assign(Object.assign({},e),{presentationId:t}),(function(e){return function(e,n){n(!1),e&&e.id&&p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[t,e.id]})}(e,r)}),(function(){return r(!1)}))},classification:n?{parentIds:[n]}:{},presentationId:t,classificationTree:a,subjectTree:s},y=Object.values(b).every((function(e){return!!e}));return f.createElement("div",null,f.createElement("h4",{className:"py-2"},"Create New Classification"),!!y&&f.createElement(rr,Object.assign({},b)))}function ri(e){return(ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ii(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ai(e,t){return!t||"object"!==ri(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function oi(e){return(oi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ci(e,t){return(ci=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ui=function(e){return"/api/master/v2/objects/".concat(e,"?query=cover,banner")},si=function(e){return"/api/master/v2/objects?".concat(e.map((function(e){return"id=".concat(e)})).join("&"))},li=function(e){return"/api/master/v2/objects/".concat(e,"/playlists")},fi=function(e){return"/api/master/v2/objects/".concat(e)},pi=function(e){return"/api/master/v1/playlists/".concat(e)},di=function(e){return"/api/master/v2/objects/".concat(e,"/videos?").concat(["query={orderBy:orderindex,limit:100}"].join("&"))},vi=function(e){return"/api/master/v1/objects/".concat(e,"/videos/reorder")},mi=function(e,t){return"/api/master/v1/playlists/".concat(e,"/dissociate/").concat(t)},hi=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ai(this,oi(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ci(e,t)}(t,e),n=t,(r=[{key:"getPlaylist",value:function(e,t,n){return this.get({resource:ui(e),eventPrefix:"".concat(a.PLAYLIST,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getPlaylistsById",value:function(e,t,n){return this.get({resource:si(e),eventPrefix:"".concat(a.PLAYLISTS,":").concat(e.join(",")),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"createPlaylist",value:function(e,t,n,r){return this.create({resource:li(t),data:Object.assign(Object.assign({},e),{permissions:Pt()}),callback:n,errorCallback:r,eventPrefix:a.PLAYLIST,expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created playlist."),errorHandler:this.alertService.error("Failed to create playlist.")})}},{key:"updatePlaylist",value:function(e,t,n,r){return this.update({resource:fi(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_PLAYLIST,":").concat(e),expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated playlist"),errorHandler:this.alertService.error("Failed to update playlist")})}},{key:"deletePlaylist",value:function(e,t,n){return this.delete({resource:pi(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_PLAYLIST,invalidationKeys:["".concat(a.PLAYLIST,":").concat(e)],successHandler:this.alertService.success("Successfully deleted playlist"),errorHandler:this.alertService.error("Failed to delete playlist.")})}},{key:"getPlaylistVideos",value:function(e,t,n){return this.get({resource:di(e),callback:t,errorCallback:n,eventPrefix:"".concat(a.PLAYLIST,":").concat(e,":videos"),expiryTime:d.CacheDurations.STANDARD})}},{key:"reorderVideos",value:function(e,t,n){return this.update({resource:vi(e),data:Object.assign({ownerId:e},t),eventPrefix:a.REORDER_PLAYLIST_VIDEOS,expiryTime:d.CacheDurations.STANDARD,invalidationKeys:["".concat(a.PLAYLIST,":").concat(e,":videos")],callback:n,errorHandler:this.alertService.error("Failed to update playlist order.")})}},{key:"removeVideoFromPlaylist",value:function(e,t,n,r){return this.delete({resource:mi(e,t),eventPrefix:"".concat(a.REMOVE_PLAYLIST_VIDEO,":").concat(e,":").concat(t),invalidationKeys:["".concat(a.PLAYLIST,":").concat(e,":videos")],callback:n,errorCallback:r})}},{key:"name",get:function(){return l.PLAYLIST}},{key:"channelName",get:function(){return s.PLAYLIST}}])&&ii(n.prototype,r),i&&ii(n,i),t}(p.BaseDataService),bi={dataServiceName:l.PLAYLIST,dataChannelName:s.PLAYLIST},yi={getPlaylistFetchOptions:function(e,t,n){return Object.assign(Object.assign({},bi),{eventPrefix:"".concat(a.PLAYLIST,":").concat(e),fetchData:function(t){return t.getPlaylist(e)},setData:t,onError:n,deleteEventPrefix:a.DELETE_PLAYLIST})},getPlaylistsByIdFetchOptions:function(e,t,n){return Object.assign(Object.assign({},bi),{eventPrefix:"".concat(a.PLAYLISTS,":").concat(e.join(",")),fetchData:function(t){return t.getPlaylistsById(e)},setData:t,onError:n})},getPlaylistVideosFetchOptions:function(e,t,n){return Object.assign(Object.assign({},bi),{eventPrefix:"".concat(a.PLAYLIST,":").concat(e,":videos"),fetchData:function(t){return t.getPlaylistVideos(e)},setData:t,onError:n})}};function gi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Si=function(e,t,n){switch(e){case fe.Playlists:return yi.getPlaylistFetchOptions(t,n);case fe.Series:return G.getSeriesFetchOptions(t,n);case fe.Videos:return ye.getVideoFetchOptions(t,n)}},Ei=function(e,t,n,r){return[{variant:"link",onClick:e,buttonText:"Cancel"},{variant:"danger",onClick:t,buttonText:"Yes, remove this ".concat(Ae.singularizeMemberType(n)),isSpinnerButton:!0,showSpinner:r}]};function ji(e){var t=e.classificationId,n=e.memberId,r=e.memberType,i=e.closePopup,a=gi(f.useState(),2),o=a[0],c=a[1],u=gi(f.useState(),2),s=u[0],d=u[1],v=gi(f.useState(!1),2),m=v[0],h=v[1],b=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(Si(r,n,d),[n]),Object(p.useFetch)(mt.getClassificationFetchOptions(t,c),[t]);var y=!!o&&!!s,g="Remove ".concat(Nt.capitalizeFirstLetter(Ae.singularizeMemberType(r)));return f.createElement(Xt,{title:g,closePopup:i,showLoadingSpinner:!y},y&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to remove ",f.createElement("strong",null,s.name)," from ",f.createElement("strong",null,o.name),"?"),f.createElement("p",null,"This will not remove it from the backbone subject.")),f.createElement(on,{buttons:Ei(i,(function(){h(!0),b.removeObjectsFromClassification(t,[n],r,null,null,i,i)}),r,m)})))}function Oi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ti(e){var t=e.id,n=Oi(f.useState(),2),r=n[0],i=n[1],a=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(mt.getLevelFetchOptions(t,i),[t]);var o={level:r,saveLevel:function(e,n){var r=n.setSubmitting;return a.updateLevel(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}},c=kt.propsLoaded(o);return f.createElement(f.Fragment,null,f.createElement("h4",{className:"py-2"},"Edit Level"),!!c&&f.createElement(cr,Object.assign({},o)))}function Ai(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Ci=function(e){return{application:u.SUBJECTS,action:i.Subjects.EDIT_LEVEL,args:[e]}},Ii={application:u.SUBJECTS,action:i.Subjects.NEW_LEVEL};function _i(){var e=Ai(f.useState(),2),t=e[0],n=e[1];return Object(p.useFetch)(mt.getLevelsFetchOptions(n),[]),f.createElement("div",null,f.createElement("div",{className:"d-flex justify-content-between mb-2"},f.createElement("h5",{className:"d-inline-block m-0"},"Select a level to edit:"),f.createElement(d.AppLink,{appLink:Ii,className:"d-block"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Plus,size:d.SvgContainerSize.Small}),f.createElement("span",null,"New Level"))),f.createElement(br,{objects:t,getAppLink:Ci}))}function wi(){var e=Object(p.useService)(l.SUBJECT);return f.createElement(f.Fragment,null,f.createElement("h4",{className:"py-2"},"Create New Level"),f.createElement(cr,{saveLevel:function(t,n){var r=n.setSubmitting;e.createLevel(t,(function(e){return function(e,t){t(!1),e&&e.id&&p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_LEVEL,args:[e.id]})}(e,r)}),(function(){return r(!1)}))}}))}function xi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Fi(e){var t=e.id,n=xi(f.useState(),2),r=n[0],i=n[1],a=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(mt.getPresentationFetchOptions(t,i),[t]);var o={presentation:r,savePresentation:function(e,n){var r=n.setSubmitting;return a.updatePresentation(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}},c=kt.propsLoaded(o);return f.createElement(f.Fragment,null,f.createElement("h4",{className:"py-2"},"Edit Presentation"),!!c&&f.createElement(sr,Object.assign({},o)))}function Li(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Pi=function(e){return{application:u.SUBJECTS,action:i.Subjects.EDIT_PRESENTATION,args:[e]}},ki={application:u.SUBJECTS,action:i.Subjects.NEW_PRESENTATION};function Ni(){var e=Li(f.useState(),2),t=e[0],n=e[1];return Object(p.useFetch)(mt.getPresentationsFetchOptions(n),[]),f.createElement("div",null,f.createElement("div",{className:"d-flex justify-content-between mb-2"},f.createElement("h5",{className:"d-inline-block m-0"},"Select a presentation to edit:"),f.createElement(d.AppLink,{appLink:ki,className:"d-block"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Plus,size:d.SvgContainerSize.Small}),f.createElement("span",null,"New Presentation"))),f.createElement(br,{objects:t,getAppLink:Pi}))}function Di(){var e=Object(p.useService)(l.SUBJECT);return f.createElement(f.Fragment,null,f.createElement("h4",{className:"py-2"},"Create New Presentation"),f.createElement(sr,{savePresentation:function(t,n){var r=n.setSubmitting;e.createPresentation(t,(function(e){return function(e,t){t(!1),e&&e.id&&p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_PRESENTATION,args:[e.id]})}(e,r)}),(function(){return r(!1)}))}}))}function Ri(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ui(e){var t=e.objectType,n=e.getAppLink,r=Ri(f.useState(),2),i=r[0],a=r[1];return Object(p.useFetch)(mt.getPresentationsFetchOptions(a),[]),f.createElement("div",null,f.createElement("h5",null,"Select a presentation to view its ".concat(t,":")),f.createElement(br,{objects:i,getAppLink:n}))}function Bi(e,t){return d.StateHelper.getSetStateByKey(e,t)}function Vi(e,t){var n=e.memberType,r=e.objectIds,i=mt.getSubjectTreeFetchOptions(Bi(t,"subjectTree"));Object(p.useFetch)(i,[]);var a=function(e,t,n){switch(e){case fe.Playlists:return yi.getPlaylistsByIdFetchOptions(t,n);case fe.Series:return G.getSeriesByIdFetchOptions(t,n);case fe.Videos:return ye.getVideosByIdFetchOptions(t,n)}}(n,r,Bi(t,"objects"));Object(p.useFetch)(a,[n,r])}function Mi(e,t,n,r){var a=n.selectedSubject,o=n.objects,c=function(){return Bi(r,"showConfirmationPopup")(!1)};e.addObjectsToSubject(a.id,o.map((function(e){return e.id})),t.memberType,!0,(function(){c(),p.Core.AppLinkHelper.trigger(function(e,t){var n={application:u.SUBJECTS,args:[e]};switch(t){case fe.Playlists:return Object.assign(Object.assign({},n),{action:i.Subjects.EDIT_SUBJECT_PLAYLISTS});case fe.Series:return Object.assign(Object.assign({},n),{action:i.Subjects.EDIT_SUBJECT_SERIES});case fe.Videos:return Object.assign(Object.assign({},n),{action:i.Subjects.EDIT_SUBJECT_VIDEOS})}}(a.id,t.memberType))}),c)}function Ji(e,t,n){if(t&&n){var r=1===t.length?"this ".concat(Ae.singularizeMemberType(e)):"these ".concat(e);return"Add ".concat(r," to ").concat(n.name)}}function zi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Hi(e){var t=e.memberType,n=zi(f.useState({}),2),r=n[0],i=n[1],a=r.objects,o=r.subjectTree,c=r.selectedSubject,u=r.showConfirmationPopup,s=Object(p.useService)(l.SUBJECT);Vi(e,i);var d=function(e){return Bi(i,"showConfirmationPopup")(e)},v={memberType:t,objects:a,subjectTree:o,subjectId:c&&c.id,onSelectSubject:Bi(i,"selectedSubject"),onClickAddToSubject:function(){c&&d(!0)}},m={title:Ji(t,a,c),onClickConfirm:function(){return Mi(s,e,r,i)},closePopup:function(){return d(!1)}},h=!!a&&!!o,b=Nt.capitalizeFirstLetter(Ae.singularizeMemberType(t));return f.createElement(f.Fragment,null,h&&f.createElement(zn,Object.assign({},v)),h&&u&&f.createElement(_t,Object.assign({},m),f.createElement("p",null,"The following ".concat(t," will be added to "),f.createElement("strong",null,c.name)," and it's mapped classifications:"),f.createElement("ul",null,a.map((function(e){return f.createElement("li",{key:e.id},e.name)}))),f.createElement("p",null,"".concat(b," to classification mappings can be managed from the "),f.createElement("strong",null,"Edit Subject ".concat(Nt.capitalizeFirstLetter(t)," ")),"page.")))}function Yi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function $i(e){var t=e.subjectId,n=e.routeToOnDelete,r=e.closePopup,i=Yi(f.useState(),2),a=i[0],o=i[1],c=Yi(f.useState(!1),2),u=c[0],s=c[1];Object(p.useFetch)(mt.getSubjectFetchOptions(t,o),[]);var d=Object(p.useService)(l.SUBJECT),v=[{variant:"link",onClick:r,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0);d.deleteSubject(t,(function(){r(),n&&p.Core.AppLinkHelper.trigger(n)}),r)},buttonText:"Yes, delete this subject",isSpinnerButton:!0,showSpinner:u}];return f.createElement(Xt,{title:"Delete Subject",closePopup:r,showLoadingSpinner:!a},!!a&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to delete ",f.createElement("strong",null,a.name),"?"),f.createElement("p",null,"Subjects that have mapped classifications cannot be deleted.")),f.createElement(on,{buttons:v})))}function qi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Wi(e){var t=e.subjectId,n=qi(f.useState(),2),r=n[0],i=n[1],a=qi(f.useState(),2),o=a[0],c=a[1],u=Object(p.useService)(l.SUBJECT),s=mt.getSubjectFetchOptions(t,i),d=mt.getSubjectTreeFetchOptions(c);Object(p.useFetch)(d,[]),Object(p.useFetch)(s,[t]);var v={subject:r,saveSubject:function(e,n){var r=n.setSubmitting;return u.updateSubject(t,e,(function(){return r(!1)}),(function(){return r(!1)}))},subjectTree:o},m=kt.propsLoaded(v);return f.createElement(f.Fragment,null,f.createElement(hr,{subjectId:t}),!!m&&f.createElement(vr,Object.assign({},v)))}function Ki(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Gi=f.createContext(void 0);function Zi(e){var t=e.children,n=Ki(f.useState(),2),r=n[0],i=n[1];return f.createElement(Gi.Provider,{value:[r,i]},t)}var Qi=function(e){var t=e.children;return f.createElement(Zi,null,f.createElement(gt,null,t))};function Xi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ea(e,t){return d.StateHelper.getSetStateByKey(e,t)}function ta(e,t,n){var r=e.subjectId,i=e.memberType,a=t.memberIds,o=Xi(f.useContext(Gi),1)[0];Object(p.useFetch)(mt.getPresentationsFetchOptions(ea(n,"presentations")),[]),Object(p.useFetch)(mt.getSubjectMemberIdsFetchOptions(r,i,ea(n,"memberIds")),[r,i]),Object(p.useFetch)(function(e,t,n){if(!t||!t.length)return;switch(e){case fe.Playlists:return yi.getPlaylistsByIdFetchOptions(t,n);case fe.Series:return G.getSeriesByIdFetchOptions(t,n);case fe.Videos:return ye.getVideosByIdFetchOptions(t,n)}}(i,a,ea(n,"members")),[i,a],!!a&&!!a.length),Object(p.useFetch)(!!o&&mt.getSubjectClassificationFetchOptions(r,ea(n,"classifications"),o.id,i),[r,i,o],!!o)}var na=function(e,t){return function(n){var r,a=u.SUBJECTS,o=[t,n];switch(e){case fe.Playlists:r=i.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;break;case fe.Series:r=i.Subjects.EDIT_CLASSIFICATION_SERIES;break;case fe.Videos:r=i.Subjects.EDIT_CLASSIFICATION_VIDEOS}return{application:a,action:r,args:o}}};function ra(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ia(e){var t=e.subjectId,n=e.memberType,r=ra(f.useState({}),2),i=r[0],a=r[1],o=i.presentations,c=i.classifications,u=i.memberIds,s=i.membersWithClassifications,d=ra(f.useContext(Gi),2),v=d[0],m=d[1],h=Object(p.useService)(l.SUBJECT);ta(e,i,a),function(e,t,n){var r=t.memberIds,i=t.members,a=t.classifications;f.useEffect((function(){ea(n,"membersWithClassifications")(function(e,t,n){if(!t||!n)return;return t.map((function(t){return{id:t.id,name:t.name,classifications:n.map((function(n){return{id:n.id,selected:(r=t,i=n,!!i[e]&&!!i[e].data.filter((function(e){return e.id===r.id})).length)};var r,i}))}}))}(e.memberType,i,a))}),[i,a]),f.useEffect((function(){i&&i.length&&r&&!r.length&&ea(n,"members")([])}),[r])}(e,i,a);var b={presentations:o,currentPresentation:v,setCurrentPresentation:m},y={members:s||[],memberType:n,getMemberAppLink:function(e){return Ae.getMemberAppLink(n,e)},getActions:function(e){return Ae.getMemberActions(t,le.Subject,n,e)},classifications:c,getClassificationAppLink:v&&na(n,v.id),onToggleClassification:function(e,r,i){return function(e,t,n,r,i,a,o){(o?e.addObjectsToClassification.bind(e):e.removeObjectsFromClassification.bind(e))(a,n,t,r,i)}(h,n,i?[i]:u,t,v&&v.id,e,r)}},g=!!v&&!!c;return f.createElement(f.Fragment,null,f.createElement(hr,{subjectId:t,memberType:n}),f.createElement(St.Alert,{variant:"info",className:"m-0"},"Select which ".concat(n," are shown for each classification in this subject.")+" Change the selected presentation to view different classifications."),f.createElement("div",{className:"w-50 py-2"},!!o&&f.createElement(gr,Object.assign({},b))),g&&f.createElement(Ir,Object.assign({},y)))}function aa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function oa(e){var t=e.parentId,n=aa(f.useState(),2),r=n[0],a=n[1],o=Object(p.useService)(l.SUBJECT),c=mt.getSubjectTreeFetchOptions(a);Object(p.useFetch)(c,[]);var s={application:u.SUBJECTS,action:i.Subjects.PRESENTATIONS},d={saveSubject:function(e,t){var n=t.setSubmitting;return o.createSubject(Object.assign({},e),(function(e){return function(e,t){t(!1),e&&e.id&&p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[e.id]})}(e,n)}),(function(){return n(!1)}))},subject:t?{parentId:t}:{},subjectTree:r},v=Object.values(d).every((function(e){return!!e}));return f.createElement(f.Fragment,null,f.createElement("div",{className:"pb-2 border-bottom"},f.createElement(Tt,{backToName:"Presentations",appLink:s})),f.createElement("h4",{className:"py-2"},"Create New Subject"),!!v&&f.createElement(vr,Object.assign({},d)))}function ca(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ua=function(e,t,n){switch(e){case fe.Playlists:return yi.getPlaylistFetchOptions(t,n);case fe.Series:return G.getSeriesFetchOptions(t,n);case fe.Videos:return ye.getVideoFetchOptions(t,n)}},sa=function(e,t,n,r){return[{variant:"link",onClick:e,buttonText:"Cancel"},{variant:"danger",onClick:t,buttonText:"Yes, remove this ".concat(Ae.singularizeMemberType(n)),isSpinnerButton:!0,showSpinner:r}]};function la(e){var t=e.subjectId,n=e.memberId,r=e.memberType,i=e.closePopup,a=ca(f.useState(),2),o=a[0],c=a[1],u=ca(f.useState(),2),s=u[0],d=u[1],v=ca(f.useState(!1),2),m=v[0],h=v[1],b=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(ua(r,n,d),[n]),Object(p.useFetch)(mt.getSubjectFetchOptions(t,c),[t]);var y=!!o&&!!s,g="Remove ".concat(Nt.capitalizeFirstLetter(Ae.singularizeMemberType(r)));return f.createElement(Xt,{title:g,closePopup:i,showLoadingSpinner:!y},y&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to remove ",f.createElement("strong",null,s.name)," from ",f.createElement("strong",null,o.name),"?"),f.createElement("p",null,"Please ensure that it is not in any classifications before removing.")),f.createElement(on,{buttons:sa(i,(function(){h(!0),b.removeObjectsFromSubject(t,[n],r,i,i)}),r,m)})))}var fa=n(102),pa=n.n(fa);function da(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function va(e){var t=e.selectedSubjectId,n=da(f.useState(),2),r=n[0],a=n[1];Object(p.useFetch)(mt.getSubjectTreeFetchOptions(a),[]);var o=f.useCallback((function(e){return{application:u.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[e.id]}}),[]),c={application:u.SUBJECTS,action:i.Subjects.NEW_SUBJECT},s=[{name:"Add child",getAppLink:function(e){return Object.assign(Object.assign({},c),{params:{parentId:e.id}})}},{name:"Delete subject",getAppLink:function(e){return{application:u.SUBJECTS,action:i.Subjects.DELETE_SUBJECT,args:[e.id]}},className:"text-danger"}];return f.createElement("div",{className:"".concat(pa.a.navContainer," pr-2 border-right")},f.createElement("h5",{className:"border-bottom pb-2"},"Subjects"),f.createElement(d.AppLink,{appLink:c,className:"d-inline-block pb-2"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Plus,size:d.SvgContainerSize.Small}),f.createElement("span",null,"New Subject")),!!r&&f.createElement("div",{className:"border-top pt-1"},f.createElement(gn,{tree:r,getAppLink:o,selectedIds:[t],actions:s})))}function ma(e){var t=e.currentAppLink;return f.createElement(xr,{navItems:Ce.getTopNavItems(),currentAppLink:t})}function ha(e){return(ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ba(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ya(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ga(e,t,n){return t&&ya(e.prototype,t),n&&ya(e,n),e}function Sa(e,t){return!t||"object"!==ha(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ea(e){return(Ea=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ja(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oa(e,t)}function Oa(e,t){return(Oa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ta=function(e){function t(){return ba(this,t),Sa(this,Ea(t).apply(this,arguments))}return ja(t,e),ga(t,[{key:"channelName",get:function(){return u.SUBJECTS}},{key:"appRoutes",get:function(){return{"subjects(/)":"subjects","subjects/add-objects(/)":"addSubjectMembers","subjects/new(/)":"newSubject","subjects/:id/edit(/)":"editSubject","subjects/:id/edit/playlists(/)":"editSubjectPlaylists","subjects/:id/edit/series(/)":"editSubjectSeries","subjects/:id/edit/videos(/)":"editSubjectVideos","subjects/classifications(/)":"classifications","subjects/presentations/:id/classifications(/)":"presentationClassifications","subjects/presentations/:id/classifications/new(/)":"newClassification","subjects/presentations/:id/classifications/:id/edit(/)":"editClassification","subjects/presentations/:id/classifications/:id/edit/playlists(/)":"editClassificationPlaylists","subjects/presentations/:id/classifications/:id/edit/series(/)":"editClassificationSeries","subjects/presentations/:id/classifications/:id/edit/videos(/)":"editClassificationVideos","subjects/levels(/)":"levels","subjects/levels/new(/)":"newLevel","subjects/levels/:id(/)":"editLevel","subjects/audiences(/)":"audiences","subjects/presentations/:id/audiences(/)":"presentationAudiences","subjects/presentations/:id/audiences/new(/)":"newAudience","subjects/presentations/:id/audiences/:id/edit(/)":"editAudience","subjects/presentations(/)":"presentations","subjects/presentations/new":"newPresentation","subjects/presentations/:id(/)":"editPresentation","subjects/videos/:id(/)":"video","subjects/series/:id(/)":"series","subjects/playlists/:id(/)":"playlist"}}},{key:"appLinks",get:function(){return["deleteClassification","removeClassificationMember","deleteSubject","removeSubjectMember","deleteAudience","uploadImage"]}}]),t}(p.Core.AppRouter),Aa=function(e){function t(){return ba(this,t),Sa(this,Ea(t).apply(this,arguments))}return ja(t,e),ga(t,[{key:"initialize",value:function(){this.subjectDataService=p.InstanceManager.getInstance(l.SUBJECT,this)}},{key:"subjects",value:function(){this.subjectDataService.getSubjectTree((function(e){var t=!!e.children&&e.children[0];t?p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[t.id]},{replace:!0}):p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.NEW_SUBJECT},{replace:!0})}))}},{key:"newSubject",value:function(e){var t={parentId:e.parentId};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(oa,Object.assign({key:e.parentId},t))),this.renderSubjectsLeftNav()}},{key:"editSubject",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Wi,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"editSubjectPlaylists",value:function(e){var t={subjectId:e,memberType:fe.Playlists};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ia,Object.assign({key:"".concat(e,":playlists")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectSeries",value:function(e){var t={subjectId:e,memberType:fe.Series};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ia,Object.assign({key:"".concat(e,":series")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectVideos",value:function(e){var t={subjectId:e,memberType:fe.Videos};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ia,Object.assign({key:"".concat(e,":videos")},t))),this.renderSubjectsLeftNav(e)}},{key:"addSubjectMembers",value:function(e){var t=e.memberType,n=e.objectIds;if(t&&n){var r={memberType:t,objectIds:Array.isArray(n)?n:[n]};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Hi,Object.assign({},r))),this.hideLeftNav()}}},{key:"removeSubjectMember",value:function(e,t,n){var r=Object.assign({subjectId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(la,Object.assign({},r)))}},{key:"deleteSubject",value:function(e){var t=e===this.currentLeftNavId?{application:u.SUBJECTS,action:i.Subjects.SUBJECTS}:null,n=Object.assign({subjectId:e,routeToOnDelete:t||null},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement($i,Object.assign({},n)))}},{key:"classifications",value:function(){var e={objectType:"classifications",getAppLink:function(e){return{application:u.SUBJECTS,action:i.Subjects.PRESENTATION_CLASSIFICATIONS,args:[e]}}};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Ui,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationClassifications",value:function(e){this.subjectDataService.getClassificationTree(e,(function(t){var n=!!t.children&&t.children[0];n?p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]},{replace:!0}):p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.NEW_CLASSIFICATION,args:[e]},{replace:!0})}))}},{key:"newClassification",value:function(e,t){var n={presentationId:e,parentId:t.parentId};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ni,Object.assign({key:t.parentId},n))),this.renderClassificationLeftNav(e)}},{key:"editClassification",value:function(e,t){var n={presentationId:e,classificationId:t};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Qr,Object.assign({key:t},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationPlaylists",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:fe.Playlists};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ei,Object.assign({key:"".concat(t,":playlists")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationSeries",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:fe.Series};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ei,Object.assign({key:"".concat(t,":series")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationVideos",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:fe.Videos};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ei,Object.assign({key:"".concat(t,":videos")},n))),this.renderClassificationLeftNav(e,t)}},{key:"removeClassificationMember",value:function(e,t,n){var r=Object.assign({classificationId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(ji,Object.assign({},r)))}},{key:"deleteClassification",value:function(e,t){var n=t===this.currentLeftNavId?{application:u.SUBJECTS,action:i.Subjects.EDIT_PRESENTATION,args:[e]}:null,r=Object.assign({classificationId:t,routeToOnDelete:n||null},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(Gr,Object.assign({},r)))}},{key:"levels",value:function(){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(_i,null)),this.hideLeftNav()}},{key:"newLevel",value:function(){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(wi,null)),this.hideLeftNav()}},{key:"editLevel",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Ti,{key:e,id:e})),this.hideLeftNav()}},{key:"audiences",value:function(){var e={objectType:"audiences",getAppLink:function(e){return{application:u.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e]}}};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Ui,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationAudiences",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Ur,{presentationId:e})),this.hideLeftNav()}},{key:"newAudience",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Jr,{presentationId:e})),this.hideLeftNav()}},{key:"editAudience",value:function(e,t){var n={presentationId:e,audienceId:t};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Pr,Object.assign({key:t},n))),this.hideLeftNav()}},{key:"deleteAudience",value:function(e,t){var n={application:u.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e]},r=Object.assign({id:t,routeToOnDelete:n},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(Jn,Object.assign({},r)))}},{key:"presentations",value:function(){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Ni,null)),this.hideLeftNav()}},{key:"newPresentation",value:function(){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Di,null))}},{key:"editPresentation",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Fi,{key:e,id:e})),this.hideLeftNav()}},{key:"video",value:function(e){p.Core.LocationUtils.Redirect("/tools/programlookup/".concat(e))}},{key:"series",value:function(e){p.Core.LocationUtils.Redirect("/hostedlibraries/series/".concat(e))}},{key:"playlist",value:function(e){p.Core.LocationUtils.Redirect("/playlists/".concat(e))}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(Bn,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return ht.Radio.channel(p.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(d.LayoutRegions.ALERT,f.createElement(d.AlertList,{alerts:n,removeAlert:r}))}},{key:"renderClassificationLeftNav",value:function(e,t){this.setCurrentLeftNavItem(t);var n={presentationId:e,selectedClassificationId:t};this.layout.showChildView(d.LayoutRegions.LEFT_NAV,f.createElement(Wr,Object.assign({},n)))}},{key:"renderSubjectsLeftNav",value:function(e){this.setCurrentLeftNavItem(e),this.layout.showChildView(d.LayoutRegions.LEFT_NAV,f.createElement(va,{selectedSubjectId:e}))}},{key:"setCurrentLeftNavItem",value:function(e){this.currentLeftNavId=e||null}},{key:"hideLeftNav",value:function(){this.setCurrentLeftNavItem(),this.layout.hideLeftNav()}},{key:"getTopNav",value:function(e){return f.createElement(ma,{currentAppLink:e})}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Subjects Application"}},{key:"channelName",get:function(){return u.SUBJECTS}},{key:"layoutOptions",get:function(){return{name:c.CURATOR_LAYOUT,options:{provider:Qi,getTopNavView:this.getTopNav}}}}],[{key:"router",get:function(){return Ta}}]),t}(p.Core.Application),Ca=function(e){var t=e.children;return f.createElement(gt,null,t)};function Ia(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function _a(e){var t=e.playlistId,n=e.closePopup,r=Ia(f.useState(),2),a=r[0],o=r[1],c=Ia(f.useState(!1),2),s=c[0],d=c[1],v=Object(p.useService)(l.PLAYLIST);Object(p.useFetch)(yi.getPlaylistFetchOptions(t,o),[t]);var m=f.useCallback((function(){n(),p.Core.AppLinkHelper.trigger({application:u.PLAYLISTS,action:i.Playlists.PLAYLISTS})}),[]),h=f.useCallback((function(){d(!0),v.deletePlaylist(t,m,n)}),[t]),b=[{variant:"link",onClick:n,buttonText:"Cancel"},{variant:"danger",onClick:h,buttonText:"Yes, delete playlist",isSpinnerButton:!0,showSpinner:s}],y=!!a;return f.createElement(Xt,{title:"Delete Playlist",closePopup:n,showLoadingSpinner:!y},y&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to delete ",f.createElement("strong",null,a.name),"?"),f.createElement("p",null,"Please ensure it is not being used in any widgets.")),f.createElement(on,{buttons:b})))}var wa=ge.object().shape({name:ge.string().max(255,"Name is too long").required("Name is required"),description:ge.string().max(65535,"Description is too long")}),xa={getEditPlaylistTabs:function(e){var t=u.PLAYLISTS,n=i.Playlists,r=[{label:"Edit Playlist Details",appLink:{application:t,action:n.EDIT_PLAYLIST,args:[e]}},{label:"Videos",appLink:{application:t,action:n.EDIT_PLAYLIST_VIDEOS,args:[e]}}],a=window.ClickView;return!!a&&a.User.isDev&&r.push({label:"Subjects",appLink:{application:t,action:n.EDIT_PLAYLIST_SUBJECTS,args:[e]},activeActions:[n.EDIT_PLAYLIST_SUBJECTS,n.REMOVE_FROM_SUBJECT]}),r}},Fa={onSort:function(e,t,n,r){if(p.FunctionHelper.isFunction(r)){if(t!==n){var i=p.ArrayHelper.moveItem(e,t,n),a=n<e.length-1?i[n+1].id:null;r(i,{sourceMemberId:i[n].id,destinationMemberId:a})}}else p.Core.ErrorHelper.throw(new p.DevError("A callback function must be passed to onSort"))}};function La(e){var t=e.values,n=t.name,r=t.description,a=t.cover,o=void 0===a?{}:a,c=t.banner,s=void 0===c?{}:c,l=e.id,p=e.actions,v=e.isValid,m=e.isSubmitting,h=e.setFieldValue,b=!l;return f.createElement(wt.Form,null,f.createElement(d.FormField,{label:"Name",type:"text",name:"name",id:"name",value:n,placeholder:"Enter a name for this playlist",autoFocus:!0}),f.createElement(d.FormField,{label:"Description",type:"textarea",name:"description",id:"description",value:r,placeholder:"Describe this playlist here"}),f.createElement(zt,{imageType:d.ImageType.Covers,currentImage:o,setNewImage:function(e){return h("cover",e)},application:u.PLAYLISTS,uploadAction:i.Playlists.UPLOAD_IMAGE}),f.createElement(zt,{imageType:d.ImageType.Banners,currentImage:s,setNewImage:function(e){return h("banner",e)},application:u.PLAYLISTS,uploadAction:i.Playlists.UPLOAD_IMAGE}),f.createElement("div",{className:"d-flex justify-content-between align-items-center"},f.createElement(d.SpinnerButton,{showSpinner:m,type:"submit",disabled:!v},b?"Create":"Save"),!!p&&f.createElement(Ot,{actions:p})))}var Pa=function(e){var t=[],n=window.ClickView;return!!n&&n.User.isDev&&t.push({name:"Add to subject",appLink:{application:u.PLAYLISTS,action:i.Playlists.ADD_SUBJECT_MEMBERS,args:[e]}}),t.push({name:"Delete playlist",appLink:{application:u.PLAYLISTS,action:i.Playlists.DELETE_PLAYLIST,args:[e]},className:"text-danger"}),t};function ka(e){var t=e.playlist,n=(t=void 0===t?{}:t).id,r=t.name,i=void 0===r?"":r,a=t.description,o=t.cover,c=void 0===o?{}:o,u=t.banner,s=void 0===u?{}:u,l=e.savePlaylist;return f.createElement(wt.Formik,{initialValues:{name:i,description:a||"",cover:c,banner:s},validationSchema:wa,onSubmit:l},(function(e){return f.createElement(La,Object.assign({id:n,actions:!!n&&Pa(n)},e))}))}var Na=function(e){return function(t){return t.appLink.action===e}};function Da(e){var t=e.playlistId,n=e.activeAction;return f.createElement("div",{className:"py-2"},f.createElement(pn,{tabs:xa.getEditPlaylistTabs(t),isItemActive:Na(n)}))}function Ra(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ua(e){var t=e.playlistId,n=Ra(f.useState(),2),r=n[0],a=n[1],o=Object(p.useService)(l.PLAYLIST);Object(p.useFetch)(yi.getPlaylistFetchOptions(t,a),[t]);return f.createElement(f.Fragment,null,f.createElement(Da,{playlistId:t,activeAction:i.Playlists.EDIT_PLAYLIST}),!!r&&f.createElement(ka,{playlist:r,savePlaylist:function(e,n){var r=n.setSubmitting;return o.updatePlaylist(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}}))}function Ba(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Va=function(e){return[{name:"Add to subject",appLink:{application:u.PLAYLISTS,action:i.Playlists.ADD_SUBJECT_MEMBERS,args:[e]}}]},Ma=function(e){return function(t){return[{name:"Remove playlist from subject",appLink:{application:u.PLAYLISTS,action:i.Playlists.REMOVE_FROM_SUBJECT,args:[e.toString(),t.id.toString()]},className:"text-danger"}]}},Ja=function(e){return{application:u.PLAYLISTS,action:i.Playlists.SUBJECT,args:[e.id]}};function za(e){var t=e.playlistId,n=Ba(f.useState(),2),r=n[0],a=n[1],o=Ba(f.useState(),2),c=o[0];return function(e,t,n){Object(p.useBulkFetch)([yi.getPlaylistFetchOptions(e,t),mt.getObjectSubjectsFetchOptions(e,fe.Playlists,n)],[e])}(t,a,o[1]),f.createElement(f.Fragment,null,f.createElement(Da,{playlistId:t,activeAction:i.Playlists.EDIT_PLAYLIST_SUBJECTS}),f.createElement(Zt,{object:r,actions:Va(t)}),!!c&&!!c.length&&f.createElement("p",null,f.createElement("em",null,"To view the classifications that this playlist is mapped to, please click on the subjects below.")),!!c&&f.createElement(fn,{subjects:c,getSubjectAppLink:Ja,getActions:Ma(t),emptyMessage:"This playlist isn't mapped to any subjects."}))}function Ha(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Ya=function(e){return function(t){return[{name:"Remove video",appLink:{application:u.PLAYLISTS,action:i.Playlists.REMOVE_VIDEO,args:[e.toString(),t.id.toString()]},className:"text-danger"}]}},$a=function(e){return{application:u.PLAYLISTS,action:i.Playlists.VIDEO,args:[e.id]}};function qa(e){var t=e.playlistId,n=Ha(f.useState(),2),r=n[0],a=n[1],o=Ha(f.useState(),2),c=o[0],u=o[1],s=Object(p.useService)(l.PLAYLIST);!function(e,t,n){Object(p.useBulkFetch)([yi.getPlaylistFetchOptions(e,t),yi.getPlaylistVideosFetchOptions(e,n)],[e])}(t,a,u);return f.createElement(f.Fragment,null,f.createElement(Da,{playlistId:t,activeAction:i.Playlists.EDIT_PLAYLIST_VIDEOS}),f.createElement(Zt,{object:r}),!!c&&f.createElement(Rn,{onSortEnd:function(e,n){if(c.data&&c.data[e]){Fa.onSort(c.data,e,n,(function(e,n){s.reorderVideos(t,n),u((function(t){return{data:e,pagination:t.pagination}}))}))}},videos:c,getVideoAppLink:$a,getVideoActions:Ya(t),emptyMessage:"There are no videos in this playlist."}))}function Wa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ka(){var e=Wa(f.useState(),2),t=e[0],n=e[1],r=Object(p.useService)(l.PLAYLIST);Object(p.useFetch)(ie.getCurrentUserFetchOptions(n),[]);var a=f.useCallback((function(e,t){t(!1),e&&e.id&&p.Core.AppLinkHelper.trigger({application:u.PLAYLISTS,action:i.Playlists.EDIT_PLAYLIST,args:[e.id]})}),[]),o=f.useCallback((function(e,n){var i=n.setSubmitting;r.createPlaylist(e,t.id,(function(e){return a(e,i)}),(function(){return i(!1)}))}),[t,a]);return f.createElement(f.Fragment,null,!!t&&f.createElement(ka,{savePlaylist:o}))}function Ga(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Za(e){var t=e.videoId,n=e.playlistId,r=e.closePopup,i=Ga(f.useState(),2),a=i[0],o=i[1],c=Ga(f.useState(),2),u=c[0],s=c[1],d=Ga(f.useState(!1),2),v=d[0],m=d[1],h=Object(p.useService)(l.PLAYLIST);Object(p.useFetch)(ye.getVideoFetchOptions(t,o),[t]),Object(p.useFetch)(yi.getPlaylistFetchOptions(n,s),[n]);var b=f.useCallback((function(){m(!0),h.removeVideoFromPlaylist(n,t,r,r)}),[t,n]),y=[{variant:"link",onClick:r,buttonText:"Cancel"},{variant:"danger",onClick:b,buttonText:"Yes, remove video",isSpinnerButton:!0,showSpinner:v}],g=u&&a;return f.createElement(Xt,{title:"Remove Video",closePopup:r,showLoadingSpinner:!g},!!g&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to remove ",f.createElement("strong",null,a.name)," from ",f.createElement("strong",null,u.name),"?")),f.createElement(on,{buttons:y})))}function Qa(e){return(Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function to(e,t,n){return t&&eo(e.prototype,t),n&&eo(e,n),e}function no(e,t){return!t||"object"!==Qa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ro(e){return(ro=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function io(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ao(e,t)}function ao(e,t){return(ao=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var oo=function(e){function t(){return Xa(this,t),no(this,ro(t).apply(this,arguments))}return io(t,e),to(t,[{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"appRoutes",get:function(){return{"playlists(/)":"index","playlists/new(/)":"newPlaylist","playlists/:id(/)":"editPlaylist","playlists/:id/videos(/)":"editPlaylistVideos","playlists/:id/subjects(/)":"editPlaylistSubjects","playlists/videos/:id(/)":"video","playlists/subjects/:id(/)":"subject"}}},{key:"appLinks",get:function(){return["deletePlaylist","removeVideo","uploadImage","addSubjectMembers","removeFromSubject"]}}]),t}(p.Core.AppRouter),co=function(e){function t(){return Xa(this,t),no(this,ro(t).apply(this,arguments))}return io(t,e),to(t,[{key:"index",value:function(){this.navigate("/dashboards/playlists")}},{key:"newPlaylist",value:function(){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Ka,null))}},{key:"editPlaylist",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Ua,{key:e,playlistId:e}))}},{key:"editPlaylistVideos",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(qa,{key:e,playlistId:e}))}},{key:"editPlaylistSubjects",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(za,{key:e,playlistId:e}))}},{key:"deletePlaylist",value:function(e){var t=Object.assign({playlistId:e},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(_a,Object.assign({},t)))}},{key:"removeVideo",value:function(e,t){var n=Object.assign({playlistId:e,videoId:t},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(Za,Object.assign({},n)))}},{key:"video",value:function(e){p.Core.LocationUtils.Redirect("/tools/programlookup/".concat(e))}},{key:"subject",value:function(e){var t={application:u.SUBJECTS,action:i.Subjects.EDIT_SUBJECT_PLAYLISTS,args:[e]};p.Core.LocationUtils.Redirect(p.Core.AppLinkHelper.getHref(t))}},{key:"addSubjectMembers",value:function(e){var t={application:u.SUBJECTS,action:i.Subjects.ADD_SUBJECT_MEMBERS,params:{memberType:fe.Playlists,objectIds:Array.isArray(e)?e:[e]}};p.Core.LocationUtils.Redirect(p.Core.AppLinkHelper.getHref(t))}},{key:"removeFromSubject",value:function(e,t){var n=Object.assign({subjectId:t,memberId:e,memberType:fe.Playlists},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(la,Object.assign({},n)))}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(Bn,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return ht.Radio.channel(p.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(d.LayoutRegions.ALERT,f.createElement(d.AlertList,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"navigate",value:function(e){p.Core.LocationUtils.PageLoad(e)}},{key:"name",get:function(){return"Playlists Application"}},{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"layoutOptions",get:function(){return{name:c.CURATOR_LAYOUT,options:{provider:Ca}}}}],[{key:"router",get:function(){return oo}}]),t}(p.Core.Application);n.d(t,"Actions",(function(){return i})),n.d(t,"DataPrefixes",(function(){return a})),n.d(t,"FileExtensions",(function(){return o})),n.d(t,"Layouts",(function(){return c})),n.d(t,"AppChannels",(function(){return u})),n.d(t,"DataChannels",(function(){return s})),n.d(t,"DataServices",(function(){return l})),n.d(t,"CuratorLayoutView",(function(){return T})),n.d(t,"LayoutComponent",(function(){return k})),n.d(t,"ImageUploadDataService",(function(){return V})),n.d(t,"SeriesDataService",(function(){return W})),n.d(t,"SeriesDataServiceHelper",(function(){return G})),n.d(t,"UserDataService",(function(){return ne})),n.d(t,"UserDataServiceHelper",(function(){return ie})),n.d(t,"VideoDataService",(function(){return he})),n.d(t,"VideoDataServiceHelper",(function(){return ye})),n.d(t,"SubjectDataService",(function(){return dt})),n.d(t,"SubjectDataServiceHelper",(function(){return mt})),n.d(t,"SubjectsApplication",(function(){return Aa})),n.d(t,"PlaylistDataService",(function(){return hi})),n.d(t,"PlaylistDataServiceHelper",(function(){return yi})),n.d(t,"PlaylistsApplication",(function(){return co}))}])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("ReactBootstrap"),require("Formik"),require("Backbone"),require("SortableHOC"),require("Cropper"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","@clickview/shared","@clickview/common","ReactBootstrap","Formik","Backbone","SortableHOC","Cropper","Handlebars"],t):"object"==typeof exports?exports.curator=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("ReactBootstrap"),require("Formik"),require("Backbone"),require("SortableHOC"),require("Cropper"),require("Handlebars")):e.curator=t(e.React,e["@clickview/shared"],e["@clickview/common"],e.ReactBootstrap,e.Formik,e.Backbone,e.SortableHOC,e.Cropper,e.Handlebars)}(window,(function(e,t,n,r,i,a,o,c,u){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=231)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.addMethod=function(e,t,n){if(!e||!(0,m.default)(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if("string"!=typeof t)throw new TypeError("A Method name must be provided");if("function"!=typeof n)throw new TypeError("Method function must be provided");e.prototype[t]=n},t.lazy=t.ref=t.boolean=void 0;var i=r(n(11));t.mixed=i.default;var a=r(n(202));t.bool=a.default;var o=r(n(203));t.string=o.default;var c=r(n(204));t.number=c.default;var u=r(n(205));t.date=u.default;var s=r(n(207));t.object=s.default;var l=r(n(228));t.array=l.default;var f=r(n(25)),p=r(n(229)),d=r(n(55));t.ValidationError=d.default;var v=r(n(92));t.reach=v.default;var m=r(n(14));t.isSchema=m.default;var b=r(n(230));t.setLocale=b.default;var h=a.default;t.boolean=h;t.ref=function(e,t){return new f.default(e,t)};t.lazy=function(e){return new p.default(e)}},function(e,t){e.exports=i},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){e.exports={tree:"_1abau",text:"f13wK",chevron:"_25eVA",disabled:"_1qyCo",parentOfSelected:"_1fgN6",selected:"cVZit",actions:"_2BGWp",node:"rJVbQ",collapsed:"vc2by"}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(59),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();e.exports=a},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=y;var i=r(n(16)),a=r(n(17)),o=r(n(132)),c=r(n(171)),u=n(13),s=r(n(178)),l=r(n(54)),f=r(n(179)),p=r(n(14)),d=r(n(180)),v=r(n(33)),m=r(n(25)),b=n(92),h=function(){function e(){this.list=new Set,this.refs=new Map}var t=e.prototype;return t.toArray=function(){return(0,c.default)(this.list).concat((0,c.default)(this.refs.values()))},t.add=function(e){m.default.isRef(e)?this.refs.set(e.key,e):this.list.add(e)},t.delete=function(e){m.default.isRef(e)?this.refs.delete(e.key,e):this.list.delete(e)},t.has=function(e,t){if(this.list.has(e))return!0;for(var n,r=this.refs.values();!(n=r.next()).done;)if(t(n.value)===e)return!0;return!1},e}();function y(e){var t=this;if(void 0===e&&(e={}),!(this instanceof y))return new y;this._deps=[],this._conditions=[],this._options={abortEarly:!0,recursive:!0},this._exclusive=Object.create(null),this._whitelist=new h,this._blacklist=new h,this.tests=[],this.transforms=[],this.withMutation((function(){t.typeError(u.mixed.notType)})),(0,a.default)(e,"default")&&(this._defaultDefault=e.default),this._type=e.type||"mixed"}for(var S=y.prototype={__isYupSchema__:!0,constructor:y,clone:function(){var e=this;return this._mutate?this:(0,o.default)(this,(function(t){if((0,p.default)(t)&&t!==e)return t}))},label:function(e){var t=this.clone();return t._label=e,t},meta:function(e){if(0===arguments.length)return this._meta;var t=this.clone();return t._meta=(0,i.default)(t._meta||{},e),t},withMutation:function(e){var t=this._mutate;this._mutate=!0;var n=e(this);return this._mutate=t,n},concat:function(e){if(!e||e===this)return this;if(e._type!==this._type&&"mixed"!==this._type)throw new TypeError("You cannot `concat()` schema's of different types: "+this._type+" and "+e._type);var t=(0,f.default)(e.clone(),this);return(0,a.default)(e,"_default")&&(t._default=e._default),t.tests=this.tests,t._exclusive=this._exclusive,t.withMutation((function(t){e.tests.forEach((function(e){t.test(e.OPTIONS)}))})),t},isType:function(e){return!(!this._nullable||null!==e)||(!this._typeCheck||this._typeCheck(e))},resolve:function(e){var t=this;if(t._conditions.length){var n=t._conditions;(t=t.clone())._conditions=[],t=(t=n.reduce((function(t,n){return n.resolve(t,e)}),t)).resolve(e)}return t},cast:function(e,t){void 0===t&&(t={});var n=this.resolve((0,i.default)({},t,{value:e})),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){var a=(0,v.default)(e),o=(0,v.default)(r);throw new TypeError("The value of "+(t.path||"field")+' could not be cast to a value that satisfies the schema type: "'+n._type+'". \n\nattempted value: '+a+" \n"+(o!==a?"result of cast: "+o:""))}return r},_cast:function(e){var t=this,n=void 0===e?e:this.transforms.reduce((function(n,r){return r.call(t,n,e)}),e);return void 0===n&&(0,a.default)(this,"_default")&&(n=this.default()),n},_validate:function(e,t){var n=this;void 0===t&&(t={});var r=e,a=null!=t.originalValue?t.originalValue:e,o=this._option("strict",t),c=this._option("abortEarly",t),u=t.sync,s=t.path,f=this._label;o||(r=this._cast(r,(0,i.default)({assert:!1},t)));var p={value:r,path:s,schema:this,options:t,label:f,originalValue:a,sync:u},d=[];return this._typeError&&d.push(this._typeError(p)),this._whitelistError&&d.push(this._whitelistError(p)),this._blacklistError&&d.push(this._blacklistError(p)),(0,l.default)({validations:d,endEarly:c,value:r,path:s,sync:u}).then((function(e){return(0,l.default)({path:s,sync:u,value:e,endEarly:c,validations:n.tests.map((function(e){return e(p)}))})}))},validate:function(e,t){return void 0===t&&(t={}),this.resolve((0,i.default)({},t,{value:e}))._validate(e,t)},validateSync:function(e,t){var n,r;if(void 0===t&&(t={}),this.resolve((0,i.default)({},t,{value:e}))._validate(e,(0,i.default)({},t,{sync:!0})).then((function(e){return n=e})).catch((function(e){return r=e})),r)throw r;return n},isValid:function(e,t){return this.validate(e,t).then((function(){return!0})).catch((function(e){if("ValidationError"===e.name)return!1;throw e}))},isValidSync:function(e,t){try{return this.validateSync(e,t),!0}catch(e){if("ValidationError"===e.name)return!1;throw e}},getDefault:function(e){return void 0===e&&(e={}),this.resolve(e).default()},default:function(e){if(0===arguments.length){var t=(0,a.default)(this,"_default")?this._default:this._defaultDefault;return"function"==typeof t?t.call(this):(0,o.default)(t)}var n=this.clone();return n._default=e,n},strict:function(e){void 0===e&&(e=!0);var t=this.clone();return t._options.strict=e,t},_isPresent:function(e){return null!=e},required:function(e){return void 0===e&&(e=u.mixed.required),this.test({message:e,name:"required",exclusive:!0,test:function(e){return this.schema._isPresent(e)}})},notRequired:function(){var e=this.clone();return e.tests=e.tests.filter((function(e){return"required"!==e.OPTIONS.name})),e},nullable:function(e){void 0===e&&(e=!0);var t=this.clone();return t._nullable=e,t},transform:function(e){var t=this.clone();return t.transforms.push(e),t},test:function(){var e;if(void 0===(e=1===arguments.length?"function"==typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]}).message&&(e.message=u.mixed.default),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");var t=this.clone(),n=(0,d.default)(e),r=e.exclusive||e.name&&!0===t._exclusive[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t._exclusive[e.name]=!!e.exclusive,t.tests=t.tests.filter((function(t){if(t.OPTIONS.name===e.name){if(r)return!1;if(t.OPTIONS.test===n.OPTIONS.test)return!1}return!0})),t.tests.push(n),t},when:function(e,t){1===arguments.length&&(t=e,e=".");var n=this.clone(),r=[].concat(e).map((function(e){return new m.default(e)}));return r.forEach((function(e){e.isSibling&&n._deps.push(e.key)})),n._conditions.push(new s.default(r,t)),n},typeError:function(e){var t=this.clone();return t._typeError=(0,d.default)({message:e,name:"typeError",test:function(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t},oneOf:function(e,t){void 0===t&&(t=u.mixed.oneOf);var n=this.clone();return e.forEach((function(e){n._whitelist.add(e),n._blacklist.delete(e)})),n._whitelistError=(0,d.default)({message:t,name:"oneOf",test:function(e){if(void 0===e)return!0;var t=this.schema._whitelist;return!!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n},notOneOf:function(e,t){void 0===t&&(t=u.mixed.notOneOf);var n=this.clone();return e.forEach((function(e){n._blacklist.add(e),n._whitelist.delete(e)})),n._blacklistError=(0,d.default)({message:t,name:"notOneOf",test:function(e){var t=this.schema._blacklist;return!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n},strip:function(e){void 0===e&&(e=!0);var t=this.clone();return t._strip=e,t},_option:function(e,t){return(0,a.default)(t,e)?t[e]:this._options[e]},describe:function(){var e=this.clone();return{type:e._type,meta:e._meta,label:e._label,tests:e.tests.map((function(e){return{name:e.OPTIONS.name,params:e.OPTIONS.params}})).filter((function(e,t,n){return n.findIndex((function(t){return t.name===e.name}))===t}))}}},g=["validate","validateSync"],E=function(){var e=g[j];S[e+"At"]=function(t,n,r){void 0===r&&(r={});var a=(0,b.getIn)(this,t,n,r.context),o=a.parent,c=a.parentPath;return a.schema[e](o&&o[c],(0,i.default)({},r,{parent:o,path:t}))}},j=0;j<g.length;j++)E();for(var O=["equals","is"],T=0;T<O.length;T++){S[O[T]]=S.oneOf}for(var A=["not","nope"],C=0;C<A.length;C++){S[A[C]]=S.notOneOf}S.optional=S.notRequired,e.exports=t.default},function(e,t,n){var r=n(112),i=n(115);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=t.array=t.object=t.boolean=t.date=t.number=t.string=t.mixed=void 0;var i=r(n(33)),a={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:function(e){var t=e.path,n=e.type,r=e.value,a=e.originalValue,o=null!=a&&a!==r,c=t+" must be a `"+n+"` type, but the final value was: `"+(0,i.default)(r,!0)+"`"+(o?" (cast from the value `"+(0,i.default)(a,!0)+"`).":".");return null===r&&(c+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),c}};t.mixed=a;var o={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"};t.string=o;var c={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",notEqual:"${path} must be not equal to ${notEqual}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"};t.number=c;var u={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"};t.date=u;var s={};t.boolean=s;var l={noUnknown:"${path} field cannot have keys not specified in the object shape"};t.object=l;var f={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items"};t.array=f;var p={mixed:a,string:o,number:c,date:u,object:l,array:f,boolean:s};t.default=p},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;t.default=function(e){return e&&e.__isYupSchema__},e.exports=t.default},function(e,t,n){e.exports={draggableVideoItem:"_1JMCe",draggedVideoItem:"_3jjle"}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(102),i=n(57);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t,n){var r=n(19),i=n(104),a=n(105),o="[object Null]",c="[object Undefined]",u=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?c:o:u&&u in Object(e)?i(e):a(e)}},function(e,t,n){var r=n(9).Symbol;e.exports=r},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(66),i=n(145),a=n(51);e.exports=function(e){return a(e)?r(e):i(e)}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=function(e,t,n){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),(0,i.default)(e.prototype,n)};var i=r(n(16));e.exports=t.default},function(e,t,n){var r=n(130);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(155),i=n(43),a=n(156),o=n(157),c=n(158),u=n(18),s=n(61),l=s(r),f=s(i),p=s(a),d=s(o),v=s(c),m=u;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||a&&"[object Promise]"!=m(a.resolve())||o&&"[object Set]"!=m(new o)||c&&"[object WeakMap]"!=m(new c))&&(m=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?s(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case v:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var i=r(n(16)),a=n(34),o={context:"$",value:"."},c=function(){function e(e,t){if(void 0===t&&(t={}),"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===o.context,this.isValue=this.key[0]===o.value,this.isSibling=!this.isContext&&!this.isValue;var n=this.isContext?o.context:this.isValue?o.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,a.getter)(this.path,!0),this.map=t.map}var t=e.prototype;return t.getValue=function(e){var t=this.isContext?e.context:this.isValue?e.value:e.parent;return this.getter&&(t=this.getter(t||{})),this.map&&(t=this.map(t)),t},t.cast=function(e,t){return this.getValue((0,i.default)({},t,{value:e}))},t.resolve=function(){return this},t.describe=function(){return{type:"ref",key:this.key}},t.toString=function(){return"Ref("+this.key+")"},e.isRef=function(e){return e&&e.__isYupRef},e}();t.default=c,c.prototype.__isYupRef=!0,e.exports=t.default},function(e,t,n){var r=n(12)(Object,"create");e.exports=r},function(e,t,n){var r=n(120),i=n(121),a=n(122),o=n(123),c=n(124);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=c,e.exports=u},function(e,t,n){var r=n(42);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(126);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(40),i=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},function(e,t,n){var r=n(140);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(65),i=n(31);e.exports=function(e,t,n,a){var o=!n;n||(n={});for(var c=-1,u=t.length;++c<u;){var s=t[c],l=a?a(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?i(n,s,l):r(n,s,l)}return n}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=u(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){var r=u(this[e],t);return null!==r?r:n}),2)};var r=Object.prototype.toString,i=Error.prototype.toString,a=RegExp.prototype.toString,o="undefined"!=typeof Symbol?Symbol.prototype.toString:function(){return""},c=/^Symbol\((.*)\)(.*)$/;function u(e,t){if(void 0===t&&(t=!1),null==e||!0===e||!1===e)return""+e;var n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?'"'+e+'"':e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return o.call(e).replace(c,"Symbol($1)");var u=r.call(e).slice(8,-1);return"Date"===u?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===u||e instanceof Error?"["+i.call(e)+"]":"RegExp"===u?a.call(e):null}e.exports=t.default},function(e,t,n){"use strict";function r(e){this._maxSize=e,this.clear()}r.prototype.clear=function(){this._size=0,this._values={}},r.prototype.get=function(e){return this._values[e]},r.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),this._values.hasOwnProperty(e)||this._size++,this._values[e]=t};var i=/[^.^\]^[]+|(?=\[\]|\.\.)/g,a=/^\d+$/,o=/^\d/,c=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,u=/^\s*(['"]?)(.*?)(\1)\s*$/,s=!1,l=new r(512),f=new r(512),p=new r(512);try{new Function("")}catch(e){s=!0}function d(e){return l.get(e)||l.set(e,v(e).map((function(e){return e.replace(u,"$2")})))}function v(e){return e.match(i)}function m(e,t,n){return"string"==typeof t&&(n=t,t=!1),n=n||"data",(e=e||"")&&"["!==e.charAt(0)&&(e="."+e),t?function(e,t){var n,r=t,i=v(e);return b(i,(function(e,t,i,a,o){n=a===o.length-1,r+=(e=t||i?"["+e+"]":"."+e)+(n?")":" || {})")})),new Array(i.length+1).join("(")+r}(e,n):n+e}function b(e,t,n){var r,i,a,o,c=e.length;for(i=0;i<c;i++)(r=e[i])&&(y(r)&&(r='"'+r+'"'),a=!(o=h(r))&&/^\d+$/.test(r),t.call(n,r,o,a,i,e))}function h(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function y(e){return!h(e)&&(function(e){return e.match(o)&&!e.match(a)}(e)||function(e){return c.test(e)}(e))}e.exports={Cache:r,expr:m,split:v,normalizePath:d,setter:s?function(e){var t=d(e);return function(e,n){return function(e,t,n){var r=0,i=e.length;for(;r<i-1;)t=t[e[r++]];t[e[r]]=n}(t,e,n)}}:function(e){return f.get(e)||f.set(e,new Function("data, value",m(e,"data")+" = value"))},getter:s?function(e,t){var n=d(e);return function(e){return function(e,t,n){var r=0,i=e.length;for(;r<i;){if(null==n&&t)return;n=n[e[r++]]}return n}(n,t,e)}}:function(e,t){var n=e+"_"+t;return p.get(n)||p.set(n,new Function("data","return "+m(e,t,"data")))},join:function(e){return e.reduce((function(e,t){return e+(h(t)||a.test(t)?"["+t+"]":(e?".":"")+t)}),"")},forEach:function(e,t,n){b(v(e),t,n)}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;t.default=function(e){return null==e},e.exports=t.default},function(e,t){e.exports=a},function(e,t){e.exports=o},function(e,t,n){e.exports={curatorLayout:"XayF7",topNavRegion:"_3ewaZ",leftNavRegion:"_2c2o6"}},function(e,t,n){var r=n(8),i=n(40),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(o.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(18),i=n(10),a="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||i(e)&&r(e)==a}},function(e,t,n){var r=n(109),i=n(125),a=n(127),o=n(128),c=n(129);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=c,e.exports=u},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(12)(n(9),"Map");e.exports=r},function(e,t){var n=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t,n){var r=n(27),i=n(134),a=n(135),o=n(136),c=n(137),u=n(138);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=i,s.prototype.delete=a,s.prototype.get=o,s.prototype.has=c,s.prototype.set=u,e.exports=s},function(e,t,n){(function(e){var r=n(9),i=n(143),a=t&&!t.nodeType&&t,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,c=o&&o.exports===a?r.Buffer:void 0,u=(c?c.isBuffer:void 0)||i;e.exports=u}).call(this,n(47)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(59),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i&&r.process,c=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=c}).call(this,n(47)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(60),i=n(44);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){var r=n(152),i=n(71),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,c=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return a.call(e,t)})))}:i;e.exports=c},function(e,t,n){var r=n(77);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.propagateErrors=function(e,t){return e?null:function(e){return t.push(e),e.value}},t.settled=s,t.collectErrors=l,t.default=function(e){var t=e.endEarly,n=(0,i.default)(e,["endEarly"]);return t?function(e,t,n){return c(n).all(e).catch((function(e){throw"ValidationError"===e.name&&(e.value=t),e})).then((function(){return t}))}(n.validations,n.value,n.sync):l(n)};var i=r(n(82)),a=n(83),o=r(n(55)),c=function(e){return e?a.SynchronousPromise:Promise},u=function(e){return void 0===e&&(e=[]),e.inner&&e.inner.length?e.inner:[].concat(e)};function s(e,t){var n=c(t);return n.all(e.map((function(e){return n.resolve(e).then((function(e){return{fulfilled:!0,value:e}}),(function(e){return{fulfilled:!1,value:e}}))})))}function l(e){var t=e.validations,n=e.value,r=e.path,i=e.sync,a=e.errors,c=e.sort;return a=u(a),s(t,i).then((function(e){var t=e.filter((function(e){return!e.fulfilled})).reduce((function(e,t){var n=t.value;if(!o.default.isError(n))throw n;return e.concat(n)}),[]);if(c&&t.sort(c),(a=t.concat(a)).length)throw new o.default(a,n,r);return n}))}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=c;var i=r(n(33)),a=/\$\{\s*(\w+)\s*\}/g,o=function(e){return function(t){return e.replace(a,(function(e,n){return(0,i.default)(t[n])}))}};function c(e,t,n,r){var i=this;this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],e&&[].concat(e).forEach((function(e){i.errors=i.errors.concat(e.errors||e),e.inner&&(i.inner=i.inner.concat(e.inner.length?e.inner:e))})),this.message=this.errors.length>1?this.errors.length+" errors occurred":this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,c)}c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,c.isError=function(e){return e&&"ValidationError"===e.name},c.formatError=function(e,t){"string"==typeof e&&(e=o(e));var n=function(t){return t.path=t.label||t.path||"this","function"==typeof e?e(t):e};return 1===arguments.length?n:n(t)},e.exports=t.default},function(e,t,n){e.exports={dropdown:"_3SSd3",dropdownToggle:"GL7MR"}},function(e,t,n){var r=n(58),i=n(63),a=n(8),o=n(64),c=n(44),u=n(30);e.exports=function(e,t,n){for(var s=-1,l=(t=r(t,e)).length,f=!1;++s<l;){var p=u(t[s]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++s!=l?f:!!(l=null==e?0:e.length)&&c(l)&&o(p,l)&&(a(e)||i(e))}},function(e,t,n){var r=n(8),i=n(39),a=n(106),o=n(23);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:a(o(e))}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(103))},function(e,t,n){var r=n(18),i=n(20),a="[object AsyncFunction]",o="[object Function]",c="[object GeneratorFunction]",u="[object Proxy]";e.exports=function(e){if(!i(e))return!1;var t=r(e);return t==o||t==c||t==a||t==u}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){var r=n(131),i=n(10),a=Object.prototype,o=a.hasOwnProperty,c=a.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,"callee")&&!c.call(e,"callee")};e.exports=u},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=typeof e;return!!(t=null==t?n:t)&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(31),i=n(42),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];a.call(e,t)&&i(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(142),i=n(63),a=n(8),o=n(46),c=n(64),u=n(67),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&i(e),f=!n&&!l&&o(e),p=!n&&!l&&!f&&u(e),d=n||l||f||p,v=d?r(e.length,String):[],m=v.length;for(var b in e)!t&&!s.call(e,b)||d&&("length"==b||f&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||c(b,m))||v.push(b);return v}},function(e,t,n){var r=n(144),i=n(48),a=n(49),o=a&&a.isTypedArray,c=o?i(o):r;e.exports=c},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(66),i=n(148),a=n(51);e.exports=function(e){return a(e)?r(e,!0):i(e)}},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(73),i=n(74),a=n(52),o=n(71),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,a(e)),e=i(e);return t}:o;e.exports=c},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(68)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(76),i=n(52),a=n(21);e.exports=function(e){return r(e,a,i)}},function(e,t,n){var r=n(73),i=n(8);e.exports=function(e,t,n){var a=t(e);return i(e)?a:r(a,n(e))}},function(e,t,n){var r=n(9).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(174),i=n(81),a=n(175);e.exports=function(e){return i(e)?a(e):r(e)}},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}},function(e,t,n){"use strict";function r(e){return Array.prototype.slice.apply(e)}var i="pending";function a(e){this.status=i,this._continuations=[],this._parent=null,this._paused=!1,e&&e.call(this,this._continueWith.bind(this),this._failWith.bind(this))}function o(e){return e&&"function"==typeof e.then}if(a.prototype={then:function(e,t){var n=a.unresolved()._setParent(this);if(this._isRejected()){if(this._paused)return this._continuations.push({promise:n,nextFn:e,catchFn:t}),n;if(t)try{var r=t(this._error);return o(r)?(this._chainPromiseData(r,n),n):a.resolve(r)._setParent(this)}catch(e){return a.reject(e)._setParent(this)}return a.reject(this._error)._setParent(this)}return this._continuations.push({promise:n,nextFn:e,catchFn:t}),this._runResolutions(),n},catch:function(e){if(this._isResolved())return a.resolve(this._data)._setParent(this);var t=a.unresolved()._setParent(this);return this._continuations.push({promise:t,catchFn:e}),this._runRejections(),t},finally:function(e){var t=!1;function n(){if(!t)return t=!0,e()}return this.then(n).catch(n)},pause:function(){return this._paused=!0,this},resume:function(){var e=this._findFirstPaused();return e&&(e._paused=!1,e._runResolutions(),e._runRejections()),this},_findAncestry:function(){return this._continuations.reduce((function(e,t){if(t.promise){var n={promise:t.promise,children:t.promise._findAncestry()};e.push(n)}return e}),[])},_setParent:function(e){if(this._parent)throw new Error("parent already set");return this._parent=e,this},_continueWith:function(e){var t=this._findFirstPending();t&&(t._data=e,t._setResolved())},_findFirstPending:function(){return this._findFirstAncestor((function(e){return e._isPending&&e._isPending()}))},_findFirstPaused:function(){return this._findFirstAncestor((function(e){return e._paused}))},_findFirstAncestor:function(e){for(var t,n=this;n;)e(n)&&(t=n),n=n._parent;return t},_failWith:function(e){var t=this._findFirstPending();t&&(t._error=e,t._setRejected())},_takeContinuations:function(){return this._continuations.splice(0,this._continuations.length)},_runRejections:function(){if(!this._paused&&this._isRejected()){var e=this._error,t=this._takeContinuations(),n=this;t.forEach((function(t){if(t.catchFn)try{var r=t.catchFn(e);n._handleUserFunctionResult(r,t.promise)}catch(e){e.message;t.promise.reject(e)}else t.promise.reject(e)}))}},_runResolutions:function(){if(!this._paused&&this._isResolved()&&!this._isPending()){var e=this._takeContinuations();if(o(this._data))return this._handleWhenResolvedDataIsPromise(this._data);var t=this._data,n=this;e.forEach((function(e){if(e.nextFn)try{var r=e.nextFn(t);n._handleUserFunctionResult(r,e.promise)}catch(t){n._handleResolutionError(t,e)}else e.promise&&e.promise.resolve(t)}))}},_handleResolutionError:function(e,t){if(this._setRejected(),t.catchFn)try{return void t.catchFn(e)}catch(t){e=t}t.promise&&t.promise.reject(e)},_handleWhenResolvedDataIsPromise:function(e){var t=this;return e.then((function(e){t._data=e,t._runResolutions()})).catch((function(e){t._error=e,t._setRejected(),t._runRejections()}))},_handleUserFunctionResult:function(e,t){o(e)?this._chainPromiseData(e,t):t.resolve(e)},_chainPromiseData:function(e,t){e.then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)}))},_setResolved:function(){this.status="resolved",this._paused||this._runResolutions()},_setRejected:function(){this.status="rejected",this._paused||this._runRejections()},_isPending:function(){return this.status===i},_isResolved:function(){return"resolved"===this.status},_isRejected:function(){return"rejected"===this.status}},a.resolve=function(e){return new a((function(t,n){o(e)?e.then((function(e){t(e)})).catch((function(e){n(e)})):t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},a.unresolved=function(){return new a((function(e,t){this.resolve=e,this.reject=t}))},a.all=function(){var e=r(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new a((function(t,n){var r=[],i=0,o=!1;e.forEach((function(c,u){a.resolve(c).then((function(n){r[u]=n,(i+=1)===e.length&&t(r)})).catch((function(e){!function(e){o||(o=!0,n(e))}(e)}))}))})):a.resolve([])},Promise===a)throw new Error("Please use SynchronousPromise.installGlobally() to install globally");var c=Promise;a.installGlobally=function(e){if(Promise===a)return e;var t=function(e){if(void 0===e||e.__patched)return e;var t=e;return(e=function(){t.apply(this,r(arguments))}).__patched=!0,e}(e);return Promise=a,t},a.uninstallGlobally=function(){Promise===a&&(Promise=c)},e.exports={SynchronousPromise:a}},function(e,t,n){var r=n(31),i=n(85),a=n(86);e.exports=function(e,t){var n={};return t=a(t,3),i(e,(function(e,i,a){r(n,i,t(e,i,a))})),n}},function(e,t,n){var r=n(181),i=n(21);e.exports=function(e,t){return e&&r(e,t,i)}},function(e,t,n){var r=n(183),i=n(194),a=n(198),o=n(8),c=n(199);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?o(e)?i(e[0],e[1]):r(e):c(e)}},function(e,t,n){var r=n(185),i=n(10);e.exports=function e(t,n,a,o,c){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,a,o,e,c))}},function(e,t,n){var r=n(186),i=n(189),a=n(190),o=1,c=2;e.exports=function(e,t,n,u,s,l){var f=n&o,p=e.length,d=t.length;if(p!=d&&!(f&&d>p))return!1;var v=l.get(e);if(v&&l.get(t))return v==t;var m=-1,b=!0,h=n&c?new r:void 0;for(l.set(e,t),l.set(t,e);++m<p;){var y=e[m],S=t[m];if(u)var g=f?u(S,y,m,t,e,l):u(y,S,m,e,t,l);if(void 0!==g){if(g)continue;b=!1;break}if(h){if(!i(t,(function(e,t){if(!a(h,t)&&(y===e||s(y,e,n,u,l)))return h.push(t)}))){b=!1;break}}else if(y!==S&&!s(y,S,n,u,l)){b=!1;break}}return l.delete(e),l.delete(t),b}},function(e,t,n){var r=n(20);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(58),i=n(30);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[i(t[n++])];return n&&n==a?e:void 0}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.getIn=c,t.default=void 0;var i=n(34),a=r(n(17)),o=function(e){return e.substr(0,e.length-1).substr(1)};function c(e,t,n,r){var c,u,s;return r=r||n,t?((0,i.forEach)(t,(function(i,l,f){var p=l?o(i):i;if(f||(0,a.default)(e,"_subType")){var d=f?parseInt(p,10):0;if(e=e.resolve({context:r,parent:c,value:n})._subType,n){if(f&&d>=n.length)throw new Error("Yup.reach cannot resolve an array item at index: "+i+", in the path: "+t+". because there is no value at that index. ");n=n[d]}}if(!f){if(e=e.resolve({context:r,parent:c,value:n}),!(0,a.default)(e,"fields")||!(0,a.default)(e.fields,p))throw new Error("The schema does not contain the path: "+t+". (failed at: "+s+' which is a type: "'+e._type+'") ');e=e.fields[p],c=n,n=n&&n[p],u=p,s=l?"["+i+"]":"."+i}})),{schema:e,parent:c,parentPath:u}):{parent:c,parentPath:t,schema:e}}var u=function(e,t,n,r){return c(e,t,n,r).schema};t.default=u},function(e,t,n){var r=n(208);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var c=a?Object.getOwnPropertyDescriptor(e,o):null;c&&(c.get||c.set)?Object.defineProperty(n,o,c):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),e.raw=t,e}},function(e,t,n){var r=n(210),i=n(211),a=n(214),o=RegExp("['’]","g");e.exports=function(e){return function(t){return r(a(i(t).replace(o,"")),e,"")}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((function(e,t){var r=n.shift();return e+(null==r?"":r)+t})).replace(/^\./,"")},e.exports=t.default},function(e,t,n){var r=n(101);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region"></div>'},useData:!0})},function(e,t){e.exports=c},function(e,t,n){e.exports={navContainer:"_11O8h"}},function(e,t,n){e.exports={navContainer:"_3vLoN"}},function(e,t){e.exports=u},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e,t){return null!=e&&n.call(e,t)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(19),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var i=o.call(e);return r&&(t?e[c]=n:delete e[c]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(107),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}));e.exports=o},function(e,t,n){var r=n(108),i=500;e.exports=function(e){var t=r(e,(function(e){return n.size===i&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(41),i="Expected a function";function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(a.Cache||r),n}a.Cache=r,e.exports=a},function(e,t,n){var r=n(110),i=n(27),a=n(43);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(e,t,n){var r=n(111),i=n(116),a=n(117),o=n(118),c=n(119);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=c,e.exports=u},function(e,t,n){var r=n(26);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t,n){var r=n(60),i=n(113),a=n(20),o=n(61),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,l=u.toString,f=s.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||i(e))&&(r(e)?p:c).test(o(e))}},function(e,t,n){var r,i=n(114),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(9)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(26),i="__lodash_hash_undefined__",a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return n===i?void 0:n}return a.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(26),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},function(e,t,n){var r=n(26),i="__lodash_hash_undefined__";e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?i:t,this}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(28),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(28);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(28);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(28);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(29);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(29);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(29);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(29);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},function(e,t,n){var r=n(19),i=n(62),a=n(8),o=n(40),c=1/0,u=r?r.prototype:void 0,s=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return i(t,e)+"";if(o(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-c?"-0":n}},function(e,t,n){var r=n(18),i=n(10),a="[object Arguments]";e.exports=function(e){return i(e)&&r(e)==a}},function(e,t,n){var r=n(133),i=1,a=4;e.exports=function(e,t){return r(e,i|a,t="function"==typeof t?t:void 0)}},function(e,t,n){var r=n(45),i=n(139),a=n(65),o=n(141),c=n(147),u=n(150),s=n(70),l=n(151),f=n(153),p=n(75),d=n(154),v=n(24),m=n(159),b=n(160),h=n(165),y=n(8),S=n(46),g=n(167),E=n(20),j=n(169),O=n(21),T=1,A=2,C=4,I="[object Arguments]",_="[object Function]",w="[object GeneratorFunction]",x="[object Object]",F={};F[I]=F["[object Array]"]=F["[object ArrayBuffer]"]=F["[object DataView]"]=F["[object Boolean]"]=F["[object Date]"]=F["[object Float32Array]"]=F["[object Float64Array]"]=F["[object Int8Array]"]=F["[object Int16Array]"]=F["[object Int32Array]"]=F["[object Map]"]=F["[object Number]"]=F[x]=F["[object RegExp]"]=F["[object Set]"]=F["[object String]"]=F["[object Symbol]"]=F["[object Uint8Array]"]=F["[object Uint8ClampedArray]"]=F["[object Uint16Array]"]=F["[object Uint32Array]"]=!0,F["[object Error]"]=F[_]=F["[object WeakMap]"]=!1,e.exports=function e(t,n,L,P,N,k){var D,R=n&T,U=n&A,B=n&C;if(L&&(D=N?L(t,P,N,k):L(t)),void 0!==D)return D;if(!E(t))return t;var V=y(t);if(V){if(D=m(t),!R)return s(t,D)}else{var M=v(t),J=M==_||M==w;if(S(t))return u(t,R);if(M==x||M==I||J&&!N){if(D=U||J?{}:h(t),!R)return U?f(t,c(D,t)):l(t,o(D,t))}else{if(!F[M])return N?t:{};D=b(t,M,R)}}k||(k=new r);var H=k.get(t);if(H)return H;k.set(t,D),j(t)?t.forEach((function(r){D.add(e(r,n,L,r,t,k))})):g(t)&&t.forEach((function(r,i){D.set(i,e(r,n,L,i,t,k))}));var z=B?U?d:p:U?keysIn:O,Y=V?void 0:z(t);return i(Y||t,(function(r,i){Y&&(r=t[i=r]),a(D,i,e(r,n,L,i,t,k))})),D}},function(e,t,n){var r=n(27);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(27),i=n(43),a=n(41),o=200;e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var c=n.__data__;if(!i||c.length<o-1)return c.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(c)}return n.set(e,t),this.size=n.size,this}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(12),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,n){var r=n(32),i=n(21);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(18),i=n(44),a=n(10),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&i(e.length)&&!!o[r(e)]}},function(e,t,n){var r=n(50),i=n(146),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(68)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(32),i=n(69);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){var r=n(20),i=n(50),a=n(149),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=i(e),n=[];for(var c in e)("constructor"!=c||!t&&o.call(e,c))&&n.push(c);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(9),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.Buffer:void 0,c=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=c?c(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(47)(e))},function(e,t,n){var r=n(32),i=n(52);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}},function(e,t,n){var r=n(32),i=n(72);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t,n){var r=n(76),i=n(72),a=n(69);e.exports=function(e){return r(e,a,i)}},function(e,t,n){var r=n(12)(n(9),"DataView");e.exports=r},function(e,t,n){var r=n(12)(n(9),"Promise");e.exports=r},function(e,t,n){var r=n(12)(n(9),"Set");e.exports=r},function(e,t,n){var r=n(12)(n(9),"WeakMap");e.exports=r},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(53),i=n(161),a=n(162),o=n(163),c=n(164),u="[object Boolean]",s="[object Date]",l="[object Map]",f="[object Number]",p="[object RegExp]",d="[object Set]",v="[object String]",m="[object Symbol]",b="[object ArrayBuffer]",h="[object DataView]",y="[object Float32Array]",S="[object Float64Array]",g="[object Int8Array]",E="[object Int16Array]",j="[object Int32Array]",O="[object Uint8Array]",T="[object Uint8ClampedArray]",A="[object Uint16Array]",C="[object Uint32Array]";e.exports=function(e,t,n){var I=e.constructor;switch(t){case b:return r(e);case u:case s:return new I(+e);case h:return i(e,n);case y:case S:case g:case E:case j:case O:case T:case A:case C:return c(e,n);case l:return new I;case f:case v:return new I(e);case p:return a(e);case d:return new I;case m:return o(e)}}},function(e,t,n){var r=n(53);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(19),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;e.exports=function(e){return a?Object(a.call(e)):{}}},function(e,t,n){var r=n(53);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(166),i=n(74),a=n(50);e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:r(i(e))}},function(e,t,n){var r=n(20),i=Object.create,a=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=a},function(e,t,n){var r=n(168),i=n(48),a=n(49),o=a&&a.isMap,c=o?i(o):r;e.exports=c},function(e,t,n){var r=n(24),i=n(10),a="[object Map]";e.exports=function(e){return i(e)&&r(e)==a}},function(e,t,n){var r=n(170),i=n(48),a=n(49),o=a&&a.isSet,c=o?i(o):r;e.exports=c},function(e,t,n){var r=n(24),i=n(10),a="[object Set]";e.exports=function(e){return i(e)&&r(e)==a}},function(e,t,n){var r=n(19),i=n(70),a=n(24),o=n(51),c=n(172),u=n(173),s=n(78),l=n(79),f=n(80),p=n(176),d="[object Map]",v="[object Set]",m=r?r.iterator:void 0;e.exports=function(e){if(!e)return[];if(o(e))return c(e)?f(e):i(e);if(m&&e[m])return u(e[m]());var t=a(e);return(t==d?s:t==v?l:p)(e)}},function(e,t,n){var r=n(18),i=n(8),a=n(10),o="[object String]";e.exports=function(e){return"string"==typeof e||!i(e)&&a(e)&&r(e)==o}},function(e,t){e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",s="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[a,o,c].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[a+r+"?",r,o,c,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+s,"g");e.exports=function(e){return e.match(f)||[]}},function(e,t,n){var r=n(177),i=n(21);e.exports=function(e){return null==e?[]:r(e,i(e))}},function(e,t,n){var r=n(62);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var i=r(n(17)),a=r(n(14)),o=function(){function e(e,t){if(this.refs=e,"function"!=typeof t){if(!(0,i.default)(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");var n=t.is,r=t.then,a=t.otherwise,o="function"==typeof n?n:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.every((function(e){return e===n}))};this.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.pop(),c=t.pop(),u=o.apply(void 0,t)?r:a;if(u)return"function"==typeof u?u(c):c.concat(u.resolve(i))}}else this.fn=t}return e.prototype.resolve=function(e,t){var n=this.refs.map((function(e){return e.getValue(t)})),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!(0,a.default)(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)},e}();t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=function e(t,n){for(var r in n)if((0,i.default)(n,r)){var c=n[r],u=t[r];if(void 0===u)t[r]=c;else{if(u===c)continue;(0,a.default)(u)?(0,a.default)(c)&&(t[r]=c.concat(u)):o(u)?o(c)&&(t[r]=e(u,c)):Array.isArray(u)&&Array.isArray(c)&&(t[r]=c.concat(u))}}return t};var i=r(n(17)),a=r(n(14)),o=function(e){return"[object Object]"===Object.prototype.toString.call(e)};e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.createErrorFactory=p,t.default=function(e){var t=e.name,n=e.message,r=e.test,o=e.params;function l(e){var l=e.value,d=e.path,v=e.label,m=e.options,b=e.originalValue,h=e.sync,y=(0,i.default)(e,["value","path","label","options","originalValue","sync"]),S=m.parent,g=function(e){return u.default.isRef(e)?e.getValue({value:l,parent:S,context:m.context}):e},E=p({message:n,path:d,value:l,originalValue:b,params:o,label:v,resolve:g,name:t}),j=(0,a.default)({path:d,parent:S,type:t,createError:E,resolve:g,options:m},y);return function(e,t,n,r){var i=e.call(t,n);if(!r)return Promise.resolve(i);if(f(i))throw new Error('Validation test of type: "'+t.type+'" returned a Promise during a synchronous validate. This test will finish after the validate call has returned');return s.SynchronousPromise.resolve(i)}(r,j,l,h).then((function(e){if(c.default.isError(e))throw e;if(!e)throw E()}))}return l.OPTIONS=e,l};var i=r(n(82)),a=r(n(16)),o=r(n(84)),c=r(n(55)),u=r(n(25)),s=n(83),l=c.default.formatError,f=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch};function p(e){var t=e.value,n=e.label,r=e.resolve,u=e.originalValue,s=(0,i.default)(e,["value","label","resolve","originalValue"]);return function(e){var i=void 0===e?{}:e,f=i.path,p=void 0===f?s.path:f,d=i.message,v=void 0===d?s.message:d,m=i.type,b=void 0===m?s.name:m,h=i.params;return h=(0,a.default)({path:p,value:t,originalValue:u,label:n},function(e,t,n){return(0,o.default)((0,a.default)({},e,t),n)}(s.params,h,r)),(0,a.default)(new c.default(l(v,h),t,p,b),{params:h})}}},function(e,t,n){var r=n(182)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),c=o.length;c--;){var u=o[e?c:++i];if(!1===n(a[u],u,a))break}return t}}},function(e,t,n){var r=n(184),i=n(193),a=n(90);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(45),i=n(87),a=1,o=2;e.exports=function(e,t,n,c){var u=n.length,s=u,l=!c;if(null==e)return!s;for(e=Object(e);u--;){var f=n[u];if(l&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++u<s;){var p=(f=n[u])[0],d=e[p],v=f[1];if(l&&f[2]){if(void 0===d&&!(p in e))return!1}else{var m=new r;if(c)var b=c(d,v,p,e,t,m);if(!(void 0===b?i(v,d,a|o,c,m):b))return!1}}return!0}},function(e,t,n){var r=n(45),i=n(88),a=n(191),o=n(192),c=n(24),u=n(8),s=n(46),l=n(67),f=1,p="[object Arguments]",d="[object Array]",v="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,b,h,y){var S=u(e),g=u(t),E=S?d:c(e),j=g?d:c(t),O=(E=E==p?v:E)==v,T=(j=j==p?v:j)==v,A=E==j;if(A&&s(e)){if(!s(t))return!1;S=!0,O=!1}if(A&&!O)return y||(y=new r),S||l(e)?i(e,t,n,b,h,y):a(e,t,E,n,b,h,y);if(!(n&f)){var C=O&&m.call(e,"__wrapped__"),I=T&&m.call(t,"__wrapped__");if(C||I){var _=C?e.value():e,w=I?t.value():t;return y||(y=new r),h(_,w,n,b,y)}}return!!A&&(y||(y=new r),o(e,t,n,b,h,y))}},function(e,t,n){var r=n(41),i=n(187),a=n(188);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,e.exports=o},function(e,t){var n="__lodash_hash_undefined__";e.exports=function(e){return this.__data__.set(e,n),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(19),i=n(77),a=n(42),o=n(88),c=n(78),u=n(79),s=1,l=2,f="[object Boolean]",p="[object Date]",d="[object Error]",v="[object Map]",m="[object Number]",b="[object RegExp]",h="[object Set]",y="[object String]",S="[object Symbol]",g="[object ArrayBuffer]",E="[object DataView]",j=r?r.prototype:void 0,O=j?j.valueOf:void 0;e.exports=function(e,t,n,r,j,T,A){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case g:return!(e.byteLength!=t.byteLength||!T(new i(e),new i(t)));case f:case p:case m:return a(+e,+t);case d:return e.name==t.name&&e.message==t.message;case b:case y:return e==t+"";case v:var C=c;case h:var I=r&s;if(C||(C=u),e.size!=t.size&&!I)return!1;var _=A.get(e);if(_)return _==t;r|=l,A.set(e,t);var w=o(C(e),C(t),r,j,T,A);return A.delete(e),w;case S:if(O)return O.call(e)==O.call(t)}return!1}},function(e,t,n){var r=n(75),i=1,a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,c,u){var s=n&i,l=r(e),f=l.length;if(f!=r(t).length&&!s)return!1;for(var p=f;p--;){var d=l[p];if(!(s?d in t:a.call(t,d)))return!1}var v=u.get(e);if(v&&u.get(t))return v==t;var m=!0;u.set(e,t),u.set(t,e);for(var b=s;++p<f;){var h=e[d=l[p]],y=t[d];if(o)var S=s?o(y,h,d,t,e,u):o(h,y,d,e,t,u);if(!(void 0===S?h===y||c(h,y,n,o,u):S)){m=!1;break}b||(b="constructor"==d)}if(m&&!b){var g=e.constructor,E=t.constructor;g!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof g&&g instanceof g&&"function"==typeof E&&E instanceof E)&&(m=!1)}return u.delete(e),u.delete(t),m}},function(e,t,n){var r=n(89),i=n(21);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var a=t[n],o=e[a];t[n]=[a,o,r(o)]}return t}},function(e,t,n){var r=n(87),i=n(195),a=n(196),o=n(39),c=n(89),u=n(90),s=n(30),l=1,f=2;e.exports=function(e,t){return o(e)&&c(t)?u(s(e),t):function(n){var o=i(n,e);return void 0===o&&o===t?a(n,e):r(t,o,l|f)}}},function(e,t,n){var r=n(91);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t,n){var r=n(197),i=n(57);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(200),i=n(201),a=n(39),o=n(30);e.exports=function(e){return a(e)?r(o(e)):i(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(91);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var i=r(n(22)),a=r(n(11)),o=c;function c(){var e=this;if(!(this instanceof c))return new c;a.default.call(this,{type:"boolean"}),this.withMutation((function(){e.transform((function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(e))return!0;if(/^(false|0)$/i.test(e))return!1}return e}))}))}t.default=o,(0,i.default)(c,a.default,{_typeCheck:function(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e}}),e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=f;var i=r(n(22)),a=r(n(11)),o=n(13),c=r(n(35)),u=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,s=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,l=function(e){return(0,c.default)(e)||e===e.trim()};function f(){var e=this;if(!(this instanceof f))return new f;a.default.call(this,{type:"string"}),this.withMutation((function(){e.transform((function(e){return this.isType(e)?e:null!=e&&e.toString?e.toString():e}))}))}(0,i.default)(f,a.default,{_typeCheck:function(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e},_isPresent:function(e){return a.default.prototype._cast.call(this,e)&&e.length>0},length:function(e,t){return void 0===t&&(t=o.string.length),this.test({message:t,name:"length",exclusive:!0,params:{length:e},test:function(t){return(0,c.default)(t)||t.length===this.resolve(e)}})},min:function(e,t){return void 0===t&&(t=o.string.min),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return(0,c.default)(t)||t.length>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=o.string.max),this.test({name:"max",exclusive:!0,message:t,params:{max:e},test:function(t){return(0,c.default)(t)||t.length<=this.resolve(e)}})},matches:function(e,t){var n,r=!1;return t&&(t.message||t.hasOwnProperty("excludeEmptyString")?(r=t.excludeEmptyString,n=t.message):n=t),this.test({message:n||o.string.matches,params:{regex:e},test:function(t){return(0,c.default)(t)||""===t&&r||e.test(t)}})},email:function(e){return void 0===e&&(e=o.string.email),this.matches(u,{message:e,excludeEmptyString:!0})},url:function(e){return void 0===e&&(e=o.string.url),this.matches(s,{message:e,excludeEmptyString:!0})},ensure:function(){return this.default("").transform((function(e){return null===e?"":e}))},trim:function(e){return void 0===e&&(e=o.string.trim),this.transform((function(e){return null!=e?e.trim():e})).test({message:e,name:"trim",test:l})},lowercase:function(e){return void 0===e&&(e=o.string.lowercase),this.transform((function(e){return(0,c.default)(e)?e:e.toLowerCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return(0,c.default)(e)||e===e.toLowerCase()}})},uppercase:function(e){return void 0===e&&(e=o.string.uppercase),this.transform((function(e){return(0,c.default)(e)?e:e.toUpperCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return(0,c.default)(e)||e===e.toUpperCase()}})}}),e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=s;var i=r(n(22)),a=r(n(11)),o=n(13),c=r(n(35)),u=function(e){return(0,c.default)(e)||e===(0|e)};function s(){var e=this;if(!(this instanceof s))return new s;a.default.call(this,{type:"number"}),this.withMutation((function(){e.transform((function(e){var t=e;if("string"==typeof t){if(""===(t=t.replace(/\s/g,"")))return NaN;t=+t}return this.isType(t)?t:parseFloat(t)}))}))}(0,i.default)(s,a.default,{_typeCheck:function(e){return e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!function(e){return e!=+e}(e)},min:function(e,t){return void 0===t&&(t=o.number.min),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return(0,c.default)(t)||t>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=o.number.max),this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return(0,c.default)(t)||t<=this.resolve(e)}})},lessThan:function(e,t){return void 0===t&&(t=o.number.lessThan),this.test({message:t,name:"max",exclusive:!0,params:{less:e},test:function(t){return(0,c.default)(t)||t<this.resolve(e)}})},moreThan:function(e,t){return void 0===t&&(t=o.number.moreThan),this.test({message:t,name:"min",exclusive:!0,params:{more:e},test:function(t){return(0,c.default)(t)||t>this.resolve(e)}})},positive:function(e){return void 0===e&&(e=o.number.positive),this.moreThan(0,e)},negative:function(e){return void 0===e&&(e=o.number.negative),this.lessThan(0,e)},integer:function(e){return void 0===e&&(e=o.number.integer),this.test({name:"integer",message:e,test:u})},truncate:function(){return this.transform((function(e){return(0,c.default)(e)?e:0|e}))},round:function(e){var t=["ceil","floor","round","trunc"];if("trunc"===(e=e&&e.toLowerCase()||"round"))return this.truncate();if(-1===t.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+t.join(", "));return this.transform((function(t){return(0,c.default)(t)?t:Math[e](t)}))}}),e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var i=r(n(11)),a=r(n(22)),o=r(n(206)),c=n(13),u=r(n(35)),s=r(n(25)),l=new Date(""),f=p;function p(){var e=this;if(!(this instanceof p))return new p;i.default.call(this,{type:"date"}),this.withMutation((function(){e.transform((function(e){return this.isType(e)?e:(e=(0,o.default)(e))?new Date(e):l}))}))}t.default=f,(0,a.default)(p,i.default,{_typeCheck:function(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t},min:function(e,t){void 0===t&&(t=c.date.min);var n=e;if(!s.default.isRef(n)&&(n=this.cast(e),!this._typeCheck(n)))throw new TypeError("`min` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(e){return(0,u.default)(e)||e>=this.resolve(n)}})},max:function(e,t){void 0===t&&(t=c.date.max);var n=e;if(!s.default.isRef(n)&&(n=this.cast(e),!this._typeCheck(n)))throw new TypeError("`max` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(e){return(0,u.default)(e)||e<=this.resolve(n)}})}}),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t,n,i=[1,4,5,6,7,10,11],a=0;if(n=r.exec(e)){for(var o,c=0;o=i[c];++c)n[o]=+n[o]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(a=60*n[10]+n[11],"+"===n[9]&&(a=0-a)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+a,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t};var r=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;e.exports=t.default},function(e,t,n){"use strict";var r=n(93),i=n(6);t.__esModule=!0,t.default=O;var a=i(n(94)),o=i(n(16)),c=i(n(17)),u=i(n(209)),s=i(n(218)),l=i(n(224)),f=i(n(84)),p=n(34),d=i(n(11)),v=n(13),m=i(n(225)),b=i(n(227)),h=i(n(22)),y=i(n(96)),S=r(n(54));function g(){var e=(0,a.default)(["",".",""]);return g=function(){return e},e}function E(){var e=(0,a.default)(["",".",""]);return E=function(){return e},e}var j=function(e){return"[object Object]"===Object.prototype.toString.call(e)};function O(e){var t=this;if(!(this instanceof O))return new O(e);d.default.call(this,{type:"object",default:function(){var e=this;if(this._nodes.length){var t={};return this._nodes.forEach((function(n){t[n]=e.fields[n].default?e.fields[n].default():void 0})),t}}}),this.fields=Object.create(null),this._nodes=[],this._excludedEdges=[],this.withMutation((function(){t.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),e&&t.shape(e)}))}(0,h.default)(O,d.default,{_typeCheck:function(e){return j(e)||"function"==typeof e},_cast:function(e,t){var n=this;void 0===t&&(t={});var r=d.default.prototype._cast.call(this,e,t);if(void 0===r)return this.default();if(!this._typeCheck(r))return r;var i=this.fields,a=!0===this._option("stripUnknown",t),u=this._nodes.concat(Object.keys(r).filter((function(e){return-1===n._nodes.indexOf(e)}))),s={},l=(0,o.default)({},t,{parent:s,__validating:!1}),f=!1;return u.forEach((function(e){var n=i[e],o=(0,c.default)(r,e);if(n){var u,p=n._options&&n._options.strict;if(l.path=(0,y.default)(E(),t.path,e),l.value=r[e],!0===(n=n.resolve(l))._strip)return void(f=f||e in r);void 0!==(u=t.__validating&&p?r[e]:n.cast(r[e],l))&&(s[e]=u)}else o&&!a&&(s[e]=r[e]);s[e]!==r[e]&&(f=!0)})),f?s:r},_validate:function(e,t){var n,r,i=this;void 0===t&&(t={});var a=t.sync,c=[],u=null!=t.originalValue?t.originalValue:e;return n=this._option("abortEarly",t),r=this._option("recursive",t),t=(0,o.default)({},t,{__validating:!0,originalValue:u}),d.default.prototype._validate.call(this,e,t).catch((0,S.propagateErrors)(n,c)).then((function(e){if(!r||!j(e)){if(c.length)throw c[0];return e}u=u||e;var s=i._nodes.map((function(n){var r=(0,y.default)(g(),t.path,n),a=i.fields[n],c=(0,o.default)({},t,{path:r,parent:e,originalValue:u[n]});return a&&a.validate?(c.strict=!0,a.validate(e[n],c)):Promise.resolve(!0)}));return(0,S.default)({sync:a,validations:s,value:e,errors:c,endEarly:n,path:t.path,sort:(0,b.default)(i.fields)})}))},concat:function(e){var t=d.default.prototype.concat.call(this,e);return t._nodes=(0,m.default)(t.fields,t._excludedEdges),t},shape:function(e,t){void 0===t&&(t=[]);var n=this.clone(),r=(0,o.default)(n.fields,e);if(n.fields=r,t.length){Array.isArray(t[0])||(t=[t]);var i=t.map((function(e){return e[0]+"-"+e[1]}));n._excludedEdges=n._excludedEdges.concat(i)}return n._nodes=(0,m.default)(r,n._excludedEdges),n},from:function(e,t,n){var r=(0,p.getter)(e,!0);return this.transform((function(i){if(null==i)return i;var a=i;return(0,c.default)(i,e)&&(a=(0,o.default)({},i),n||delete a[e],a[t]=r(i)),a}))},noUnknown:function(e,t){void 0===e&&(e=!0),void 0===t&&(t=v.object.noUnknown),"string"==typeof e&&(t=e,e=!0);var n=this.test({name:"noUnknown",exclusive:!0,message:t,test:function(t){return null==t||!e||0===function(e,t){var n=Object.keys(e.fields);return Object.keys(t).filter((function(e){return-1===n.indexOf(e)}))}(this.schema,t).length}});return n._options.stripUnknown=e,n},unknown:function(e,t){return void 0===e&&(e=!0),void 0===t&&(t=v.object.noUnknown),this.noUnknown(!e,t)},transformKeys:function(e){return this.transform((function(t){return t&&(0,l.default)(t,(function(t,n){return e(n)}))}))},camelCase:function(){return this.transformKeys(s.default)},snakeCase:function(){return this.transformKeys(u.default)},constantCase:function(){return this.transformKeys((function(e){return(0,u.default)(e).toUpperCase()}))},describe:function(){var e=d.default.prototype.describe.call(this);return e.fields=(0,f.default)(this.fields,(function(e){return e.describe()})),e}}),e.exports=t.default},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){var r=n(95)((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));e.exports=r},function(e,t){e.exports=function(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}},function(e,t,n){var r=n(212),i=n(23),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(a,r).replace(o,"")}},function(e,t,n){var r=n(213)({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});e.exports=r},function(e,t){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},function(e,t,n){var r=n(215),i=n(216),a=n(23),o=n(217);e.exports=function(e,t,n){return e=a(e),void 0===(t=n?void 0:t)?i(e)?o(e):r(e):e.match(t)||[]}},function(e,t){var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(n)||[]}},function(e,t){var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return n.test(e)}},function(e,t){var n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="["+n+"]",i="\\d+",a="[\\u2700-\\u27bf]",o="[a-z\\xdf-\\xf6\\xf8-\\xff]",c="[^\\ud800-\\udfff"+n+i+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="[A-Z\\xc0-\\xd6\\xd8-\\xde]",f="(?:"+o+"|"+c+")",p="(?:"+l+"|"+c+")",d="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",v="[\\ufe0e\\ufe0f]?"+d+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",u,s].join("|")+")[\\ufe0e\\ufe0f]?"+d+")*"),m="(?:"+[a,u,s].join("|")+")"+v,b=RegExp([l+"?"+o+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[r,l,"$"].join("|")+")",p+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[r,l+f,"$"].join("|")+")",l+"?"+f+"+(?:['’](?:d|ll|m|re|s|t|ve))?",l+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,m].join("|"),"g");e.exports=function(e){return e.match(b)||[]}},function(e,t,n){var r=n(219),i=n(95)((function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)}));e.exports=i},function(e,t,n){var r=n(23),i=n(220);e.exports=function(e){return i(r(e).toLowerCase())}},function(e,t,n){var r=n(221)("toUpperCase");e.exports=r},function(e,t,n){var r=n(222),i=n(81),a=n(80),o=n(23);e.exports=function(e){return function(t){t=o(t);var n=i(t)?a(t):void 0,c=n?n[0]:t.charAt(0),u=n?r(n,1).join(""):t.slice(1);return c[e]()+u}}},function(e,t,n){var r=n(223);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},function(e,t){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}},function(e,t,n){var r=n(31),i=n(85),a=n(86);e.exports=function(e,t){var n={};return t=a(t,3),i(e,(function(e,i,a){r(n,t(e,i,a),e)})),n}},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=function(e,t){void 0===t&&(t=[]);var n=[],r=[];function s(e,i){var a=(0,o.split)(e)[0];~r.indexOf(a)||r.push(a),~t.indexOf(i+"-"+a)||n.push([i,a])}for(var l in e)if((0,i.default)(e,l)){var f=e[l];~r.indexOf(l)||r.push(l),c.default.isRef(f)&&f.isSibling?s(f.path,l):(0,u.default)(f)&&f._deps&&f._deps.forEach((function(e){return s(e,l)}))}return a.default.array(r,n).reverse()};var i=r(n(17)),a=r(n(226)),o=n(34),c=r(n(25)),u=r(n(14));e.exports=t.default},function(e,t){function n(e,t){var n=e.length,r=new Array(n),i={},a=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),c=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach((function(e){if(!c.has(e[0])||!c.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));a--;)i[a]||u(e[a],a,new Set);return r;function u(e,t,a){if(a.has(e)){var s;try{s=", node was:"+JSON.stringify(e)}catch(e){s=""}throw new Error("Cyclic dependency"+s)}if(!c.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var l=o.get(e)||new Set;if(t=(l=Array.from(l)).length){a.add(e);do{var f=l[--t];u(f,c.get(f),a)}while(t);a.delete(e)}r[--n]=e}}}e.exports=function(e){return n(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)},e.exports.array=n},function(e,t,n){"use strict";function r(e,t){var n=1/0;return e.some((function(e,r){if(-1!==t.path.indexOf(e))return n=r,!0})),n}t.__esModule=!0,t.default=function(e){var t=Object.keys(e);return function(e,n){return r(t,e)-r(t,n)}},e.exports=t.default},function(e,t,n){"use strict";var r=n(93),i=n(6);t.__esModule=!0,t.default=void 0;var a=i(n(16)),o=i(n(94)),c=i(n(22)),u=i(n(35)),s=i(n(14)),l=i(n(96)),f=i(n(33)),p=i(n(11)),d=n(13),v=r(n(54));function m(){var e=(0,o.default)(["","[","]"]);return m=function(){return e},e}var b=h;function h(e){var t=this;if(!(this instanceof h))return new h(e);p.default.call(this,{type:"array"}),this._subType=void 0,this.withMutation((function(){t.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),e&&t.of(e)}))}t.default=b,(0,c.default)(h,p.default,{_typeCheck:function(e){return Array.isArray(e)},_cast:function(e,t){var n=this,r=p.default.prototype._cast.call(this,e,t);if(!this._typeCheck(r)||!this._subType)return r;var i=!1,a=r.map((function(e){var r=n._subType.cast(e,t);return r!==e&&(i=!0),r}));return i?a:r},_validate:function(e,t){var n=this;void 0===t&&(t={});var r=[],i=t.sync,o=t.path,c=this._subType,u=this._option("abortEarly",t),s=this._option("recursive",t),f=null!=t.originalValue?t.originalValue:e;return p.default.prototype._validate.call(this,e,t).catch((0,v.propagateErrors)(u,r)).then((function(e){if(!s||!c||!n._typeCheck(e)){if(r.length)throw r[0];return e}f=f||e;var p=e.map((function(n,r){var i=(0,l.default)(m(),t.path,r),o=(0,a.default)({},t,{path:i,strict:!0,parent:e,originalValue:f[r]});return!c.validate||c.validate(n,o)}));return(0,v.default)({sync:i,path:o,value:e,errors:r,endEarly:u,validations:p})}))},_isPresent:function(e){return p.default.prototype._cast.call(this,e)&&e.length>0},of:function(e){var t=this.clone();if(!1!==e&&!(0,s.default)(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema, or `false` to negate a current sub-schema. not: "+(0,f.default)(e));return t._subType=e,t},min:function(e,t){return t=t||d.array.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return(0,u.default)(t)||t.length>=this.resolve(e)}})},max:function(e,t){return t=t||d.array.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return(0,u.default)(t)||t.length<=this.resolve(e)}})},ensure:function(){var e=this;return this.default((function(){return[]})).transform((function(t){return e.isType(t)?t:null===t?[]:[].concat(t)}))},compact:function(e){var t=e?function(t,n,r){return!e(t,n,r)}:function(e){return!!e};return this.transform((function(e){return null!=e?e.filter(t):e}))},describe:function(){var e=p.default.prototype.describe.call(this);return this._subType&&(e.innerType=this._subType.describe()),e}}),e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var i=r(n(14)),a=function(){function e(e){this._resolve=function(t,n){var r=e(t,n);if(!(0,i.default)(r))throw new TypeError("lazy() functions must return a valid schema");return r.resolve(n)}}var t=e.prototype;return t.resolve=function(e){return this._resolve(e.value,e)},t.cast=function(e,t){return this._resolve(e,t).cast(e,t)},t.validate=function(e,t){return this._resolve(e,t).validate(e,t)},t.validateSync=function(e,t){return this._resolve(e,t).validateSync(e,t)},t.validateAt=function(e,t,n){return this._resolve(t,n).validateAt(e,t,n)},t.validateSyncAt=function(e,t,n){return this._resolve(t,n).validateSyncAt(e,t,n)},e}();a.prototype.__isYupSchema__=!0;var o=a;t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=function(e){Object.keys(e).forEach((function(t){Object.keys(e[t]).forEach((function(n){i.default[t][n]=e[t][n]}))}))};var i=r(n(13));e.exports=t.default},function(e,t,n){"use strict";n.r(t);var r={UPLOAD_IMAGE:"upload:image",VIDEO:"video",SERIES:"series",PLAYLIST:"playlist"},i={Subjects:Object.assign({SUBJECTS:"subjects",NEW_SUBJECT:"new:subject",EDIT_SUBJECT:"edit:subject",EDIT_SUBJECT_PLAYLISTS:"edit:subject:playlists",EDIT_SUBJECT_SERIES:"edit:subject:series",EDIT_SUBJECT_VIDEOS:"edit:subject:videos",SUBJECT_CLASSIFICATIONS:"subject:classifications",DELETE_SUBJECT:"delete:subject",ADD_SUBJECT_MEMBERS:"add:subject:members",REMOVE_SUBJECT_MEMBER:"remove:subject:member",CLASSIFICATIONS:"classifications",PRESENTATION_CLASSIFICATIONS:"presentation:classifications",NEW_CLASSIFICATION:"new:classification",EDIT_CLASSIFICATION:"edit:classification",EDIT_CLASSIFICATION_PLAYLISTS:"edit:classification:playlists",EDIT_CLASSIFICATION_SERIES:"edit:classification:series",EDIT_CLASSIFICATION_VIDEOS:"edit:classification:videos",DELETE_CLASSIFICATION:"delete:classification",REMOVE_CLASSIFICATION_MEMBER:"remove:classification:member",LEVELS:"levels",NEW_LEVEL:"new:level",EDIT_LEVEL:"edit:level",AUDIENCES:"audiences",PRESENTATION_AUDIENCES:"presentation:audiences",NEW_AUDIENCE:"new:audience",EDIT_AUDIENCE:"edit:audience",DELETE_AUDIENCE:"delete:audience",PRESENTATIONS:"presentations",NEW_PRESENTATION:"new:presentation",EDIT_PRESENTATION:"edit:presentation"},r),Playlists:Object.assign({PLAYLISTS:"index",NEW_PLAYLIST:"new:playlist",EDIT_PLAYLIST:"edit:playlist",EDIT_PLAYLIST_VIDEOS:"edit:playlist:videos",EDIT_PLAYLIST_SUBJECTS:"edit:playlist:subjects",DELETE_PLAYLIST:"delete:playlist",REMOVE_VIDEO:"remove:video",SUBJECT:"subject",ADD_SUBJECT_MEMBERS:"add:subject:members",REMOVE_FROM_SUBJECT:"remove:from:subject"},r)},a={SUBJECT:"subject",SUBJECTS:"subjects",UPDATE_SUBJECT:"update:subject",DELETE_SUBJECT:"delete:subject",ADD_TO_SUBJECT:"add:to:subject",REMOVE_FROM_SUBJECT:"remove:from:subject",CLASSIFICATION:"classification",CLASSIFICATIONS:"classifications",UPDATE_CLASSIFICATION:"update:classification",DELETE_CLASSIFICATION:"delete:classification",ADD_TO_CLASSIFICATION:"add:to:classification",REMOVE_FROM_CLASSIFICATION:"remove:from:classification",PRESENTATION:"presentation",PRESENTATIONS:"presentations",UPDATE_PRESENTATION:"update:presentation",LEVEL:"level",LEVELS:"levels",UPDATE_LEVEL:"update:level",AUDIENCE:"audience",AUDIENCES:"audiences",UPDATE_AUDIENCE:"update:audience",DELETE_AUDIENCE:"delete:audience",PLAYLIST:"playlist",PLAYLISTS:"playlists",UPDATE_PLAYLIST:"update:playlist",DELETE_PLAYLIST:"delete:playlist",PLAYLIST_VIDEOS:"playlist:videos",REORDER_PLAYLIST_VIDEOS:"reorder:playlist:videos",REMOVE_PLAYLIST_VIDEO:"remove:playlist:video",VIDEO:"video",SERIES:"series",CURRENT_USER:"current:user",UPLOAD_IMAGE:"upload:image"},o={IMAGES:".".concat(["jpg","tif","png","bmp","gif","jpeg"].join(",."))},c={CURATOR_LAYOUT:"CuratorLayout"},u={PLAYLISTS:"playlists:application",SUBJECTS:"subjects:application"},s={IMAGE_UPLOAD:"image:upload:data:service",PLAYLIST:"playlist:data:service",SUBJECT:"subject:data:service",USER:"user:data:service",VIDEO:"video:data:service",SERIES:"series:data:service"},l={IMAGE_UPLOAD:"ImageUploadDataService",PLAYLIST:"PlaylistDataService",SUBJECT:"SubjectDataService",USER:"UserDataService",VIDEO:"VideoDataService",SERIES:"SeriesDataService"},f=n(0),p=n(2),d=n(1),v=n(97),m=n.n(v),b=n(38),h=n.n(b);function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return!t||"object"!==y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e,t,n){return(E="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=j(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=g(this,j(t).call(this,e))).childComponents={},n}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}(t,e),n=t,i=[{key:"getCacheKey",value:function(){return c.CURATOR_LAYOUT}}],(r=[{key:"regions",value:function(){return{layout:".layout-region"}}},{key:"getChildComponents",value:function(){return{topNav:{component:this.childComponents[d.LayoutRegions.TOP_NAV],className:h.a.topNavRegion},leftNav:{component:this.childComponents[d.LayoutRegions.LEFT_NAV],className:"py-3 ".concat(h.a.leftNavRegion)},content:{component:this.childComponents[d.LayoutRegions.CONTENT],className:"position-relative container py-3"},popup:{component:this.childComponents[d.LayoutRegions.POPUP]},alert:{component:this.childComponents[d.LayoutRegions.ALERT]}}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"renderTopNav",value:function(){p.FunctionHelper.isFunction(this.options.getTopNavView)&&(this.childComponents[d.LayoutRegions.TOP_NAV]=this.options.getTopNavView(p.Core.AppLinkHelper.getCurrentAppLink()))}},{key:"hideLeftNav",value:function(){this.unsetRegion(d.LayoutRegions.LEFT_NAV)}},{key:"closePopup",value:function(){this.unsetRegion(d.LayoutRegions.POPUP)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderTopNav(),this.renderLayout()}},{key:"renderLayout",value:function(){var e=Object.assign({provider:this.options.provider},this.getChildComponents());E(j(t.prototype),"showChildView",this).call(this,"layout",f.createElement(N,Object.assign({},e)))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"CuratorLayoutView"}},{key:"template",get:function(){return m.a}},{key:"className",get:function(){return"container-fluid ".concat(h.a.curatorLayout)}}])&&S(n.prototype,r),i&&S(n,i),t}(p.Core.LayoutView),A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},C=function(e){var t=e.className,n=e.children;return f.createElement("div",{className:t},n)},I=function(e,t){return"".concat(e).concat(t?" ".concat(t):"")},_=function(e){return f.createElement(C,{className:I("top-nav-region",e.className)},e.children)},w=function(e){return f.createElement(C,{className:I("left-nav-region",e.className)},e.children)},x=function(e){return f.createElement("div",{className:"content-container"},f.createElement(C,{className:I("content-region",e.className)},e.children))},F=function(e){return f.createElement(C,{className:I("popup-region",e.className)},e.children)},L=function(e){return f.createElement(C,{className:I("alert-region",e.className)},e.children)},P=function(e){var t=e.topNav,n=e.leftNav,r=e.content,i=e.popup,a=e.alert;return f.createElement(f.Fragment,null,f.createElement("div",{className:"position-relative"},!!t.component&&f.createElement(_,{className:t.className},t.component),!!n.component&&f.createElement(w,{className:n.className},n.component),!!r.component&&f.createElement(x,{className:r.className},r.component)),!!i.component&&f.createElement(F,{className:i.className},i.component),!!a.component&&f.createElement(L,{className:a.className},a.component))},N=function(e){var t=e.provider,n=A(e,["provider"]);return t?f.createElement(t,null,f.createElement(P,Object.assign({},n))):f.createElement(P,Object.assign({},n))};function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t){return!t||"object"!==k(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var V=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),R(this,U(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(t,e),n=t,(r=[{key:"uploadBase64Image",value:function(e,t,n,r){return this.create({resource:"/api/image/upload?type=".concat(t),eventPrefix:a.UPLOAD_IMAGE,data:e,callback:n,errorCallback:r})}},{key:"name",get:function(){return l.IMAGE_UPLOAD}},{key:"channelName",get:function(){return s.IMAGE_UPLOAD}}])&&D(n.prototype,r),i&&D(n,i),t}(p.BaseDataService);function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function J(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $=function(e){return"/api/master/v2/objects/".concat(e)},q=function(e){return"/api/master/v2/objects?".concat(e.map((function(e){return"id=".concat(e)})).join("&"))},W=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),H(this,z(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}(t,e),n=t,(r=[{key:"getSeries",value:function(e,t,n){return this.get({resource:$(e),eventPrefix:"".concat(a.SERIES,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getSeriesById",value:function(e,t,n){return this.get({resource:q(e),eventPrefix:"".concat(a.SERIES,":").concat(e.join(",")),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"name",get:function(){return l.SERIES}},{key:"channelName",get:function(){return s.SERIES}}])&&J(n.prototype,r),i&&J(n,i),t}(p.BaseDataService),K={dataServiceName:l.SERIES,dataChannelName:s.SERIES},G={getSeriesFetchOptions:function(e,t,n){return Object.assign(Object.assign({},K),{eventPrefix:"".concat(a.SERIES,":").concat(e),fetchData:function(t){return t.getSeries(e)},setData:t,onError:n})},getSeriesByIdFetchOptions:function(e,t,n){return Object.assign(Object.assign({},K),{eventPrefix:"".concat(a.SERIES,":").concat(e.join(",")),fetchData:function(t){return t.getSeriesById(e)},setData:t,onError:n})}};function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function X(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ne=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),X(this,ee(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&te(e,t)}(t,e),n=t,(r=[{key:"getCurrentUser",value:function(e,t){return this.get({resource:"/api/currentuser",eventPrefix:a.CURRENT_USER,expiryTime:d.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"name",get:function(){return l.USER}},{key:"channelName",get:function(){return s.USER}}])&&Q(n.prototype,r),i&&Q(n,i),t}(p.BaseDataService),re={dataServiceName:l.USER,dataChannelName:s.USER},ie={getCurrentUserFetchOptions:function(e,t){return Object.assign(Object.assign({},re),{eventPrefix:a.CURRENT_USER,fetchData:function(e){return e.getCurrentUser()},setData:e,onError:t})}};function ae(e){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ce(e,t){return!t||"object"!==ae(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function se(e,t){return(se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var le,fe,pe,de,ve=function(e){return"/api/master/v2/objects/".concat(e)},me=function(e){return"/api/master/v2/objects?".concat(e.map((function(e){return"id=".concat(e)})).join("&"))},be=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ce(this,ue(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&se(e,t)}(t,e),n=t,(r=[{key:"getVideo",value:function(e,t,n){return this.get({resource:ve(e),eventPrefix:"".concat(a.VIDEO,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getVideosById",value:function(e,t,n){return this.get({resource:me(e),eventPrefix:"".concat(a.VIDEO,":").concat(e.join(",")),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"name",get:function(){return l.VIDEO}},{key:"channelName",get:function(){return s.VIDEO}}])&&oe(n.prototype,r),i&&oe(n,i),t}(p.BaseDataService),he={dataServiceName:l.VIDEO,dataChannelName:s.VIDEO},ye={getVideoFetchOptions:function(e,t,n){return Object.assign(Object.assign({},he),{eventPrefix:"".concat(a.VIDEO,":").concat(e),fetchData:function(t){return t.getVideo(e)},setData:t,onError:n})},getVideosByIdFetchOptions:function(e,t,n){return Object.assign(Object.assign({},he),{eventPrefix:"".concat(a.VIDEO,":").concat(e.join(",")),fetchData:function(t){return t.getVideosById(e)},setData:t,onError:n})}};!function(e){e[e.Subject=0]="Subject",e[e.Classification=1]="Classification"}(le||(le={})),function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos"}(fe||(fe={})),function(e){e.Root="0"}(pe||(pe={})),function(e){e.Root="root"}(de||(de={}));var Se=n(4),ge=Se.object().shape({name:Se.string().max(255,"Name is too long").required("Name is required"),levelIds:Se.array().of(Se.string()).required("A level is required")}),Ee=Se.object().shape({name:Se.string().max(255,"Name is too long").required("Name is required"),parentIds:Se.array().of(Se.string()),subjectIds:Se.array().of(Se.string()).min(1,"A classification must be mapped to at least one subject").required("A classification must be mapped to at least one subject"),type:Se.string().required("Type is required")}),je=Se.object().shape({name:Se.string().max(255,"Name is too long").required("Name is required")}),Oe=Se.object().shape({name:Se.string().max(255,"Name is too long").required("Name is required"),description:Se.string().max(65535,"Description is too long").required("Description is required")}),Te=Se.object().shape({name:Se.string().max(255,"Name is too long").required("Name is required"),parentId:Se.string()}),Ae={singularizeMemberType:function(e){switch(e){case fe.Playlists:return"playlist";case fe.Series:return"series";case fe.Videos:return"video"}},getMemberAppLink:function(e,t){var n=[t];switch(e){case fe.Playlists:return{application:u.SUBJECTS,action:i.Subjects.PLAYLIST,args:n};case fe.Series:return{application:u.SUBJECTS,action:i.Subjects.SERIES,args:n};case fe.Videos:return{application:u.SUBJECTS,action:i.Subjects.VIDEO,args:n}}},getMemberActions:function(e,t,n,r){return[{name:"Remove ".concat(Ae.singularizeMemberType(n)),appLink:{application:u.SUBJECTS,action:t===le.Subject?i.Subjects.REMOVE_SUBJECT_MEMBER:i.Subjects.REMOVE_CLASSIFICATION_MEMBER,args:[e,r,n]},className:"text-danger"}]}},Ce={isItemActive:function(e,t){return t||(t=p.Core.AppLinkHelper.getCurrentAppLink()),t.application===e.appLink.application&&(Array.isArray(e.activeActions)?e.activeActions.includes(t.action):t.action===e.appLink.action)},getTopNavItems:function(){var e=u.SUBJECTS,t=i.Subjects;return[{label:"Classifications",appLink:{application:e,action:t.CLASSIFICATIONS},activeActions:[t.CLASSIFICATIONS,t.PRESENTATION_CLASSIFICATIONS,t.NEW_CLASSIFICATION,t.EDIT_CLASSIFICATION,t.EDIT_CLASSIFICATION_PLAYLISTS,t.EDIT_CLASSIFICATION_SERIES,t.EDIT_CLASSIFICATION_VIDEOS,t.DELETE_CLASSIFICATION,t.REMOVE_CLASSIFICATION_MEMBER]},{label:"Subjects",appLink:{application:e,action:t.SUBJECTS},activeActions:[t.SUBJECTS,t.NEW_SUBJECT,t.EDIT_SUBJECT,t.EDIT_SUBJECT_PLAYLISTS,t.EDIT_SUBJECT_SERIES,t.EDIT_SUBJECT_VIDEOS,t.SUBJECT_CLASSIFICATIONS,t.DELETE_SUBJECT,t.ADD_SUBJECT_MEMBERS,t.REMOVE_SUBJECT_MEMBER]},{label:"Audiences",appLink:{application:e,action:t.AUDIENCES},activeActions:[t.AUDIENCES,t.PRESENTATION_AUDIENCES,t.NEW_AUDIENCE,t.EDIT_AUDIENCE]},{label:"Levels",appLink:{application:e,action:t.LEVELS},activeActions:[t.LEVELS,t.NEW_LEVEL,t.EDIT_LEVEL]},{label:"Presentations",appLink:{application:e,action:t.PRESENTATIONS},activeActions:[t.PRESENTATIONS,t.NEW_PRESENTATION,t.EDIT_PRESENTATION]}]},getEditSubjectTabs:function(e){var t=u.SUBJECTS,n=i.Subjects;return[{label:"Edit Subject Details",appLink:{application:t,action:n.EDIT_SUBJECT,args:[e]}},{label:"Classifications",appLink:{application:t,action:n.SUBJECT_CLASSIFICATIONS,args:[e]}},{label:"Playlists",appLink:{application:t,action:n.EDIT_SUBJECT_PLAYLISTS,args:[e]}},{label:"Series",appLink:{application:t,action:n.EDIT_SUBJECT_SERIES,args:[e]}},{label:"Videos",appLink:{application:t,action:n.EDIT_SUBJECT_VIDEOS,args:[e]}}]},getEditClassificationTabs:function(e,t){var n=u.SUBJECTS,r=i.Subjects;return[{label:"Edit Classification Details",appLink:{application:n,action:r.EDIT_CLASSIFICATION,args:[e,t]}},{label:"Playlists",appLink:{application:n,action:r.EDIT_CLASSIFICATION_PLAYLISTS,args:[e,t]}},{label:"Series",appLink:{application:n,action:r.EDIT_CLASSIFICATION_SERIES,args:[e,t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_CLASSIFICATION_VIDEOS,args:[e,t]}}]}};function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _e(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function we(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xe(e,t){return!t||"object"!==Ie(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Le(e,t){return(Le=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Pe=function(){return"/api/subjects/v1/subjects/tree"},Ne=function(e){return"/api/subjects/v1/subjects/".concat(e)},ke=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/").concat(t,"?query={limit:100}")},De=function(e,t,n){var r="/api/subjects/v1/subjects/".concat(e,"/classifications"),i=[];return t&&i.push("presentationId=".concat(t)),n&&i.push("query=".concat(n,"{limit:100}")),i.length?"".concat(r,"?").concat(i.join("&")):r},Re=function(){return"/api/subjects/v1/subjects"},Ue=function(e){return"/api/subjects/v1/subjects/".concat(e)},Be=function(e){return"/api/subjects/v1/subjects/".concat(e)},Ve=function(e){return"/api/subjects/v1/objects/".concat(e,"/subjects")},Me=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?addToClassifications=").concat(!!t)},Je=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},He=function(){return"/api/subjects/v1/presentations"},ze=function(e){return"/api/subjects/v1/presentations/".concat(e)},Ye=function(){return"/api/subjects/v1/presentations"},$e=function(e){return"/api/subjects/v1/presentations/".concat(e)},qe=function(e){return"/api/subjects/v1/presentations/".concat(e,"/classifications/tree")},We=function(e){return"/api/subjects/v1/classifications/".concat(e,"?query=thumbnail,banner")},Ke=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/").concat(t,"?query={limit:100}")},Ge=function(){return"/api/subjects/v1/classifications"},Ze=function(e){return"/api/subjects/v1/classifications/".concat(e)},Qe=function(e){return"/api/subjects/v1/classifications/".concat(e)},Xe=function(e){return"/api/subjects/v1/classifications/".concat(e,"/objects")},et=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},tt=function(){return"/api/subjects/v1/levels"},nt=function(e){return"/api/subjects/v1/levels/".concat(e)},rt=function(){return"/api/subjects/v1/levels"},it=function(e){return"/api/subjects/v1/levels/".concat(e)},at=function(e){return"/api/subjects/v1/presentations/".concat(e,"/audiences")},ot=function(e){return"/api/subjects/v1/audiences/".concat(e)},ct=function(){return"/api/subjects/v1/audiences"},ut=function(e){return"/api/subjects/v1/audiences/".concat(e)},st=function(e){return"/api/subjects/v1/audiences/".concat(e)},lt=function(e){return e.data},ft=function(e,t,n){var r="".concat(a.SUBJECT,":").concat(e);return t&&(r+=":".concat(t)),r+=":".concat(a.CLASSIFICATIONS),n&&(r+=":".concat(n)),r},pt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),xe(this,Fe(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Le(e,t)}(t,e),n=t,(r=[{key:"getSubjectTree",value:function(e,t){return this.get({resource:Pe(),formatData:function(e){return{children:e.data,name:pe.Root,id:null}},eventPrefix:a.SUBJECTS,expiryTime:d.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"getSubject",value:function(e,t,n){return this.get({resource:Ne(e),formatData:lt,eventPrefix:"".concat(a.SUBJECT,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getSubjectMemberIds",value:function(e,t,n,r){return this.get({resource:ke(e,t),formatData:lt,eventPrefix:"".concat(a.SUBJECT,":").concat(e,":").concat(t),expiryTime:d.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"getSubjectClassifications",value:function(e,t,n,r,i){return this.get({resource:De(e,t,n),eventPrefix:ft(e,t,n),expiryTime:d.CacheDurations.STANDARD,callback:r,errorCallback:i})}},{key:"createSubject",value:function(e,t,n){return this.create({resource:Re(),data:e,formatData:lt,callback:t,errorCallback:n,eventPrefix:a.SUBJECT,invalidationKeys:[a.SUBJECTS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created subject."),errorHandler:this.alertService.error("Failed to create subject.")})}},{key:"updateSubject",value:function(e,t,n,r){return this.update({resource:Ue(e),data:t,formatData:lt,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_SUBJECT,":").concat(e),invalidationKeys:["".concat(a.SUBJECT,":").concat(e),a.SUBJECTS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated subject."),errorHandler:this.alertService.error("Failed to save subject.")})}},{key:"deleteSubject",value:function(e,t,n){return this.delete({resource:Be(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_SUBJECT,invalidationKeys:["".concat(a.SUBJECT,":").concat(e),a.SUBJECTS],successHandler:this.alertService.success("Successfully deleted subject"),errorHandler:this.alertService.error("Failed to delete subject")})}},{key:"getObjectSubjects",value:function(e,t,n,r){return this.get({resource:Ve(e),formatData:lt,eventPrefix:"".concat(t,":").concat(e,":").concat(a.SUBJECTS),expiryTime:d.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"addObjectsToSubject",value:function(e,t,n,r,i,o){var c=1===t.length?Ae.singularizeMemberType(n):n,u=["".concat(a.SUBJECT,":").concat(e,":").concat(n)].concat(_e(t.map((function(e){return"".concat(n,":").concat(e,":").concat(a.SUBJECTS)}))));return this.create({resource:Me(e,r),data:t,formatData:lt,callback:i,errorCallback:o,eventPrefix:"".concat(a.ADD_TO_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:u,expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(c," to subject.")),errorHandler:this.alertService.error("Failed to add ".concat(c," to subject."))})}},{key:"removeObjectsFromSubject",value:function(e,t,n,r,i){var o=1===t.length?Ae.singularizeMemberType(n):n,c=["".concat(a.SUBJECT,":").concat(e,":").concat(n)].concat(_e(t.map((function(e){return"".concat(n,":").concat(e,":").concat(a.SUBJECTS)}))));return this.delete({resource:Je(e,t),callback:r,errorCallback:i,eventPrefix:"".concat(a.REMOVE_FROM_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:c,expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(o," from subject.")),errorHandler:this.alertService.error("Failed to remove ".concat(o," from subject."))})}},{key:"getPresentations",value:function(e,t){return this.get({resource:He(),formatData:lt,eventPrefix:a.PRESENTATIONS,expiryTime:d.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"getPresentation",value:function(e,t,n){return this.get({resource:ze(e),formatData:lt,eventPrefix:"".concat(a.PRESENTATION,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"createPresentation",value:function(e,t,n){return this.create({resource:Ye(),data:e,formatData:lt,callback:t,errorCallback:n,eventPrefix:a.PRESENTATION,invalidationKeys:[a.PRESENTATIONS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created presentation."),errorHandler:this.alertService.error("Failed to create presentation.")})}},{key:"updatePresentation",value:function(e,t,n,r){return this.update({resource:$e(e),data:t,formatData:lt,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_PRESENTATION,":").concat(e),invalidationKeys:["".concat(a.PRESENTATION,":").concat(e),a.PRESENTATIONS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated presentation."),errorHandler:this.alertService.error("Failed to update presentation.")})}},{key:"getClassificationTree",value:function(e,t,n){return this.get({resource:qe(e),formatData:function(e){return{children:e.data,name:de.Root,id:null}},eventPrefix:"".concat(a.CLASSIFICATIONS,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getClassification",value:function(e,t,n){return this.get({resource:We(e),formatData:lt,eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getClassificationMembers",value:function(e,t,n,r){return this.get({resource:Ke(e,t),formatData:lt,eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e,":").concat(t),expiryTime:d.CacheDurations.STANDARD,callback:n,errorCallback:r})}},{key:"createClassification",value:function(e,t,n){return this.create({resource:Ge(),data:e,formatData:lt,callback:t,errorCallback:n,eventPrefix:a.CLASSIFICATION,invalidationKeys:[a.CLASSIFICATIONS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created classification."),errorHandler:this.alertService.error("Failed to create classification.")})}},{key:"updateClassification",value:function(e,t,n,r){return this.update({resource:Ze(e),data:t,formatData:lt,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_CLASSIFICATION,":").concat(e),invalidationKeys:["".concat(a.CLASSIFICATION,":").concat(e),a.CLASSIFICATIONS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated classification."),errorHandler:this.alertService.error("Failed to save classification.")})}},{key:"deleteClassification",value:function(e,t,n){return this.delete({resource:Qe(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_CLASSIFICATION,invalidationKeys:["".concat(a.CLASSIFICATION,":").concat(e),a.CLASSIFICATIONS],successHandler:this.alertService.success("Successfully deleted classification"),errorHandler:this.alertService.error("Failed to delete classification")})}},{key:"addObjectsToClassification",value:function(e,t,n,r,i,o,c){var u=1===t.length?Ae.singularizeMemberType(n):n,s=["".concat(a.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&s.push(ft(r,i,n)),this.create({resource:Xe(e),data:t,formatData:lt,callback:o,errorCallback:c,eventPrefix:"".concat(a.ADD_TO_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:s,expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(u," to classification.")),errorHandler:this.alertService.error("Failed to add ".concat(u," to classification."))})}},{key:"removeObjectsFromClassification",value:function(e,t,n,r,i,o,c){var u=1===t.length?Ae.singularizeMemberType(n):n,s=["".concat(a.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&s.push(ft(r,i,n)),this.delete({resource:et(e,t),callback:o,errorCallback:c,eventPrefix:"".concat(a.REMOVE_FROM_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:s,expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(u," from classification.")),errorHandler:this.alertService.error("Failed to remove ".concat(u," from classification."))})}},{key:"getLevels",value:function(e,t){return this.get({resource:tt(),formatData:lt,eventPrefix:a.LEVELS,expiryTime:d.CacheDurations.STANDARD,callback:e,errorCallback:t})}},{key:"getLevel",value:function(e,t,n){return this.get({resource:nt(e),formatData:lt,eventPrefix:"".concat(a.LEVEL,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"createLevel",value:function(e,t,n){return this.create({resource:rt(),data:e,formatData:lt,callback:t,errorCallback:n,eventPrefix:a.LEVEL,invalidationKeys:[a.LEVELS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created level."),errorHandler:this.alertService.error("Failed to create level.")})}},{key:"updateLevel",value:function(e,t,n,r){return this.update({resource:it(e),data:t,formatData:lt,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_LEVEL,":").concat(e),invalidationKeys:["".concat(a.LEVEL,":").concat(e),a.LEVELS],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated level."),errorHandler:this.alertService.error("Failed to save level.")})}},{key:"getAudiences",value:function(e,t,n){return this.get({resource:at(e),formatData:lt,callback:t,errorCallback:n,eventPrefix:"".concat(a.AUDIENCES,":").concat(e),expiryTime:d.CacheDurations.STANDARD})}},{key:"getAudience",value:function(e,t,n){return this.get({resource:ot(e),formatData:lt,callback:t,errorCallback:n,eventPrefix:"".concat(a.AUDIENCE,":").concat(e),expiryTime:d.CacheDurations.STANDARD})}},{key:"createAudience",value:function(e,t,n){return this.create({resource:ct(),data:e,formatData:lt,callback:t,errorCallback:n,eventPrefix:a.AUDIENCE,invalidationKeys:[a.AUDIENCES],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created audience."),errorHandler:this.alertService.error("Failed to create audience.")})}},{key:"updateAudience",value:function(e,t,n,r){return this.update({resource:ut(e),data:t,formatData:lt,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_AUDIENCE,":").concat(e),invalidationKeys:["".concat(a.AUDIENCE,":").concat(e),a.AUDIENCES],expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated audience."),errorHandler:this.alertService.error("Failed to update audience.")})}},{key:"deleteAudience",value:function(e,t,n){return this.delete({resource:st(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_AUDIENCE,invalidationKeys:["".concat(a.AUDIENCE,":").concat(e),a.AUDIENCES],successHandler:this.alertService.success("Successfully deleted audience"),errorHandler:this.alertService.error("Failed to delete audience")})}},{key:"name",get:function(){return l.SUBJECT}},{key:"channelName",get:function(){return s.SUBJECT}}])&&we(n.prototype,r),i&&we(n,i),t}(p.BaseDataService),dt={dataServiceName:l.SUBJECT,dataChannelName:s.SUBJECT},vt={getSubjectTreeFetchOptions:function(e,t){return Object.assign(Object.assign({},dt),{eventPrefix:a.SUBJECTS,fetchData:function(e){return e.getSubjectTree()},setData:e,onError:t})},getSubjectFetchOptions:function(e,t,n){return Object.assign(Object.assign({},dt),{eventPrefix:"".concat(a.SUBJECT,":").concat(e),fetchData:function(t){return t.getSubject(e)},setData:t,onError:n,deleteEventPrefix:a.DELETE_SUBJECT})},getSubjectMemberIdsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},dt),{eventPrefix:"".concat(a.SUBJECT,":").concat(e,":").concat(t),fetchData:function(n){return n.getSubjectMemberIds(e,t)},setData:n,onError:r})},getSubjectClassificationFetchOptions:function(e,t,n,r,i){return Object.assign(Object.assign({},dt),{eventPrefix:ft(e,n,r),fetchData:function(t){return t.getSubjectClassifications(e,n,r)},setData:t,onError:i})},getObjectSubjectsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},dt),{eventPrefix:"".concat(t,":").concat(e,":").concat(a.SUBJECTS),fetchData:function(n){return n.getObjectSubjects(e,t)},setData:n,onError:r})},getPresentationsFetchOptions:function(e,t){return Object.assign(Object.assign({},dt),{eventPrefix:a.PRESENTATIONS,fetchData:function(e){return e.getPresentations()},setData:e,onError:t})},getPresentationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},dt),{eventPrefix:"".concat(a.PRESENTATION,":").concat(e),fetchData:function(t){return t.getPresentation(e)},setData:t,onError:n})},getClassificationTreeFetchOptions:function(e,t,n){return Object.assign(Object.assign({},dt),{eventPrefix:"".concat(a.CLASSIFICATIONS,":").concat(e),fetchData:function(t){return t.getClassificationTree(e)},setData:t,onError:n})},getClassificationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},dt),{eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e),fetchData:function(t){return t.getClassification(e)},setData:t,onError:n,deleteEventPrefix:a.DELETE_CLASSIFICATION})},getClassificationMembersFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},dt),{eventPrefix:"".concat(a.CLASSIFICATION,":").concat(e,":").concat(t),fetchData:function(n){return n.getClassificationMembers(e,t)},setData:n,onError:r})},getLevelsFetchOptions:function(e,t){return Object.assign(Object.assign({},dt),{eventPrefix:a.LEVELS,fetchData:function(e){return e.getLevels()},setData:e,onError:t})},getLevelFetchOptions:function(e,t,n){return Object.assign(Object.assign({},dt),{eventPrefix:"".concat(a.LEVEL,":").concat(e),fetchData:function(t){return t.getLevel(e)},setData:t,onError:n})},getAudiencesFetchOptions:function(e,t,n){return Object.assign(Object.assign({},dt),{eventPrefix:"".concat(a.AUDIENCES,":").concat(e),fetchData:function(t){return t.getAudiences(e)},setData:t,onError:n})},getAudienceFetchOptions:function(e,t,n){return Object.assign(Object.assign({},dt),{eventPrefix:"".concat(a.AUDIENCE,":").concat(e),fetchData:function(t){return t.getAudience(e)},setData:t,onError:n})}},mt=n(36);function bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ht=f.createContext(void 0),yt=function(e){var t=e.children,n=bt(f.useState(),2),r=n[0],i=n[1],a=bt(f.useState(!1),2),o=a[0],c=a[1],u=bt(f.useState(),2),s=u[0],l=u[1],p={getDataUrl:function(){var e=r;return i(null),e},setDataUrl:i,imageUploaded:o,getImage:function(){var e=s;return l(null),c(!1),e},setImage:function(e){l(e),c(!0)}};return f.createElement(ht.Provider,{value:p},t)};function St(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var gt=f.createContext(void 0);function Et(e){var t=e.children,n=St(f.useState(),2),r=n[0],i=n[1];return Object(p.useFetch)(d.UserDataServiceHelper.getCurrentUserFetchOptions(i),[]),f.createElement(gt.Provider,{value:r},t)}var jt=n(3),Ot=n(56),Tt=n.n(Ot);function At(e){var t=e.className,n=void 0===t?"":t,r=e.actions,i=e.alignLeft;if(!r||!r.length)return f.createElement(f.Fragment,null);var a="".concat(Tt.a.dropdown," cursor-pointer rounded-circle");n&&(a+=" ".concat(n));var o="actions-dropdown-".concat(p.RandomHelper.getRandomInt());return f.createElement(jt.Dropdown,{className:a,alignRight:!i},f.createElement(jt.Dropdown.Toggle,{as:"a",id:o,className:Tt.a.dropdownToggle},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.More,size:d.SvgContainerSize.Standard})),f.createElement(jt.Dropdown.Menu,null,r.map((function(e,t){return f.createElement(jt.Dropdown.Item,{key:t,as:d.AppLink,appLink:e.appLink,className:e.className||""},e.name)}))))}function Ct(e){var t=e.backToName,n=e.appLink;return f.createElement(d.AppLink,{appLink:n,className:"d-inline-flex align-items-center"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.ArrowLeft,size:d.SvgContainerSize.Small}),f.createElement("span",{className:"ml-1"},"Back to ".concat(t)))}function It(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var _t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function wt(e){var t=e.selected,n=e.onToggle,r=_t(e,["selected","onToggle"]),i=It(f.useState(t),2),a=i[0],o=i[1];f.useEffect((function(){return o(t)}),[t]);return f.createElement(jt.Form.Check,Object.assign({type:"checkbox",id:"checkbox-".concat(p.RandomHelper.getRandomInt()),checked:a,onChange:function(){o(!a),n(!a)}},r))}function xt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ft(e){var t=e.title,n=e.onClickConfirm,r=e.confirmButtonText,i=e.cancelButtonText,a=e.closePopup,o=xt(f.useState(!1),2),c=o[0],u=o[1],s=[{variant:"link",onClick:a,buttonText:i},{variant:"primary",onClick:function(){u(!0),n()},buttonText:r,isSpinnerButton:!0,showSpinner:c}];return f.createElement(on,{title:t,closePopup:a},f.createElement(f.Fragment,null,e.children,f.createElement(ln,{buttons:s})))}Ft.defaultProps={confirmButtonText:"Confirm",cancelButtonText:"Cancel"};var Lt=n(5),Pt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Nt(e){var t=e.onFileSelect,n=e.acceptMultiple,r=e.mimeType,i=e.label,a=e.error,o=e.touched,c=Pt(e,["onFileSelect","acceptMultiple","mimeType","label","error","touched"]),u="custom-file-input cursor-pointer";a&&o&&(u+=" is-invalid");var s=Object.assign({type:"file",className:u,onChange:function(e){var n=e.currentTarget.files;n&&n.length&&p.FunctionHelper.isFunction(t)&&t(n)},autoComplete:"off",value:"",multiple:!!n},r?{accept:r}:{});return f.createElement("div",{className:"form-group"},f.createElement("div",{className:"custom-file"},f.createElement(Lt.Field,Object.assign({},s,c),e.children),f.createElement(jt.Form.Label,{className:"custom-file-label",htmlFor:c.id},i)))}var kt,Dt={onFileSelect:function(e,t,n){if(t&&t.length){var r=new FileReader;r.addEventListener("load",(function(){return Dt.onReaderLoad(r,e,n)})),r.readAsDataURL(t[0])}},onReaderLoad:function(e,t,n){var r=new Image;r.src=e.result;var i=d.ImageMinDimensions[t].width,a=d.ImageMinDimensions[t].height;r.addEventListener("load",(function(){Dt.isImageValid(t,r)&&p.FunctionHelper.isFunction(n)?n(r):alert("Image too small: minimum dimensions are ".concat(i," x ").concat(a))}))},isImageValid:function(e,t){var n=d.ImageMinDimensions[e].width,r=d.ImageMinDimensions[e].height;return!(n&&t.width<n)&&!(r&&t.height<r)}};!function(e){e.Developer="Curator Devs",e.Curator="Curators",e.Support="Support",e.SalesSupport="Sales Support"}(kt||(kt={}));var Rt=function(){return[{value:"protected",access:"r"}]},Ut=function(e){return zt.getGroupNames(e).includes(kt.Developer)},Bt={propsLoaded:function(e){return Object.values(e).every((function(e){return!!e}))}},Vt={isEqual:function(e,t){return!!e&&!!t&&e.toString()===t.toString()},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}};function Mt(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Jt,Ht={find:function(e,t){if(e&&e.children&&e.children.length)for(var n=function e(n){if(Vt.isEqual(n.id,t))return n;var r=n.children;if(r&&r.length)for(var i=0;i<r.length;i++){var a=e(r[i]);if(a)return a}},r=0;r<e.children.length;r++){var i=n(e.children[r]);if(i)return i}},getPath:function(e,t){for(var n=[t],r=function(e){return e.hasOwnProperty("parentIds")&&Array.isArray(e.parentIds)&&e.parentIds.length?e.parentIds[0]:e.hasOwnProperty("parentId")?e.parentId:null},i=r(t);i;){var a=Ht.find(e,i);a&&(n=[a].concat(Mt(n))),i=a?r(a):null}return n}},zt={getGroupNames:function(e){return e&&e.groups?e.groups.map((function(e){return e.name})):[]}};function Yt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function $t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Wt=($t(Jt={},d.ImageType.Thumbnails,"Thumbnail"),$t(Jt,d.ImageType.Banners,"Banner"),$t(Jt,d.ImageType.Avatars,"Avatar"),$t(Jt,d.ImageType.Logos,"Logo"),$t(Jt,d.ImageType.Covers,"Cover"),Jt);function Kt(e){var t=e.imageType,n=e.currentImage,r=e.setNewImage,i=e.application,a=e.uploadAction,c=qt(e,["imageType","currentImage","setNewImage","application","uploadAction"]),u=f.useContext(ht),s=u.setDataUrl,l=u.getImage,v=u.imageUploaded,m=Yt(f.useState(!1),2),b=m[0],h=m[1],y=Yt(f.useState(n),2),S=y[0],g=y[1],E=Yt(f.useState(!1),2),j=E[0],O=E[1],T=function(e){h(!0),s(e.src),p.Core.AppLinkHelper.trigger({application:i,action:a,args:[t]})};return f.useEffect((function(){if(b){var e=l();e&&(h(!1),g(e),r({fileId:e.id,fileIdType:d.FileIdType.ImageAPIv2}))}}),[v]),f.createElement("div",{className:"form-group"},f.createElement("div",{className:"form-control h-auto py-2"},f.createElement("label",null,Wt[t]),f.createElement(Nt,Object.assign({label:"Choose a ".concat(Wt[t].toLowerCase()),name:"thumbnail",mimeType:o.IMAGES,onFileSelect:function(e){return Dt.onFileSelect(t,e,T)}},c)),!!S&&!!S.url&&f.createElement(f.Fragment,null,!j&&f.createElement("div",{className:"pb-2 ".concat(t===d.ImageType.Banners?"w-100":"w-50")},f.createElement("img",{src:d.ImageHelper.createUrl(S.url),className:"img img-fluid"})),f.createElement("div",{className:"d-flex justify-content-center"},f.createElement(d.SvgContainer,{svgName:j?d.cvSvgLibrary.ChevronDown:d.cvSvgLibrary.ChevronUp,size:d.SvgContainerSize.Large,className:"svg-container cursor-pointer",onClick:function(){return O(!j)},title:j?"Show image":"Hide image",tooltipPlacement:"top"})))))}var Gt,Zt=n(98),Qt=n.n(Zt);function Xt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}!function(e){e[e.NoRestrictions=0]="NoRestrictions",e[e.RestrictToCanvas=1]="RestrictToCanvas"}(Gt||(Gt={}));var en=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/,tn=function(e){var t=e.match(en);if(t)return t[1]};function nn(e){var t=e.dataUrl,n=e.minHeight,r=e.minWidth,i=e.onCrop,a=e.onCancel,o=f.useRef(),c=f.useRef(),u=Xt(f.useState(!1),2),s=u[0],l=u[1],v=Xt(f.useState(!1),2),m=v[0],b=v[1];return f.useEffect((function(){var e=new Image;e.src=t;var i=o.current.offsetWidth/e.width;return c.current=new Qt.a(o.current,{viewMode:Gt.RestrictToCanvas,autoCropArea:1,aspectRatio:r/n,minCropBoxWidth:r*i,minCropBoxHeight:n*i,ready:function(){return l(!0)}}),function(){return c.current.destroy()}}),[]),f.createElement(f.Fragment,null,f.createElement("div",{className:"pb-3"},f.createElement("img",{ref:o,src:t,className:"img img-fluid mw-100"})),f.createElement("div",{className:"d-flex justify-content-end border-top pt-3"},f.createElement(jt.Button,{variant:"link",onClick:a},"Cancel"),f.createElement(d.SpinnerButton,{onClick:function(){if(s){b(!0);var e=c.current.getCroppedCanvas().toDataURL(tn(t));p.FunctionHelper.isFunction(i)&&i(e)}},disabled:!s,showSpinner:m},"Crop")))}var rn=function(e){var t=e.object,n=e.actions;return f.createElement("div",{className:"d-flex justify-content-between py-2"},!!t&&f.createElement("h6",null,t.name),!!n&&f.createElement("span",null,f.createElement(At,{actions:n})))};function an(){return f.createElement("div",{className:"text-center p-5"},f.createElement(jt.Spinner,{as:"div",animation:"border",role:"status"}))}function on(e){var t=e.title,n=e.closeButton,r=void 0===n||n,i=e.closePopup,a=e.onEntered,o=e.showLoadingSpinner,c=Object.assign({show:!0,onHide:i},p.FunctionHelper.isFunction(a)?{onEntered:a}:{});return f.createElement(jt.Modal,Object.assign({},c),!!t&&f.createElement(jt.Modal.Header,{closeButton:r},f.createElement(jt.Modal.Title,null,t)),o?f.createElement(an,null):f.createElement(jt.Modal.Body,null,e.children))}var cn,un=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};!function(e){e.Button="button",e.Reset="reset",e.Submit="submit"}(cn||(cn={}));var sn=function(e,t){var n=e.buttonText,r=e.type,i=void 0===r?cn.Button:r,a=e.isSpinnerButton,o=e.showSpinner,c=void 0!==o&&o,u=e.className,s=un(e,["buttonText","type","isSpinnerButton","showSpinner","className"]),l=Object.assign({key:t,type:i,className:"ml-2".concat(u?" ".concat(u):"")},s);return a?f.createElement(d.SpinnerButton,Object.assign({showSpinner:c},l),n):f.createElement(jt.Button,Object.assign({},l),n)};function ln(e){var t=e.buttons;return f.createElement("div",{className:"d-flex justify-content-end border-top pt-3 px-3 mx-n3"},t.map((function(e,t){return sn(e,t)})))}var fn=function(e){var t=e.subject,n=e.getSubjectAppLink,r=e.getActions;return f.createElement("tr",null,f.createElement("td",null,f.createElement(d.AppLink,{appLink:n(t)},t.name)),p.FunctionHelper.isFunction(r)&&f.createElement("td",null,f.createElement("span",{className:"d-flex justify-content-end"},f.createElement(At,{actions:r(t)}))))},pn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},dn=function(e){var t=e.getActions;return f.createElement("thead",null,f.createElement("tr",null,f.createElement("th",null,"Subject Name"),!!t&&f.createElement("th",null)))},vn=function(e){var t=e.subjects,n=pn(e,["subjects"]);return f.createElement("tbody",null,t.map((function(e){return f.createElement(fn,Object.assign({key:e.id,subject:e},n))})))};function mn(e){var t=e.emptyMessage,n=pn(e,["emptyMessage"]);return n.subjects.length?f.createElement(jt.Table,{responsive:!0},f.createElement(dn,Object.assign({},n)),f.createElement(vn,Object.assign({},n))):f.createElement("div",null,t)}function bn(e){var t=e.tabs,n=e.isItemActive;return f.createElement(jt.Nav,{fill:!0,variant:"tabs"},t.map((function(e,t){return f.createElement(jt.Nav.Item,{key:t},f.createElement(jt.Nav.Link,{as:d.AppLink,appLink:e.appLink,active:n(e)},e.label))})))}mn.defaultProps={emptyMessage:"There are no subjects in this list."},bn.defaultProps={isItemActive:Ce.isItemActive};var hn=n(7),yn=n.n(hn);function Sn(e){var t=e.name,n=e.appLink,r=e.onSelect,i=e.isDisabled,a=e.className,o=e.actions,c=yn.a.text;return a&&(c+=" ".concat(a)),i?f.createElement("a",{className:"".concat(c," text-muted ").concat(yn.a.disabled)},t):f.createElement(f.Fragment,null,n?f.createElement(d.AppLink,{appLink:n,className:c},t):f.createElement("a",{onClick:r,className:c},t),!!o&&f.createElement(At,{className:yn.a.actions,actions:o}))}function gn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function En(e){var t=e.tree,n=e.selectedIds,r=e.getAppLink,i=e.onSelect,a=e.isDisabled,o=e.actions,c=Array.isArray(n)&&n.some((function(e){return Vt.isEqual(t.id,e)})),u=f.useMemo((function(){return!c&&Array.isArray(n)&&n.some((function(e){return Ht.find(t,e)}))}),[n]),s=gn(f.useState(u),2),l=s[0],v=s[1],m=!!t.children&&!!t.children.length,b={name:t.name,appLink:p.FunctionHelper.isFunction(r)?r(t):null,onSelect:p.FunctionHelper.isFunction(i)?function(){return i(t)}:null,isDisabled:!!p.FunctionHelper.isFunction(a)&&a(t),className:c&&yn.a.selected||u&&yn.a.parentOfSelected,actions:!!o&&o.map((function(e){return Object.assign(Object.assign({},e),{appLink:e.getAppLink(t)})}))};return f.createElement("li",{className:"position-relative".concat(l?"":" ".concat(yn.a.collapsed))},f.createElement("div",{className:"position-relative"},f.createElement("span",{className:yn.a.node},m&&f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.ChevronDown,size:d.SvgContainerSize.Small,className:"svg-container ".concat(yn.a.chevron),onClick:function(){return v(!l)}}),f.createElement(Sn,Object.assign({},b))),l&&f.createElement(On,Object.assign({},e))))}var jn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function On(e){var t=e.tree,n=jn(e,["tree"]);return t&&t.children?f.createElement("ul",{className:"m-0 p-0 ".concat(yn.a.tree)},t.children.map((function(e){return f.createElement(En,Object.assign({key:e.id,tree:e},n))}))):f.createElement(f.Fragment,null)}var Tn={getChord:function(e,t){return Ht.getPath(e,t).map((function(e){return e.name})).join(" -> ")},getState:function(e,t){var n={};return Array.isArray(e)&&e.forEach((function(e){var r,i,a,o=Ht.find(t,e);o&&(n=Object.assign((r={},i=e,a=Tn.getChord(t,o),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r),n))})),n},isNodeDisabled:function(e,t,n,r){return r?n.some((function(n){if(n===e.id)return!0;var r=Ht.find(t,n);return!!Ht.find(r,e.id)})):n.includes(e.id)}};function An(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Cn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function In(e){var t=e.onSelect,n=e.label,r=e.hideCollapseBtn,i=e.collapse,a=e.noSelectionMessage,o=e.disabledIds,c=void 0===o?[]:o,u=e.disableChildren,s=e.getSelectedItemAppLink,l=Cn(e,["onSelect","label","hideCollapseBtn","collapse","noSelectionMessage","disabledIds","disableChildren","getSelectedItemAppLink"]),v=l.tree,m=l.selectedIds,b=An(f.useState(Tn.getState(m,v)),2),h=b[0],y=b[1];f.useEffect((function(){return y(Tn.getState(m,v))}),[m]);var S=An(f.useState(!!i),2),g=S[0],E=S[1];f.useEffect((function(){return E(!!i)}),[i]);var j=f.useCallback((function(e){return p.FunctionHelper.isFunction(t)&&t(e)}),[t]),O=f.useCallback((function(e){return Tn.isNodeDisabled(e,v,c,u)}),[v,c,u]),T=!r||!!n;return f.createElement(f.Fragment,null,T&&f.createElement("div",{className:"pb-2"},!!n&&f.createElement("label",{className:"m-0"},n),!r&&f.createElement("a",{className:"float-right cursor-pointer",onClick:function(){return E(!g)}},g?"Expand":"Collapse")),!g&&f.createElement("div",{className:"py-2 border-top"},f.createElement(On,Object.assign({onSelect:j,isDisabled:O},l))),(!p.ObjectHelper.isEmpty(h)||!!a)&&f.createElement("div",{className:"py-2 border-top"},f.createElement("label",null,"Selected:"),f.createElement("ul",{className:"m-0"},p.ObjectHelper.isEmpty(h)?f.createElement("li",null,a):Object.keys(h).map((function(e,t){return f.createElement("li",{key:t},p.FunctionHelper.isFunction(s)?f.createElement(d.AppLink,{appLink:s(e)},h[e]):h[e])})))))}var _n=n(37),wn=function(e){var t="bg-white";return e&&(t+=" ".concat(e)),t};function xn(e){var t=e.video,n=e.getVideoAppLink,r=e.getVideoActions,i=e.className,a=void 0===i?"":i,o=e.itemNumber,c=p.FunctionHelper.isFunction(n)&&n(t);return f.createElement("tr",{className:wn(a)},!!o&&f.createElement("td",null,f.createElement("span",null,o)),f.createElement("td",null,c?f.createElement(d.AppLink,{appLink:c},t.name):t.name),p.FunctionHelper.isFunction(r)&&f.createElement("td",null,f.createElement("span",{className:"d-flex justify-content-end"},f.createElement(At,{actions:r(t)}))))}var Fn=Object(_n.SortableElement)((function(e){return f.createElement(xn,Object.assign({sortable:!0},e))})),Ln=n(15),Pn=n.n(Ln),Nn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},kn=function(e){var t=e.sortable,n=e.getVideoActions;return f.createElement("thead",null,f.createElement("tr",null,!!t&&f.createElement("th",null,"#"),f.createElement("th",null,"Name"),!!n&&f.createElement("th",null)))},Dn=f.forwardRef((function(e,t){var n=e.videos,r=e.sortable,i=Nn(e,["videos","sortable"]);return f.createElement("tbody",{ref:t},!d.CollectionHelper.isEmpty(n)&&n.data.map((function(e,t){return r?f.createElement(Fn,Object.assign({key:e.id,index:t,itemNumber:t+1,video:e,className:Pn.a.draggableVideoItem},i)):f.createElement(xn,Object.assign({video:e},i))})))}));var Rn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Un=Object(_n.SortableContainer)((function(e){var t=e.forwardedRef,n=Rn(e,["forwardedRef"]);return f.createElement(Dn,Object.assign({sortable:!0,ref:t},n))})),Bn=function(e){return function(t){var n=t.node,r=e.current;if(r){r.classList.add(Pn.a.sortingContainer);var i=r.querySelector(".".concat(Pn.a.draggedVideoItem));n.childNodes.forEach((function(e,t){return i.childNodes[t].style.width="".concat(e.offsetWidth,"px")}))}}},Vn=function(e,t){return function(n){var r=e.current;r&&r.classList.remove(Pn.a.sortingContainer),t(n.oldIndex,n.newIndex)}};function Mn(e){var t=e.onSortEnd,n=e.emptyMessage,r=Rn(e,["onSortEnd","emptyMessage"]),i=f.useRef();return d.CollectionHelper.isEmpty(e.videos)?f.createElement("div",null,n):f.createElement(jt.Table,{responsive:!0},f.createElement(kn,Object.assign({sortable:!0},e)),f.createElement(Un,Object.assign({forwardedRef:i,onSortStart:Bn(i),onSortEnd:Vn(i,t),lockAxis:"y",lockToContainerEdges:!0,distance:1,helperClass:Pn.a.draggedVideoItem,helperContainer:function(){return i.current}},r)))}function Jn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Hn(e){var t=e.imageType,n=e.closePopup,r=f.useContext(ht),i=r.getDataUrl,a=r.setImage,o=Jn(f.useState(i()),1)[0],c=Jn(f.useState(!1),2),u=c[0],s=c[1],v=Object(p.useService)(l.IMAGE_UPLOAD),m=function(e){a(e),n()},b={dataUrl:o,imageType:t,minWidth:d.ImageMinDimensions[t].width,minHeight:d.ImageMinDimensions[t].height,onCrop:function(e){return v.uploadBase64Image(e,t,m,n)},onCancel:n};return f.createElement(on,{title:"Crop Image",closePopup:n,onEntered:function(){return s(!0)}},u&&f.createElement(nn,Object.assign({},b)))}function zn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Mn.defaultProps={emptyMessage:"There are no videos in this list."};var Yn=function(e,t,n){return[{variant:"link",onClick:t,buttonText:"Cancel"},{variant:"danger",onClick:e,buttonText:"Yes, delete this audience",isSpinnerButton:!0,showSpinner:n}]};function $n(e){var t=e.id,n=e.routeToOnDelete,r=e.closePopup,i=zn(f.useState(),2),a=i[0],o=i[1],c=zn(f.useState(!1),2),u=c[0],s=c[1],d=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(vt.getAudienceFetchOptions(t,o),[t]);return f.createElement(on,{title:"Delete Audience",closePopup:r,showLoadingSpinner:!a},!!a&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to delete ",f.createElement("strong",null,a.name),"?")),f.createElement(ln,{buttons:Yn((function(){s(!0);d.deleteAudience(t,(function(){r(),n&&p.Core.AppLinkHelper.trigger(n)}),r)}),r,u)})))}var qn=function(e,t,n){var r=e.target.value,i=t.map((function(e){return e.toString()})),a=i.indexOf(r);-1===a?i.push(r):i.splice(a,1),n("levelIds",i)};function Wn(e){var t=e.values,n=t.name,r=t.levelIds,a=e.masterId,o=e.presentationId,c=e.levels,s=e.setFieldValue,l=e.isSubmitting,p=null===a;return f.createElement(Lt.Form,null,f.createElement(d.FormField,{label:"Name",name:"name",id:"name",value:n,placeholder:"Enter a name for this audience",autoFocus:!0}),f.createElement(d.FormField,{label:"Mapped Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:c.length,value:r,onChange:function(e){return qn(e,r,s)}},c.map((function(e){return f.createElement("option",{key:e.id,value:e.id},e.name)}))),f.createElement("div",{className:"d-flex justify-content-between"},f.createElement(d.SpinnerButton,{showSpinner:l,type:"submit"},p?"Create":"Save"),!p&&f.createElement(jt.Button,{as:d.AppLink,variant:"danger",appLink:{application:u.SUBJECTS,action:i.Subjects.DELETE_AUDIENCE,args:[o,a]}},"Delete")))}var Kn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Gn(e){var t=e.audience,n=(t=void 0===t?{}:t).masterId,r=void 0===n?null:n,i=t.name,a=void 0===i?"":i,o=t.levelIds,c=void 0===o?[]:o,u=e.saveAudience,s=Kn(e,["audience","saveAudience"]);return f.createElement(Lt.Formik,{initialValues:{name:a,levelIds:c},validationSchema:ge,onSubmit:u},(function(e){return f.createElement(Wn,Object.assign({masterId:r},s,e))}))}function Zn(e){var t=e.item,n=e.getItemAppLink,r=e.actions;return f.createElement("tr",null,f.createElement("td",null,f.createElement(d.AppLink,{appLink:n(t)},t.name)),r&&f.createElement("td",null,f.createElement("span",{className:"d-flex justify-content-end"},f.createElement(At,{actions:r}))))}function Qn(e){var t=e.items,n=e.memberType,r=e.getItemAppLink,i=e.getActions;if(!t.length)return f.createElement("div",{className:"py-5"},"No ".concat(n," in this classification."));var a="".concat(Vt.capitalizeFirstLetter(Ae.singularizeMemberType(n))," Name");return f.createElement(jt.Table,{responsive:!0},f.createElement("thead",null,f.createElement("tr",null,f.createElement("th",null,a),p.FunctionHelper.isFunction(i)&&f.createElement("th",null))),f.createElement("tbody",null,t.map((function(e){return f.createElement(Zn,{item:e,key:e.id,getItemAppLink:r,actions:p.FunctionHelper.isFunction(i)&&i(e)})}))))}function Xn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function er(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var tr=function(e,t,n,r){var i=n.indexOf(r.id),a=er(n);i>-1?a.splice(i,1):a.push(r.id),t(e,a)},nr=function(e){return{application:u.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[e]}},rr=function(e,t,n){var r="form-control h-auto py-2";return n[e]&&t[e]&&(r+=" is-invalid"),r};function ir(e){var t=e.values,n=t.name,r=t.parentIds,a=t.subjectIds,o=t.type,c=t.emphasize,s=t.thumbnail,l=t.banner,v=e.id,m=e.presentationId,b=e.classificationTree,h=e.subjectTree,y=e.setFieldValue,S=e.setFieldTouched,g=e.errors,E=e.touched,j=e.isSubmitting,O=null==v,T=!O||!(!r||!r.length),A=Xn(f.useState(T),2),C=A[0],I=A[1];return f.useEffect((function(){return I(T)}),[v,r]),f.useEffect((function(){a.length&&!E.subjectIds&&S("subjectIds",!0)}),[a]),f.createElement(Lt.Form,null,f.createElement(d.FormField,{label:"Name",name:"name",id:"name",value:n,placeholder:"Enter a name for this classification",autoFocus:!0}),f.createElement(d.FormField,{as:"select",label:"Type",name:"type",id:"type",value:o},p.ObjectHelper.getEnumKeys(d.ClassificationType).map((function(e){return f.createElement("option",{key:e,value:d.ClassificationType[e]},e)}))),f.createElement(d.FormField,{label:"Emphasize",name:"emphasize",id:"emphasize",type:"checkbox",checked:c}),f.createElement(d.FormField,{name:"parentIds"},(function(){return f.createElement("div",{className:rr("parentIds",g,E)},f.createElement(In,{label:"Parent Classification(s)",tree:b,selectedIds:r,onSelect:function(e){return tr("parentIds",y,r,e)},collapse:C,noSelectionMessage:"No parent selected, this will be a root classification.",disabledIds:[v],disableChildren:!0}))})),f.createElement(d.FormField,{name:"subjectIds"},(function(){return f.createElement("div",{className:rr("subjectIds",g,E)},f.createElement(In,{label:"Mapped Subject(s)",tree:h,selectedIds:a,onSelect:function(e){return tr("subjectIds",y,a,e)},collapse:!O,getSelectedItemAppLink:nr}))})),f.createElement(Kt,{imageType:d.ImageType.Thumbnails,currentImage:s,setNewImage:function(e){return y("thumbnail",e)},application:u.SUBJECTS,uploadAction:i.Subjects.UPLOAD_IMAGE}),f.createElement(Kt,{imageType:d.ImageType.Banners,currentImage:l,setNewImage:function(e){return y("banner",e)},application:u.SUBJECTS,uploadAction:i.Subjects.UPLOAD_IMAGE}),f.createElement("div",{className:"d-flex justify-content-between"},f.createElement(d.SpinnerButton,{showSpinner:j,type:"submit"},O?"Create":"Save"),!O&&f.createElement(jt.Button,{as:d.AppLink,variant:"danger",appLink:{application:u.SUBJECTS,action:i.Subjects.DELETE_CLASSIFICATION,args:[m,v]}},"Delete")))}var ar=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function or(e){var t=e.classification,n=t.id,r=t.name,i=void 0===r?"":r,a=t.parentIds,o=void 0===a?[]:a,c=t.subjectIds,u=void 0===c?[]:c,s=t.type,l=void 0===s?d.ClassificationType.Subject:s,p=t.emphasize,v=t.thumbnail,m=void 0===v?{}:v,b=t.banner,h=void 0===b?{}:b,y=e.saveClassification,S={id:n,presentationId:e.presentationId,classificationTree:e.classificationTree,subjectTree:e.subjectTree};return f.createElement(Lt.Formik,{initialValues:{name:i,parentIds:o,subjectIds:u,type:l,emphasize:p,thumbnail:m,banner:h},validationSchema:Ee,onSubmit:function(e,t){var n=e.parentIds,r=ar(e,["parentIds"]);n.length||n.push(de.Root),y(Object.assign(Object.assign({},r),{parentIds:n}),t)}},(function(e){return f.createElement(ir,Object.assign({},S,e))}))}var cr=function(e){return function(t){if(!e)return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION;switch(e){case fe.Playlists:return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;case fe.Series:return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION_SERIES;case fe.Videos:return t.appLink.action===i.Subjects.EDIT_CLASSIFICATION_VIDEOS}}};function ur(e){var t=e.presentation,n=e.classificationId,r=e.memberType;return t?f.createElement(f.Fragment,null,f.createElement("h6",null,"Presentation: ".concat(!!t&&t.name)),f.createElement("div",{className:"py-2"},f.createElement(bn,{tabs:Ce.getEditClassificationTabs(t.id,n),isItemActive:cr(r)}))):f.createElement(f.Fragment,null)}function sr(e){var t=e.values.name,n=e.id,r=e.isSubmitting,i=null===n;return f.createElement(Lt.Form,null,f.createElement(d.FormField,{label:"Name",type:"text",name:"name",id:"name",value:t,placeholder:"Enter a name for this level",autoFocus:!0}),f.createElement(d.SpinnerButton,{showSpinner:r,type:"submit"},i?"Create":"Save"))}function lr(e){var t=e.level,n=(t=void 0===t?{}:t).id,r=void 0===n?null:n,i=t.name,a=void 0===i?"":i,o=e.saveLevel;return f.createElement(Lt.Formik,{initialValues:{name:a},validationSchema:je,onSubmit:o},(function(e){return f.createElement(sr,Object.assign({id:r},e))}))}function fr(e){var t=e.objects,n=e.getAppLink,r=e.emptyMessage;return t?t.length?f.createElement("ul",{className:"list-unstyled"},t.map((function(e){return f.createElement("li",{key:e.id,className:"border rounded mb-3"},f.createElement(d.AppLink,{appLink:n(e.id),className:"d-block p-3"},e.name))}))):f.createElement("div",{className:"py-3"},f.createElement("p",null,r)):f.createElement(f.Fragment,null)}function pr(e){var t=e.values,n=t.name,r=t.description,i=e.id,a=e.isSubmitting,o=!i;return f.createElement(Lt.Form,null,f.createElement(d.FormField,{label:"Name",type:"text",name:"name",id:"name",value:n,placeholder:"Enter a name for this presentation",autoFocus:!0}),f.createElement(d.FormField,{label:"Description",type:"textarea",name:"description",id:"description",value:r,placeholder:"Describe this presentation here"}),f.createElement(d.SpinnerButton,{showSpinner:a,type:"submit"},o?"Create":"Save"))}function dr(e){var t=e.presentation,n=(t=void 0===t?{}:t).id,r=void 0===n?null:n,i=t.name,a=void 0===i?"":i,o=t.description,c=void 0===o?"":o,u=e.savePresentation;return f.createElement(Lt.Formik,{initialValues:{name:a,description:c},validationSchema:Oe,onSubmit:u},(function(e){return f.createElement(pr,Object.assign({id:r},e))}))}fr.defaultProps={emptyMessage:"There is nothing here."};var vr=function(e,t){return p.ArrayHelper.first(t.filter((function(t){return t.id.toString()===e.toString()})))};function mr(e){var t=e.presentations,n=e.currentPresentation,r=e.setCurrentPresentation,i=e.label;return f.useEffect((function(){t&&!n&&r(t[0])}),[t]),f.createElement(f.Fragment,null,!!n&&f.createElement(f.Fragment,null,f.createElement(jt.Form.Label,null,i),f.createElement(jt.Form.Control,{as:"select",value:n.id,onChange:function(e){return n=e.target.value,i=vr(n,t),void r(i);var n,i},className:"cursor-pointer"},t.map((function(e){return f.createElement("option",{value:e.id,key:e.id},e.name)})))))}mr.defaultProps={label:"Presentation"};var br=function(e){var t=e.memberType,n=1===e.objects.length?"this ".concat(Ae.singularizeMemberType(t)):"these ".concat(t);return"If selected, ".concat(n," will automatically be added")+" to all classifications mapped to the selected subject."};function hr(e){return f.createElement(f.Fragment,null,f.createElement("h4",null,"".concat(Vt.capitalizeFirstLetter(e.memberType))),f.createElement(jt.Table,{responsive:!0},f.createElement("tbody",null,e.objects&&e.objects.map((function(t){return f.createElement("tr",{key:t.id},f.createElement("td",null,f.createElement(d.AppLink,{appLink:Ae.getMemberAppLink(e.memberType,t.id)},t.name)))})))),f.createElement("div",{className:"form-control h-auto py-2"},f.createElement(In,{label:"Select a subject:",tree:e.subjectTree,selectedIds:[e.subjectId],onSelect:function(t){return e.onSelectSubject(t)}})),f.createElement("div",{className:"form-group pt-2"},f.createElement(wt,{label:"Add to subject's classifications",title:br(e),selected:e.addToClassifications,onToggle:e.onToggleAddToClassifications})),f.createElement("div",{className:"form-group"},f.createElement(jt.Button,{onClick:e.onClickAddToSubject,disabled:!e.subjectId},"Add to subject")))}function yr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Sr=function(e,t){var n="form-control h-auto py-2";return t.parentId&&e.parentId&&(n+=" is-invalid"),n};function gr(e){var t=e.values,n=t.name,r=t.parentId,a=e.id,o=e.subjectTree,c=e.setFieldValue,s=e.errors,l=e.touched,p=e.isSubmitting,v=!a,m=!v||!!r,b=yr(f.useState(m),2),h=b[0],y=b[1];f.useEffect((function(){return y(m)}),[a,r]);var S=function(e){var t=e.id===r?null:e.id;c("parentId",t)};return f.createElement(Lt.Form,null,f.createElement(d.FormField,{label:"Name",name:"name",id:"name",value:n,placeholder:"Enter a name for this subject",autoFocus:!0}),f.createElement(d.FormField,{name:"parentId"},(function(){return f.createElement("div",{className:Sr(s,l)},f.createElement(In,{label:"Parent Subject",tree:o,selectedIds:[r],onSelect:S,collapse:h,noSelectionMessage:"No parent selected, this will be a root subject.",disabledIds:[a],disableChildren:!0}))})),f.createElement("div",{className:"d-flex justify-content-between"},f.createElement(d.SpinnerButton,{showSpinner:p,type:"submit"},v?"Create":"Save"),!v&&f.createElement(jt.Button,{as:d.AppLink,variant:"danger",appLink:{application:u.SUBJECTS,action:i.Subjects.DELETE_SUBJECT,args:[a]}},"Delete")))}var Er=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function jr(e){var t=e.subject,n=t.id,r=t.name,i=void 0===r?"":r,a=t.parentId,o=e.saveSubject,c={id:n,subjectTree:e.subjectTree};return f.createElement(Lt.Formik,{initialValues:{name:i,parentId:a},validationSchema:Te,onSubmit:function(e,t){var n=e.parentId,r=Er(e,["parentId"]);o(Object.assign(Object.assign({},r),{parentId:n||pe.Root}),t)}},(function(e){return f.createElement(gr,Object.assign({},c,e))}))}var Or=function(e){return function(t){return t.appLink.action===e}};function Tr(e){var t=e.subjectId,n=e.activeAction;return f.createElement(f.Fragment,null,f.createElement(jt.Alert,{variant:"danger"},"Warning: You are editing the backbone subjects."),f.createElement("div",{className:"py-2"},f.createElement(bn,{tabs:Ce.getEditSubjectTabs(t),isItemActive:Or(n)})))}var Ar=function(e){return f.createElement("div",{className:"border rounded p-2 mb-3"},f.createElement("h6",{className:"border-bottom pb-1"},e.presentation.name),e.classifications&&e.classifications.length?f.createElement("ul",{className:"list-unstyled mb-0"},e.classifications.map((function(t){return f.createElement("li",{key:t.id,className:"py-1"},f.createElement(d.AppLink,{appLink:(n=e.presentation.id,r=t.id,{application:u.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[n,r]})},t.name));var n,r}))):f.createElement("p",null,f.createElement("em",null,"There are no classifications mapped to this subject in this presentation.")))},Cr=function(e){return f.createElement(f.Fragment,null,!!e.presentations&&!!e.classificationDictionary&&e.presentations.map((function(t){return f.createElement(Ar,{key:t.id,presentation:t,classifications:e.classificationDictionary[t.id]})})))},Ir=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},_r=function(e,t){return t?e.name:"Classification: ".concat(e.name)};function wr(e){return f.createElement(f.Fragment,null,e.classifications.map((function(t){return f.createElement("th",{key:t.id},f.createElement("span",{className:"d-inline-block"},f.createElement(wt,{selected:e.getIsClassificationSelected(t),onToggle:function(n){return e.onToggleClassification(t.id,n)}})),f.createElement(d.AppLink,{appLink:e.getClassificationAppLink(t.id)},_r(t,e.showClassificationSubHeader)))})))}function xr(e){var t=e.memberType,n=e.hasActions,r=e.classifications,i=Ir(e,["memberType","hasActions","classifications"]),a="".concat(Vt.capitalizeFirstLetter(Ae.singularizeMemberType(t))," Name"),o=!!r&&!!r.length,c=o&&r.length>1,u=o?2:1,s=Object.assign({classifications:r,showClassificationSubHeader:c},i);return f.createElement("thead",null,f.createElement("tr",null,f.createElement("th",{rowSpan:u},a),o&&(c?f.createElement("th",{colSpan:r.length,className:"text-center"},"Classifications"):f.createElement(wr,Object.assign({},s))),n&&f.createElement("th",{rowSpan:u})),o&&c&&f.createElement("tr",null,f.createElement(wr,Object.assign({},s))))}function Fr(e){var t=e.member,n=t.id,r=t.name,i=t.classifications,a=void 0===i?[]:i,o=e.getMemberAppLink,c=e.onToggleClassification,u=e.actions,s=p.FunctionHelper.isFunction(o)&&o(n);return a.length&&!p.FunctionHelper.isFunction(c)&&p.Core.ErrorHelper.throw(new p.DevError("onToggleClassification must be passed to SubjectMemberItem")),f.createElement("tr",null,f.createElement("td",null,s?f.createElement(d.AppLink,{appLink:o(n)},r):r),!!a.length&&a.map((function(e){return f.createElement("td",{key:e.id},f.createElement(wt,{selected:e.selected,onToggle:function(t){return c(e.id,t,n)}}))})),u&&f.createElement("td",null,f.createElement("span",{className:"d-flex justify-content-end"},f.createElement(At,{actions:u}))))}var Lr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Pr(e,t){return function(n){var r=n[e],i=d.CollectionHelper.length(r);return!!i&&i===t.length}}function Nr(e){var t=e.members,n=e.memberType,r=e.getActions,i=e.classifications,a=e.getClassificationAppLink,o=e.onToggleClassification,c=Lr(e,["members","memberType","getActions","classifications","getClassificationAppLink","onToggleClassification"]);if(!t.length)return f.createElement("div",{className:"py-5"},"No ".concat(n," in this subject."));var u=p.FunctionHelper.isFunction(r),s={memberType:n,classifications:i,getClassificationAppLink:a,getIsClassificationSelected:Pr(n,t),onToggleClassification:o,hasActions:u};return f.createElement(jt.Table,{responsive:!0,bordered:!0},f.createElement(xr,Object.assign({},s)),f.createElement("tbody",null,t.map((function(e,t){return f.createElement(Fr,Object.assign({key:t,member:e,actions:u&&r(e.id),onToggleClassification:o},c))}))))}function kr(e){var t=e.navItems,n=e.currentAppLink;return f.createElement(jt.Container,null,f.createElement(jt.Navbar,{className:"justify-content-between align-items-center"},f.createElement(jt.Nav,null,!!t&&t.map((function(e,t){return f.createElement(jt.Nav.Item,{key:t},f.createElement(jt.Nav.Link,{as:d.AppLink,appLink:e.appLink,active:Ce.isItemActive(e,n),className:Ce.isItemActive(e,n)?"text-primary":""},e.label))})))))}function Dr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Rr=function(e){return{application:u.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function Ur(e){var t=e.presentationId,n=e.audienceId,r=Dr(f.useState(),2),i=r[0],a=r[1],o=Dr(f.useState(),2),c=o[0],u=o[1],s=Dr(f.useState(),2),d=s[0],v=s[1],m=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(vt.getAudienceFetchOptions(n,a),[n]),Object(p.useFetch)(vt.getLevelsFetchOptions(u),[]),Object(p.useFetch)(vt.getPresentationFetchOptions(t,v),[t]);var b={audience:i,levels:c,saveAudience:function(e,r){var i=r.setSubmitting;return m.updateAudience(n,Object.assign(Object.assign({},e),{presentationId:t}),(function(){return i(!1)}),(function(){return i(!1)}))},presentationId:t},h=Bt.propsLoaded(b);return f.createElement(f.Fragment,null,f.createElement("div",{className:"pb-3"},f.createElement(Ct,{appLink:Rr(t),backToName:"audiences"})),!!d&&f.createElement("h6",null,"Presentation: ".concat(d.name)),h&&f.createElement(Gn,Object.assign({},b)))}function Br(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Vr=function(e,t){return{application:u.SUBJECTS,action:i.Subjects.EDIT_AUDIENCE,args:[e,t]}},Mr=function(e){return{application:u.SUBJECTS,action:i.Subjects.NEW_AUDIENCE,args:[e]}},Jr={application:u.SUBJECTS,action:i.Subjects.AUDIENCES};function Hr(e){var t=e.presentationId,n=Br(f.useState(),2),r=n[0],i=n[1];return Object(p.useFetch)(vt.getAudiencesFetchOptions(t,i),[]),f.createElement(f.Fragment,null,f.createElement("div",{className:"pb-3"},f.createElement(Ct,{appLink:Jr,backToName:"presentations"})),f.createElement("div",{className:"d-flex justify-content-between mb-2"},f.createElement("h5",{className:"d-inline-block m-0"},"Select an audience to edit:"),f.createElement(d.AppLink,{appLink:Mr(t),className:"d-block"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Plus,size:d.SvgContainerSize.Small}),f.createElement("span",null,"New Audience"))),f.createElement(fr,{objects:r,getAppLink:function(e){return Vr(t,e)},emptyMessage:"There are no audiences in this presentation yet. Click '+ New Audience' to create one."}))}function zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Yr=function(e){return{application:u.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e]}},$r=function(e,t,n){n(!1),p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_AUDIENCE,args:[e,t.masterId]})};function qr(e){var t=e.presentationId,n=zr(f.useState(),2),r=n[0],i=n[1],a=zr(f.useState(),2),o=a[0],c=a[1],u=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(vt.getLevelsFetchOptions(i),[]),Object(p.useFetch)(vt.getPresentationFetchOptions(t,c),[t]);return f.createElement(f.Fragment,null,f.createElement("div",{className:"pb-2"},f.createElement(Ct,{appLink:Yr(t),backToName:"audiences"})),!!o&&f.createElement("h6",null,"Presentation: ".concat(o.name)),!!r&&f.createElement(Gn,{levels:r,presentationId:t,saveAudience:function(e,n){var r=n.setSubmitting;return u.createAudience(Object.assign(Object.assign({},e),{presentationId:t}),(function(e){return $r(t,e,r)}),(function(){return r(!1)}))}}))}function Wr(e){return{application:u.SUBJECTS,action:i.Subjects.NEW_CLASSIFICATION,args:[e]}}function Kr(e){return[{name:"Add child",getAppLink:function(t){return Object.assign(Object.assign({},Wr(e)),{args:[e],params:{parentId:t.id}})}},{name:"Delete classification",getAppLink:function(t){return{application:u.SUBJECTS,action:i.Subjects.DELETE_CLASSIFICATION,args:[e,t.id]}},className:"text-danger"}]}var Gr=n(99),Zr=n.n(Gr);function Qr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Xr(e){var t=e.presentationId,n=e.selectedClassificationId,r=Qr(f.useState(),2),a=r[0],o=r[1],c=Qr(f.useState(),2),s=c[0],l=c[1];return function(e,t,n){var r=vt.getClassificationTreeFetchOptions(e,t),i=vt.getPresentationFetchOptions(e,n);Object(p.useBulkFetch)([r,i],[e])}(t,o,l),f.createElement("div",{className:"".concat(Zr.a.navContainer," h-auto pr-2 border-right")},!!s&&f.createElement("h6",{className:"border-bottom pb-2"},"Classifications (".concat(s.name,")")),f.createElement(d.AppLink,{appLink:Wr(t),className:"d-inline-block pb-2"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Plus,size:d.SvgContainerSize.Small}),f.createElement("span",null,"New Classification")),!!a&&f.createElement("div",{className:"border-top pt-1"},f.createElement(On,{tree:a,getAppLink:function(e){return function(e,t){return{application:u.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[e,t.id]}}(t,e)},selectedIds:[n],actions:Kr(t)})))}function ei(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ti(e){var t=e.classificationId,n=e.routeToOnDelete,r=e.closePopup,i=ei(f.useState(),2),a=i[0],o=i[1],c=ei(f.useState(!1),2),u=c[0],s=c[1];Object(p.useFetch)(vt.getClassificationFetchOptions(t,o),[]);var d=Object(p.useService)(l.SUBJECT),v=[{variant:"link",onClick:r,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0);d.deleteClassification(t,(function(){r(),n&&p.Core.AppLinkHelper.trigger(n)}),r)},buttonText:"Yes, delete this classification",isSpinnerButton:!0,showSpinner:u}];return f.createElement(on,{title:"Delete Classification",closePopup:r,showLoadingSpinner:!a},!!a&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to delete ",f.createElement("strong",null,a.name),"?")),f.createElement(ln,{buttons:v})))}function ni(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ri(e){var t=e.presentationId,n=e.classificationId,r=ni(f.useState(),2),i=r[0],a=r[1],o=ni(f.useState(),2),c=o[0],u=o[1],s=ni(f.useState(),2),d=s[0],v=s[1],m=ni(f.useState(),2),b=m[0],h=m[1],y=Object(p.useService)(l.SUBJECT),S=vt.getClassificationFetchOptions(n,a),g=vt.getPresentationFetchOptions(t,u),E=vt.getClassificationTreeFetchOptions(t,v),j=vt.getSubjectTreeFetchOptions(h);Object(p.useFetch)(j,[]),Object(p.useFetch)(S,[n]),Object(p.useBulkFetch)([g,E],[t]);var O={presentation:c,classificationId:n},T={classification:i,presentationId:t,saveClassification:function(e,t){var r=t.setSubmitting;return y.updateClassification(n,e,(function(){return r(!1)}),(function(){return r(!1)}))},classificationTree:d,subjectTree:b},A=Bt.propsLoaded(T);return f.createElement("div",null,f.createElement(ur,Object.assign({},O)),!!A&&f.createElement(or,Object.assign({},T)))}function ii(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ai(e){var t=e.presentationId,n=e.classificationId,r=e.memberType,i=ii(f.useState(),2),a=i[0],o=i[1],c=ii(f.useState(),2),u=c[0],s=c[1];Object(p.useFetch)(vt.getPresentationFetchOptions(t,o),[]),Object(p.useFetch)(vt.getClassificationMembersFetchOptions(n,r,s),[n,r]);var l={items:u&&u.data,memberType:r,getItemAppLink:function(e){return Ae.getMemberAppLink(r,e.id)},getActions:function(e){return Ae.getMemberActions(n,le.Classification,r,e.id)}},d={presentation:a,classificationId:n},v=Bt.propsLoaded(l);return f.createElement(f.Fragment,null,f.createElement(ur,Object.assign({},d,{memberType:r})),v&&f.createElement(Qn,Object.assign({},l)))}function oi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ci(e){var t=e.presentationId,n=e.parentId,r=oi(f.useState(),2),a=r[0],o=r[1],c=oi(f.useState(),2),s=c[0],d=c[1],v=Object(p.useService)(l.SUBJECT),m=vt.getClassificationTreeFetchOptions(t,o),b=vt.getSubjectTreeFetchOptions(d);Object(p.useFetch)(b,[]),Object(p.useFetch)(m,[t]);var h={saveClassification:function(e,n){var r=n.setSubmitting;return v.createClassification(Object.assign(Object.assign({},e),{presentationId:t}),(function(e){return function(e,n){n(!1),e&&e.id&&p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[t,e.id]})}(e,r)}),(function(){return r(!1)}))},classification:n?{parentIds:[n]}:{},presentationId:t,classificationTree:a,subjectTree:s},y=Object.values(h).every((function(e){return!!e}));return f.createElement("div",null,f.createElement("h4",{className:"py-2"},"Create New Classification"),!!y&&f.createElement(or,Object.assign({},h)))}function ui(e){return(ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function si(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function li(e,t){return!t||"object"!==ui(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fi(e){return(fi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pi(e,t){return(pi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var di=function(e){return"/api/master/v2/objects/".concat(e,"?query=cover,banner")},vi=function(e){return"/api/master/v2/objects?".concat(e.map((function(e){return"id=".concat(e)})).join("&"))},mi=function(e){return"/api/master/v2/objects/".concat(e,"/playlists")},bi=function(e){return"/api/master/v2/objects/".concat(e)},hi=function(e){return"/api/master/v1/playlists/".concat(e)},yi=function(e){return"/api/master/v2/objects/".concat(e,"/videos?").concat(["query={orderBy:orderindex,limit:100}"].join("&"))},Si=function(e){return"/api/master/v1/objects/".concat(e,"/videos/reorder")},gi=function(e,t){return"/api/master/v1/playlists/".concat(e,"/dissociate/").concat(t)},Ei=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),li(this,fi(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pi(e,t)}(t,e),n=t,(r=[{key:"getPlaylist",value:function(e,t,n){return this.get({resource:di(e),eventPrefix:"".concat(a.PLAYLIST,":").concat(e),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"getPlaylistsById",value:function(e,t,n){return this.get({resource:vi(e),eventPrefix:"".concat(a.PLAYLISTS,":").concat(e.join(",")),expiryTime:d.CacheDurations.STANDARD,callback:t,errorCallback:n})}},{key:"createPlaylist",value:function(e,t,n,r){return this.create({resource:mi(t),data:Object.assign(Object.assign({},e),{permissions:Rt()}),callback:n,errorCallback:r,eventPrefix:a.PLAYLIST,expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully created playlist."),errorHandler:this.alertService.error("Failed to create playlist.")})}},{key:"updatePlaylist",value:function(e,t,n,r){return this.update({resource:bi(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(a.UPDATE_PLAYLIST,":").concat(e),expiryTime:d.CacheDurations.STANDARD,successHandler:this.alertService.success("Successfully updated playlist"),errorHandler:this.alertService.error("Failed to update playlist")})}},{key:"deletePlaylist",value:function(e,t,n){return this.delete({resource:hi(e),callback:t,errorCallback:n,eventPrefix:a.DELETE_PLAYLIST,invalidationKeys:["".concat(a.PLAYLIST,":").concat(e)],successHandler:this.alertService.success("Successfully deleted playlist"),errorHandler:this.alertService.error("Failed to delete playlist.")})}},{key:"getPlaylistVideos",value:function(e,t,n){return this.get({resource:yi(e),callback:t,errorCallback:n,eventPrefix:"".concat(a.PLAYLIST,":").concat(e,":videos"),expiryTime:d.CacheDurations.STANDARD})}},{key:"reorderVideos",value:function(e,t,n){return this.update({resource:Si(e),data:Object.assign({ownerId:e},t),eventPrefix:a.REORDER_PLAYLIST_VIDEOS,expiryTime:d.CacheDurations.STANDARD,invalidationKeys:["".concat(a.PLAYLIST,":").concat(e,":videos")],callback:n,errorHandler:this.alertService.error("Failed to update playlist order.")})}},{key:"removeVideoFromPlaylist",value:function(e,t,n,r){return this.delete({resource:gi(e,t),eventPrefix:"".concat(a.REMOVE_PLAYLIST_VIDEO,":").concat(e,":").concat(t),invalidationKeys:["".concat(a.PLAYLIST,":").concat(e,":videos")],callback:n,errorCallback:r})}},{key:"name",get:function(){return l.PLAYLIST}},{key:"channelName",get:function(){return s.PLAYLIST}}])&&si(n.prototype,r),i&&si(n,i),t}(p.BaseDataService),ji={dataServiceName:l.PLAYLIST,dataChannelName:s.PLAYLIST},Oi={getPlaylistFetchOptions:function(e,t,n){return Object.assign(Object.assign({},ji),{eventPrefix:"".concat(a.PLAYLIST,":").concat(e),fetchData:function(t){return t.getPlaylist(e)},setData:t,onError:n,deleteEventPrefix:a.DELETE_PLAYLIST})},getPlaylistsByIdFetchOptions:function(e,t,n){return Object.assign(Object.assign({},ji),{eventPrefix:"".concat(a.PLAYLISTS,":").concat(e.join(",")),fetchData:function(t){return t.getPlaylistsById(e)},setData:t,onError:n})},getPlaylistVideosFetchOptions:function(e,t,n){return Object.assign(Object.assign({},ji),{eventPrefix:"".concat(a.PLAYLIST,":").concat(e,":videos"),fetchData:function(t){return t.getPlaylistVideos(e)},setData:t,onError:n})}};function Ti(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Ai=function(e,t,n){switch(e){case fe.Playlists:return Oi.getPlaylistFetchOptions(t,n);case fe.Series:return G.getSeriesFetchOptions(t,n);case fe.Videos:return ye.getVideoFetchOptions(t,n)}},Ci=function(e,t,n,r){return[{variant:"link",onClick:e,buttonText:"Cancel"},{variant:"danger",onClick:t,buttonText:"Yes, remove this ".concat(Ae.singularizeMemberType(n)),isSpinnerButton:!0,showSpinner:r}]};function Ii(e){var t=e.classificationId,n=e.memberId,r=e.memberType,i=e.closePopup,a=Ti(f.useState(),2),o=a[0],c=a[1],u=Ti(f.useState(),2),s=u[0],d=u[1],v=Ti(f.useState(!1),2),m=v[0],b=v[1],h=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(Ai(r,n,d),[n]),Object(p.useFetch)(vt.getClassificationFetchOptions(t,c),[t]);var y=!!o&&!!s,S="Remove ".concat(Vt.capitalizeFirstLetter(Ae.singularizeMemberType(r)));return f.createElement(on,{title:S,closePopup:i,showLoadingSpinner:!y},y&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to remove ",f.createElement("strong",null,s.name)," from ",f.createElement("strong",null,o.name),"?"),f.createElement("p",null,"This will not remove it from the backbone subject.")),f.createElement(ln,{buttons:Ci(i,(function(){b(!0),h.removeObjectsFromClassification(t,[n],r,null,null,i,i)}),r,m)})))}function _i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function wi(e){var t=e.id,n=_i(f.useState(),2),r=n[0],i=n[1],a=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(vt.getLevelFetchOptions(t,i),[t]);var o={level:r,saveLevel:function(e,n){var r=n.setSubmitting;return a.updateLevel(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}},c=Bt.propsLoaded(o);return f.createElement(f.Fragment,null,f.createElement("h4",{className:"py-2"},"Edit Level"),!!c&&f.createElement(lr,Object.assign({},o)))}function xi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Fi=function(e){return{application:u.SUBJECTS,action:i.Subjects.EDIT_LEVEL,args:[e]}},Li={application:u.SUBJECTS,action:i.Subjects.NEW_LEVEL};function Pi(){var e=xi(f.useState(),2),t=e[0],n=e[1];return Object(p.useFetch)(vt.getLevelsFetchOptions(n),[]),f.createElement("div",null,f.createElement("div",{className:"d-flex justify-content-between mb-2"},f.createElement("h5",{className:"d-inline-block m-0"},"Select a level to edit:"),f.createElement(d.AppLink,{appLink:Li,className:"d-block"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Plus,size:d.SvgContainerSize.Small}),f.createElement("span",null,"New Level"))),f.createElement(fr,{objects:t,getAppLink:Fi}))}function Ni(){var e=Object(p.useService)(l.SUBJECT);return f.createElement(f.Fragment,null,f.createElement("h4",{className:"py-2"},"Create New Level"),f.createElement(lr,{saveLevel:function(t,n){var r=n.setSubmitting;e.createLevel(t,(function(e){return function(e,t){t(!1),e&&e.id&&p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_LEVEL,args:[e.id]})}(e,r)}),(function(){return r(!1)}))}}))}function ki(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Di(e){var t=e.id,n=ki(f.useState(),2),r=n[0],i=n[1],a=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(vt.getPresentationFetchOptions(t,i),[t]);var o={presentation:r,savePresentation:function(e,n){var r=n.setSubmitting;return a.updatePresentation(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}},c=Bt.propsLoaded(o);return f.createElement(f.Fragment,null,f.createElement("h4",{className:"py-2"},"Edit Presentation"),!!c&&f.createElement(dr,Object.assign({},o)))}function Ri(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Ui=function(e){return{application:u.SUBJECTS,action:i.Subjects.EDIT_PRESENTATION,args:[e]}},Bi={application:u.SUBJECTS,action:i.Subjects.NEW_PRESENTATION};function Vi(){var e=Ri(f.useState(),2),t=e[0],n=e[1];return Object(p.useFetch)(vt.getPresentationsFetchOptions(n),[]),f.createElement("div",null,f.createElement("div",{className:"d-flex justify-content-between mb-2"},f.createElement("h5",{className:"d-inline-block m-0"},"Select a presentation to edit:"),f.createElement(d.AppLink,{appLink:Bi,className:"d-block"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Plus,size:d.SvgContainerSize.Small}),f.createElement("span",null,"New Presentation"))),f.createElement(fr,{objects:t,getAppLink:Ui}))}function Mi(){var e=Object(p.useService)(l.SUBJECT);return f.createElement(f.Fragment,null,f.createElement("h4",{className:"py-2"},"Create New Presentation"),f.createElement(dr,{savePresentation:function(t,n){var r=n.setSubmitting;e.createPresentation(t,(function(e){return function(e,t){t(!1),e&&e.id&&p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_PRESENTATION,args:[e.id]})}(e,r)}),(function(){return r(!1)}))}}))}function Ji(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Hi(e){var t=e.objectType,n=e.getAppLink,r=Ji(f.useState(),2),i=r[0],a=r[1];return Object(p.useFetch)(vt.getPresentationsFetchOptions(a),[]),f.createElement("div",null,f.createElement("h5",null,"Select a presentation to view its ".concat(t,":")),f.createElement(fr,{objects:i,getAppLink:n}))}function zi(e,t){return d.StateHelper.getSetStateByKey(e,t)}function Yi(e,t){var n=e.memberType,r=e.objectIds,i=vt.getSubjectTreeFetchOptions(zi(t,"subjectTree"));Object(p.useFetch)(i,[]);var a=function(e,t,n){switch(e){case fe.Playlists:return Oi.getPlaylistsByIdFetchOptions(t,n);case fe.Series:return G.getSeriesByIdFetchOptions(t,n);case fe.Videos:return ye.getVideosByIdFetchOptions(t,n)}}(n,r,zi(t,"objects"));Object(p.useFetch)(a,[n,r])}function $i(e,t,n,r){var a=n.selectedSubject,o=n.objects,c=function(){return zi(r,"showConfirmationPopup")(!1)};e.addObjectsToSubject(a.id,o.map((function(e){return e.id})),t.memberType,n.addToClassifications,(function(){c(),p.Core.AppLinkHelper.trigger(function(e,t){var n={application:u.SUBJECTS,args:[e]};switch(t){case fe.Playlists:return Object.assign(Object.assign({},n),{action:i.Subjects.EDIT_SUBJECT_PLAYLISTS});case fe.Series:return Object.assign(Object.assign({},n),{action:i.Subjects.EDIT_SUBJECT_SERIES});case fe.Videos:return Object.assign(Object.assign({},n),{action:i.Subjects.EDIT_SUBJECT_VIDEOS})}}(a.id,t.memberType))}),c)}function qi(e,t,n){if(t&&n){var r=1===t.length?"this ".concat(Ae.singularizeMemberType(e)):"these ".concat(e);return"Add ".concat(r," to ").concat(n.name)}}function Wi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ki(e){var t=e.memberType,n=Wi(f.useState({}),2),r=n[0],i=n[1],a=Object(p.useService)(l.SUBJECT);Yi(e,i);var o=function(e){return zi(i,"showConfirmationPopup")(e)},c=Vt.capitalizeFirstLetter(Ae.singularizeMemberType(t)),u=!!r.objects&&!!r.subjectTree;return f.createElement(f.Fragment,null,u&&f.createElement(hr,{memberType:t,objects:r.objects,subjectTree:r.subjectTree,subjectId:r.selectedSubject&&r.selectedSubject.id,addToClassifications:r.addToClassifications,onSelectSubject:zi(i,"selectedSubject"),onToggleAddToClassifications:zi(i,"addToClassifications"),onClickAddToSubject:function(){r.selectedSubject&&o(!0)}}),u&&r.showConfirmationPopup&&f.createElement(Ft,{title:qi(t,r.objects,r.selectedSubject),onClickConfirm:function(){return $i(a,e,r,i)},closePopup:function(){return o(!1)}},f.createElement("p",null,"The following ".concat(t," will be added to "),f.createElement("strong",null,r.selectedSubject.name),r.addToClassifications?" and its mapped classifications:":":"),f.createElement("ul",null,r.objects.map((function(e){return f.createElement("li",{key:e.id},e.name)}))),!r.addToClassifications&&f.createElement("p",null,"".concat(1===r.objects.length?"It":"They"," will not be added to its mapped classifications.")),f.createElement("p",null,"".concat(c," to classification mappings can be managed from the "),f.createElement("strong",null,"Edit Subject ".concat(Vt.capitalizeFirstLetter(t)," ")),"page.")))}function Gi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Zi(e){var t=e.subjectId,n=e.routeToOnDelete,r=e.closePopup,i=Gi(f.useState(),2),a=i[0],o=i[1],c=Gi(f.useState(!1),2),u=c[0],s=c[1];Object(p.useFetch)(vt.getSubjectFetchOptions(t,o),[]);var d=Object(p.useService)(l.SUBJECT),v=[{variant:"link",onClick:r,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0);d.deleteSubject(t,(function(){r(),n&&p.Core.AppLinkHelper.trigger(n)}),r)},buttonText:"Yes, delete this subject",isSpinnerButton:!0,showSpinner:u}];return f.createElement(on,{title:"Delete Subject",closePopup:r,showLoadingSpinner:!a},!!a&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to delete ",f.createElement("strong",null,a.name),"?"),f.createElement("p",null,"Subjects that have mapped classifications cannot be deleted.")),f.createElement(ln,{buttons:v})))}function Qi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Xi(e){var t=e.subjectId,n=Qi(f.useState(),2),r=n[0],a=n[1],o=Qi(f.useState(),2),c=o[0],u=o[1],s=Object(p.useService)(l.SUBJECT),d=vt.getSubjectFetchOptions(t,a),v=vt.getSubjectTreeFetchOptions(u);Object(p.useFetch)(v,[]),Object(p.useFetch)(d,[t]);var m={subject:r,saveSubject:function(e,n){var r=n.setSubmitting;return s.updateSubject(t,e,(function(){return r(!1)}),(function(){return r(!1)}))},subjectTree:c},b=Bt.propsLoaded(m);return f.createElement(f.Fragment,null,f.createElement(Tr,{subjectId:t,activeAction:i.Subjects.EDIT_SUBJECT}),!!b&&f.createElement(jr,Object.assign({},m)))}function ea(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ta=f.createContext(void 0);function na(e){var t=e.children,n=ea(f.useState(),2),r=n[0],i=n[1];return f.createElement(ta.Provider,{value:[r,i]},t)}var ra=function(e){var t=e.children;return f.createElement(Et,null,f.createElement(na,null,f.createElement(yt,null,t)))};function ia(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function aa(e,t){return d.StateHelper.getSetStateByKey(e,t)}function oa(e,t,n){var r=e.subjectId,i=e.memberType,a=t.memberIds,o=ia(f.useContext(ta),1)[0];Object(p.useFetch)(vt.getPresentationsFetchOptions(aa(n,"presentations")),[]),Object(p.useFetch)(vt.getSubjectMemberIdsFetchOptions(r,i,aa(n,"memberIds")),[r,i]),Object(p.useFetch)(function(e,t,n){if(!t||!t.length)return;switch(e){case fe.Playlists:return Oi.getPlaylistsByIdFetchOptions(t,n);case fe.Series:return G.getSeriesByIdFetchOptions(t,n);case fe.Videos:return ye.getVideosByIdFetchOptions(t,n)}}(i,a,aa(n,"members")),[i,a],!!a&&!!a.length),Object(p.useFetch)(!!o&&vt.getSubjectClassificationFetchOptions(r,aa(n,"classifications"),o.id,i),[r,i,o],!!o)}var ca=function(e,t){return function(n){var r,a=u.SUBJECTS,o=[t,n];switch(e){case fe.Playlists:r=i.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;break;case fe.Series:r=i.Subjects.EDIT_CLASSIFICATION_SERIES;break;case fe.Videos:r=i.Subjects.EDIT_CLASSIFICATION_VIDEOS}return{application:a,action:r,args:o}}};function ua(e){switch(e){case fe.Playlists:return i.Subjects.EDIT_SUBJECT_PLAYLISTS;case fe.Series:return i.Subjects.EDIT_SUBJECT_SERIES;case fe.Videos:return i.Subjects.EDIT_SUBJECT_VIDEOS}}function sa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function la(e){var t=e.subjectId,n=e.memberType,r=sa(f.useState({}),2),i=r[0],a=r[1],o=i.presentations,c=i.classifications,u=i.memberIds,s=i.membersWithClassifications,d=sa(f.useContext(ta),2),v=d[0],m=d[1],b=Object(p.useService)(l.SUBJECT);oa(e,i,a),function(e,t,n){var r=t.memberIds,i=t.members,a=t.classifications;f.useEffect((function(){aa(n,"membersWithClassifications")(function(e,t,n){if(!t||!n)return;return t.map((function(t){return{id:t.id,name:t.name,classifications:n.map((function(n){return{id:n.id,selected:(r=t,i=n,!!i[e]&&!!i[e].data.filter((function(e){return e.id===r.id})).length)};var r,i}))}}))}(e.memberType,i,a))}),[i,a]),f.useEffect((function(){i&&i.length&&r&&!r.length&&aa(n,"members")([])}),[r])}(e,i,a);var h={presentations:o,currentPresentation:v,setCurrentPresentation:m},y={members:s||[],memberType:n,getMemberAppLink:function(e){return Ae.getMemberAppLink(n,e)},getActions:function(e){return Ae.getMemberActions(t,le.Subject,n,e)},classifications:c,getClassificationAppLink:v&&ca(n,v.id),onToggleClassification:function(e,r,i){return function(e,t,n,r,i,a,o){(o?e.addObjectsToClassification.bind(e):e.removeObjectsFromClassification.bind(e))(a,n,t,r,i)}(b,n,i?[i]:u,t,v&&v.id,e,r)}},S=!!v&&!!c;return f.createElement(f.Fragment,null,f.createElement(Tr,{subjectId:t,activeAction:ua(n)}),f.createElement(jt.Alert,{variant:"info",className:"m-0"},"Select which ".concat(n," are shown for each classification in this subject.")+" Change the selected presentation to view different classifications."),f.createElement("div",{className:"w-50 py-2"},!!o&&f.createElement(mr,Object.assign({},h))),S&&f.createElement(Nr,Object.assign({},y)))}function fa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function pa(e){var t=e.parentId,n=fa(f.useState(),2),r=n[0],a=n[1],o=Object(p.useService)(l.SUBJECT),c=vt.getSubjectTreeFetchOptions(a);Object(p.useFetch)(c,[]);var s={application:u.SUBJECTS,action:i.Subjects.PRESENTATIONS},d={saveSubject:function(e,t){var n=t.setSubmitting;return o.createSubject(Object.assign({},e),(function(e){return function(e,t){t(!1),e&&e.id&&p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[e.id]})}(e,n)}),(function(){return n(!1)}))},subject:t?{parentId:t}:{},subjectTree:r},v=Object.values(d).every((function(e){return!!e}));return f.createElement(f.Fragment,null,f.createElement("div",{className:"pb-2 border-bottom"},f.createElement(Ct,{backToName:"Presentations",appLink:s})),f.createElement("h4",{className:"py-2"},"Create New Subject"),!!v&&f.createElement(jr,Object.assign({},d)))}function da(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var va=function(e,t,n){switch(e){case fe.Playlists:return Oi.getPlaylistFetchOptions(t,n);case fe.Series:return G.getSeriesFetchOptions(t,n);case fe.Videos:return ye.getVideoFetchOptions(t,n)}},ma=function(e,t,n,r){return[{variant:"link",onClick:e,buttonText:"Cancel"},{variant:"danger",onClick:t,buttonText:"Yes, remove this ".concat(Ae.singularizeMemberType(n)),isSpinnerButton:!0,showSpinner:r}]};function ba(e){var t=e.subjectId,n=e.memberId,r=e.memberType,i=e.closePopup,a=da(f.useState(),2),o=a[0],c=a[1],u=da(f.useState(),2),s=u[0],d=u[1],v=da(f.useState(!1),2),m=v[0],b=v[1],h=Object(p.useService)(l.SUBJECT);Object(p.useFetch)(va(r,n,d),[n]),Object(p.useFetch)(vt.getSubjectFetchOptions(t,c),[t]);var y=!!o&&!!s,S="Remove ".concat(Vt.capitalizeFirstLetter(Ae.singularizeMemberType(r)));return f.createElement(on,{title:S,closePopup:i,showLoadingSpinner:!y},y&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to remove ",f.createElement("strong",null,s.name)," from ",f.createElement("strong",null,o.name),"?"),f.createElement("p",null,"Please ensure that it is not in any classifications before removing.")),f.createElement(ln,{buttons:ma(i,(function(){b(!0),h.removeObjectsFromSubject(t,[n],r,i,i)}),r,m)})))}function ha(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ya(e){var t=e.subjectId,n=ha(f.useState({}),2),r=n[0];return function(e,t){var n=function(e){return d.StateHelper.getSetStateByKey(t,e)};Object(p.useFetch)(vt.getSubjectClassificationFetchOptions(e,n("classifications")),[e]),Object(p.useFetch)(vt.getPresentationsFetchOptions(n("presentations")),[])}(t,n[1]),f.createElement(f.Fragment,null,f.createElement(Tr,{subjectId:t,activeAction:i.Subjects.SUBJECT_CLASSIFICATIONS}),f.createElement(Cr,{presentations:r.presentations,classificationDictionary:p.ArrayHelper.groupBy(r.classifications,"presentationId")}))}var Sa=n(100),ga=n.n(Sa);function Ea(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ja(e){var t=e.selectedSubjectId,n=Ea(f.useState(),2),r=n[0],a=n[1];Object(p.useFetch)(vt.getSubjectTreeFetchOptions(a),[]);var o=f.useCallback((function(e){return{application:u.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[e.id]}}),[]),c={application:u.SUBJECTS,action:i.Subjects.NEW_SUBJECT},s=[{name:"Add child",getAppLink:function(e){return Object.assign(Object.assign({},c),{params:{parentId:e.id}})}},{name:"Delete subject",getAppLink:function(e){return{application:u.SUBJECTS,action:i.Subjects.DELETE_SUBJECT,args:[e.id]}},className:"text-danger"}];return f.createElement("div",{className:"".concat(ga.a.navContainer," h-auto pr-2 border-right")},f.createElement("h5",{className:"border-bottom pb-2"},"Subjects"),f.createElement(d.AppLink,{appLink:c,className:"d-inline-block pb-2"},f.createElement(d.SvgContainer,{svgName:d.cvSvgLibrary.Plus,size:d.SvgContainerSize.Small}),f.createElement("span",null,"New Subject")),!!r&&f.createElement("div",{className:"border-top pt-1"},f.createElement(On,{tree:r,getAppLink:o,selectedIds:[t],actions:s})))}function Oa(e){var t=e.currentAppLink;return f.createElement(kr,{navItems:Ce.getTopNavItems(),currentAppLink:t})}function Ta(e){return(Ta="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Aa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ca(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ia(e,t,n){return t&&Ca(e.prototype,t),n&&Ca(e,n),e}function _a(e,t){return!t||"object"!==Ta(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wa(e){return(wa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xa(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fa(e,t)}function Fa(e,t){return(Fa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var La=function(e){function t(){return Aa(this,t),_a(this,wa(t).apply(this,arguments))}return xa(t,e),Ia(t,[{key:"channelName",get:function(){return u.SUBJECTS}},{key:"appRoutes",get:function(){return{"subjects(/)":"subjects","subjects/add-objects(/)":"addSubjectMembers","subjects/new(/)":"newSubject","subjects/:id/edit(/)":"editSubject","subjects/:id/edit/playlists(/)":"editSubjectPlaylists","subjects/:id/edit/series(/)":"editSubjectSeries","subjects/:id/edit/videos(/)":"editSubjectVideos","subjects/:id/classifications(/)":"subjectClassifications","subjects/classifications(/)":"classifications","subjects/presentations/:id/classifications(/)":"presentationClassifications","subjects/presentations/:id/classifications/new(/)":"newClassification","subjects/presentations/:id/classifications/:id/edit(/)":"editClassification","subjects/presentations/:id/classifications/:id/edit/playlists(/)":"editClassificationPlaylists","subjects/presentations/:id/classifications/:id/edit/series(/)":"editClassificationSeries","subjects/presentations/:id/classifications/:id/edit/videos(/)":"editClassificationVideos","subjects/levels(/)":"levels","subjects/levels/new(/)":"newLevel","subjects/levels/:id(/)":"editLevel","subjects/audiences(/)":"audiences","subjects/presentations/:id/audiences(/)":"presentationAudiences","subjects/presentations/:id/audiences/new(/)":"newAudience","subjects/presentations/:id/audiences/:id/edit(/)":"editAudience","subjects/presentations(/)":"presentations","subjects/presentations/new":"newPresentation","subjects/presentations/:id(/)":"editPresentation","subjects/videos/:id(/)":"video","subjects/series/:id(/)":"series","subjects/playlists/:id(/)":"playlist"}}},{key:"appLinks",get:function(){return["deleteClassification","removeClassificationMember","deleteSubject","removeSubjectMember","deleteAudience","uploadImage"]}}]),t}(p.Core.AppRouter),Pa=function(e){function t(){return Aa(this,t),_a(this,wa(t).apply(this,arguments))}return xa(t,e),Ia(t,[{key:"initialize",value:function(){this.subjectDataService=p.InstanceManager.getInstance(l.SUBJECT,this)}},{key:"subjects",value:function(){this.subjectDataService.getSubjectTree((function(e){var t=!!e.children&&e.children[0];t?p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_SUBJECT,args:[t.id]},{replace:!0}):p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.NEW_SUBJECT},{replace:!0})}))}},{key:"newSubject",value:function(e){var t={parentId:e.parentId};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(pa,Object.assign({key:e.parentId},t))),this.renderSubjectsLeftNav()}},{key:"editSubject",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Xi,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"editSubjectPlaylists",value:function(e){var t={subjectId:e,memberType:fe.Playlists};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(la,Object.assign({key:"".concat(e,":playlists")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectSeries",value:function(e){var t={subjectId:e,memberType:fe.Series};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(la,Object.assign({key:"".concat(e,":series")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectVideos",value:function(e){var t={subjectId:e,memberType:fe.Videos};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(la,Object.assign({key:"".concat(e,":videos")},t))),this.renderSubjectsLeftNav(e)}},{key:"subjectClassifications",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ya,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"addSubjectMembers",value:function(e){var t=e.memberType,n=e.objectIds;if(t&&n){var r={memberType:t,objectIds:Array.isArray(n)?n:[n]};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Ki,Object.assign({},r))),this.hideLeftNav()}}},{key:"removeSubjectMember",value:function(e,t,n){var r=Object.assign({subjectId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(ba,Object.assign({},r)))}},{key:"deleteSubject",value:function(e){var t=e===this.currentLeftNavId?{application:u.SUBJECTS,action:i.Subjects.SUBJECTS}:null,n=Object.assign({subjectId:e,routeToOnDelete:t||null},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(Zi,Object.assign({},n)))}},{key:"classifications",value:function(){var e={objectType:"classifications",getAppLink:function(e){return{application:u.SUBJECTS,action:i.Subjects.PRESENTATION_CLASSIFICATIONS,args:[e]}}};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Hi,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationClassifications",value:function(e){this.subjectDataService.getClassificationTree(e,(function(t){var n=!!t.children&&t.children[0];n?p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]},{replace:!0}):p.Core.AppLinkHelper.trigger({application:u.SUBJECTS,action:i.Subjects.NEW_CLASSIFICATION,args:[e]},{replace:!0})}))}},{key:"newClassification",value:function(e,t){var n={presentationId:e,parentId:t.parentId};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ci,Object.assign({key:t.parentId},n))),this.renderClassificationLeftNav(e)}},{key:"editClassification",value:function(e,t){var n={presentationId:e,classificationId:t};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ri,Object.assign({key:t},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationPlaylists",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:fe.Playlists};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ai,Object.assign({key:"".concat(t,":playlists")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationSeries",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:fe.Series};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ai,Object.assign({key:"".concat(t,":series")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationVideos",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:fe.Videos};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ai,Object.assign({key:"".concat(t,":videos")},n))),this.renderClassificationLeftNav(e,t)}},{key:"removeClassificationMember",value:function(e,t,n){var r=Object.assign({classificationId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(Ii,Object.assign({},r)))}},{key:"deleteClassification",value:function(e,t){var n=t===this.currentLeftNavId?{application:u.SUBJECTS,action:i.Subjects.EDIT_PRESENTATION,args:[e]}:null,r=Object.assign({classificationId:t,routeToOnDelete:n||null},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(ti,Object.assign({},r)))}},{key:"levels",value:function(){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Pi,null)),this.hideLeftNav()}},{key:"newLevel",value:function(){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Ni,null)),this.hideLeftNav()}},{key:"editLevel",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(wi,{key:e,id:e})),this.hideLeftNav()}},{key:"audiences",value:function(){var e={objectType:"audiences",getAppLink:function(e){return{application:u.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e]}}};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Hi,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationAudiences",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Hr,{presentationId:e})),this.hideLeftNav()}},{key:"newAudience",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(qr,{presentationId:e})),this.hideLeftNav()}},{key:"editAudience",value:function(e,t){var n={presentationId:e,audienceId:t};this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Ur,Object.assign({key:t},n))),this.hideLeftNav()}},{key:"deleteAudience",value:function(e,t){var n={application:u.SUBJECTS,action:i.Subjects.PRESENTATION_AUDIENCES,args:[e]},r=Object.assign({id:t,routeToOnDelete:n},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement($n,Object.assign({},r)))}},{key:"presentations",value:function(){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Vi,null)),this.hideLeftNav()}},{key:"newPresentation",value:function(){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Mi,null))}},{key:"editPresentation",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Di,{key:e,id:e})),this.hideLeftNav()}},{key:"video",value:function(e){p.Core.LocationUtils.Redirect("/tools/programlookup/".concat(e))}},{key:"series",value:function(e){p.Core.LocationUtils.Redirect("/hostedlibraries/series/".concat(e))}},{key:"playlist",value:function(e){p.Core.LocationUtils.Redirect("/playlists/".concat(e))}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(Hn,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return mt.Radio.channel(p.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(d.LayoutRegions.ALERT,f.createElement(d.AlertList,{alerts:n,removeAlert:r}))}},{key:"renderClassificationLeftNav",value:function(e,t){this.setCurrentLeftNavItem(t);var n={presentationId:e,selectedClassificationId:t};this.layout.showChildView(d.LayoutRegions.LEFT_NAV,f.createElement(Xr,Object.assign({},n)))}},{key:"renderSubjectsLeftNav",value:function(e){this.setCurrentLeftNavItem(e),this.layout.showChildView(d.LayoutRegions.LEFT_NAV,f.createElement(ja,{selectedSubjectId:e}))}},{key:"setCurrentLeftNavItem",value:function(e){this.currentLeftNavId=e||null}},{key:"hideLeftNav",value:function(){this.setCurrentLeftNavItem(),this.layout.hideLeftNav()}},{key:"getTopNav",value:function(e){return f.createElement(Oa,{currentAppLink:e})}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Subjects Application"}},{key:"channelName",get:function(){return u.SUBJECTS}},{key:"layoutOptions",get:function(){return{name:c.CURATOR_LAYOUT,options:{provider:ra,getTopNavView:this.getTopNav}}}}],[{key:"router",get:function(){return La}}]),t}(p.Core.Application),Na=function(e){var t=e.children;return f.createElement(Et,null,f.createElement(yt,null,t))};function ka(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Da(e){var t=e.playlistId,n=e.closePopup,r=ka(f.useState(),2),a=r[0],o=r[1],c=ka(f.useState(!1),2),s=c[0],d=c[1],v=Object(p.useService)(l.PLAYLIST);Object(p.useFetch)(Oi.getPlaylistFetchOptions(t,o),[t]);var m=f.useCallback((function(){n(),p.Core.AppLinkHelper.trigger({application:u.PLAYLISTS,action:i.Playlists.PLAYLISTS})}),[]),b=f.useCallback((function(){d(!0),v.deletePlaylist(t,m,n)}),[t]),h=[{variant:"link",onClick:n,buttonText:"Cancel"},{variant:"danger",onClick:b,buttonText:"Yes, delete playlist",isSpinnerButton:!0,showSpinner:s}],y=!!a;return f.createElement(on,{title:"Delete Playlist",closePopup:n,showLoadingSpinner:!y},y&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to delete ",f.createElement("strong",null,a.name),"?"),f.createElement("p",null,"Please ensure it is not being used in any widgets.")),f.createElement(ln,{buttons:h})))}var Ra=Se.object().shape({name:Se.string().max(255,"Name is too long").required("Name is required"),description:Se.string().max(65535,"Description is too long")}),Ua={getEditPlaylistTabs:function(e,t){var n=u.PLAYLISTS,r=i.Playlists,a=[{label:"Edit Playlist Details",appLink:{application:n,action:r.EDIT_PLAYLIST,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_PLAYLIST_VIDEOS,args:[t]}}];return Ut(e)&&a.push({label:"Subjects",appLink:{application:n,action:r.EDIT_PLAYLIST_SUBJECTS,args:[t]},activeActions:[r.EDIT_PLAYLIST_SUBJECTS,r.REMOVE_FROM_SUBJECT]}),a}},Ba={onSort:function(e,t,n,r){if(p.FunctionHelper.isFunction(r)){if(t!==n){var i=p.ArrayHelper.moveItem(e,t,n),a=n<e.length-1?i[n+1].id:null;r(i,{sourceMemberId:i[n].id,destinationMemberId:a})}}else p.Core.ErrorHelper.throw(new p.DevError("A callback function must be passed to onSort"))}};function Va(e){var t=e.values,n=t.name,r=t.description,a=t.cover,o=void 0===a?{}:a,c=t.banner,s=void 0===c?{}:c,l=e.id,p=e.actions,v=e.isValid,m=e.isSubmitting,b=e.setFieldValue,h=!l;return f.createElement(Lt.Form,null,f.createElement(d.FormField,{label:"Name",type:"text",name:"name",id:"name",value:n,placeholder:"Enter a name for this playlist",autoFocus:!0}),f.createElement(d.FormField,{label:"Description",type:"textarea",name:"description",id:"description",value:r,placeholder:"Describe this playlist here"}),f.createElement(Kt,{imageType:d.ImageType.Covers,currentImage:o,setNewImage:function(e){return b("cover",e)},application:u.PLAYLISTS,uploadAction:i.Playlists.UPLOAD_IMAGE}),f.createElement(Kt,{imageType:d.ImageType.Banners,currentImage:s,setNewImage:function(e){return b("banner",e)},application:u.PLAYLISTS,uploadAction:i.Playlists.UPLOAD_IMAGE}),f.createElement("div",{className:"d-flex justify-content-between align-items-center"},f.createElement(d.SpinnerButton,{showSpinner:m,type:"submit",disabled:!v},h?"Create":"Save"),!!p&&f.createElement(At,{actions:p})))}var Ma=function(e,t){var n=[];return Ut(e)&&n.push({name:"Add to subject",appLink:{application:u.PLAYLISTS,action:i.Playlists.ADD_SUBJECT_MEMBERS,args:[t]}}),n.push({name:"Delete playlist",appLink:{application:u.PLAYLISTS,action:i.Playlists.DELETE_PLAYLIST,args:[t]},className:"text-danger"}),n};function Ja(e){var t=e.playlist,n=(t=void 0===t?{}:t).id,r=t.name,i=void 0===r?"":r,a=t.description,o=t.cover,c=void 0===o?{}:o,u=t.banner,s=void 0===u?{}:u,l=f.useContext(gt);return f.createElement(Lt.Formik,{initialValues:{name:i,description:a||"",cover:c,banner:s},validationSchema:Ra,onSubmit:e.savePlaylist},(function(e){return f.createElement(Va,Object.assign({id:n,actions:!!n&&Ma(l,n)},e))}))}var Ha=function(e){return function(t){return t.appLink.action===e}};function za(e){var t=e.playlistId,n=e.activeAction,r=f.useContext(gt);return f.createElement("div",{className:"py-2"},!!r&&f.createElement(bn,{tabs:Ua.getEditPlaylistTabs(r,t),isItemActive:Ha(n)}))}function Ya(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function $a(e){var t=e.playlistId,n=Ya(f.useState(),2),r=n[0],a=n[1],o=Object(p.useService)(l.PLAYLIST);Object(p.useFetch)(Oi.getPlaylistFetchOptions(t,a),[t]);return f.createElement(f.Fragment,null,f.createElement(za,{playlistId:t,activeAction:i.Playlists.EDIT_PLAYLIST}),!!r&&f.createElement(Ja,{playlist:r,savePlaylist:function(e,n){var r=n.setSubmitting;return o.updatePlaylist(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}}))}function qa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Wa=function(e){return[{name:"Add to subject",appLink:{application:u.PLAYLISTS,action:i.Playlists.ADD_SUBJECT_MEMBERS,args:[e]}}]},Ka=function(e){return function(t){return[{name:"Remove playlist from subject",appLink:{application:u.PLAYLISTS,action:i.Playlists.REMOVE_FROM_SUBJECT,args:[e.toString(),t.id.toString()]},className:"text-danger"}]}},Ga=function(e){return{application:u.PLAYLISTS,action:i.Playlists.SUBJECT,args:[e.id]}};function Za(e){var t=e.playlistId,n=qa(f.useState(),2),r=n[0],a=n[1],o=qa(f.useState(),2),c=o[0];return function(e,t,n){Object(p.useBulkFetch)([Oi.getPlaylistFetchOptions(e,t),vt.getObjectSubjectsFetchOptions(e,fe.Playlists,n)],[e])}(t,a,o[1]),f.createElement(f.Fragment,null,f.createElement(za,{playlistId:t,activeAction:i.Playlists.EDIT_PLAYLIST_SUBJECTS}),f.createElement(rn,{object:r,actions:Wa(t)}),!!c&&!!c.length&&f.createElement("p",null,f.createElement("em",null,"To view the classifications that this playlist is mapped to, please click on the subjects below.")),!!c&&f.createElement(mn,{subjects:c,getSubjectAppLink:Ga,getActions:Ka(t),emptyMessage:"This playlist isn't mapped to any subjects."}))}function Qa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Xa=function(e){return function(t){return[{name:"Remove video",appLink:{application:u.PLAYLISTS,action:i.Playlists.REMOVE_VIDEO,args:[e.toString(),t.id.toString()]},className:"text-danger"}]}},eo=function(e){return{application:u.PLAYLISTS,action:i.Playlists.VIDEO,args:[e.id]}};function to(e){var t=e.playlistId,n=Qa(f.useState(),2),r=n[0],a=n[1],o=Qa(f.useState(),2),c=o[0],u=o[1],s=Object(p.useService)(l.PLAYLIST);!function(e,t,n){Object(p.useBulkFetch)([Oi.getPlaylistFetchOptions(e,t),Oi.getPlaylistVideosFetchOptions(e,n)],[e])}(t,a,u);return f.createElement(f.Fragment,null,f.createElement(za,{playlistId:t,activeAction:i.Playlists.EDIT_PLAYLIST_VIDEOS}),f.createElement(rn,{object:r}),!!c&&f.createElement(Mn,{onSortEnd:function(e,n){if(c.data&&c.data[e]){Ba.onSort(c.data,e,n,(function(e,n){s.reorderVideos(t,n),u((function(t){return{data:e,pagination:t.pagination}}))}))}},videos:c,getVideoAppLink:eo,getVideoActions:Xa(t),emptyMessage:"There are no videos in this playlist."}))}function no(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ro(){var e=no(f.useState(),2),t=e[0],n=e[1],r=Object(p.useService)(l.PLAYLIST);Object(p.useFetch)(ie.getCurrentUserFetchOptions(n),[]);var a=f.useCallback((function(e,t){t(!1),e&&e.id&&p.Core.AppLinkHelper.trigger({application:u.PLAYLISTS,action:i.Playlists.EDIT_PLAYLIST,args:[e.id]})}),[]),o=f.useCallback((function(e,n){var i=n.setSubmitting;r.createPlaylist(e,t.id,(function(e){return a(e,i)}),(function(){return i(!1)}))}),[t,a]);return f.createElement(f.Fragment,null,!!t&&f.createElement(Ja,{savePlaylist:o}))}function io(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ao(e){var t=e.videoId,n=e.playlistId,r=e.closePopup,i=io(f.useState(),2),a=i[0],o=i[1],c=io(f.useState(),2),u=c[0],s=c[1],d=io(f.useState(!1),2),v=d[0],m=d[1],b=Object(p.useService)(l.PLAYLIST);Object(p.useFetch)(ye.getVideoFetchOptions(t,o),[t]),Object(p.useFetch)(Oi.getPlaylistFetchOptions(n,s),[n]);var h=f.useCallback((function(){m(!0),b.removeVideoFromPlaylist(n,t,r,r)}),[t,n]),y=[{variant:"link",onClick:r,buttonText:"Cancel"},{variant:"danger",onClick:h,buttonText:"Yes, remove video",isSpinnerButton:!0,showSpinner:v}],S=u&&a;return f.createElement(on,{title:"Remove Video",closePopup:r,showLoadingSpinner:!S},!!S&&f.createElement(f.Fragment,null,f.createElement("div",null,f.createElement("p",null,"Are you sure you want to remove ",f.createElement("strong",null,a.name)," from ",f.createElement("strong",null,u.name),"?")),f.createElement(ln,{buttons:y})))}function oo(e){return(oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function co(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function so(e,t,n){return t&&uo(e.prototype,t),n&&uo(e,n),e}function lo(e,t){return!t||"object"!==oo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fo(e){return(fo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function po(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vo(e,t)}function vo(e,t){return(vo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var mo=function(e){function t(){return co(this,t),lo(this,fo(t).apply(this,arguments))}return po(t,e),so(t,[{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"appRoutes",get:function(){return{"playlists(/)":"index","playlists/new(/)":"newPlaylist","playlists/:id(/)":"editPlaylist","playlists/:id/videos(/)":"editPlaylistVideos","playlists/:id/subjects(/)":"editPlaylistSubjects","playlists/videos/:id(/)":"video","playlists/subjects/:id(/)":"subject"}}},{key:"appLinks",get:function(){return["deletePlaylist","removeVideo","uploadImage","addSubjectMembers","removeFromSubject"]}}]),t}(p.Core.AppRouter),bo=function(e){function t(){return co(this,t),lo(this,fo(t).apply(this,arguments))}return po(t,e),so(t,[{key:"index",value:function(){this.navigate("/dashboards/playlists")}},{key:"newPlaylist",value:function(){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(ro,null))}},{key:"editPlaylist",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement($a,{key:e,playlistId:e}))}},{key:"editPlaylistVideos",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(to,{key:e,playlistId:e}))}},{key:"editPlaylistSubjects",value:function(e){this.layout.showChildView(d.LayoutRegions.CONTENT,f.createElement(Za,{key:e,playlistId:e}))}},{key:"deletePlaylist",value:function(e){var t=Object.assign({playlistId:e},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(Da,Object.assign({},t)))}},{key:"removeVideo",value:function(e,t){var n=Object.assign({playlistId:e,videoId:t},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(ao,Object.assign({},n)))}},{key:"video",value:function(e){p.Core.LocationUtils.Redirect("/tools/programlookup/".concat(e))}},{key:"subject",value:function(e){var t={application:u.SUBJECTS,action:i.Subjects.EDIT_SUBJECT_PLAYLISTS,args:[e]};p.Core.LocationUtils.Redirect(p.Core.AppLinkHelper.getHref(t))}},{key:"addSubjectMembers",value:function(e){var t={application:u.SUBJECTS,action:i.Subjects.ADD_SUBJECT_MEMBERS,params:{memberType:fe.Playlists,objectIds:Array.isArray(e)?e:[e]}};p.Core.LocationUtils.Redirect(p.Core.AppLinkHelper.getHref(t))}},{key:"removeFromSubject",value:function(e,t){var n=Object.assign({subjectId:t,memberId:e,memberType:fe.Playlists},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(ba,Object.assign({},n)))}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(d.LayoutRegions.POPUP,f.createElement(Hn,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return mt.Radio.channel(p.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(d.LayoutRegions.ALERT,f.createElement(d.AlertList,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"navigate",value:function(e){p.Core.LocationUtils.PageLoad(e)}},{key:"name",get:function(){return"Playlists Application"}},{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"layoutOptions",get:function(){return{name:c.CURATOR_LAYOUT,options:{provider:Na}}}}],[{key:"router",get:function(){return mo}}]),t}(p.Core.Application);n.d(t,"Actions",(function(){return i})),n.d(t,"DataPrefixes",(function(){return a})),n.d(t,"FileExtensions",(function(){return o})),n.d(t,"Layouts",(function(){return c})),n.d(t,"AppChannels",(function(){return u})),n.d(t,"DataChannels",(function(){return s})),n.d(t,"DataServices",(function(){return l})),n.d(t,"CuratorLayoutView",(function(){return T})),n.d(t,"LayoutComponent",(function(){return N})),n.d(t,"ImageUploadDataService",(function(){return V})),n.d(t,"SeriesDataService",(function(){return W})),n.d(t,"SeriesDataServiceHelper",(function(){return G})),n.d(t,"UserDataService",(function(){return ne})),n.d(t,"UserDataServiceHelper",(function(){return ie})),n.d(t,"VideoDataService",(function(){return be})),n.d(t,"VideoDataServiceHelper",(function(){return ye})),n.d(t,"SubjectDataService",(function(){return pt})),n.d(t,"SubjectDataServiceHelper",(function(){return vt})),n.d(t,"SubjectsApplication",(function(){return Pa})),n.d(t,"PlaylistDataService",(function(){return Ei})),n.d(t,"PlaylistDataServiceHelper",(function(){return Oi})),n.d(t,"PlaylistsApplication",(function(){return bo}))}])}));
2
2
  //# sourceMappingURL=curator-app.js.map