function _typeof(e){return(_typeof="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 _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var i=r[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey(i.key),i)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,r){if("object"!=_typeof(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return("string"===r?String:Number)(e);t=t.call(e,r||"default");if("object"!=_typeof(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}var HoraireAffiche=(()=>_createClass(function e(){_classCallCheck(this,e)},[{key:"checkIfSkipElementPlaylist",value:function(e){e.listeDate;var r=e.listeHeure,e=e.listeJour,t=this.recupererHoraire(i=[],r,e),i=this.recupererHoraire(i,r,e,1),r=t.skip||i.skip;return r=t.horaire&&i.horaire?t.skip&&i.skip:r}},{key:"checkIfSkipElementPlayer",value:function(e){var r=e.listeDate,t=e.listeHeure,e=e.listeJour,i=this.recupererHoraire(r,t,e),r=this.recupererHoraire(r,t,e,1),t=i.skip||r.skip;return t=i.horaire&&r.horaire?i.skip&&r.skip:t}},{key:"checkIfSkipElement",value:function(e){var r=this,t=!0;return e&&e.affiches&&1<e.affiches.length?e.affiches.forEach(function(e){e.affiches.forEach(function(e){r.checkHoraire(e.horaires)||(t=!1)})}):e.affiches.horaires&&(t=this.checkHoraire(e.affiches.horaires)),t}},{key:"checkHoraire",value:function(e){var r=e.date,t=e.heure,e=e.jour,i=this.recupererHoraire(r,t,e),r=this.recupererHoraire(r,t,e,1),t=i.skip||r.skip;return t=i.horaire&&r.horaire?i.skip&&r.skip:t}},{key:"recupererHoraire",value:function(e,r,t){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,o=[null,null],e=(e[i]&&(o=e[i]),[null,null]),r=(r[i]&&(e=r[i]),{plageHoraire:i+1,jour:t[i],date:{debut:o[0],fin:o[1]},heure:{debut:e[0],fin:e[1]}});return this.gestionHoraire(r,i)}},{key:"gestionHoraire",value:function(e,r){var t=[],i={horaire:!1,skip:!1,plageHoraire:r+1},o=(new Date).toTimeString().split(" GMT")[0],n=(new Date).toISOString().split("T")[0];return null==e.date.debut&&null==e.heure.debut&&""===e.jour||(i.horaire=!0,n=this.checkDateEtHeure(e.date,n),t.push(n),n)||(n=this.checkDateEtHeure(e.heure,o),t.push(n),n)||(o=this.checkJour(e.jour),t.push(o)),(t[0]||t[1]||t[2])&&(i.horaire=!0,i.skip=!0),r=0,i}},{key:"checkDateEtHeure",value:function(e,r){return r<e.debut||r>e.fin}},{key:"checkJour",value:function(e){var r=(new Date).getDay().toString();return"0"===r&&(r="7"),null!=e?!e.includes(r)&&""!=e:""}}]))();