vendor: 5,074 bytes, line 1
1!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ResumeMedia=e():t.ResumeMedia=e()}(window,function(){return n={},o.m=r=[function(t,e,r){"use strict";function E(t){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function j(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */j=function(){return a};var a={},t=Object.prototype,f=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i,a,u,c,o=e&&e.prototype instanceof h?e:h,s=Object.create(o.prototype),f=new _(n||[]);return s._invoke=(i=t,a=r,u=f,c="suspendedStart",function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return S()}for(u.method=t,u.arg=e;;){var r=u.delegate;if(r){var n=b(r,u);if(n){if(n===p)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if("suspendedStart"===c)throw c="completed",u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c="executing";var o=l(i,a,u);if("normal"===o.type){if(c=u.done?"completed":"suspendedYield",o.arg===p)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c="completed",u.method="throw",u.arg=o.arg)}}),s}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var p={};function h(){}function c(){}function s(){}var d={};i(d,o,function(){return this});var y=Object.getPrototypeOf,v=y&&y(y(L([])));v&&v!==t&&f.call(v,o)&&(d=v);var g=s.prototype=h.prototype=Object.create(d);function m(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function w(c,s){var e;this._invoke=function(r,n){function t(){return new s(function(t,e){!function e(t,r,n,o){var i=l(c[t],c,r);if("throw"!==i.type){var a=i.arg,u=a.value;return u&&"object"==E(u)&&f.call(u,"__await")?s.resolve(u.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):s.resolve(u).then(function(t){a.value=t,n(a)},function(t){return e("throw",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function L(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(f.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:S}}function S(){return{value:void 0,done:!0}}return i(g,"constructor",c.prototype=s),i(s,"constructor",c),c.displayName=i(s,n,"GeneratorFunction"),a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===c||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,i(t,n,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},m(w.prototype),i(w.prototype,r,function(){return this}),a.AsyncIterator=w,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new w(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},m(g),i(g,n,"Generator"),i(g,o,function(){return this}),i(g,"toString",function(){return"[object Generator]"}),a.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=L,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
1h(O),!t)for(var e in this)"t"===e.charAt(0)&&f.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=f.call(o,"catchLoc"),u=f.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&f.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},a}function c(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function a(u){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=u.apply(t,a);function o(t){c(n,e,r,o,i,"next",t)}function i(t){c(n,e,r,o,i,"throw",t)}o(void 0)})}}r.r(e),r.d(e,"TIPOLOGY",function(){return d}),r.d(e,"MEDIA",function(){return y}),r.d(e,"WRITING_FREQUENCY",function(){return v}),r.d(e,"configureApp",function(){return L}),r.d(e,"getAudio",function(){return S}),r.d(e,"getItem",function(){return I}),r.d(e,"getList",function(){return k}),r.d(e,"getVideo",function(){return M}),r.d(e,"setItem",function(){return P}),r.d(e,"isAvaliable",function(){return A});var s,u={},f="_ccma_resume_playlist_",l="https://api.3cat.cat/usuaris/llistes/obtenircontinguts?_format=json&tipus_llista=continuareproduint&vista=HISTORIC",p={pageItems:200,page:1},h=5/1440,n=!1,o=[],i=0,d={VIDEO:"DTY_VIDEO_MM",AUDIO:"WCR_AUDIO_MM"},y={TV:"TELEVISIO",RADIO:"RADIO"},v=5e3,g=function(){var t,e=(t=window.getUser())?t.idint:null;return[f,e].join("")},m=function(){return t=window.getUser(),s=t?t.access_token:null,t&&!!window.CCMAStorage;var t},w=function(){var t=a(j().mark(function t(){var e;return j().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,window.CCMAStorage.get(g());case 2:return e=t.sent,t.prev=3,t.abrupt("return",JSON.parse(e));case 7:return t.prev=7,t.t0=t.catch(3),t.abrupt("return",{});case 10:case"end":return t.stop()}},t,null,[[3,7]])}));return function(){return t.apply(this,arguments)}}(),b=function(){var t=a(j().mark(function t(){var e,r,n,o,i,a,u;return j().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=l,s){t.next=3;break}return t.abrupt("return",{});case 3:return l.endsWith(".json")||(n=l+"&usuari_id="+s+"&uuid="+void 0,n=p.media?n+"&mitja="+p.media:n,n=p.pageItems?n+"&items_pagina="+p.pageItems:n,n=p.page?n+"&pagina="+p.page:n),t.next=6,fetch(n);case 6:return o=t.sent,t.next=9,o.json();case 9:return i=t.sent,a={},null!=i&&null!==(e=i.resposta)&&void 0!==e&&null!==(r=e.items)&&void 0!==r&&r.item&&(a=i.resposta.items.item.reduce(function(t,e){return t[e.tipologia]||(t[e.tipologia]={}),t[e.tipologia][e.contingut_id]={tc:e.tc},t},{})),0===Object.keys(a).length&&(a[d.VIDEO]={}),u=JSON.stringify(a),t.next=16,window.CCMAStorage.set(g(),u,{expires:h});case 16:return t.next=18,w();case 18:return t.abrupt("return",t.sent);case 19:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),x=function(){return new Promise(function(){var e=a(j().mark(function t(r){return j().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=!u||0===Object.keys(u).length,!(3e5<Date.now()-i||e)){t.next=17;break}if(o.push(r),n){t.next=15;break}return n=!0,t.next=6,w();case 6:if((u=t.sent)&&0!==Object.keys(u).length){t.next=11;break}return t.next=10,b();case 10:u=t.sent;case 11:i=Date.now(),o.forEach(function(t){return t()}),n=!(o=[]);case 15:t.next=18;break;case 17:r();case 18:case"end":return t.stop()}var e},t)}));return function(t){return e.apply(this,arguments)}}())},O=function(t,e,r){"object"!=E(u)&&(u=JSON.parse(u),console.log("_addMediaToPlayList playList com objecte")),u[e]||(u[e]={}),u[e][t]={tc:r}},_=function(){var t=!0;return window.ServicesStatus&&(t=window.ServicesStatus.isServiceStatusActive("resume-media")),t};function L(t){var e=t.name,r=t.url,n=t.media,o=t.tipology,i=t.page,a=t.pageItems;f=e||f,l=r||l,p={media:n||p.media,tipology:o||p.tipology,page:i||p.page,pageItems:a||p.pageItems}}function S(t){return I({id:t,tipology:d.AUDIO})}function I(t){var r,n=t.id,o=t.tipology;return new Promise(function(){var e=a(j().mark(function t(e){return j().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(m())return t.next=3,x();t.next=4;break;case 3:u&&u[o]&&(r=u[o][n]);case 4:e(r);case 5:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}())}function k(){var r={};return new Promise(function(){var e=a(j().mark(function t(e){return j().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(m())return t.next=3,x();t.next=4;break;case 3:r=u;case 4:e(r);case 5:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}())}function M(t){return I({id:t,tipology:d.VIDEO})}function P(t){var n=t.id,o=t.tipology,i=t.tc;return new Promise(function(){var e=a(j().mark(function t(e){var r;return j().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(m())return t.next=3,x();t.next=7;break;case 3:return O(n,o,i),r=JSON.stringify(u),t.next=7,window.CCMAStorage.set(g(),r,{expires:h});case 7:e();case 8:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}())}function A(){return window.Moduls&&window.Moduls.login&&Moduls.login.isLogged()&&_()}}],o.c=n,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
1),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0);function o(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return r[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var r,n}); 2//# sourceMappingURL=resume-media.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.