@italia/video 0.1.0-alpha.2 → 1.0.0-alpha.10

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.
@@ -543,8 +543,12 @@ function requireDomElement () {
543
543
 
544
544
  DOMElement.prototype.removeAttributeNS =
545
545
  function _Element_removeAttributeNS(namespace, name) {
546
+ // Prevent prototype pollution by checking if namespace is a direct property
547
+ if (!Object.prototype.hasOwnProperty.call(this._attributes, namespace)) {
548
+ return;
549
+ }
546
550
  var attributes = this._attributes[namespace];
547
- if (attributes) {
551
+ if (attributes && Object.prototype.hasOwnProperty.call(attributes, name)) {
548
552
  delete attributes[name];
549
553
  }
550
554
  };
@@ -7175,6 +7179,9 @@ function requireDom () {
7175
7179
  }
7176
7180
  do{
7177
7181
  newFirst.parentNode = parent;
7182
+ // Update ownerDocument for each node being inserted
7183
+ var targetDoc = parent.ownerDocument || parent;
7184
+ _updateOwnerDocument(newFirst, targetDoc);
7178
7185
  }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
7179
7186
  _onUpdateChild(parent.ownerDocument||parent, parent);
7180
7187
  //console.log(parent.lastChild.nextSibling == null)
@@ -7184,6 +7191,37 @@ function requireDom () {
7184
7191
  return node;
7185
7192
  }
7186
7193
 
7194
+ /**
7195
+ * Recursively updates the ownerDocument property for a node and all its descendants
7196
+ * @param {Node} node
7197
+ * @param {Document} newOwnerDocument
7198
+ * @private
7199
+ */
7200
+ function _updateOwnerDocument(node, newOwnerDocument) {
7201
+ if (node.ownerDocument === newOwnerDocument) {
7202
+ return;
7203
+ }
7204
+
7205
+ node.ownerDocument = newOwnerDocument;
7206
+
7207
+ // Update attributes if this is an element
7208
+ if (node.nodeType === ELEMENT_NODE && node.attributes) {
7209
+ for (var i = 0; i < node.attributes.length; i++) {
7210
+ var attr = node.attributes.item(i);
7211
+ if (attr) {
7212
+ attr.ownerDocument = newOwnerDocument;
7213
+ }
7214
+ }
7215
+ }
7216
+
7217
+ // Recursively update child nodes
7218
+ var child = node.firstChild;
7219
+ while (child) {
7220
+ _updateOwnerDocument(child, newOwnerDocument);
7221
+ child = child.nextSibling;
7222
+ }
7223
+ }
7224
+
7187
7225
  /**
7188
7226
  * Appends `newChild` to `parentNode`.
7189
7227
  * If `newChild` is already connected to a `parentNode` it is first removed from it.
@@ -7209,6 +7247,11 @@ function requireDom () {
7209
7247
  }
7210
7248
  parentNode.lastChild = newChild;
7211
7249
  _onUpdateChild(parentNode.ownerDocument, parentNode, newChild);
7250
+
7251
+ // Update ownerDocument for the new child and all its descendants
7252
+ var targetDoc = parentNode.ownerDocument || parentNode;
7253
+ _updateOwnerDocument(newChild, targetDoc);
7254
+
7212
7255
  return newChild;
7213
7256
  }
7214
7257
 
@@ -7237,7 +7280,7 @@ function requireDom () {
7237
7280
  return newChild;
7238
7281
  }
7239
7282
  _insertBefore(this, newChild, refChild);
7240
- newChild.ownerDocument = this;
7283
+ _updateOwnerDocument(newChild, this);
7241
7284
  if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {
7242
7285
  this.documentElement = newChild;
7243
7286
  }
@@ -7253,7 +7296,7 @@ function requireDom () {
7253
7296
  replaceChild: function (newChild, oldChild) {
7254
7297
  //raises
7255
7298
  _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);
7256
- newChild.ownerDocument = this;
7299
+ _updateOwnerDocument(newChild, this);
7257
7300
  if (oldChild) {
7258
7301
  this.removeChild(oldChild);
7259
7302
  }
@@ -8033,7 +8076,7 @@ var hasRequiredEntities;
8033
8076
  function requireEntities () {
8034
8077
  if (hasRequiredEntities) return entities;
8035
8078
  hasRequiredEntities = 1;
8036
- (function (exports) {
8079
+ (function (exports$1) {
8037
8080
 
8038
8081
  var freeze = requireConventions().freeze;
8039
8082
 
@@ -8044,7 +8087,7 @@ function requireEntities () {
8044
8087
  * @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0
8045
8088
  * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML Wikipedia
8046
8089
  */
8047
- exports.XML_ENTITIES = freeze({
8090
+ exports$1.XML_ENTITIES = freeze({
8048
8091
  amp: '&',
8049
8092
  apos: "'",
8050
8093
  gt: '>',
@@ -8066,7 +8109,7 @@ function requireEntities () {
8066
8109
  * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)
8067
8110
  * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)
8068
8111
  */
8069
- exports.HTML_ENTITIES = freeze({
8112
+ exports$1.HTML_ENTITIES = freeze({
8070
8113
  Aacute: '\u00C1',
8071
8114
  aacute: '\u00E1',
8072
8115
  Abreve: '\u0102',
@@ -10198,7 +10241,7 @@ function requireEntities () {
10198
10241
  * @deprecated use `HTML_ENTITIES` instead
10199
10242
  * @see HTML_ENTITIES
10200
10243
  */
10201
- exports.entityMap = exports.HTML_ENTITIES;
10244
+ exports$1.entityMap = exports$1.HTML_ENTITIES;
10202
10245
  } (entities));
10203
10246
  return entities;
10204
10247
  }
@@ -14720,8 +14763,8 @@ var clockExports = requireClock();
14720
14763
 
14721
14764
  /**
14722
14765
  * @license
14723
- * Video.js 8.23.4 <http://videojs.com/>
14724
- * Copyright Brightcove, Inc. <https://www.brightcove.com/>
14766
+ * Video.js 8.23.7 <http://videojs.com/>
14767
+ * Copyright 2010-present Video.js contributors
14725
14768
  * Available under Apache License Version 2.0
14726
14769
  * <https://github.com/videojs/video.js/blob/main/LICENSE>
14727
14770
  *
@@ -14731,7 +14774,7 @@ var clockExports = requireClock();
14731
14774
  */
14732
14775
 
14733
14776
 
14734
- var version$6 = "8.23.4";
14777
+ var version$6 = "8.23.7";
14735
14778
 
14736
14779
  /**
14737
14780
  * An Object that contains lifecycle hooks as keys which point to an array
@@ -21280,23 +21323,20 @@ class TrackList extends EventTarget$2 {
21280
21323
  constructor(tracks = []) {
21281
21324
  super();
21282
21325
  this.tracks_ = [];
21283
-
21284
- /**
21285
- * @memberof TrackList
21286
- * @member {number} length
21287
- * The current number of `Track`s in the this Trackist.
21288
- * @instance
21289
- */
21290
- Object.defineProperty(this, 'length', {
21291
- get() {
21292
- return this.tracks_.length;
21293
- }
21294
- });
21295
21326
  for (let i = 0; i < tracks.length; i++) {
21296
21327
  this.addTrack(tracks[i]);
21297
21328
  }
21298
21329
  }
21299
21330
 
21331
+ /**
21332
+ * The current number of `Track`s in this TrackList.
21333
+ *
21334
+ * @type {number}
21335
+ */
21336
+ get length() {
21337
+ return this.tracks_.length;
21338
+ }
21339
+
21300
21340
  /**
21301
21341
  * Add a {@link Track} to the `TrackList`
21302
21342
  *
@@ -21336,10 +21376,10 @@ class TrackList extends EventTarget$2 {
21336
21376
  /**
21337
21377
  * Triggered when a track label is changed.
21338
21378
  *
21339
- * @event TrackList#addtrack
21379
+ * @event TrackList#labelchange
21340
21380
  * @type {Event}
21341
21381
  * @property {Track} track
21342
- * A reference to track that was added.
21382
+ * A reference to track whose label was changed.
21343
21383
  */
21344
21384
  track.labelchange_ = () => {
21345
21385
  this.trigger({
@@ -26145,7 +26185,7 @@ class TextTrackDisplay extends Component$1 {
26145
26185
  }
26146
26186
  this.updateForTrack(descriptionsTrack);
26147
26187
  }
26148
- if (!window$1.CSS.supports('inset', '10px')) {
26188
+ if (!(window$1.CSS !== undefined && window$1.CSS.supports('inset', '10px'))) {
26149
26189
  const textTrackDisplay = this.el_;
26150
26190
  const vjsTextTrackCues = textTrackDisplay.querySelectorAll('.vjs-text-track-cue');
26151
26191
  const controlBarHeight = this.player_.controlBar.el_.getBoundingClientRect().height;
@@ -26193,7 +26233,7 @@ class TextTrackDisplay extends Component$1 {
26193
26233
  updateDisplayOverlay() {
26194
26234
  // inset-inline and inset-block are not supprted on old chrome, but these are
26195
26235
  // only likely to be used on TV devices
26196
- if (!this.player_.videoHeight() || !window$1.CSS.supports('inset-inline: 10px')) {
26236
+ if (!this.player_.videoHeight() || !(window$1.CSS !== undefined && window$1.CSS.supports('inset-inline: 10px'))) {
26197
26237
  return;
26198
26238
  }
26199
26239
  const playerWidth = this.player_.currentWidth();
@@ -26986,7 +27026,7 @@ class CurrentTimeDisplay extends TimeDisplay {
26986
27026
  let time;
26987
27027
  if (this.player_.ended()) {
26988
27028
  time = this.player_.duration();
26989
- } else if (event && event.target && typeof event.target.pendingSeekTime === 'function') {
27029
+ } else if (event && event.target && typeof event.target.pendingSeekTime === 'function' && event.target.pendingSeekTime() !== null) {
26990
27030
  time = event.target.pendingSeekTime();
26991
27031
  } else {
26992
27032
  time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();
@@ -30657,9 +30697,12 @@ class MenuButton extends Component$1 {
30657
30697
  *
30658
30698
  * @param {string} name
30659
30699
  * The icon name to be added.
30700
+ *
30701
+ * @return {Element}
30702
+ * The element that gets created.
30660
30703
  */
30661
30704
  setIcon(name) {
30662
- super.setIcon(name, this.menuButton_.el_);
30705
+ return super.setIcon(name, this.menuButton_.el_);
30663
30706
  }
30664
30707
 
30665
30708
  /**
@@ -42943,7 +42986,7 @@ videojs.registerPlugin('qualityLevels', qualityLevels);
42943
42986
  // Include the version number.
42944
42987
  qualityLevels.VERSION = version$5;
42945
42988
 
42946
- /*! @name @videojs/http-streaming @version 3.17.2 @license Apache-2.0 */
42989
+ /*! @name @videojs/http-streaming @version 3.17.3 @license Apache-2.0 */
42947
42990
 
42948
42991
  /**
42949
42992
  * @file resolve-url.js - Handling how URLs are resolved and manipulated
@@ -47362,7 +47405,7 @@ const getWorkerString = function (fn) {
47362
47405
  return fn.toString().replace(/^function.+?{/, '').slice(0, -1);
47363
47406
  };
47364
47407
 
47365
- /* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */
47408
+ /* rollup-plugin-worker-factory start for worker!/Users/srimron-soutter/repos/github/vjs/http-streaming/src/transmuxer-worker.js */
47366
47409
  const workerCode$1 = transform(getWorkerString(function () {
47367
47410
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
47368
47411
  /**
@@ -56063,7 +56106,7 @@ const workerCode$1 = transform(getWorkerString(function () {
56063
56106
  };
56064
56107
  }));
56065
56108
  var TransmuxWorker = factory(workerCode$1);
56066
- /* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */
56109
+ /* rollup-plugin-worker-factory end for worker!/Users/srimron-soutter/repos/github/vjs/http-streaming/src/transmuxer-worker.js */
56067
56110
 
56068
56111
  const handleData_ = (event, transmuxedData, callback) => {
56069
56112
  const {
@@ -63875,7 +63918,7 @@ class TimelineChangeController extends videojs.EventTarget {
63875
63918
  }
63876
63919
  }
63877
63920
 
63878
- /* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */
63921
+ /* rollup-plugin-worker-factory start for worker!/Users/srimron-soutter/repos/github/vjs/http-streaming/src/decrypter-worker.js */
63879
63922
  const workerCode = transform(getWorkerString(function () {
63880
63923
  /**
63881
63924
  * @file stream.js
@@ -64467,7 +64510,7 @@ const workerCode = transform(getWorkerString(function () {
64467
64510
  };
64468
64511
  }));
64469
64512
  var Decrypter = factory(workerCode);
64470
- /* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */
64513
+ /* rollup-plugin-worker-factory end for worker!/Users/srimron-soutter/repos/github/vjs/http-streaming/src/decrypter-worker.js */
64471
64514
 
64472
64515
  /**
64473
64516
  * Convert the properties of an HLS track into an audioTrackKind.
@@ -66791,7 +66834,14 @@ class PlaylistController extends videojs.EventTarget {
66791
66834
  if (media.start) {
66792
66835
  const offset = media.start.timeOffset;
66793
66836
  if (offset < 0) {
66794
- startPoint = Math.max(seekableEnd + offset, seekable.start(0));
66837
+ // Per HLS spec, negative TIME-OFFSET is from the end of the last Media Segment.
66838
+ // For live streams, seekableEnd already has liveEdgeDelay subtracted,
66839
+ // so we need to add it back to get the actual playlist end.
66840
+ // Clamp to seekableEnd to avoid seeking into the unsafe live edge zone.
66841
+ const main = this.mainPlaylistLoader_.main;
66842
+ const liveEdgeDelay = Vhs$1.Playlist.liveEdgeDelay(main, media);
66843
+ const actualPlaylistEnd = seekableEnd + liveEdgeDelay;
66844
+ startPoint = Math.max(Math.min(actualPlaylistEnd + offset, seekableEnd), seekable.start(0));
66795
66845
  } else {
66796
66846
  startPoint = Math.min(seekableEnd, offset);
66797
66847
  }
@@ -68789,7 +68839,7 @@ const initPlugin = function (player, options) {
68789
68839
  const reloadSourceOnError = function (options) {
68790
68840
  initPlugin(this, options);
68791
68841
  };
68792
- var version$4 = "3.17.2";
68842
+ var version$4 = "3.17.3";
68793
68843
  var version$3 = "7.1.0";
68794
68844
  var version$2 = "1.3.1";
68795
68845
  var version$1 = "7.2.0";
@@ -70074,7 +70124,9 @@ function registerTranslation(...translation) {
70074
70124
  });
70075
70125
  update();
70076
70126
  }
70077
- window.registerTranslation = registerTranslation;
70127
+ if (typeof window !== 'undefined') {
70128
+ window.registerTranslation = registerTranslation;
70129
+ }
70078
70130
  /**
70079
70131
  * Localize Reactive Controller for components built with Lit
70080
70132
  *
@@ -70397,6 +70449,7 @@ const interactions = new WeakMap();
70397
70449
  /** A reactive controller to allow form controls to participate in form submission, validation, etc. */
70398
70450
  class FormControlController {
70399
70451
  constructor(host, options) {
70452
+ this.submittedOnce = false;
70400
70453
  this.handleFormData = (event) => {
70401
70454
  // console.log('handleFormData');
70402
70455
  const disabled = this.options.disabled(this.host);
@@ -70418,6 +70471,27 @@ class FormControlController {
70418
70471
  event.formData.append(name, value);
70419
70472
  }
70420
70473
  break;
70474
+ case 'it-checkbox':
70475
+ case 'it-toggle':
70476
+ if (this.host.checked) {
70477
+ if (event.formData.getAll(name).indexOf(value) < 0) {
70478
+ // handle group checkbox
70479
+ event.formData.append(name, value);
70480
+ }
70481
+ }
70482
+ break;
70483
+ case 'it-checkbox-group':
70484
+ case 'it-toggle-group':
70485
+ // non settare valori in formData, perchè ogni singola checkbox setta il suo valore
70486
+ break;
70487
+ case 'it-upload':
70488
+ // value is File[] — append each File object directly (not as string)
70489
+ if (Array.isArray(value)) {
70490
+ value.forEach((file) => {
70491
+ event.formData.append(name, file);
70492
+ });
70493
+ }
70494
+ break;
70421
70495
  default:
70422
70496
  if (Array.isArray(value)) {
70423
70497
  value.forEach((val) => {
@@ -70439,13 +70513,30 @@ class FormControlController {
70439
70513
  this.setUserInteracted(control, true);
70440
70514
  });
70441
70515
  }
70442
- if (this.form && !this.form.noValidate && !disabled && !reportValidity(this.host)) {
70516
+ const resReportValidity = reportValidity(this.host);
70517
+ if (this.form && !this.form.noValidate && !disabled && !resReportValidity) {
70443
70518
  event.preventDefault();
70444
70519
  // event.stopImmediatePropagation(); // se lo attiviamo, valida un campo alla volta
70520
+ // Scroll al primo controllo non valido
70521
+ const formControls = formCollections.get(this.form);
70522
+ if (formControls) {
70523
+ for (const control of formControls) {
70524
+ if (!control.validity?.valid) {
70525
+ // Scroll smooth verso il controllo non valido
70526
+ control.scrollIntoView({
70527
+ behavior: 'smooth',
70528
+ block: 'center',
70529
+ });
70530
+ break;
70531
+ }
70532
+ }
70533
+ }
70445
70534
  }
70535
+ this.submittedOnce = true;
70446
70536
  };
70447
70537
  this.handleFormReset = () => {
70448
70538
  this.options.setValue(this.host, '');
70539
+ this.submittedOnce = false;
70449
70540
  this.setUserInteracted(this.host, false);
70450
70541
  interactions.set(this.host, []);
70451
70542
  };
@@ -70610,6 +70701,7 @@ class FormControlController {
70610
70701
  if (!formCollection) {
70611
70702
  return;
70612
70703
  }
70704
+ this.submittedOnce = false;
70613
70705
  // Remove this host from the form's collection
70614
70706
  formCollection.delete(this.host);
70615
70707
  // Check to make sure there's no other form controls in the collection. If we do this
@@ -70706,6 +70798,10 @@ class FormControlController {
70706
70798
  host.toggleAttribute('data-user-invalid', !isValid && hasInteracted);
70707
70799
  host.toggleAttribute('data-user-valid', isValid && hasInteracted);
70708
70800
  }
70801
+ userInteracted() {
70802
+ const hasInteracted = Boolean(userInteractedControls.has(this.host));
70803
+ return hasInteracted;
70804
+ }
70709
70805
  /**
70710
70806
  * Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything
70711
70807
  * that affects constraint validation changes so the component receives the correct validity states.
@@ -70742,6 +70838,7 @@ const translation$2 = {
70742
70838
  $name: 'Italiano',
70743
70839
  $dir: 'ltr',
70744
70840
  validityRequired: 'Questo campo è obbligatorio.',
70841
+ validityGroupRequired: "Scegli almeno un'opzione",
70745
70842
  validityPattern: 'Il valore non corrisponde al formato richiesto.',
70746
70843
  validityMinlength: 'Il valore deve essere lungo almeno {minlength} caratteri.',
70747
70844
  validityMaxlength: 'Il valore deve essere lungo al massimo {maxlength} caratteri.',
@@ -70786,24 +70883,27 @@ class FormControl extends BaseLocalizedComponent {
70786
70883
  this.maxlength = -1;
70787
70884
  /** If the input is required. */
70788
70885
  this.required = false;
70886
+ /* For grouped input, like checkbox-group */
70887
+ this.isInGroup = false;
70789
70888
  this.validationMessage = '';
70790
70889
  }
70791
70890
  /** Gets the validity state object */
70792
70891
  get validity() {
70793
70892
  return this.inputElement?.validity;
70794
70893
  }
70894
+ /** Gets the associated form, if one exists. */
70895
+ getForm() {
70896
+ return this.formControlController.getForm();
70897
+ }
70795
70898
  // Form validation methods
70796
70899
  checkValidity() {
70797
70900
  const inputValid = this.inputElement?.checkValidity() ?? true; // this.inputElement.checkValidity() è la validazione del browser
70798
70901
  return inputValid;
70799
70902
  }
70800
- /** Gets the associated form, if one exists. */
70801
- getForm() {
70802
- return this.formControlController.getForm();
70803
- }
70804
70903
  /** Checks for validity and shows the browser's validation message if the control is invalid. */
70805
70904
  reportValidity() {
70806
- const ret = this.inputElement.checkValidity();
70905
+ // const ret = this.inputElement.checkValidity();
70906
+ const ret = this.checkValidity(); // chiama la checkValidity, che se è stata overridata chiama quella
70807
70907
  this.handleValidationMessages();
70808
70908
  return ret; // this.inputElement.reportValidity();
70809
70909
  }
@@ -70848,7 +70948,8 @@ class FormControl extends BaseLocalizedComponent {
70848
70948
  handleValidationMessages() {
70849
70949
  if (!this.customValidation) {
70850
70950
  const _v = this.inputElement.validity;
70851
- if (_v.valueMissing) {
70951
+ const isRequiredHandledByGroup = this.isInGroup === true;
70952
+ if (_v.valueMissing && !isRequiredHandledByGroup) {
70852
70953
  this.setCustomValidity(this.$t('validityRequired'));
70853
70954
  }
70854
70955
  else if (_v.patternMismatch) {
@@ -70919,7 +71020,7 @@ class FormControl extends BaseLocalizedComponent {
70919
71020
  if (this.customValidation) {
70920
71021
  this.setCustomValidity(this.validationText ?? '');
70921
71022
  }
70922
- else {
71023
+ else if (this.formControlController.userInteracted()) {
70923
71024
  this.formControlController.updateValidity();
70924
71025
  }
70925
71026
  }
@@ -70987,6 +71088,10 @@ __decorate([
70987
71088
  ,
70988
71089
  __metadata("design:type", Object)
70989
71090
  ], FormControl.prototype, "required", void 0);
71091
+ __decorate([
71092
+ property({ type: Boolean }),
71093
+ __metadata("design:type", Object)
71094
+ ], FormControl.prototype, "isInGroup", void 0);
70990
71095
  __decorate([
70991
71096
  state(),
70992
71097
  __metadata("design:type", Object)
@@ -71022,6 +71127,14 @@ const cookies = {
71022
71127
  clearAllRememberedChoices,
71023
71128
  };
71024
71129
 
71130
+ if (typeof window !== 'undefined') {
71131
+ window._itAnalytics = window._itAnalytics || {};
71132
+ window._itAnalytics = {
71133
+ ...window._itAnalytics,
71134
+ version: '1.0.0-alpha.10',
71135
+ };
71136
+ }
71137
+
71025
71138
  /* eslint-disable class-methods-use-this */
71026
71139
  /* eslint-disable prefer-destructuring */
71027
71140
  /* eslint-disable dot-notation */
@@ -73951,14 +74064,14 @@ video::-webkit-media-text-track-display {
73951
74064
 
73952
74065
  /* stylelint-enable */
73953
74066
  .vjs-theme-bootstrap-italia {
73954
- --bs-videoplayer-button-background: var(--bs-color-background-primary);
73955
- --bs-videoplayer-control-background: var(--bs-color-background-primary);
74067
+ --bsi-videoplayer-button-background: var(--bsi-color-background-primary);
74068
+ --bsi-videoplayer-control-background: var(--bsi-color-background-primary);
73956
74069
  }
73957
74070
  .vjs-theme-bootstrap-italia .vjs-big-play-button, .vjs-theme-bootstrap-italia:hover .vjs-big-play-button, .vjs-theme-bootstrap-italia.vjs-big-play-button:focus {
73958
- background-color: var(--bs-videoplayer-button-background);
74071
+ background-color: var(--bsi-videoplayer-button-background);
73959
74072
  }
73960
74073
  .vjs-theme-bootstrap-italia .vjs-control-bar {
73961
- background-color: var(--bs-videoplayer-control-background);
74074
+ background-color: var(--bsi-videoplayer-control-background);
73962
74075
  font-size: 1rem;
73963
74076
  }
73964
74077
  @media (min-width: 992px) {
@@ -74006,18 +74119,21 @@ video::-webkit-media-text-track-display {
74006
74119
  }
74007
74120
  }
74008
74121
  .acceptoverlay {
74009
- --bs-acceptoverlay-color-background: var(--bs-color-background-inverse);
74010
- --bs-acceptoverlay-color-text: var(--bs-color-text);
74011
- --bs-acceptoverlay-label-color: var(--bs-color-text-secondary);
74012
- --bs-acceptoverlay-label-border-color: var(--bs-color-border-subtle);
74013
- --bs-acceptoverlay-opacity: 0.9;
74014
- --bs-acceptoverlay-spacing-inset: var(--bs-spacing-s);
74015
- --bs-acceptoverlay-primary-opacity: 0.95;
74016
- --bs-acceptoverlay-inner-width: 600px;
74017
- --bs-acceptoverlay-icon-spacing: var(--bs-spacing-s);
74018
- --bs-acceptoverlay-icon-fill: var(--bs-icon-primary);
74019
- --bs-acceptoverlay-buttons-spacing: var(--bs-spacing-s);
74020
- --bs-acceptoverlay-buttons-last-child-margin-top: ;
74122
+ --bsi-acceptoverlay-color-background: var(--bsi-color-background-inverse);
74123
+ --bsi-acceptoverlay-color-text: var(--bsi-color-text-inverse);
74124
+ --bsi-acceptoverlay-label-color: var(--bsi-color-text-inverse);
74125
+ --bsi-acceptoverlay-label-border-color: var(--bsi-color-border-inverse);
74126
+ --bsi-acceptoverlay-opacity: 0.9;
74127
+ --bsi-acceptoverlay-spacing-inset: var(--bsi-spacing-s);
74128
+ --bsi-acceptoverlay-primary-opacity: 0.95;
74129
+ --bsi-acceptoverlay-inner-width: 600px;
74130
+ --bsi-acceptoverlay-icon-spacing: var(--bsi-spacing-s);
74131
+ --bsi-acceptoverlay-icon-fill: var(--bsi-icon-primary);
74132
+ --bsi-acceptoverlay-buttons-spacing: var(--bsi-spacing-s);
74133
+ }
74134
+
74135
+ /* stylelint-disable-next-line no-duplicate-selectors */
74136
+ .acceptoverlay {
74021
74137
  position: absolute;
74022
74138
  top: 0;
74023
74139
  right: 0;
@@ -74028,13 +74144,13 @@ video::-webkit-media-text-track-display {
74028
74144
  flex-wrap: wrap;
74029
74145
  align-items: flex-start;
74030
74146
  justify-content: center;
74031
- padding: var(--bs-acceptoverlay-spacing-inset);
74032
- opacity: var(--bs-acceptoverlay-opacity);
74033
- background-color: var(--bs-acceptoverlay-background-color);
74147
+ padding: var(--bsi-acceptoverlay-spacing-inset);
74148
+ opacity: var(--bsi-acceptoverlay-opacity);
74149
+ background-color: var(--bsi-acceptoverlay-background-color);
74034
74150
  }
74035
74151
  @media (min-width: 768px) {
74036
74152
  .acceptoverlay {
74037
- --bs-acceptoverlay-spacing-inset: var(--bs-spacing-m);
74153
+ --bsi-acceptoverlay-spacing-inset: var(--bsi-spacing-m);
74038
74154
  }
74039
74155
  }
74040
74156
  @media (min-width: 992px) {
@@ -74043,19 +74159,19 @@ video::-webkit-media-text-track-display {
74043
74159
  }
74044
74160
  }
74045
74161
  .acceptoverlay label {
74046
- color: var(--bs-acceptoverlay-label-color);
74162
+ color: var(--bsi-acceptoverlay-label-color);
74047
74163
  }
74048
74164
  .acceptoverlay label::after {
74049
- border-color: var(--bs-acceptoverlay-label-border-color) !important;
74165
+ border-color: var(--bsi-acceptoverlay-label-border-color) !important;
74050
74166
  }
74051
74167
  .acceptoverlay[aria-hidden=true] {
74052
74168
  display: none;
74053
74169
  }
74054
74170
  .acceptoverlay.acceptoverlay-primary {
74055
- --bs-acceptoverlay-background-color: var(--bs-color-background-primary);
74171
+ --bsi-acceptoverlay-background-color: var(--bsi-color-background-primary);
74056
74172
  }
74057
74173
  .acceptoverlay.acceptoverlay-primary.show {
74058
- opacity: var(--bs-acceptoverlay-primary-opacity);
74174
+ opacity: var(--bsi-acceptoverlay-primary-opacity);
74059
74175
  }
74060
74176
  .acceptoverlay h1,
74061
74177
  .acceptoverlay h2,
@@ -74065,7 +74181,7 @@ video::-webkit-media-text-track-display {
74065
74181
  .acceptoverlay h6,
74066
74182
  .acceptoverlay p {
74067
74183
  margin-bottom: 0;
74068
- color: var(--bs-acceptoverlay-color-text);
74184
+ color: var(--bsi-acceptoverlay-color-text);
74069
74185
  }
74070
74186
  .acceptoverlay h4 {
74071
74187
  text-align: center;
@@ -74075,34 +74191,34 @@ video::-webkit-media-text-track-display {
74075
74191
  }
74076
74192
  .acceptoverlay .acceptoverlay-inner {
74077
74193
  width: 100%;
74078
- max-width: var(--bs-acceptoverlay-inner-width);
74194
+ max-width: var(--bsi-acceptoverlay-inner-width);
74079
74195
  }
74080
74196
  .acceptoverlay .acceptoverlay-icon {
74081
- margin-bottom: var(--bs-acceptoverlay-icon-spacing);
74197
+ margin-bottom: var(--bsi-acceptoverlay-icon-spacing);
74082
74198
  text-align: center;
74083
74199
  }
74084
74200
  @media (min-width: 768px) {
74085
74201
  .acceptoverlay .acceptoverlay-icon {
74086
- --bs-acceptoverlay-icon-margin-bottom: var(--it-spacing-12x);
74202
+ --bsi-acceptoverlay-icon-margin-bottom: var(--bsi-spacing-xxl);
74087
74203
  }
74088
74204
  }
74089
74205
  .acceptoverlay .acceptoverlay-icon .icon {
74090
- fill: var(--bs-acceptoverlay-icon-fill);
74206
+ fill: var(--bsi-acceptoverlay-icon-fill);
74091
74207
  }
74092
74208
  .acceptoverlay .acceptoverlay-buttons {
74093
74209
  display: flex;
74094
- align-items: center;
74095
- gap: 1rem;
74096
74210
  flex-wrap: wrap;
74211
+ align-items: center;
74097
74212
  justify-content: space-between;
74098
- margin-top: var(--bs-acceptoverlay-buttons-spacing);
74213
+ margin-top: var(--bsi-acceptoverlay-buttons-spacing);
74099
74214
  background-color: transparent !important;
74215
+ gap: 1rem;
74100
74216
  }
74101
74217
  .acceptoverlay .acceptoverlay-buttons button {
74102
74218
  width: 100%;
74103
74219
  }
74104
74220
  .acceptoverlay .acceptoverlay-buttons button:last-child {
74105
- --bs-acceptoverlay-buttons-spacing: var(--bs-spacing-xxs);
74221
+ --bsi-acceptoverlay-buttons-spacing: var(--bsi-spacing-xxs);
74106
74222
  }
74107
74223
  .acceptoverlay .acceptoverlay-buttons.single-button button {
74108
74224
  margin-top: 0;
@@ -74117,7 +74233,7 @@ video::-webkit-media-text-track-display {
74117
74233
  margin-top: 0 !important;
74118
74234
  }
74119
74235
  .acceptoverlay-buttons button:last-child {
74120
- margin-left: var(--bs-spacing-m);
74236
+ margin-left: var(--bsi-spacing-m);
74121
74237
  }
74122
74238
  .acceptoverlay-buttons.single-button button {
74123
74239
  width: auto;
@@ -74132,24 +74248,30 @@ video::-webkit-media-text-track-display {
74132
74248
  min-height: 450px;
74133
74249
  }
74134
74250
 
74251
+ .acceptoverlayable {
74252
+ aspect-ratio: 16 / 9;
74253
+ }
74254
+
74135
74255
  .acceptoverlay {
74136
- --bs-acceptoverlay-color-text: #fff;
74256
+ --bsi-acceptoverlay-color-text: #fff;
74257
+ --bsi-form-control-label-color: #fff;
74258
+ --bsi-form-checkbox-border-color: #fff;
74137
74259
  }
74138
74260
  .acceptoverlay a {
74139
- color: var(--bs-acceptoverlay-color-text);
74261
+ color: var(--bsi-acceptoverlay-color-text);
74140
74262
  }
74141
74263
  .acceptoverlay .bg-dark it-button::part(primary) {
74142
- --bs-btn-text-color: var(--bs-color-background-primary);
74143
- --bs-btn-background: var(--bs-color-background-inverse);
74264
+ --bsi-btn-text-color: var(--bsi-color-background-primary);
74265
+ --bsi-btn-background: var(--bsi-color-background-inverse);
74144
74266
  }
74145
74267
  .acceptoverlay .bg-dark it-button::part(primary):hover {
74146
- --bs-btn-text-color: var(--bs-color-text);
74268
+ --bsi-btn-text-color: var(--bsi-color-text);
74147
74269
  }
74148
74270
  .acceptoverlay .acceptoverlay-buttons it-button {
74149
74271
  width: 100%;
74150
74272
  }
74151
74273
  .acceptoverlay .acceptoverlay-buttons it-button:last-child {
74152
- --bs-acceptoverlay-buttons-spacing: var(--bs-spacing-xxs);
74274
+ --bsi-acceptoverlay-buttons-spacing: var(--bsi-spacing-xxs);
74153
74275
  }
74154
74276
  @media (min-width: 768px) {
74155
74277
  .acceptoverlay .acceptoverlay-buttons {
@@ -74159,7 +74281,7 @@ video::-webkit-media-text-track-display {
74159
74281
  width: 50%;
74160
74282
  }
74161
74283
  .acceptoverlay .acceptoverlay-buttons it-button:last-child {
74162
- margin-left: var(--bs-spacing-m);
74284
+ margin-left: var(--bsi-spacing-m);
74163
74285
  }
74164
74286
  .acceptoverlay .acceptoverlay-buttons.single-button it-button {
74165
74287
  width: auto;
@@ -74184,9 +74306,15 @@ video:not([width]) {
74184
74306
  width: var(--it-videojs-default-width);
74185
74307
  height: var(--it-videojs-default-height);
74186
74308
  }
74187
-
74188
- .vjs-fluid:not(.vjs-audio-only-mode) {
74189
- padding-top: 56.25%;
74309
+ .video-js .vjs-tech {
74310
+ position: inherit !important;
74311
+ height: auto !important;
74312
+ }
74313
+ .video-js.vjs-youtube .vjs-tech {
74314
+ aspect-ratio: 16 / 9;
74315
+ }
74316
+ .video-js:not(.vjs-audio-only-mode).vjs-fluid, .video-js:not(.vjs-audio-only-mode).vjs-16-9, .video-js:not(.vjs-audio-only-mode).vjs-4-3, .video-js:not(.vjs-audio-only-mode).vjs-9-16, .video-js:not(.vjs-audio-only-mode).vjs-1-1, .video-js:not(.vjs-audio-only-mode).vjs-youtube {
74317
+ height: auto;
74190
74318
  }`;
74191
74319
 
74192
74320
  registerTranslation(translation);
@@ -74205,6 +74333,9 @@ let ItVideo = class ItVideo extends BaseLocalizedComponent {
74205
74333
  this.videoElement = null;
74206
74334
  this.consentAccepted = false;
74207
74335
  }
74336
+ getPlayer() {
74337
+ return this.player;
74338
+ }
74208
74339
  /**
74209
74340
  * Funzione risolta da window[initPluginsName]
74210
74341
  */
@@ -74320,26 +74451,28 @@ let ItVideo = class ItVideo extends BaseLocalizedComponent {
74320
74451
  initYoutubePlugin(videojsFn);
74321
74452
  }
74322
74453
  this.initPluginsFn?.(videojsFn); // se passata una funzione di init di ulteriori plugin, la chiama.
74323
- this.player = videojsFn(this.videoElement, mergedOptions, function onPlayerReady() {
74324
- this.addClass('vjs-theme-bootstrap-italia');
74325
- this.addClass('vjs-big-play-centered');
74326
- // Aggiungi i track manualmente
74327
- tracks.forEach((t) => {
74328
- this.addRemoteTextTrack({
74329
- kind: t.kind,
74330
- src: t.src,
74331
- srclang: t.srclang || this.language,
74332
- label: t.label,
74333
- default: !!t.default,
74334
- }, false);
74335
- });
74336
- if (focusPlayButton) {
74337
- const playButton = this.el()?.querySelector('.vjs-big-play-button');
74338
- if (playButton) {
74339
- playButton.focus();
74454
+ if (this.videoElement) {
74455
+ this.player = videojsFn(this.videoElement, mergedOptions, function onPlayerReady() {
74456
+ this.addClass('vjs-theme-bootstrap-italia');
74457
+ this.addClass('vjs-big-play-centered');
74458
+ // Aggiungi i track manualmente
74459
+ tracks.forEach((t) => {
74460
+ this.addRemoteTextTrack({
74461
+ kind: t.kind,
74462
+ src: t.src,
74463
+ srclang: t.srclang || this.language,
74464
+ label: t.label,
74465
+ default: !!t.default,
74466
+ }, false);
74467
+ });
74468
+ if (focusPlayButton) {
74469
+ const playButton = this.el()?.querySelector('.vjs-big-play-button');
74470
+ if (playButton) {
74471
+ playButton.focus();
74472
+ }
74340
74473
  }
74341
- }
74342
- });
74474
+ });
74475
+ }
74343
74476
  }
74344
74477
  }
74345
74478
  /*
@@ -74375,10 +74508,14 @@ let ItVideo = class ItVideo extends BaseLocalizedComponent {
74375
74508
  ${this.$t('video_consent_accept')}
74376
74509
  </it-button>
74377
74510
 
74378
- <div class="form-check">
74379
- <input id="chk-remember" type="checkbox" @click=${() => this.acceptConsent(true)} />
74380
- <label for="chk-remember">${this.$t('video_consent_remember')}</label>
74381
- </div>
74511
+ <it-checkbox
74512
+ @click=${(e) => {
74513
+ e.preventDefault();
74514
+ e.stopPropagation();
74515
+ this.acceptConsent(true);
74516
+ }}
74517
+ ><span slot="label">${this.$t('video_consent_remember')}</span></it-checkbox
74518
+ >
74382
74519
  </div>
74383
74520
  </div>
74384
74521
  </div>