@clickview/library-editor 1.44.1-rc.0 → 1.44.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +2 -2
- package/dist/css/{2482-library-editor-5078795cf9.chunk.css → 2482-library-editor-6893a774e7.chunk.css} +1 -1
- package/dist/css/{6582-library-editor-47a75275ca.chunk.css → 2696-library-editor-4a7e07523b.chunk.css} +2 -2
- package/dist/css/{3087-library-editor-48ea20c815.chunk.css → 3087-library-editor-e17193216d.chunk.css} +1 -1
- package/dist/css/{343-library-editor-b5257118f9.chunk.css → 343-library-editor-9c019e516a.chunk.css} +1 -1
- package/dist/css/{3551-library-editor-d7b4563664.chunk.css → 3551-library-editor-37e6a3ecdc.chunk.css} +2 -2
- package/dist/css/{6352-library-editor-644fb58ac8.chunk.css → 6352-library-editor-c99ed407da.chunk.css} +1 -1
- package/dist/css/library-editor-app-d3089f7dab.css +62 -0
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{1601-807fe6b883.chunk.js → 1601-6eb85a794d.chunk.js} +1 -1
- package/dist/scripts/{259-b9143cebc3.chunk.js → 259-7d1d480f6e.chunk.js} +1 -1
- package/dist/scripts/2696-d9358ee579.chunk.js +2 -0
- package/dist/scripts/{3087-10641264a6.chunk.js → 3087-31652fd164.chunk.js} +1 -1
- package/dist/scripts/{3778-c1359747ac.chunk.js → 3778-60cf0a97d4.chunk.js} +1 -1
- package/dist/scripts/456-a1c2432237.chunk.js +1 -0
- package/dist/scripts/5850-1247daf018.chunk.js +1 -0
- package/dist/scripts/61-c8f0780c00.chunk.js +2 -0
- package/dist/scripts/6427-a7a06d37cf.chunk.js +1 -0
- package/dist/scripts/{7190-bb5d61afc5.chunk.js → 7190-d26b5ef34d.chunk.js} +1 -1
- package/dist/scripts/{7295-0ee9d9bd85.chunk.js → 7295-594d2f2def.chunk.js} +1 -1
- package/dist/scripts/8614-d2aae15910.chunk.js +2 -0
- package/dist/scripts/{9383-66ee024166.chunk.js → 9383-51cb65e6f7.chunk.js} +1 -1
- package/dist/scripts/bundle-a8dcf91291.min.js +2 -0
- package/package.json +1 -1
- package/dist/css/library-editor-app-94ad6d7654.css +0 -62
- package/dist/scripts/3567-77588c7fee.chunk.js +0 -1
- package/dist/scripts/4251-0b0c374686.chunk.js +0 -2
- package/dist/scripts/61-afc963ebe2.chunk.js +0 -2
- package/dist/scripts/6427-373276a90b.chunk.js +0 -1
- package/dist/scripts/6582-3d53d7e4cd.chunk.js +0 -2
- package/dist/scripts/9024-06b27d2b22.chunk.js +0 -1
- package/dist/scripts/bundle-3d909cf0e8.min.js +0 -2
- /package/dist/css/{3567-library-editor-e9cac790d6.chunk.css → 456-library-editor-e9cac790d6.chunk.css} +0 -0
- /package/dist/css/{4251-library-editor-5368f03ffe.chunk.css → 8614-library-editor-5368f03ffe.chunk.css} +0 -0
- /package/dist/scripts/{101-59428084bf.chunk.js → 101-dd5f891259.chunk.js} +0 -0
- /package/dist/scripts/{1010-d5c811879c.chunk.js → 1010-60f6dfd832.chunk.js} +0 -0
- /package/dist/scripts/{1409-e77c8982bb.chunk.js → 1409-93a72ff5bf.chunk.js} +0 -0
- /package/dist/scripts/{1601-807fe6b883.chunk.js.LICENSE.txt → 1601-6eb85a794d.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{1703-a4165b29f0.chunk.js → 1703-a320de79f3.chunk.js} +0 -0
- /package/dist/scripts/{1832-64d40684a4.chunk.js → 1832-23fead57c5.chunk.js} +0 -0
- /package/dist/scripts/{1876-a62d35b891.chunk.js → 1876-2b788843ab.chunk.js} +0 -0
- /package/dist/scripts/{2417-f6194f2c0e.chunk.js → 2417-1ee31c4281.chunk.js} +0 -0
- /package/dist/scripts/{243-845572fbbb.chunk.js → 243-2012c53e96.chunk.js} +0 -0
- /package/dist/scripts/{2482-1f565c0998.chunk.js → 2482-955e4b3615.chunk.js} +0 -0
- /package/dist/scripts/{2601-3c14f9bb49.chunk.js → 2601-d973ed65dc.chunk.js} +0 -0
- /package/dist/scripts/{2644-d371f7f2cf.chunk.js → 2644-485d14740b.chunk.js} +0 -0
- /package/dist/scripts/{4251-0b0c374686.chunk.js.LICENSE.txt → 2696-d9358ee579.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{299-902bf9f064.chunk.js → 299-eeaac48864.chunk.js} +0 -0
- /package/dist/scripts/{343-f4fe764628.chunk.js → 343-bb56a70dd3.chunk.js} +0 -0
- /package/dist/scripts/{35-059b230132.chunk.js → 35-7bfbab50e6.chunk.js} +0 -0
- /package/dist/scripts/{3551-f653ca1b11.chunk.js → 3551-5513258594.chunk.js} +0 -0
- /package/dist/scripts/{3746-65a75d633b.chunk.js → 3746-092214a0a0.chunk.js} +0 -0
- /package/dist/scripts/{376-f1479ce5b5.chunk.js → 376-98c734f74f.chunk.js} +0 -0
- /package/dist/scripts/{4245-05262bc3f2.chunk.js → 4245-6e9e71cc7d.chunk.js} +0 -0
- /package/dist/scripts/{4523-ca8248823d.chunk.js → 4523-6d51af0964.chunk.js} +0 -0
- /package/dist/scripts/{5046-d96f9b8a40.chunk.js → 5046-19d7090284.chunk.js} +0 -0
- /package/dist/scripts/{5286-cd51d38877.chunk.js → 5286-293188ce69.chunk.js} +0 -0
- /package/dist/scripts/{546-dbcd00e8a9.chunk.js → 546-9b17236feb.chunk.js} +0 -0
- /package/dist/scripts/{5707-7a54774b60.chunk.js → 5707-41f283fd98.chunk.js} +0 -0
- /package/dist/scripts/{5747-459f8afa94.chunk.js → 5747-0ab2cc3678.chunk.js} +0 -0
- /package/dist/scripts/{5891-1f84bfeb5a.chunk.js → 5891-b72da0591f.chunk.js} +0 -0
- /package/dist/scripts/{61-afc963ebe2.chunk.js.LICENSE.txt → 61-c8f0780c00.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6352-f59224dcd2.chunk.js → 6352-aaaf02499b.chunk.js} +0 -0
- /package/dist/scripts/{6963-9742b1ac30.chunk.js → 6963-386c2153af.chunk.js} +0 -0
- /package/dist/scripts/{7002-580c3dac24.chunk.js → 7002-3686f9dcfb.chunk.js} +0 -0
- /package/dist/scripts/{7053-62aabdd574.chunk.js → 7053-38535c04ca.chunk.js} +0 -0
- /package/dist/scripts/{7071-5ff3233cde.chunk.js → 7071-5a543a7eec.chunk.js} +0 -0
- /package/dist/scripts/{708-5773723b46.chunk.js → 708-9aa6428a97.chunk.js} +0 -0
- /package/dist/scripts/{7408-40f786ee81.chunk.js → 7408-35779961a6.chunk.js} +0 -0
- /package/dist/scripts/{6582-3d53d7e4cd.chunk.js.LICENSE.txt → 8614-d2aae15910.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8727-273095d854.chunk.js → 8727-2e314f9301.chunk.js} +0 -0
- /package/dist/scripts/{bundle-3d909cf0e8.min.js.LICENSE.txt → bundle-a8dcf91291.min.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 1601-
|
|
1
|
+
/*! For license information please see 1601-6eb85a794d.chunk.js.LICENSE.txt */
|
|
2
2
|
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1601],{70680:function(e,t,n){"use strict";n.d(t,{r:function(){return g}});var r=n(57857),i=n(31647),o=n(88172),a=n(93569),s=n(40622),c=n(26457),l=n(97781),u=n.n(l);function h(e){return h="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},h(e)}function p(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,f(r.key),r)}}function f(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function d(e,t,n){return t=v(t),function(e,t){if(t&&("object"==h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),d(this,t,[e])}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),n=t,(l=[{key:"initialize",value:function(){this.spinnerModel=new i.Q.Hn({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,s.NT.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return u()}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(o.ZV.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==c.Um.New&&this.model.get("status")!==c.Um.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:r.T.getPhrase(this.lang,"mergeChapters"),subtitles:r.T.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:r.T.getPhrase(this.lang,"enabledCustomSubtitles")},t=new o.Py({buttonText:e[this.options.type],extraButtonClass:"btn-dark ".concat("XKFne"),model:this.spinnerModel,spinnerOptions:{size:a.Ey.Small,type:a.dR.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:s.NT.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:r.T.getPhrase(this.lang,"chaptersHeading"),line1:r.T.getPhrase(this.lang,"chaptersInfo1"),line2:r.T.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:r.T.getPhrase(this.lang,"subtitlesHeading"),line1:r.T.getPhrase(this.lang,"subtitlesInfo1"),line2:r.T.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:r.T.getPhrase(this.lang,"cvSubtitlesHeading"),line1:r.T.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:r.T.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&r.T.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(o.ZV.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===c.Um.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&p(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l}(i.Q.wA)},21053:function(e,t,n){"use strict";n.d(t,{W:function(){return b}});var r=n(48088),i=n(57857),o=n(31647),a=n(57085),s=n(35630),c=n(57098),l=n(43791),u=n.n(l),h={svgContainer:"mtegw"};function p(e){return p="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},p(e)}function f(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,d(r.key),r)}}function d(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function y(e,t,n){return t=m(t),function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,v()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var b=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,t,[e])}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return u()}},{key:"viewOptions",value:function(){return{styles:h}}},{key:"onSave",value:function(){r.Radio.channel(c.OV.LIBRARY_EDITOR).trigger(c.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:i.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:i.T.getPhrase(this.lang,"chapters")};case"resources":return{name:i.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new s.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new a.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&f(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},16704:function(e,t,n){"use strict";n.r(t),n.d(t,{EditChaptersView:function(){return F}});var r=n(39479),i=n(99748),o=n(21679),a=n(57857),s=n(31647),c=n(52076),l=n(70065),u=n(59054),h=n(13156),p=n(99952),f=n(57e3),d=n(89167),y=n(57098),v=n(29457),m=n(74749),g=n(48404),b=n(19226),w=n(93569),C=n(264),k=n(45114),T=n(70693),E=n(70680),P=n(21053),O=n(40622),S=n(26457),L=n(56906),_=n(95061),j=n(7190),V=n(61159),x=n.n(V);function R(e){return R="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},R(e)}function I(){I=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var C=Object.getPrototypeOf,k=C&&C(C(V([])));k&&k!==n&&r.call(k,a)&&(w=k);var T=b.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,s){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==R(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=p;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=S(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var l=h(t,n,r);if("normal"===l.type){if(i=r.done?y:f,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=y,r.method="throw",r.arg=l.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function V(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(R(t)+" is not iterable")}return g.prototype=b,i(T,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},E(P.prototype),l(P.prototype,s,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(T),l(T,c,"Generator"),l(T,a,(function(){return this})),l(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=V,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:V(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}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,A(r.key),r)}}function A(e){var t=function(e,t){if("object"!=R(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==R(t)?t:t+""}function q(e,t,n){return t=M(t),function(e,t){if(t&&("object"==R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,U()?Reflect.construct(t,n||[],M(e).constructor):t.apply(e,n))}function U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(U=function(){return!!e})()}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}var F=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=q(this,t,[e]))._viewKeyRequested=!1,n}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}(t,e),n=t,(V=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),w.Si.initBackButton()}},{key:"name",get:function(){return"EditVideoChaptersView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editChapters"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"template",get:function(){return x()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:v.LP.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:v.LP.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:v.LP.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:v.LP.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(y.Vk.VIDEO,"".concat(y.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(y.Vk.CHAPTER,"".concat(y.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError),this.listenTo(this.channelName,O.NT.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,O.NT.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,O.NT.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,O.NT.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,O.NT.SeekToChapter,this.onSeekToChapter),this.listenTo(this.channelName,O.NT.MergeChapters,this.onMergeChapters)}},{key:"initializeDataServices",value:function(){this.videoDataService=o.u.getInstance(y.Or.Video,this),this.chapterDataService=o.u.getInstance(y.Or.Chapter,this),this.playerDataService=o.u.getInstance(y.Or.Player,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case i.h.NotFound:s.Q.Ry.throw(new L.l1);break;case i.h.Forbidden:s.Q.Ry.throw(new L.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===i.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"updateChapters",value:function(){var e=this;if(C.g.hasLite){var t=this.chapters.toJSON().reverse().reduce((function(t,n){var r=t[t.length-1];return[].concat(function(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t),[{timestamp:n.startTime,endTimestamp:(null==r?void 0:r.timestamp)||e.player.duration(),name:n.name}])}),[]).reverse();this.player.setChapters(t)}}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:a.T.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,n=new m.W(e);this.chapters.add(n),n.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.updateChapters(),t.logAction(e,l.Vw.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,n=this.chapters.find((function(t){return t.get("id")===e.id}));n.set("loading",!0);var r=h.J.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(n.id,e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.updateChapters(),t.logAction(e,l.Vw.Edit)}),r)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,l.Vw.Delete),t.chapters.remove(e),t.updateChapters()}))}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=w.X4.millisecondsToSeconds(this.model.get("duration"))&&(this.player?this.player.currentTime(e):this.webPlayer.seekTo(e))}},{key:"logAction",value:function(e,t){var n=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));c.k.logUserAction(n,{actionType:t,entity:l.py.Chapter,location:l.LZ.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){return t=this,n=void 0,r=void 0,i=I().mark((function t(){var n,r;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e<0)){t.next=2;break}return t.abrupt("return");case 2:if(!this.player){t.next=9;break}return t.next=5,this.player.getChapters();case 5:return n=t.sent,r=n[e],this.player.currentTime(r.timestamp),t.abrupt("return");case 9:this.webPlayer.seekToChapter(e);case 10:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(e,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}c((i=i.apply(t,n||[])).next())}));var t,n,r,i}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[S.Um.SingleFile,S.Um.ConcatenationFailed];r.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==S.Um.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.render()}))}},{key:"renderChapterList",value:function(){this.showChildView("chapterList",new T.Q({collection:this.chapters,duration:this.model.get("duration"),channelName:this.channelName,showActions:!this.hasPhysicalChapters.get("value"),editable:!this.hasPhysicalChapters.get("value"),showHeader:!0}))}},{key:"renderChapterForm",value:function(){this.showChildView("addChapter",new k.L({model:new m.W,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(y._2.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("addChapter",new E.r({type:"chapters",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderEditComponents",value:function(){if(this.hasPhysicalChapters.get("value"))return this.renderConcatenationRequest(),void this.mapPhysicalChapters();this.renderChapterForm(),this.renderChapterList()}},{key:"renderTabs",value:function(){var e=w.BK.canEditVideo(this.model);this.showChildView("tabs",new P.W({model:this.model,tabs:w.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-chapters-applink",context:"chapters",folder:this.folder,libraries:this.libraries}))}},{key:"renderWebPlayer",value:function(){if(this.playerViewKey)return this.player=new f.l({model:this.playerViewKey,playerApiUrl:this.config.get("playerApiUrl"),channelName:this.channelName,inactivityTimeout:0}),void this.showChildView("webplayer",this.player);this.webPlayer=new d.Q({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.webPlayer)}},{key:"mapPhysicalChapters",value:function(){var e=this;this.renderPartialLoading("chapterList");var t=function(t){e.chapters=new p.q(j.$k.mapPhysicalChapters(t)),e.renderChapterList()};this.player?this.player.getChapters().then(t):this.webPlayer.query("getChapters",t)}},{key:"redirectToVideoDetails",value:function(){s.Q.C$.trigger({application:y.OV.LIBRARY_EDITOR,action:y.eX.LibraryEditor.VIDEO_DETAILS,args:[this.model.get("id")]},{replace:!0})}},{key:"fetchData",value:function(){var e=this;if(this.model=this.videoDataService.getVideo(this.options.videoId),this.model){if(!w.BK.canEditVideo(this.model))return void this.redirectToVideoDetails();this.chapters=this.model.chapters,this.folder=this.model.categories.first(),C.g.hasLite&&!this._viewKeyRequested&&(this._viewKeyRequested=!0,this.playerDataService.createViewKey(this.model.get("id"),u.f.MasterObject,(function(t){e.playerViewKey=t,e.render()})))}this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||C.g.hasLite&&!this.playerViewKey||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"requiredResources",get:function(){return{config:g.p.config,currentUser:b.K.currentUser,libraries:_.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents(),this.startPollingConcatenation()}}])&&D(n.prototype,V),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,V}(s.Q.G7)},97781:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.progress:o,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?o:""},2:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.escapeExpression;return' <span class="m-3 text-secondary">'+a(e.lambda(null!=(o=null!=t?t.options:t)?o.progress:o,t))+'</span>\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\n"},4:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.failed:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:""},5:function(e,t,n,r,i){return e.propertyIsEnumerable,'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return"<h4>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.heading:o,t))+"</h4>\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line1:o,t))+"</p>\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line2:o,t))+'</p>\n<div class="btn-region"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.processing:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?o:"")},useData:!0})},43791:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(o=null!=(o=n.name||(null!=t?t.name:t))?o:e.hooks.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):o)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region ps-2"></div>'},useData:!0})},61159:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="tab-region w-100"></div>\n<div class="row">\n <div class="col-6 pt-3">\n <div class="webplayer-region"></div>\n <div class="add-chapter-region"></div>\n </div>\n <div class="col-6 mb-2 pt-3">\n <div class="chapter-list-region"></div>\n </div>\n</div>'},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[259],{86257:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},21974:function(e,t,n){"use strict";n.d(t,{u:function(){return s}});var r=n(57857),o=n(75459),i=n(86257),a=n(63791);function u(e){return u="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},u(e)}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l="shared.shared-utils",s={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case o.r.HostedLibrary:case o.r.CustomLibrary:return e.name;case o.r.Exchange:return r.T.getPhrase(l,"exchange");case o.r.Workspace:return r.T.getPhrase(l,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case o.r.HostedLibrary:case o.r.CustomLibrary:return"bg-info";case o.r.Exchange:return"bg-green";case o.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t=c(c(c(c(c(c(c({},i.L.Pdf,a.vn.FilePDF),i.L.Image,a.vn.FileImg),i.L.PowerPoint,a.vn.FilePowerpoint),i.L.Document,a.vn.FileWord),i.L.Excel,a.vn.FileExcel),i.L.Zip,a.vn.FileZip),i.L.File,a.vn.File)[e];return t||(t=a.vn.Folder),t},mapTypeToClass:function(e){switch(e){case i.L.Pdf:return"icon-red";case i.L.Image:return"icon-purple";case i.L.Document:return"icon-blue";case i.L.Excel:return"icon-green";case i.L.PowerPoint:return"icon-orange";case i.L.Zip:return"icon-teal";case i.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case i.L.Pdf:return r.T.getPhrase(l,"pdf");case i.L.Image:return r.T.getPhrase(l,"image");case i.L.Document:return r.T.getPhrase(l,"document");case i.L.Excel:return r.T.getPhrase(l,"spreadsheet");case i.L.PowerPoint:return r.T.getPhrase(l,"presentation");case i.L.Zip:return r.T.getPhrase(l,"zipArchive");case i.L.File:return r.T.getPhrase(l,"file");default:return""}}}},68708:function(e,t,n){"use strict";n.d(t,{c:function(){return N}});var r=n(31647),o=n(48088),i=n(57857),a=n(52076),u=n(70065),c=n(63791),l=n(57098),s=n(93569),p=n(76431),f=n.n(p),y={container:"vvTSf"};function d(e){return d="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},d(e)}function m(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,b(r.key),r)}}function b(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function h(e,t,n){return t=g(t),function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,v()?Reflect.construct(t,n||[],g(e).constructor):t.apply(e,n))}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}var k=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),h(this,t,[e])}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat(y.container," rounded p-2 mb-2 d-flex align-items-center")}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"attributes",get:function(){return{title:this.model.get("name")}}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":{application:l.OV.LIBRARY_EDITOR,action:l.eX.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}},{key:"onClickEdit",value:function(){var e=a.k.mergeOptions(this.options.analyticsOptions,{actionType:u.Vw.Edit,entity:u.py.Resource,workflowPhase:u.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};a.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new s.Mr({title:i.T.getPhrase(this.lang,"removeHeading"),text:i.T.getPhrase(this.lang,"removeConfirm",{name:s.m$.escapeExpression(this.model.get("name"))}),buttons:[{text:i.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:i.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:s.N0.generateUniqueChannelName(this)}).render().done((function(){o.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:y,editable:this.options.editable,linkSvg:c.Nj.getSvg(c.vn.Link),editSvg:c.Nj.getSvg(c.vn.Edit),trashSvg:c.Nj.getSvg(c.vn.Delete)}}}])&&m(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA),O=n(52929),P=n.n(O);function T(e){return T="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},T(e)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(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,x(r.key),r)}}function j(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e){var t=function(e,t){if("object"!=T(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==T(t)?t:t+""}function C(e,t,n){return t=L(t),function(e,t){if(t&&("object"==T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,n||[],L(e).constructor):t.apply(e,n))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function I(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}var N=function(e){function t(e){return S(this,t),C(this,t,[e])}return I(t,e),j(t,[{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return P()}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new D({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}}])}(r.Q.wA),D=function(e){function t(e){return S(this,t),C(this,t,[e])}return I(t,e),j(t,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return k}}])}(r.Q.$W)},77605:function(e,t,n){"use strict";n.d(t,{c:function(){return V},h:function(){return F}});var r=n(48088),o=n(57857),i=n(31647),a=n(53808),u=n(52076),c=n(70065),l=n(63791),s=n(21974),p=n(95117),f=n.n(p);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},y(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,m(r.key),r)}}function m(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function b(e,t,n){return t=v(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var w=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),b(this,t,[e])}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat("CdlNn"," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":this.options.getEditAppLink(this.model.get("id"))}}},{key:"onClickEdit",value:function(){var e=u.k.mergeOptions(this.options.analyticsOptions,{actionType:c.Vw.Edit,entity:c.py.Resource,workflowPhase:c.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};u.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){a.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,extension:s.u.mapTypeToExtension(t),svg:l.Nj.getSvg(s.u.mapTypeToSvg(t)),iconClass:s.u.mapTypeToClass(t),resourceType:s.u.mapTypeToName(t),editSvg:l.Nj.getSvg(l.vn.Edit),trashSvg:l.Nj.getSvg(l.vn.Delete)}}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.wA),k=n(41934),O=n(25094),P=n(54758),T=n(99114),S=n.n(T);function E(e){return E="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(e)}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(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 C(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}function L(e,t,n){return t=R(t),function(e,t){if(t&&("object"==E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,I()?Reflect.construct(t,n||[],R(e).constructor):t.apply(e,n))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function N(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var F=function(e){function t(e){return j(this,t),L(this,t,[e])}return N(t,e),C(t,[{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"childView",get:function(){return w}},{key:"childViewOptions",get:function(){var e=this;return{editable:this.options.editable,videoId:this.options.videoId,analyticsOptions:this.options.analyticsOptions,onClickDelete:function(t){return e.onClickDelete(t)},getEditAppLink:function(t){return{application:O.OV.LIBRARY_EDITOR,action:k.e.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}},{key:"onClickDelete",value:function(e){var t=this;new P.M({title:o.T.getPhrase(this.lang,"removeHeading"),text:o.T.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:o.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:o.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){r.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}}])}(i.Q.$W),V=function(e){function t(e){return j(this,t),L(this,t,[e])}return N(t,e),C(t,[{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return S()}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new F({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||o.T.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}}])}(i.Q.wA)},95117:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda;return'<a class="float-end svg-container cursor-pointer text-secondary delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\n<a class="float-end svg-container cursor-pointer text-secondary edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,u=e.lambda,c=e.escapeExpression,l=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,p="function";return'<span title="'+c(u(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle me-2 svg-container '+c(u(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\n<a href="'+c(typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:s)===p?a.call(l,{name:"url",hash:{},data:o}):a)+"?name="+c(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:s)===p?a.call(l,{name:"name",hash:{},data:o}):a)+'" class="align-middle">\n '+c(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:s)===p?a.call(l,{name:"name",hash:{},data:o}):a)+"\n</a>\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},76431:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda;return' <a class="ms-auto me-1 svg-container cursor-pointer text-secondary edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+'</a>\n <a class="svg-container cursor-pointer text-secondary delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,l="function",s=e.escapeExpression;return'<span class="svg-container text-info me-2">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\n<a class="w-75 text-truncate" href="'+s(typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:c)===l?a.call(u,{name:"url",hash:{},data:o}):a)+'" target="_blank">'+s(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)===l?a.call(u,{name:"name",hash:{},data:o}):a)+"</a>\n"+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},52929:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="links-region"></div>'},useData:!0})},99114:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.resourcesHeadingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="resource-list-region"></div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[259],{86257:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},21974:function(e,t,n){"use strict";n.d(t,{u:function(){return s}});var r=n(57857),o=n(75459),i=n(86257),u=n(63791);function a(e){return a="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},a(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c="shared.shared-utils",s={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-blue";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case o.r.HostedLibrary:case o.r.CustomLibrary:return e.name;case o.r.Exchange:return r.T.getPhrase(c,"exchange");case o.r.Workspace:return r.T.getPhrase(c,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case o.r.HostedLibrary:case o.r.CustomLibrary:return"bg-blue";case o.r.Exchange:return"bg-green";case o.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t=l(l(l(l(l(l(l({},i.L.Pdf,u.vn.FilePDF),i.L.Image,u.vn.FileImg),i.L.PowerPoint,u.vn.FilePowerpoint),i.L.Document,u.vn.FileWord),i.L.Excel,u.vn.FileExcel),i.L.Zip,u.vn.FileZip),i.L.File,u.vn.File)[e];return t||(t=u.vn.Folder),t},mapTypeToClass:function(e){switch(e){case i.L.Pdf:return"icon-red";case i.L.Image:return"icon-purple";case i.L.Document:return"icon-blue";case i.L.Excel:return"icon-green";case i.L.PowerPoint:return"icon-orange";case i.L.Zip:return"icon-teal";case i.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case i.L.Pdf:return r.T.getPhrase(c,"pdf");case i.L.Image:return r.T.getPhrase(c,"image");case i.L.Document:return r.T.getPhrase(c,"document");case i.L.Excel:return r.T.getPhrase(c,"spreadsheet");case i.L.PowerPoint:return r.T.getPhrase(c,"presentation");case i.L.Zip:return r.T.getPhrase(c,"zipArchive");case i.L.File:return r.T.getPhrase(c,"file");default:return""}}}},68708:function(e,t,n){"use strict";n.d(t,{c:function(){return N}});var r=n(31647),o=n(48088),i=n(57857),u=n(52076),a=n(70065),l=n(63791),c=n(57098),s=n(93569),p=n(76431),f=n.n(p),y={container:"vvTSf"};function d(e){return d="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},d(e)}function m(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,b(r.key),r)}}function b(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function h(e,t,n){return t=g(t),function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,v()?Reflect.construct(t,n||[],g(e).constructor):t.apply(e,n))}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}var k=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),h(this,t,[e])}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat(y.container," rounded p-2 mb-2 d-flex align-items-center")}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"attributes",get:function(){return{title:this.model.get("name")}}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}},{key:"onClickEdit",value:function(){var e=u.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.Edit,entity:a.py.Resource,workflowPhase:a.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};u.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new s.Mr({title:i.T.getPhrase(this.lang,"removeHeading"),text:i.T.getPhrase(this.lang,"removeConfirm",{name:s.m$.escapeExpression(this.model.get("name"))}),buttons:[{text:i.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:i.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:s.N0.generateUniqueChannelName(this)}).render().done((function(){o.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:y,editable:this.options.editable,linkSvg:l.Nj.getSvg(l.vn.Link),editSvg:l.Nj.getSvg(l.vn.Edit),trashSvg:l.Nj.getSvg(l.vn.Delete)}}}])&&m(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA),O=n(52929),P=n.n(O);function T(e){return T="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},T(e)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(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,x(r.key),r)}}function j(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e){var t=function(e,t){if("object"!=T(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==T(t)?t:t+""}function C(e,t,n){return t=L(t),function(e,t){if(t&&("object"==T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,n||[],L(e).constructor):t.apply(e,n))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function I(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}var N=function(e){function t(e){return S(this,t),C(this,t,[e])}return I(t,e),j(t,[{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return P()}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new D({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}}])}(r.Q.wA),D=function(e){function t(e){return S(this,t),C(this,t,[e])}return I(t,e),j(t,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return k}}])}(r.Q.$W)},77605:function(e,t,n){"use strict";n.d(t,{c:function(){return V},h:function(){return F}});var r=n(48088),o=n(57857),i=n(31647),u=n(53808),a=n(52076),l=n(70065),c=n(63791),s=n(21974),p=n(95117),f=n.n(p);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},y(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,m(r.key),r)}}function m(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function b(e,t,n){return t=v(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var w=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),b(this,t,[e])}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat("CdlNn"," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":this.options.getEditAppLink(this.model.get("id"))}}},{key:"onClickEdit",value:function(){var e=a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.Edit,entity:l.py.Resource,workflowPhase:l.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};a.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){u.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,extension:s.u.mapTypeToExtension(t),svg:c.Nj.getSvg(s.u.mapTypeToSvg(t)),iconClass:s.u.mapTypeToClass(t),resourceType:s.u.mapTypeToName(t),editSvg:c.Nj.getSvg(c.vn.Edit),trashSvg:c.Nj.getSvg(c.vn.Delete)}}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.wA),k=n(41934),O=n(25094),P=n(54758),T=n(99114),S=n.n(T);function E(e){return E="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(e)}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(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 C(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}function L(e,t,n){return t=R(t),function(e,t){if(t&&("object"==E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,I()?Reflect.construct(t,n||[],R(e).constructor):t.apply(e,n))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function N(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var F=function(e){function t(e){return j(this,t),L(this,t,[e])}return N(t,e),C(t,[{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"childView",get:function(){return w}},{key:"childViewOptions",get:function(){var e=this;return{editable:this.options.editable,videoId:this.options.videoId,analyticsOptions:this.options.analyticsOptions,onClickDelete:function(t){return e.onClickDelete(t)},getEditAppLink:function(t){return{application:O.OV.LIBRARY_EDITOR,action:k.e.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}},{key:"onClickDelete",value:function(e){var t=this;new P.M({title:o.T.getPhrase(this.lang,"removeHeading"),text:o.T.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:o.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:o.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){r.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}}])}(i.Q.$W),V=function(e){function t(e){return j(this,t),L(this,t,[e])}return N(t,e),C(t,[{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return S()}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new F({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||o.T.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}}])}(i.Q.wA)},95117:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda;return'<a class="float-end svg-container cursor-pointer text-secondary delete">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\n<a class="float-end svg-container cursor-pointer text-secondary edit">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u,a=e.lambda,l=e.escapeExpression,c=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,p="function";return'<span title="'+l(a(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle me-2 svg-container '+l(a(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\n<a href="'+l(typeof(u=null!=(u=n.url||(null!=t?t.url:t))?u:s)===p?u.call(c,{name:"url",hash:{},data:o}):u)+"?name="+l(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:s)===p?u.call(c,{name:"name",hash:{},data:o}):u)+'" class="align-middle">\n '+l(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:s)===p?u.call(c,{name:"name",hash:{},data:o}):u)+"\n</a>\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},76431:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda;return' <a class="ms-auto me-1 svg-container cursor-pointer text-secondary edit">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+'</a>\n <a class="svg-container cursor-pointer text-secondary delete">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c="function",s=e.escapeExpression;return'<span class="svg-container text-info me-2">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\n<a class="w-75 text-truncate" href="'+s(typeof(u=null!=(u=n.url||(null!=t?t.url:t))?u:l)===c?u.call(a,{name:"url",hash:{},data:o}):u)+'" target="_blank">'+s(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:l)===c?u.call(a,{name:"name",hash:{},data:o}):u)+"</a>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},52929:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="links-region"></div>'},useData:!0})},99114:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.resourcesHeadingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="resource-list-region"></div>'},useData:!0})}}]);
|