@clickview/exchange 0.41.0 → 0.42.0

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.
Files changed (116) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{761-exchange-5b8b71b399.chunk.css → 651-exchange-ed359f3d88.chunk.css} +1 -1
  3. package/dist/css/{lite-exchange-4026a8a0a2.css → lite-exchange-4ffe357348.css} +1 -1
  4. package/dist/languages/en.json +1 -1
  5. package/dist/scripts/117-e2b3dd7f3e-exchange.chunk.js +1 -0
  6. package/dist/scripts/127-4a3c8f9725-exchange.chunk.js +1 -0
  7. package/dist/scripts/136-fd99ef4c9d-exchange.chunk.js +2 -0
  8. package/dist/scripts/136-fd99ef4c9d-exchange.chunk.js.LICENSE.txt +1 -0
  9. package/dist/scripts/137-bc61a632a8-exchange.chunk.js +1 -0
  10. package/dist/scripts/156-99fef3c1d7-exchange.chunk.js +1 -0
  11. package/dist/scripts/170-9db7c3b12e-exchange.chunk.js +1 -0
  12. package/dist/scripts/173-3668db114a-exchange.chunk.js +1 -0
  13. package/dist/scripts/212-6ed71b2797-exchange.chunk.js +1 -0
  14. package/dist/scripts/226-889bef8e6c-exchange.chunk.js +1 -0
  15. package/dist/scripts/267-7daf64f8a1-exchange.chunk.js +1 -0
  16. package/dist/scripts/{291-46f55263da-exchange.chunk.js → 291-d16632b6d5-exchange.chunk.js} +1 -1
  17. package/dist/scripts/298-ed8e8b8328-exchange.chunk.js +1 -0
  18. package/dist/scripts/312-6d1e8b875a-exchange.chunk.js +1 -0
  19. package/dist/scripts/{325-c441427324-exchange.chunk.js → 325-76baea117f-exchange.chunk.js} +1 -1
  20. package/dist/scripts/332-08d48debc2-exchange.chunk.js +1 -0
  21. package/dist/scripts/414-567e121c75-exchange.chunk.js +2 -0
  22. package/dist/scripts/{414-6440ca2c7d-exchange.chunk.js.LICENSE.txt → 414-567e121c75-exchange.chunk.js.LICENSE.txt} +1 -1
  23. package/dist/scripts/442-d4aa745348-exchange.chunk.js +1 -0
  24. package/dist/scripts/455-ceeb969c54-exchange.chunk.js +1 -0
  25. package/dist/scripts/484-08c82c5a88-exchange.chunk.js +1 -0
  26. package/dist/scripts/494-abba46b945-exchange.chunk.js +2 -0
  27. package/dist/scripts/494-abba46b945-exchange.chunk.js.LICENSE.txt +1 -0
  28. package/dist/scripts/522-bff5ec4360-exchange.chunk.js +2 -0
  29. package/dist/scripts/522-bff5ec4360-exchange.chunk.js.LICENSE.txt +1 -0
  30. package/dist/scripts/536-b915864d5f-exchange.chunk.js +1 -0
  31. package/dist/scripts/538-ccc01a623f-exchange.chunk.js +2 -0
  32. package/dist/scripts/538-ccc01a623f-exchange.chunk.js.LICENSE.txt +1 -0
  33. package/dist/scripts/558-c29164dfd9-exchange.chunk.js +1 -0
  34. package/dist/scripts/589-141c3ced9d-exchange.chunk.js +1 -0
  35. package/dist/scripts/611-d295a5096f-exchange.chunk.js +1 -0
  36. package/dist/scripts/619-1abac6cb1d-exchange.chunk.js +1 -0
  37. package/dist/scripts/648-485af12c37-exchange.chunk.js +1 -0
  38. package/dist/scripts/651-3013ab559f-exchange.chunk.js +2 -0
  39. package/dist/scripts/651-3013ab559f-exchange.chunk.js.LICENSE.txt +1 -0
  40. package/dist/scripts/659-d7aefc839c-exchange.chunk.js +1 -0
  41. package/dist/scripts/669-ca4aa9bc7c-exchange.chunk.js +1 -0
  42. package/dist/scripts/68-34b81dae8c-exchange.chunk.js +1 -0
  43. package/dist/scripts/725-4a1875ce66-exchange.chunk.js +1 -0
  44. package/dist/scripts/726-868a877381-exchange.chunk.js +1 -0
  45. package/dist/scripts/75-9780e4300e-exchange.chunk.js +1 -0
  46. package/dist/scripts/759-c0ef5c5425-exchange.chunk.js +1 -0
  47. package/dist/scripts/782-2c340d8404-exchange.chunk.js +1 -0
  48. package/dist/scripts/831-8808647fc7-exchange.chunk.js +1 -0
  49. package/dist/scripts/851-61f77ce4aa-exchange.chunk.js +2 -0
  50. package/dist/scripts/851-61f77ce4aa-exchange.chunk.js.LICENSE.txt +1 -0
  51. package/dist/scripts/{866-187a4b057a-exchange.chunk.js → 866-14ce8a3a4d-exchange.chunk.js} +1 -1
  52. package/dist/scripts/87-d569a1463e-exchange.chunk.js +1 -0
  53. package/dist/scripts/881-d524db243c-exchange.chunk.js +1 -0
  54. package/dist/scripts/904-bd1dfd39e0-exchange.chunk.js +1 -0
  55. package/dist/scripts/925-f70ee1c7f9-exchange.chunk.js +1 -0
  56. package/dist/scripts/937-2e1f1f330e-exchange.chunk.js +1 -0
  57. package/dist/scripts/95-2cfd97bf0e-exchange.chunk.js +2 -0
  58. package/dist/scripts/95-2cfd97bf0e-exchange.chunk.js.LICENSE.txt +1 -0
  59. package/dist/scripts/bundle-2ec7627577.min.js +2 -0
  60. package/dist/scripts/{bundle-9867edefe8.min.js.LICENSE.txt → bundle-2ec7627577.min.js.LICENSE.txt} +1 -1
  61. package/package.json +1 -1
  62. package/dist/scripts/127-92dc016a93-exchange.chunk.js +0 -1
  63. package/dist/scripts/136-dcac314dd7-exchange.chunk.js +0 -2
  64. package/dist/scripts/136-dcac314dd7-exchange.chunk.js.LICENSE.txt +0 -1
  65. package/dist/scripts/156-f073d70e11-exchange.chunk.js +0 -1
  66. package/dist/scripts/170-8a3dadfb8d-exchange.chunk.js +0 -1
  67. package/dist/scripts/173-43b652e061-exchange.chunk.js +0 -1
  68. package/dist/scripts/212-c3bd645e6c-exchange.chunk.js +0 -1
  69. package/dist/scripts/226-ed8b0be42c-exchange.chunk.js +0 -1
  70. package/dist/scripts/267-ef0b473b5b-exchange.chunk.js +0 -1
  71. package/dist/scripts/298-42afa6070d-exchange.chunk.js +0 -1
  72. package/dist/scripts/306-a3f68f6b22-exchange.chunk.js +0 -1
  73. package/dist/scripts/312-5402506896-exchange.chunk.js +0 -1
  74. package/dist/scripts/332-7b0dc13857-exchange.chunk.js +0 -1
  75. package/dist/scripts/356-210e55d8fa-exchange.chunk.js +0 -1
  76. package/dist/scripts/414-6440ca2c7d-exchange.chunk.js +0 -2
  77. package/dist/scripts/442-fbffc82edc-exchange.chunk.js +0 -1
  78. package/dist/scripts/455-431dd8ae58-exchange.chunk.js +0 -1
  79. package/dist/scripts/457-ad15c6044e-exchange.chunk.js +0 -1
  80. package/dist/scripts/484-5995380059-exchange.chunk.js +0 -1
  81. package/dist/scripts/494-fb999f8f33-exchange.chunk.js +0 -2
  82. package/dist/scripts/494-fb999f8f33-exchange.chunk.js.LICENSE.txt +0 -1
  83. package/dist/scripts/522-b58cd5bdc5-exchange.chunk.js +0 -2
  84. package/dist/scripts/522-b58cd5bdc5-exchange.chunk.js.LICENSE.txt +0 -1
  85. package/dist/scripts/536-0463f74012-exchange.chunk.js +0 -1
  86. package/dist/scripts/538-eacf7c95b0-exchange.chunk.js +0 -2
  87. package/dist/scripts/538-eacf7c95b0-exchange.chunk.js.LICENSE.txt +0 -1
  88. package/dist/scripts/558-26876df8ca-exchange.chunk.js +0 -1
  89. package/dist/scripts/589-8f725206b6-exchange.chunk.js +0 -1
  90. package/dist/scripts/611-ab7180cf35-exchange.chunk.js +0 -1
  91. package/dist/scripts/619-eece92ee6d-exchange.chunk.js +0 -1
  92. package/dist/scripts/648-41dc8d0902-exchange.chunk.js +0 -1
  93. package/dist/scripts/669-5fbcc1505d-exchange.chunk.js +0 -1
  94. package/dist/scripts/68-36307cb673-exchange.chunk.js +0 -1
  95. package/dist/scripts/725-85d081e1dd-exchange.chunk.js +0 -1
  96. package/dist/scripts/726-0326486cac-exchange.chunk.js +0 -1
  97. package/dist/scripts/75-7581313572-exchange.chunk.js +0 -1
  98. package/dist/scripts/759-5eebceaaef-exchange.chunk.js +0 -1
  99. package/dist/scripts/761-3f2784dd39-exchange.chunk.js +0 -2
  100. package/dist/scripts/761-3f2784dd39-exchange.chunk.js.LICENSE.txt +0 -1
  101. package/dist/scripts/782-bab82c17c1-exchange.chunk.js +0 -1
  102. package/dist/scripts/831-51304c524c-exchange.chunk.js +0 -1
  103. package/dist/scripts/851-12378133bc-exchange.chunk.js +0 -2
  104. package/dist/scripts/851-12378133bc-exchange.chunk.js.LICENSE.txt +0 -1
  105. package/dist/scripts/87-40988e7506-exchange.chunk.js +0 -1
  106. package/dist/scripts/881-716ddfc816-exchange.chunk.js +0 -1
  107. package/dist/scripts/904-f35313974a-exchange.chunk.js +0 -1
  108. package/dist/scripts/925-e0f4aee722-exchange.chunk.js +0 -1
  109. package/dist/scripts/937-2b17465c28-exchange.chunk.js +0 -1
  110. package/dist/scripts/95-24ea1f4f33-exchange.chunk.js +0 -2
  111. package/dist/scripts/95-24ea1f4f33-exchange.chunk.js.LICENSE.txt +0 -1
  112. package/dist/scripts/bundle-9867edefe8.min.js +0 -2
  113. /package/dist/css/{306-exchange-8c1b8716b3.chunk.css → 137-exchange-8c1b8716b3.chunk.css} +0 -0
  114. /package/dist/scripts/{601-77fb6a087c-exchange.chunk.js → 601-a3c22b0a9f-exchange.chunk.js} +0 -0
  115. /package/dist/scripts/{858-51c9b42098-exchange.chunk.js → 858-70085ed3b1-exchange.chunk.js} +0 -0
  116. /package/dist/scripts/{877-e693257ae6-exchange.chunk.js → 877-5b357aeb63-exchange.chunk.js} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[442],{69834:(e,t,r)=>{r.d(t,{r:()=>T});var n=r(50242),o=r(81886),a=r(67058),i=r(23481),u=r(64364);function c(e){return c="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},c(e)}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var y="shared.privateResourceError",v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=f(t),function(e,t){if(t&&("object"==c(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,d()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}(this,t,[i.T.getPhrase(y,"title")])}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&&p(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return i.T.getPhrase(y,"heading")}},{key:"description",get:function(){return i.T.getPhrase(y,"description")}}])&&l(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.H);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function g(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}var k="shared.regionLockedResourceError",j=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=w(t),function(e,t){if(t&&("object"==m(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,r||[],w(e).constructor):t.apply(e,r))}(this,t,[i.T.getPhrase(k,"title")])}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&&O(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return i.T.getPhrase(k,"heading")}},{key:"description",get:function(){return i.T.getPhrase(k,"description")}}])&&b(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.H),P=r(49075),S={notFound:a.d,forbidden:{rating:v,yearLevel:v,region:j,privacy:v},badRequest:P._,internalServerError:P._};function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var a;a="number"==typeof e?e:e.status;var i=Object.assign(Object.assign({},S),t);a&&o.Q.Ry.isStatusCodeError(a)&&(a!==n.o.InternalServer?a!==n.o.NotFound?a!==n.o.Forbidden?r.badRequest||o.Q.Ry.throw(new i.badRequest):r.forbidden||o.Q.Ry.throw(new i.forbidden.privacy):r.notFound||o.Q.Ry.throw(new i.notFound):r.internalServerError||o.Q.Ry.throw(new P._))}}},5353:(e,t,r)=>{r.d(t,{i:()=>d});var n,o=r(99940),a=r(97395),i=r(14965);!function(e){e[e.AllResults=0]="AllResults",e[e.Subtitles=1]="Subtitles",e[e.TitleAndDescription=2]="TitleAndDescription"}(n||(n={}));var u=r(55812);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return Object.entries(e).reduce((function(e,t){var r,n,o=(n=2,function(e){if(Array.isArray(e))return e}(r=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(r,n)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],i=o[1];return e[a.charAt(0).toLowerCase()+a.slice(1)]=i,e}),{})}function s(e){return e?Array.isArray(e)?function(e){return e.map(l)}(e):l(e):null}var d={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:s}},region:function(e){return{url:"/api/tv/api/v2/regions/".concat(e),key:"tv:region:".concat(e),normalize:!1,formatData:s}},dateRange:function(e){return{url:"/api/tv/api/v2/regions/".concat(e,"/daterange"),key:"tv:region:".concat(e,":daterange"),normalize:!1,formatData:s}},channels:function(e){return{url:a._.urlBuilder("/api/tv/api/v2/channels",{region:e}),key:"tv:channels:".concat(e),normalize:!1,formatData:function(e){return s(e).sort((function(e,t){return e.sortOrder-t.sortOrder}))}}},payTvChannels:function(){return{url:"/api/tv/v1/pay-tv/channels/all",key:"pay:tv:channels",normalize:!1,formatData:s}},programsByChannel:function(e,t,r,n){return{url:a._.urlBuilder("/api/tv/api/v3/regions/".concat(e,"/channels/programs"),{channel:t,startDate:r,endDate:n}),key:["tv:programs:by:channel",e,t,r,n].join(":"),normalize:!1,formatData:s}},programsByLetter:function(e,t,r,n){return{url:a._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:e,startsWith:t,startDate:r,endDate:n}),key:["tv:programs:by:letter",e,t,r,n].join(":"),normalize:!1,formatData:s}},program:function(e){return{url:"/api/tv/api/v3/programs/".concat(e),key:"tv:programs:".concat(e),normalize:!1,formatData:function(e){var t=s(e);return t.region=s(e.Region),t}}},search:function(e,t,r){var o=t.query,i=t.dateBroadcast,c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["query","dateBroadcast"]),l=r||1,d=c.filter||n.AllResults;return{url:a._.urlBuilder("/api/tv/api/v4/search",Object.assign(Object.assign(Object.assign({region:e,query:o,filter:d},u.a.getDateBroadcastParams(i)),c),{page:l,size:25})),key:["tv:search",o,e,Object.values(Object.assign({filter:d,dateBroadcast:i},c)).join(":"),l].join(":"),normalize:!1,formatData:function(e){var t=s(e);return t.results=s(e.Results),t.page=l,t}}},addFullVideo:function(e,t){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:o.k.POST,data:e,invalidationKeys:"tv:workspace:video:".concat(t)}},addAdFreeVideo:function(e,t){return{url:a._.urlBuilder("/api/tv/v4/programs/".concat(e.id,"/ad-free"),{customerId:e.customerId,userId:e.userId}),key:"tv:add:ad:free:video",normalize:!1,type:o.k.POST,invalidationKeys:"tv:workspace:video:".concat(t)}},adFreeCredits:function(e,t,r){var n=new Date;n.setHours(0,0,0,0),n.setMinutes(n.getMinutes()+n.getTimezoneOffset());var o=i.O.add(n,1,"day");return{url:a._.urlBuilder("/api/tv/v4/user-requests",{userId:e,customerId:t,regionCode:r,from:i.O.convertUTCToLocal(n).toISOString(),to:i.O.convertUTCToLocal(o).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:s}},createAdFreeRequest:function(e){return{url:a._.urlBuilder("/api/tv/v4/user-requests/ad-free",{userId:e.userId,customerId:e.customerId}),key:"tv:create:add:free:request",normalize:!1,type:o.k.POST,data:{programId:e.programId,regionCode:e.regionCode},invalidationKeys:["tv:add:free:credits"]}},workspaceVideo:function(e,t,r){return{url:a._.urlBuilder("/api/tv/v4/workspace/programs/".concat(e),{userId:t,customerId:r}),key:"tv:workspace:video:".concat(e),formatData:s}},requestProgram:function(e){return{url:"/api/tv/v1/pay-tv/user-requests",key:"tv:request:program",type:o.k.POST,data:e}},requestProgramUk:function(e){return{url:"/api/tv/api/v1/user-requests/program",key:"tv:request:program:uk",type:o.k.POST,data:e}}}},85949:(e,t,r)=>{r.d(t,{Y:()=>y});var n=r(81886),o=r(23481),a=r(97395),i=r(20354),u=r(65858),c=r(12754),l=r(39151),s=r(35223),d=r(73818),f=r(82329),p=o.T.encloseNamespace("tv.addRequests");function y(e,t,r){var o=i.a.useBasicFetch(l.L.config());return function(i){var l;if(!t)return[];var y="preview"===e,v={id:i.id,name:i.title},m=y?u.LZ.VideoItemPreview:u.LZ.VideoListItem;return[{label:y?p("addVideo"):"",svgName:y?void 0:s.vn.AddVideo,tooltip:y?"":p("addVideo"),className:y?"btn btn-dark me-2 text-nowrap":"btn",button:!0,onClick:function(){n.Q.C$.trigger({application:f.O.TV,action:d.e.Tv.ADD,args:[t.code,i.id],params:{currentTime:Math.floor(+(null==r?void 0:r.currentTime()))||void 0}})},analyticsData:v,analyticsOptions:{actionType:u.Vw.Click,entity:u.py.Video,descriptor:u.XX.AddToWorkspace,location:m,workflowPhase:u.eu.Start}},{label:p("editVideo"),href:a._.urlBuilder("".concat(null===(l=o.data)||void 0===l?void 0:l.cloudEditorUrl,"/tv/").concat(i.globalId),{product:c.x.Exchange}),openInNewTab:!0,analyticsData:v,analyticsOptions:{actionType:u.Vw.Click,entity:u.py.Video,location:m,descriptor:u.XX.EditVideo}}]}}},8519:(e,t,r)=>{r.d(t,{e:()=>c});var n=r(32735),o=r(50242),a=r(81886),i=r(20470),u=r(69834);function c(e,t){n.useEffect((function(){e.hasCompleted&&(e.data||(e.hasError&&(0,u.r)(e.statusCode),t?a.Q.Ry.throw(new i.x):(0,u.r)(o.o.BadRequest)))}),[e.hasCompleted,e.data])}},55812:(e,t,r)=>{r.d(t,{a:()=>i});var n=r(67624),o=r(14965),a=r(1048),i={getFormattedDateRange:function(e,t){return"".concat(o.O.format(e,"Do MMMM YYYY")," - ").concat(o.O.format(t,"Do MMMM YYYY"))},getDateBroadcastParams:function(e){var t=function(e){return o.O.format(e,"YYYY-MM-DD")},r=t(new Date);switch(e){case"yesterday":return{from:t(o.O.subtract(r,1,"day")),to:r};case"last-week":return{from:t(o.O.subtract(r,7,"days")),to:r};case"last-2-weeks":return{from:t(o.O.subtract(r,14,"days")),to:r}}},isHolidayPeriod:function(){var e,t=(e=n.SG.get("cv:holiday:dates"),a.t.isObject(e)?e:{startMonth:12,startDay:15,endMonth:1,endDay:6}),r=t.startMonth,o=t.startDay,i=t.endMonth,u=t.endDay,c=new Date,l=c.getMonth()+1,s=c.getDate();return l===r&&s>=o||l===i&&s<=u}}},70442:(e,t,r)=>{r.r(t),r.d(t,{TvPreviewView:()=>b});var n=r(32735),o=r(20354),a=r(77696),i=r(39151),u=r(31949),c=r(23455),l=r(41026),s=r(1557),d=r(84034),f=r(5353),p=r(85949),y=r(8519),v=r(97395);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function b(e){var t,r,b,g=o.a.useBasicFetch(f.i.region(e.region)),h=o.a.useBasicFetch(i.L.config()),w=o.a.useBasicFetch(f.i.program(e.id)),O=o.a.useBasicFetch(u.N.currentUser()),k=(r=n.useState(),b=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(r,b)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}(r,b)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=k[0],P=k[1],S=(0,p.Y)("preview",g.data,j);(0,y.e)(g,!0),(0,c.h)(w.statusCode);var T=g.hasCompleted&&w.hasCompleted&&h.hasCompleted&&O.hasCompleted,C=T&&function(e){var t=e.currentUser,r=e.region,n=e.config,o=e.program,a=n.tvPreviewUrls[r.code],i=o.globalId.replace(/-/g,""),u=v._.safeUrlConcat(a,"/thumbnail/".concat(i,".jpg")),c=v._.safeUrlConcat(a,"/144p/".concat(i.toUpperCase(),"_144p.mp4")),l=v._.safeUrlConcat(a,"/subtitle/".concat(i.toUpperCase(),".srt")),s=v._.urlBuilder(v._.safeUrlConcat(n.playerApiUrl,"/api/srt-to-vtt"),{url:l});return{videoId:null,episodeNumber:0,seriesName:null,mediaId:null,mediaType:null,ratingCode:null,region:t.instanceRegion,seasonNumber:null,viewerId:t.id,viewerCustomerId:t.customerId,files:{fileToken:"",progressive:[{mimeType:"video/mp4",profile:"144",url:c}]},chapters:{list:[]},instanceRegion:t.instanceRegion,localCacheAddresses:[],posterUrl:u,resources:{list:[]},settings:{showSubtitles:!1,playbackProfile:"144",playbackProfileLocalCache:"144",playbackSubtitleSizeDefault:"medium"},subtitles:{list:[{url:s,isDefault:!1,language:"en-AU",mimeType:"text/vtt",label:"English"}]},title:o.title}}({currentUser:O.data,region:g.data,config:h.data,program:w.data});return n.createElement(a.G,{title:null===(t=w.data)||void 0===t?void 0:t.title,closePopup:e.closePopup,showLoadingSpinner:!T,size:"lg",bodyClassName:"p-0 rounded-3 position-relative",hideTitle:!0},T&&n.createElement(n.Fragment,null,n.createElement("div",{className:"overflow-hidden rounded-top-lg"},n.createElement(l.L,{viewKey:null,offlinePlaybackObject:C,playerApi:new URL(h.data.playerApiUrl),autoplay:!0,hotkeyElQuerySelector:"body",onReady:function(t){P(t),e.currentTime&&t.currentTime(e.currentTime)},allowFullscreen:!1})),n.createElement(d.d,{program:w.data,title:w.data.title,description:w.data.description,videoActions:S(w.data)}),n.createElement(s.$,{closePopup:e.closePopup})))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[455],{20455:(e,t,n)=>{n.d(t,{LB:()=>He,y9:()=>ct,g4:()=>te,Lg:()=>ae,we:()=>de,pE:()=>R,ey:()=>S,VK:()=>I,_8:()=>E,hI:()=>B,Cj:()=>_e,O1:()=>Ge,Zj:()=>Ze,VT:()=>g,Dy:()=>p});var r=n(32735),o=n(12788),i=n(17592);const a={display:"none"};function l(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:a},n)}function s(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const c=(0,r.createContext)(null),u={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},d={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function f(e){let{announcements:t=d,container:n,hiddenTextDescribedById:a,screenReaderInstructions:f=u}=e;const{announce:v,announcement:h}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),g=(0,i.Ld)("DndLiveRegion"),[p,b]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{b(!0)}),[]),function(e){const t=(0,r.useContext)(c);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;v(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&v(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;v(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;v(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;v(t.onDragCancel({active:n,over:r}))}})),[v,t])),!p)return null;const m=r.createElement(r.Fragment,null,r.createElement(l,{id:a,value:f.draggable}),r.createElement(s,{id:g,announcement:h}));return n?(0,o.createPortal)(m,n):m}var v;function h(){}function g(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function p(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(v||(v={}));const b=Object.freeze({x:0,y:0});function m(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function y(e,t){const n=(0,i.DC)(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function w(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function x(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function C(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function E(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function D(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const R=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=D(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=m(D(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(w)},S=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=C(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=C(r),a=o.reduce(((e,t,r)=>e+m(n[r],t)),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(w)};function M(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const N=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=M(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(x)};function k(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:b}function L(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const O=L(1);function T(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const A={ignoreTransform:!1};function I(e,t){void 0===t&&(t=A);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:t}=(0,i.Jj)(e),{transform:r,transformOrigin:o}=t(e);r&&(n=function(e,t,n){const r=T(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),c=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s}}(n,r,o))}const{top:r,left:o,width:a,height:l,bottom:s,right:c}=n;return{top:r,left:o,width:a,height:l,bottom:s,right:c}}function j(e){return I(e,{ignoreTransform:!0})}function B(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,i.qk)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,i.Re)(o)||(0,i.vZ)(o))return n;if(n.includes(o))return n;const{getComputedStyle:a}=(0,i.Jj)(o),l=a(o);return o!==e&&function(e,t){void 0===t&&(t=(0,i.Jj)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,l)&&n.push(o),function(e,t){return void 0===t&&(t=(0,i.Jj)(e).getComputedStyle(e)),"fixed"===t.position}(o,l)?n:r(o.parentNode)}(e):n}function z(e){const[t]=B(e,1);return null!=t?t:null}function X(e){return i.Nq&&e?(0,i.FJ)(e)?e:(0,i.UG)(e)?(0,i.qk)(e)||e===(0,i.r3)(e).scrollingElement?window:(0,i.Re)(e)?e:null:null:null}function P(e){return(0,i.FJ)(e)?e.scrollX:e.scrollLeft}function F(e){return(0,i.FJ)(e)?e.scrollY:e.scrollTop}function J(e){return{x:P(e),y:F(e)}}var Y;function U(e){return!(!i.Nq||!e)&&e===document.scrollingElement}function H(e){const t={x:0,y:0},n=U(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(Y||(Y={}));const K={x:.2,y:.2};function q(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=K);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=H(e),v={x:0,y:0},h={x:0,y:0},g=t.height*o.y,p=t.width*o.x;return!c&&i<=t.top+g?(v.y=Y.Backward,h.y=r*Math.abs((t.top+g-i)/g)):!u&&s>=t.bottom-g&&(v.y=Y.Forward,h.y=r*Math.abs((t.bottom-g-s)/g)),!f&&l>=t.right-p?(v.x=Y.Forward,h.x=r*Math.abs((t.right-p-l)/p)):!d&&a<=t.left+p&&(v.x=Y.Backward,h.x=r*Math.abs((t.left+p-a)/p)),{direction:v,speed:h}}function W(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function G(e){return e.reduce(((e,t)=>(0,i.IH)(e,J(t))),b)}function _(e,t){if(void 0===t&&(t=I),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);z(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const V=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+P(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+F(t)),0)}]];class ${constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=B(t),r=G(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of V)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Z{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Q(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var ee,te;function ne(e){e.preventDefault()}function re(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ee||(ee={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(te||(te={}));const oe={start:[te.Space,te.Enter],cancel:[te.Esc],end:[te.Space,te.Enter]},ie=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case te.Right:return{...n,x:n.x+25};case te.Left:return{...n,x:n.x-25};case te.Down:return{...n,y:n.y+25};case te.Up:return{...n,y:n.y-25}}};class ae{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Z((0,i.r3)(t)),this.windowListeners=new Z((0,i.Jj)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ee.Resize,this.handleCancel),this.windowListeners.add(ee.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(ee.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&_(n),t(b)}handleKeyDown(e){if((0,i.vd)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=oe,coordinateGetter:a=ie,scrollBehavior:l="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:b;this.referenceCoordinates||(this.referenceCoordinates=u);const d=a(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=(0,i.$X)(d,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:c,maxScroll:u,minScroll:f}=H(n),v=W(n),h={x:Math.min(o===te.Right?v.right-v.width/2:v.right,Math.max(o===te.Right?v.left:v.left+v.width/2,d.x)),y:Math.min(o===te.Down?v.bottom-v.height/2:v.bottom,Math.max(o===te.Down?v.top:v.top+v.height/2,d.y))},g=o===te.Right&&!a||o===te.Left&&!s,p=o===te.Down&&!c||o===te.Up&&!i;if(g&&h.x!==d.x){const e=n.scrollLeft+t.x,i=o===te.Right&&e<=u.x||o===te.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});r.x=i?n.scrollLeft-e:o===te.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:l});break}if(p&&h.y!==d.y){const e=n.scrollTop+t.y,i=o===te.Down&&e<=u.y||o===te.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});r.y=i?n.scrollTop-e:o===te.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:l});break}}this.handleMove(e,(0,i.IH)((0,i.$X)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function le(e){return Boolean(e&&"distance"in e)}function se(e){return Boolean(e&&"delay"in e)}ae.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=oe,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class ce{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,i.Jj)(e);return e instanceof t?e:(0,i.r3)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:a}=o;this.props=e,this.events=t,this.document=(0,i.r3)(a),this.documentListeners=new Z(this.document),this.listeners=new Z(n),this.windowListeners=new Z((0,i.Jj)(a)),this.initialCoordinates=null!=(r=(0,i.DC)(o))?r:b,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(ee.Resize,this.handleCancel),this.windowListeners.add(ee.DragStart,ne),this.windowListeners.add(ee.VisibilityChange,this.handleCancel),this.windowListeners.add(ee.ContextMenu,ne),this.documentListeners.add(ee.Keydown,this.handleKeydown),t){if(le(t))return;if(se(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ee.Click,re,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ee.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:a,options:{activationConstraint:l}}=o;if(!r)return;const s=null!=(t=(0,i.DC)(e))?t:b,c=(0,i.$X)(r,s);if(!n&&l){if(se(l))return Q(c,l.tolerance)?this.handleCancel():void 0;if(le(l))return null!=l.tolerance&&Q(c,l.tolerance)?this.handleCancel():Q(c,l.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),a(s)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===te.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const ue={move:{name:"pointermove"},end:{name:"pointerup"}};class de extends ce{constructor(e){const{event:t}=e,n=(0,i.r3)(t.target);super(e,ue,n)}}de.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const fe={move:{name:"mousemove"},end:{name:"mouseup"}};var ve;!function(e){e[e.RightClick=2]="RightClick"}(ve||(ve={})),class extends ce{constructor(e){super(e,fe,(0,i.r3)(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ve.RightClick&&(null==r||r({event:n}),!0)}}];const he={move:{name:"touchmove"},end:{name:"touchend"}};var ge,pe;(class extends ce{constructor(e){super(e,he)}static setup(){return window.addEventListener(he.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(he.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(ge||(ge={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(pe||(pe={}));const be={x:{[Y.Backward]:!1,[Y.Forward]:!1},y:{[Y.Backward]:!1,[Y.Forward]:!1}};var me,ye;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(me||(me={})),function(e){e.Optimized="optimized"}(ye||(ye={}));const we=new Map;function xe(e,t){return(0,i.Gj)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Ce(e){let{callback:t,disabled:n}=e;const o=(0,i.zX)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}function Ee(e){return new $(I(e),e)}function De(e,t,n){void 0===t&&(t=Ee);const[o,a]=(0,r.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),l=function(e){let{callback:t,disabled:n}=e;const o=(0,i.zX)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Ce({callback:a});return(0,i.LI)((()=>{a(),e?(null==s||s.observe(e),null==l||l.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==l||l.disconnect())}),[e]),o}const Re=[];function Se(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==b;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,i.$X)(e,n.current):b}function Me(e){return(0,r.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Ne=[];function ke(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,i.Re)(t)?t:e}const Le=[{sensor:de,options:{}},{sensor:ae,options:{}}],Oe={current:{}},Te={draggable:{measure:j},droppable:{measure:j,strategy:me.WhileDragging,frequency:ye.Optimized},dragOverlay:{measure:I}};class Ae extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ie={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ae,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:h},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Te,measureDroppableContainers:h,windowRect:null,measuringScheduled:!1},je={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:h,draggableNodes:new Map,over:null,measureDroppableContainers:h},Be=(0,r.createContext)(je),ze=(0,r.createContext)(Ie);function Xe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ae}}}function Pe(e,t){switch(t.type){case v.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case v.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case v.DragEnd:case v.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case v.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Ae(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case v.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Ae(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case v.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Ae(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Fe(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:a}=(0,r.useContext)(Be),l=(0,i.D9)(o),s=(0,i.D9)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!o&&l&&null!=s){if(!(0,i.vd)(l))return;if(document.activeElement===l.target)return;const e=a.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,i.so)(e);if(t){t.focus();break}}}))}}),[o,t,a,s,l]),null}function Je(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Ye=(0,r.createContext)({...b,scaleX:1,scaleY:1});var Ue;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ue||(Ue={}));const He=(0,r.memo)((function(e){var t,n,a,l;let{id:s,accessibility:u,autoScroll:d=!0,children:h,sensors:g=Le,collisionDetection:p=N,measuring:m,modifiers:y,...w}=e;const x=(0,r.useReducer)(Pe,void 0,Xe),[C,D]=x,[R,S]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[M,L]=(0,r.useState)(Ue.Uninitialized),T=M===Ue.Initialized,{draggable:{active:A,nodes:j,translate:P},droppable:{containers:F}}=C,H=A?j.get(A):null,K=(0,r.useRef)({initial:null,translated:null}),W=(0,r.useMemo)((()=>{var e;return null!=A?{id:A,data:null!=(e=null==H?void 0:H.data)?e:Oe,rect:K}:null}),[A,H]),_=(0,r.useRef)(null),[V,Z]=(0,r.useState)(null),[Q,ee]=(0,r.useState)(null),te=(0,i.Ey)(w,Object.values(w)),ne=(0,i.Ld)("DndDescribedBy",s),re=(0,r.useMemo)((()=>F.getEnabled()),[F]),oe=(ie=m,(0,r.useMemo)((()=>({draggable:{...Te.draggable,...null==ie?void 0:ie.draggable},droppable:{...Te.droppable,...null==ie?void 0:ie.droppable},dragOverlay:{...Te.dragOverlay,...null==ie?void 0:ie.dragOverlay}})),[null==ie?void 0:ie.draggable,null==ie?void 0:ie.droppable,null==ie?void 0:ie.dragOverlay]));var ie;const{droppableRects:ae,measureDroppableContainers:le,measuringScheduled:se}=function(e,t){let{dragging:n,dependencies:o,config:a}=t;const[l,s]=(0,r.useState)(null),c=null!=l,{frequency:u,measure:d,strategy:f}=a,v=(0,r.useRef)(e),h=function(){switch(f){case me.Always:return!1;case me.BeforeDragging:return n;default:return!n}}(),g=(0,i.Ey)(h),p=(0,r.useCallback)((function(e){void 0===e&&(e=[]),g.current||s((t=>t?t.concat(e):e))}),[g]),b=(0,r.useRef)(null),m=(0,i.Gj)((t=>{if(h&&!n)return we;const r=l;if(!t||t===we||v.current!==e||null!=r){const t=new Map;for(let n of e){if(!n)continue;if(r&&r.length>0&&!r.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new $(d(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,l,n,h,d]);return(0,r.useEffect)((()=>{v.current=e}),[e]),(0,r.useEffect)((()=>{h||requestAnimationFrame((()=>p()))}),[n,h]),(0,r.useEffect)((()=>{c&&s(null)}),[c]),(0,r.useEffect)((()=>{h||"number"!=typeof u||null!==b.current||(b.current=setTimeout((()=>{p(),b.current=null}),u))}),[u,h,p,...o]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:c}}(re,{dragging:T,dependencies:[P.x,P.y],config:oe.droppable}),ce=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return(0,i.Gj)((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(j,A),ue=(0,r.useMemo)((()=>Q?(0,i.DC)(Q):null),[Q]),de=function(){const e=!1===(null==V?void 0:V.autoScrollEnabled),t="object"==typeof d?!1===d.enabled:!1===d,n=T&&!e&&!t;return"object"==typeof d?{...d,enabled:n}:{enabled:n}}(),fe=function(e,t){return xe(e,t)}(ce,oe.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:a=!0}=e;const l=(0,r.useRef)(!1),{x:s,y:c}="boolean"==typeof a?{x:a,y:a}:a;(0,i.LI)((()=>{if(!s&&!c||!t)return void(l.current=!1);if(l.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=k(n(e),o);if(s||(r.x=0),c||(r.y=0),l.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=z(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,s,c,o,n])}({activeNode:A?j.get(A):null,config:de.layoutShiftCompensation,initialRect:fe,measure:oe.draggable.measure});const ve=De(ce,oe.draggable.measure,fe),he=De(ce?ce.parentElement:null),ye=(0,r.useRef)({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:j,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ee=F.getNodeFor(null==(t=ye.current.over)?void 0:t.id),Ae=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),a=Ce({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,i.Re)(n)){o((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),l=(0,r.useCallback)((e=>{const n=ke(e);null==a||a.disconnect(),n&&(null==a||a.observe(n)),o(n?t(n):null)}),[t,a]),[s,c]=(0,i.wm)(l);return(0,r.useMemo)((()=>({nodeRef:s,rect:n,setRef:c})),[n,s,c])}({measure:oe.dragOverlay.measure}),Ie=null!=(n=Ae.nodeRef.current)?n:ce,je=T?null!=(a=Ae.rect)?a:ve:null,He=Boolean(Ae.nodeRef.current&&Ae.rect),Ke=k(qe=He?null:ve,xe(qe));var qe;const We=Me(Ie?(0,i.Jj)(Ie):null),Ge=function(e){const t=(0,r.useRef)(e),n=(0,i.Gj)((n=>e?n&&n!==Re&&e&&t.current&&e.parentNode===t.current.parentNode?n:B(e):Re),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(T?null!=Ee?Ee:ce:null),_e=function(e,t){void 0===t&&(t=I);const[n]=e,o=Me(n?(0,i.Jj)(n):null),[a,l]=(0,r.useReducer)((function(){return e.length?e.map((e=>U(e)?o:new $(t(e),e))):Ne}),Ne),s=Ce({callback:l});return e.length>0&&a===Ne&&l(),(0,i.LI)((()=>{e.length?e.forEach((e=>null==s?void 0:s.observe(e))):(null==s||s.disconnect(),l())}),[e]),a}(Ge),Ve=Je(y,{transform:{x:P.x-Ke.x,y:P.y-Ke.y,scaleX:1,scaleY:1},activatorEvent:Q,active:W,activeNodeRect:ve,containerNodeRect:he,draggingNodeRect:je,over:ye.current.over,overlayNodeRect:Ae.rect,scrollableAncestors:Ge,scrollableAncestorRects:_e,windowRect:We}),$e=ue?(0,i.IH)(ue,P):null,Ze=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),a=(0,r.useCallback)((e=>{const t=X(e.target);t&&n((e=>e?(e.set(t,J(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=o.current;if(e!==t){r(t);const i=e.map((e=>{const t=X(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,J(t)]):null})).filter((e=>null!=e));n(i.length?new Map(i):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=X(e);null==t||t.removeEventListener("scroll",a)}))}}),[a,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,i.IH)(e,t)),b):G(e):b),[e,t])}(Ge),Qe=Se(Ze),et=Se(Ze,[ve]),tt=(0,i.IH)(Ve,Qe),nt=je?O(je,Ve):null,rt=W&&nt?p({active:W,collisionRect:nt,droppableRects:ae,droppableContainers:re,pointerCoordinates:$e}):null,ot=E(rt,"id"),[it,at]=(0,r.useState)(null),lt=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(He?Ve:(0,i.IH)(Ve,et),null!=(l=null==it?void 0:it.rect)?l:null,ve),st=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==_.current)return;const i=j.get(_.current);if(!i)return;const a=e.nativeEvent,l=new n({active:_.current,activeNode:i,event:a,options:r,context:ye,onStart(e){const t=_.current;if(null==t)return;const n=j.get(t);if(!n)return;const{onDragStart:r}=te.current,i={active:{id:t,data:n.data,rect:K}};(0,o.unstable_batchedUpdates)((()=>{null==r||r(i),L(Ue.Initializing),D({type:v.DragStart,initialCoordinates:e,active:t}),R({type:"onDragStart",event:i})}))},onMove(e){D({type:v.DragMove,coordinates:e})},onEnd:s(v.DragEnd),onCancel:s(v.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ye.current;let l=null;if(t&&i){const{cancelDrop:o}=te.current;l={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===v.DragEnd&&"function"==typeof o&&await Promise.resolve(o(l))&&(e=v.DragCancel)}_.current=null,(0,o.unstable_batchedUpdates)((()=>{D({type:e}),L(Ue.Uninitialized),at(null),Z(null),ee(null);const t=e===v.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=te.current[t];null==e||e(l),R({type:t,event:l})}}))}}(0,o.unstable_batchedUpdates)((()=>{Z(l),ee(e.nativeEvent)}))}),[j]),ct=(0,r.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=j.get(r);if(null!==_.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},_.current=r,st(n,t))}),[j,st]),ut=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(g,ct);!function(e){(0,r.useEffect)((()=>{if(!i.Nq)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(g),(0,i.LI)((()=>{ve&&M===Ue.Initializing&&L(Ue.Initialized)}),[ve,M]),(0,r.useEffect)((()=>{const{onDragMove:e}=te.current,{active:t,activatorEvent:n,collisions:r,over:i}=ye.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:tt.x,y:tt.y},over:i};(0,o.unstable_batchedUpdates)((()=>{null==e||e(a),R({type:"onDragMove",event:a})}))}),[tt.x,tt.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ye.current;if(!e||null==_.current||!t||!i)return;const{onDragOver:a}=te.current,l=r.get(ot),s=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,o.unstable_batchedUpdates)((()=>{at(s),null==a||a(c),R({type:"onDragOver",event:c})}))}),[ot]),(0,i.LI)((()=>{ye.current={activatorEvent:Q,active:W,activeNode:ce,collisionRect:nt,collisions:rt,droppableRects:ae,draggableNodes:j,draggingNode:Ie,draggingNodeRect:je,droppableContainers:F,over:it,scrollableAncestors:Ge,scrollAdjustedTranslate:tt},K.current={initial:je,translated:nt}}),[W,ce,rt,nt,j,Ie,je,ae,F,it,Ge,tt]),function(e){let{acceleration:t,activator:n=ge.Pointer,canScroll:o,draggingRect:a,enabled:l,interval:s=5,order:c=pe.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:f,delta:v,threshold:h}=e;const g=function(e){let{delta:t,disabled:n}=e;const r=(0,i.D9)(t);return(0,i.Gj)((e=>{if(n||!r||!e)return be;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[Y.Backward]:e.x[Y.Backward]||-1===o,[Y.Forward]:e.x[Y.Forward]||1===o},y:{[Y.Backward]:e.y[Y.Backward]||-1===i,[Y.Forward]:e.y[Y.Forward]||1===i}}}),[n,t,r])}({delta:v,disabled:!l}),[p,b]=(0,i.Yz)(),m=(0,r.useRef)({x:0,y:0}),y=(0,r.useRef)({x:0,y:0}),w=(0,r.useMemo)((()=>{switch(n){case ge.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case ge.DraggableRect:return a}}),[n,a,u]),x=(0,r.useRef)(null),C=(0,r.useCallback)((()=>{const e=x.current;if(!e)return;const t=m.current.x*y.current.x,n=m.current.y*y.current.y;e.scrollBy(t,n)}),[]),E=(0,r.useMemo)((()=>c===pe.TreeOrder?[...d].reverse():d),[c,d]);(0,r.useEffect)((()=>{if(l&&d.length&&w){for(const e of E){if(!1===(null==o?void 0:o(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:a}=q(e,r,w,t,h);for(const e of["x","y"])g[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return b(),x.current=e,p(C,s),m.current=a,void(y.current=i)}m.current={x:0,y:0},y.current={x:0,y:0},b()}else b()}),[t,C,o,b,l,s,JSON.stringify(w),JSON.stringify(g),p,d,E,f,JSON.stringify(h)])}({...de,delta:P,draggingRect:nt,pointerCoordinates:$e,scrollableAncestors:Ge,scrollableAncestorRects:_e});const dt=(0,r.useMemo)((()=>({active:W,activeNode:ce,activeNodeRect:ve,activatorEvent:Q,collisions:rt,containerNodeRect:he,dragOverlay:Ae,draggableNodes:j,droppableContainers:F,droppableRects:ae,over:it,measureDroppableContainers:le,scrollableAncestors:Ge,scrollableAncestorRects:_e,measuringConfiguration:oe,measuringScheduled:se,windowRect:We})),[W,ce,ve,Q,rt,he,Ae,j,F,ae,it,le,Ge,_e,oe,se,We]),ft=(0,r.useMemo)((()=>({activatorEvent:Q,activators:ut,active:W,activeNodeRect:ve,ariaDescribedById:{draggable:ne},dispatch:D,draggableNodes:j,over:it,measureDroppableContainers:le})),[Q,ut,W,ve,D,ne,j,it,le]);return r.createElement(c.Provider,{value:S},r.createElement(Be.Provider,{value:ft},r.createElement(ze.Provider,{value:dt},r.createElement(Ye.Provider,{value:lt},h)),r.createElement(Fe,{disabled:!1===(null==u?void 0:u.restoreFocus)})),r.createElement(f,{...u,hiddenTextDescribedById:ne}))})),Ke=(0,r.createContext)(null),qe="button",We="Droppable";function Ge(e){let{id:t,data:n,disabled:o=!1,attributes:a}=e;const l=(0,i.Ld)(We),{activators:s,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:f,draggableNodes:v,over:h}=(0,r.useContext)(Be),{role:g=qe,roleDescription:p="draggable",tabIndex:b=0}=null!=a?a:{},m=(null==u?void 0:u.id)===t,y=(0,r.useContext)(m?Ye:Ke),[w,x]=(0,i.wm)(),[C,E]=(0,i.wm)(),D=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(s,t),R=(0,i.Ey)(n);return(0,i.LI)((()=>(v.set(t,{id:t,key:l,node:w,activatorNode:C,data:R}),()=>{const e=v.get(t);e&&e.key===l&&v.delete(t)})),[v,t]),{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,r.useMemo)((()=>({role:g,tabIndex:b,"aria-disabled":o,"aria-pressed":!(!m||g!==qe)||void 0,"aria-roledescription":p,"aria-describedby":f.draggable})),[o,g,b,m,p,f.draggable]),isDragging:m,listeners:o?void 0:D,node:w,over:h,setNodeRef:x,setActivatorNodeRef:E,transform:y}}function _e(){return(0,r.useContext)(ze)}const Ve="Droppable",$e={timeout:25};function Ze(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:a}=e;const l=(0,i.Ld)(Ve),{active:s,dispatch:c,over:u,measureDroppableContainers:d}=(0,r.useContext)(Be),f=(0,r.useRef)({disabled:n}),h=(0,r.useRef)(!1),g=(0,r.useRef)(null),p=(0,r.useRef)(null),{disabled:b,updateMeasurementsFor:m,timeout:y}={...$e,...a},w=(0,i.Ey)(null!=m?m:o),x=Ce({callback:(0,r.useCallback)((()=>{h.current?(null!=p.current&&clearTimeout(p.current),p.current=setTimeout((()=>{d(Array.isArray(w.current)?w.current:[w.current]),p.current=null}),y)):h.current=!0}),[y]),disabled:b||!s}),C=(0,r.useCallback)(((e,t)=>{x&&(t&&(x.unobserve(t),h.current=!1),e&&x.observe(e))}),[x]),[E,D]=(0,i.wm)(C),R=(0,i.Ey)(t);return(0,r.useEffect)((()=>{x&&E.current&&(x.disconnect(),h.current=!1,x.observe(E.current))}),[E,x]),(0,i.LI)((()=>(c({type:v.RegisterDroppable,element:{id:o,key:l,disabled:n,node:E,rect:g,data:R}}),()=>c({type:v.UnregisterDroppable,key:l,id:o}))),[o]),(0,r.useEffect)((()=>{n!==f.current.disabled&&(c({type:v.SetDroppableDisabled,id:o,key:l,disabled:n}),f.current.disabled=n)}),[o,l,n,c]),{active:s,rect:g,isOver:(null==u?void 0:u.id)===o,node:E,over:u,setNodeRef:D}}function Qe(e){let{animation:t,children:n}=e;const[o,a]=(0,r.useState)(null),[l,s]=(0,r.useState)(null),c=(0,i.D9)(n);return n||o||!c||a(c),(0,i.LI)((()=>{if(!l)return;const e=null==o?void 0:o.key,n=null==o?void 0:o.props.id;null!=e&&null!=n?Promise.resolve(t(n,l)).then((()=>{a(null)})):a(null)}),[t,o,l]),r.createElement(r.Fragment,null,n,o?(0,r.cloneElement)(o,{ref:s}):null)}const et={x:0,y:0,scaleX:1,scaleY:1};function tt(e){let{children:t}=e;return r.createElement(Be.Provider,{value:je},r.createElement(Ye.Provider,{value:et},t))}const nt={position:"fixed",touchAction:"none"},rt=e=>(0,i.vd)(e)?"transform 250ms ease":void 0,ot=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:o,adjustScale:a,children:l,className:s,rect:c,style:u,transform:d,transition:f=rt}=e;if(!c)return null;const v=a?d:{...d,scaleX:1,scaleY:1},h={...nt,width:c.width,height:c.height,top:c.top,left:c.left,transform:i.ux.Transform.toString(v),transformOrigin:a&&o?y(o,c):void 0,transition:"function"==typeof f?f(o):f,...u};return r.createElement(n,{className:s,style:h,ref:t},l)})),it=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(null!=i&&i.active)for(const[e,t]of Object.entries(i.active))void 0!==t&&(o[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=i&&i.dragOverlay)for(const[e,t]of Object.entries(i.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(o))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},at={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:i.ux.Transform.toString(t)},{transform:i.ux.Transform.toString(n)}]},sideEffects:it({styles:{active:{opacity:"0"}}})};let lt=0;function st(e){return(0,r.useMemo)((()=>{if(null!=e)return lt++,lt}),[e])}const ct=r.memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:a,transition:l,modifiers:s,wrapperElement:c="div",className:u,zIndex:d=999}=e;const{activatorEvent:f,active:v,activeNodeRect:h,containerNodeRect:g,draggableNodes:p,droppableContainers:b,dragOverlay:m,over:y,measuringConfiguration:w,scrollableAncestors:x,scrollableAncestorRects:C,windowRect:E}=_e(),D=(0,r.useContext)(Ye),R=st(null==v?void 0:v.id),S=Je(s,{activatorEvent:f,active:v,activeNodeRect:h,containerNodeRect:g,draggingNodeRect:m.rect,over:y,overlayNodeRect:m.rect,scrollableAncestors:x,scrollableAncestorRects:C,transform:D,windowRect:E}),M=xe(h),N=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return(0,i.zX)(((e,a)=>{if(null===t)return;const l=n.get(e);if(!l)return;const s=l.node.current;if(!s)return;const c=ke(a);if(!c)return;const{transform:u}=(0,i.Jj)(a).getComputedStyle(a),d=T(u);if(!d)return;const f="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...at,...e};return e=>{let{active:i,dragOverlay:a,transform:l,...s}=e;if(!t)return;const c=a.rect.left-i.rect.left,u=a.rect.top-i.rect.top,d={scaleX:1!==l.scaleX?i.rect.width*l.scaleX/a.rect.width:1,scaleY:1!==l.scaleY?i.rect.height*l.scaleY/a.rect.height:1},f={x:l.x-c,y:l.y-u,...d},v=o({...s,active:i,dragOverlay:a,transform:{initial:l,final:f}}),[h]=v,g=v[v.length-1];if(JSON.stringify(h)===JSON.stringify(g))return;const p=null==r?void 0:r({active:i,dragOverlay:a,...s}),b=a.node.animate(v,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{b.onfinish=()=>{null==p||p(),e()}}))}}(t);return _(s,o.draggable.measure),f({active:{id:e,data:l.data,node:s,rect:o.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:o.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:o,transform:d})}))}({config:o,draggableNodes:p,droppableContainers:b,measuringConfiguration:w}),k=M?m.setRef:void 0;return r.createElement(tt,null,r.createElement(Qe,{animation:N},v&&R?r.createElement(ot,{key:R,id:v.id,ref:k,as:c,activatorEvent:f,adjustScale:t,className:u,transition:l,rect:M,style:{zIndex:d,...a},transform:S},n):null))}))},17592:(e,t,n)=>{n.d(t,{$X:()=>D,D9:()=>y,DC:()=>S,Ey:()=>p,FJ:()=>a,Gj:()=>b,HB:()=>o,IH:()=>E,Jj:()=>s,LI:()=>v,Ld:()=>x,Nq:()=>i,Re:()=>u,UG:()=>l,Yz:()=>g,qk:()=>c,r3:()=>f,so:()=>k,ux:()=>M,vZ:()=>d,vd:()=>R,wm:()=>m,zX:()=>h});var r=n(32735);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}const i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function l(e){return"nodeType"in e}function s(e){var t,n;return e?a(e)?e:l(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=s(e);return e instanceof t}function u(e){return!a(e)&&e instanceof s(e).HTMLElement}function d(e){return e instanceof s(e).SVGElement}function f(e){return e?a(e)?e.document:l(e)?c(e)?e:u(e)||d(e)?e.ownerDocument:document:document:document}const v=i?r.useLayoutEffect:r.useEffect;function h(e){const t=(0,r.useRef)(e);return v((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function g(){const e=(0,r.useRef)(null);return[(0,r.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function p(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return v((()=>{n.current!==e&&(n.current=e)}),t),n}function b(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function m(e){const t=h(e),n=(0,r.useRef)(null),o=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function y(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let w={};function x(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[e]=n,e+"-"+n}),[e,t])}function C(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const E=C(1),D=C(-1);function R(e){if(!e)return!1;const{KeyboardEvent:t}=s(e.target);return t&&e instanceof t}function S(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=s(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const M=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[M.Translate.toString(e),M.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),N="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function k(e){return e.matches(N)?e:e.querySelector(N)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[457],{18967:(e,t,n)=>{n.d(t,{e:()=>h});var i=n(32735),r=n(79014),a=n(74097),o=n(26354),c=n(42735),s=n(81886),l=n(45157),u=n(49985),d=n(28825),v=n(83914),m=n(35223);const p={dropdownToggle:"UCAnJ"};function g(){return i.createElement(i.Fragment,null,i.createElement("div",{style:{padding:"0.53125rem 1rem"}},i.createElement("div",{className:"partial-loading-background",style:{height:"1.0625rem",width:"8rem"}})),i.createElement("div",{style:{padding:"0.53125rem 1rem"}},i.createElement("div",{className:"partial-loading-background",style:{height:"1.0625rem",width:"12rem"}})),i.createElement("div",{style:{padding:"0.53125rem 1rem"}},i.createElement("div",{className:"partial-loading-background",style:{height:"1.0625rem",width:"11rem"}})),i.createElement("div",{style:{padding:"0.53125rem 1rem"}},i.createElement("div",{className:"partial-loading-background",style:{height:"1.0625rem",width:"9rem"}})))}function y(e){var t="dropdown-item";return e&&(t+=" ".concat(e)),t}function b(e){var t=r.q.isFunction(e.action.label)?e.action.label:function(){return i.createElement(i.Fragment,null,e.action.label)};if(e.action.appLink)return i.createElement(d.F,{appLink:e.action.appLink,onClick:e.action.onClick,className:y(e.action.className),analyticsData:e.action.analyticsData,analyticsOptions:e.action.analyticsOptions,openInNewTab:e.action.openInNewTab,disabled:e.action.disabled},e.action.svgName&&i.createElement(v.x,{svgName:e.action.svgName,className:"d-inline-block svg-container me-2 align-middle"}),i.createElement("span",{className:"align-middle"},t()));function n(t){t.preventDefault(),e.action.analyticsData&&e.action.analyticsOptions&&u.k.logUserAction(e.action.analyticsData,e.action.analyticsOptions),r.q.isFunction(e.action.onClick)&&e.action.onClick(),e.action.href&&s.Q.Ab.PageLoad(e.action.href,e.action.openInNewTab)}return e.action.href?i.createElement("a",{className:y(e.action.className),onClick:n,href:e.action.href},e.action.svgName&&i.createElement(v.x,{svgName:e.action.svgName,className:"d-inline-block svg-container me-2 align-middle"}),i.createElement("span",{className:"align-middle"},t())):i.createElement("span",{className:"cursor-pointer ".concat(y(e.action.className)),onClick:n,role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&n(e)}},e.action.svgName&&i.createElement(v.x,{svgName:e.action.svgName,className:"d-inline-block svg-container me-2"}),t())}function f(e){if(!e.actions||!e.actions.length)return i.createElement(i.Fragment,null);var t=e.actions.some((function(e){return e.lazyPlaceholder})),n="dropdown";e.className&&(n+=" ".concat(e.className));var r,a="actions-dropdown-".concat(l.Y.getRandomInt()),c="dropdown-toggle px-0 ".concat(p.dropdownToggle);return e.dropdownToggleClassName&&(c+=" ".concat(e.dropdownToggleClassName)),i.createElement("div",{className:n},i.createElement("button",{className:c,type:"button",id:a,"data-bs-toggle":"dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"More actions dropdown",onClick:t?e.fetchMore:null},i.createElement(v.x,{svgName:m.vn.More,size:e.dropdownToggleSvgSize})),i.createElement("ul",{className:"dropdown-menu dropdown-menu-end dropdown-menu-right font-size-normal","aria-labelledby":a},t?i.createElement(g,null):e.actions.map((function(e,t){var n=void 0!==r&&r!==e.group;return r=e.group,e.tooltip?i.createElement("li",{key:t},n&&i.createElement("hr",{className:"dropdown-divider",role:"separator"}),i.createElement(o.u,{title:e.tooltip,spanHack:!0},i.createElement(b,{action:e}))):i.createElement("li",{key:t},n&&i.createElement("hr",{className:"dropdown-divider",role:"separator"}),i.createElement(b,{action:e}))}))))}function h(e){var t=i.useMemo((function(){return e.actions.sort((function(e,t){return e.order-t.order}))}),[e.actions]),n=[],s=[];t.forEach((function(e){e.button?n.push(e):s.push(e)}));var l="d-flex";return e.className&&(l+=" ".concat(e.className)),n.length||s.length?i.createElement("div",{className:l},n.length?n.map((function(t,n){return i.createElement(i.Fragment,{key:n},function(){if(t.label){var n=r.q.isFunction(t.label)?t.label:function(){return i.createElement(i.Fragment,null,t.label)};return i.createElement(c.K,{appLink:t.appLink,href:t.href,onClick:t.onClick,svgName:t.svgName,svgSize:e.dropdownToggleSvgSize,className:t.className,tooltip:t.tooltip,showSpinner:t.showSpinner,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions,openInNewTab:t.openInNewTab,disabled:t.disabled},n())}var s=i.createElement(a.h,{appLink:t.appLink,href:t.href,onClick:t.onClick,svgName:t.svgName,className:t.className,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions,openInNewTab:t.openInNewTab,disabled:t.disabled,showBorder:t.showBorder,customSize:e.customSize,ariaLabel:t.tooltip});return t.tooltip?i.createElement(o.u,{title:t.tooltip,spanHack:!0},s):s}())})):i.createElement(i.Fragment,null),e.sortComponent&&e.sortComponent,s.length?i.createElement(f,{actions:s,dropdownToggleClassName:e.actionsDropdownClassName,dropdownToggleSvgSize:e.dropdownToggleSvgSize,fetchMore:e.fetchMore}):i.createElement(i.Fragment,null)):i.createElement(i.Fragment,null)}f.defaultProps={dropdownToggleClassName:"btn btn-light",dropdownToggleSvgSize:v.S.Small}},78417:(e,t,n)=>{var i;n.d(t,{r:()=>i}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(i||(i={}))},98064:(e,t,n)=>{n.d(t,{D:()=>c});var i=n(99940),r=n(97395),a=n(75896),o=n(62803),c={domainLibraries:function(e,t,n,i){return{url:r._.urlBuilder("/api/domain/v2/me/libraries",{type:e,maxCategoryDepth:0}),key:"libraries:".concat(e.sort().join(":")),formatData:function(e){return e.map((function(e){return e.data}))},success:t,error:n,always:i}},libraryRequestLibraries:function(){return{url:"{gateway}/v1/library-requests/libraries",key:"libraries"}},librariesWithCategories:function(){return{url:r._.urlBuilder("/api/domain/v2/me/libraries",{type:["sharedLibrary","customLibrary","unpublishedCustomLibrary"],maxCategoryDepth:5}),key:"libraries:with:categories",normalize:!1}},librariesWithOwnerLogos:function(e,t,n,i){return e.sort(),{url:r._.urlBuilder("/api/domain/v2/objects",{query:o.v.LIBRARY_COLLECTION,id:e}),key:"libraries:owner:logo:".concat(e.join(",")),success:t,error:n,always:i}},library:function(e,t,n,i){return{url:r._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:o.v.LIBRARY}),key:"library:".concat(e),success:t,error:n,always:i}},exchange:function(e){return{url:r._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"categorytree"}),key:"exchange"}},streamableLearning:function(){return{url:"{gateway}/v1/streamable-learning-library",key:"streamable:learning"}},librarySubscribers:function(e,t){var n={};return t&&(n.cursor=t),{url:r._.urlBuilder("{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers"),n),key:"library:subscribers:".concat(e,":").concat(t)}},libraryOwner:function(e){return{url:"{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers?ownerOnly=true"),key:"library:owner:".concat(e),formatData:function(e){return a.m.first(e.data)}}},updateSubscriberPermissions:function(e,t,n,r,a){return{url:"{gateway}/v1/libraries/".concat(e,"/library-request-permissions"),key:"update:subscriber:permissions:".concat(e,":").concat(t),type:i.k.PUT,data:{customerId:t,granted:n},invalidationKeys:["library:owner:".concat(e),"library:subscribers:".concat(e)],success:r,error:a}},removeSubscriber:function(e,t,n,r){return{url:"{gateway}/v1/objects/".concat(e,"/subscribedcustomers?memberId=").concat(t),key:"revoke:subscription:".concat(e,":").concat(t),type:i.k.DELETE,invalidationKeys:["library:subscribers:".concat(e)],success:n,error:r}},folder:function(e,t,n,i){return{url:"{gateway}/v1/objects/".concat(e,"?query=banner,libraries"),key:"library:folder:".concat(e),success:t,error:n,always:i}},videoFolders:function(e){return{url:"{gateway}/v1/objects/".concat(e,"/categories?query=libraries"),key:"video:folders:".concat(e)}},folderParentTree:function(e,t,n,i){return{url:"/api/domain/v2/categories/".concat(e,"/parent-tree?includeAll=false"),key:"folder:parent:tree".concat(e),success:t,error:n,always:i}},childFolders:function(e,t,n,i,r){var a="{gateway}/v1/objects/".concat(e,"/categories?query={limit:100}thumbnail"),o="child:folders:".concat(e);return t&&(a+="&cursor=".concat(t),o+=":".concat(t)),{url:a,key:o,formatData:function(e){var t=e.data.sort((function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}));return Object.assign(Object.assign({},e),{data:t})},success:n,error:i,always:r}},addToLibrary:function(e,t){var n=["folder","videos",e.metadata.destinationCategoryId,t].filter((function(e){return!!e})).join(":");return{url:"{gateway}/v1/library-requests",key:"add:".concat(e.objectId,":to:").concat(e.destinationLibraryId,":").concat(e.metadata.destinationCategoryId),type:i.k.POST,data:e,invalidationKeys:n}},libraries:function(){return{url:"{gateway}/v1/users/me/libraries",key:"objects:libraries"}},libraryExport:function(e){return{url:"{gateway}/v1/libraries/export",key:"library:export",type:i.k.POST,data:e}}}},32299:(e,t,n)=>{n.d(t,{R:()=>g});var i,r=n(99940),a=n(97395),o=n(62803),c=n(5960),s=n(4594),l=n(78417);!function(e){e.Series="series",e.Playlist="playlist",e.Widget="widget",e.Folder="category",e.CategoryTree="categoryTree"}(i||(i={}));var u=n(68140),d=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:o.v.VIDEO})},v=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{query:"thumbnail,_canBeConsumed,series,season,rating,libraries{typeId:[17]}",permissionFilterOption:l.r.StripMetadata,shareId:t})},m=function(e){return a._.urlBuilder("{gateway}/v1/objects",{"query.video":o.v.VIDEO_COLLECTION,"query.clip":o.v.CLIP_COLLECTION,"query.interactive":o.v.INTERACTIVE_COLLECTION,id:e})},p=function(e){var t=e.videoId,n=e.context,r=e.collectionId,c=e.moviesAndTv,s={videoId:t,limit:e.limit,query:o.v.VIDEO_COLLECTION};return n&&(n===i.Widget?s["context.widgetId"]=r:(s["context.collectionType"]=n,s["context.collectionId"]=r)),c&&(s["context.moviesAndTv"]=!0),a._.urlBuilder("{gateway}/v1/suggestions/related-videos",s)},g={video:function(e,t){return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:o.v.VIDEO,permissionFilterOption:t}),publicUrl:a._.urlBuilder("/api/objects/".concat(e),{query:o.t.VIDEO,permissionFilterOption:t}),key:"videos:".concat(e,":").concat(t)}},publicVideo:function(e,t,n,i){return{url:v(e,t),key:"videos:".concat(e,":public:").concat(t),bootstrapName:"shared:object:".concat(e),success:n,error:i}},sharedVideo:function(e,t,n,i){return{url:d(e,t),key:"shared:video:".concat(e),success:n,error:i}},myVideos:function(e,t){var n=o.v.VIDEO_COLLECTION,i=o.v.CLIP_COLLECTION,r=o.v.INTERACTIVE,u="videos[".concat(n,"]{libraries.typeid:").concat(s.E.WorkspaceCollection,"}"),d="clips[".concat(i,"]"),v="interactives[".concat(r,"]{status:[").concat(c.X.Published,",").concat(c.X.Draft,"]}"),m={query:"(".concat(u,"|").concat(d,"|").concat(v,"){orderbydesc:id}"),permissionFilterOption:l.r.StripMetadata};return t&&(m.cursor=t),{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),m),key:"my:videos:".concat(t)}},videos:function(e,t){return{url:m(e),key:"videos:by:id:".concat(e.join(",")),success:t}},watchHistoryVideos:function(e,t){return{url:m(e),key:"watch:history:videos:by:id:".concat(e.join(",")),success:t}},updateVideo:function(e,t,n,i,a){return{key:"update:video:".concat(e),url:"{gateway}/v1/objects/".concat(e),type:r.k.PUT,data:t,success:n,error:i,always:a}},videoRatings:function(e,t){var n=e.map((function(e){return"id=".concat(e)}));if(n.length)return{url:"/api/domain/v2/objects?query=rating&".concat(n.join("&")),key:"video:ratings:by:id:".concat(e.join(",")),normalizeOptions:{namespace:t}}},videoMixinAssocs:function(e,t){if(e.map((function(e){return"id=".concat(e)})).length)return{url:a._.urlBuilder("{gateway}/v1/objects",{query:"interactives{limit:100},resources{limit:100},links{limit:100},_hasCurriculumLinks",id:e}),publicUrl:a._.urlBuilder("/api/objects",{query:"interactives{limit:100},resources{limit:100},links{limit:100},_hasCurriculumLinks",id:e}),key:"video:mixin:assocs:".concat(e.join(",")),normalizeOptions:{namespace:t}}},getRestrictions:function(e){var t=e.slice().sort();return{url:"/api/domain/v1/restrictedobjects"+"?objectTypeId=".concat(s.E.Video).concat(t.map((function(e){return"&objectId=".concat(e)})).join("")),key:"restrictions:".concat(t.join(",")),normalizeOptions:{namespace:"domain",idAttribute:"objectId"}}},delete:function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:video:".concat(e),type:r.k.DELETE,success:t,error:n,invalidationKeys:["videos","search"]}},deleteBulk:function(e,t,n,i,a){var o=e.map((function(e){return"videoIds=".concat(e)})).join("&"),c=["categoryId=".concat(n),"".concat(o)].join("&");return{url:"/api/domain/v1/libraries/".concat(t,"/videos?").concat(c),key:"delete:bulk:video:".concat(e.join(":"),":").concat(t,":").concat(n),type:r.k.DELETE,success:i,error:a,invalidationKeys:["videos","search"]}},relatedVideos:function(e){var t=e.videoId,n=e.context,i=e.collectionId,r=e.moviesAndTv;return{url:p(e),key:"related:videos:".concat(t,":").concat(n,":").concat(i,":").concat(r)}},collectionVideos:function(e,t,n,i,r,s){var d=u.d.getVideoSortParam(t),v=o.v.VIDEO_COLLECTION,m=o.v.CLIP_COLLECTION,p=o.v.INTERACTIVE,g="videos[".concat(v,"]"),y="clips[".concat(m,"]"),b="interactives[".concat(p,"]{status:[").concat(c.X.Published,",").concat(c.X.Draft,"]}"),f=Object.assign({query:"(".concat(g,"|").concat(y,"|").concat(b,")").concat(d?"{".concat(d,"}"):""),permissionFilterOption:l.r.FilterOut},n?{cursor:n}:{}),h=["folder","videos",e,n,t].filter((function(e){return!!e})).join(":");return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),f),key:h,success:i,error:r,always:s}},pointsOfInterest:function(e,t,n,i,r){var o={query:"{limit:100}",cursor:t};return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/pointsofinterest"),o),publicUrl:a._.urlBuilder("/api/objects/".concat(e,"/pointsofinterest"),o),key:"pointsofinterest:".concat(e).concat(t?":".concat(t):""),success:n,error:i,always:r}},regionAlternatives:function(e,t,n,i){return{url:"/api/objects/videos/".concat(e,"/region-alternatives"),publicUrl:"/api/objects/videos/".concat(e,"/region-alternatives"),key:"video:regionAlternatives:".concat(e),normalize:!1,success:t,error:n,always:i}}}},40370:(e,t,n)=>{n.d(t,{M:()=>h});var i,r=n(56050),a=n(23481),o=n(81886),c=n(14965),s=n(65858);!function(e){e.Screenrights="screenrights",e.Era="era",e.ClickView="clickview"}(i||(i={}));var l=n(5960),u=n(4594),d=n(5345),v=(n(99940),n(97395)),m=n(62803),p=(n(78417),function(e,t){return{key:"clip:".concat(e,":").concat(t),url:v._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:m.v.CLIP,permissionFilterOption:t})}}),g=n(32299),y=n(26361),b=n(16714),f=a.T.encloseNamespace("shared.shared-utils"),h={isVideo:function(e){return(null==e?void 0:e.typeId)===u.E.Video},isClip:function(e){return(null==e?void 0:e.typeId)===u.E.Clip},isInteractive:function(e){return(null==e?void 0:e.typeId)===u.E.Interactive},isVideoTypeArchived:function(e){return(null==e?void 0:e.status)===l.X.Archived},isVideoType:function(e){return h.isVideo(e)||h.isInteractive(e)||h.isClip(e)},hasSeries:function(e){var t;return!!(null===(t=null==e?void 0:e.series)||void 0===t?void 0:t.id)},showVideoGuidance:function(e){return!e(b.C.StudentExperience)},showInteractivesGuidance:function(e){var t,n;return!(!e||h.isInteractive(e)||!(null===(n=null===(t=e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length))},showResourcesGuidance:function(e){var t,n,i,r;return!(!e||h.isInteractive(e)||!(((null===(n=null===(t=e.resources)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)||0)+((null===(r=null===(i=e.links)||void 0===i?void 0:i.data)||void 0===r?void 0:r.length)||0)))},getVideoProgress:function(e){var t,n;return(null==e?void 0:e.lastProgressPoint)?null==e?void 0:e.lastProgressPoint:(null===(t=null==e?void 0:e._videoProgress)||void 0===t?void 0:t.progress)?null===(n=null==e?void 0:e._videoProgress)||void 0===n?void 0:n.progress:0},getThumbnail:function(e){var t,n,i;return e?h.isVideo(e)?e.thumbnail:(null==e?void 0:e._thumbnail)?e._thumbnail:h.isClip(e)?e.thumbnail||(null===(t=e._parentVideo)||void 0===t?void 0:t.thumbnail):h.isInteractive(e)?(null===(n=e._parentVideo)||void 0===n?void 0:n.thumbnail)||(null===(i=e._parentClip)||void 0===i?void 0:i.thumbnail):void 0:null},getDuration:function(e){var t,n;if(e){if(h.isVideo(e))return e.duration;if(h.isInteractive(e)){if(null===(t=e._parentClip)||void 0===t?void 0:t.id)return 1e3*(e._parentClip.endTime-e._parentClip.startTime);if(null===(n=e._parentVideo)||void 0===n?void 0:n.duration)return e._parentVideo.duration}return h.isClip(e)?1e3*(e.endTime-e.startTime):void 0}},getAnalyticsEntity:function(e){return h.isVideo(e)?s.py.Video:h.isInteractive(e)?s.py.Interactive:h.isClip(e)?s.py.Clip:void 0},getAnalyticsData:function(e){var t,n,i,r,a,o,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(h.isVideo(e))return Object.assign(Object.assign({},c||{}),{id:e.id,name:e.name});if(h.isClip(e)){var s=Object.assign(Object.assign({},c||{}),{id:e.id,name:e.name});return(null===(t=e._parentVideo)||void 0===t?void 0:t.id)&&(s.video={id:null===(n=e._parentVideo)||void 0===n?void 0:n.id,name:e._parentVideo.name}),s}var l=Object.assign(Object.assign({},c),{id:e.id,interactiveId:e.interactiveId,name:e.name,status:e.status,originType:e.originType});return(null===(i=null==e?void 0:e._parentClip)||void 0===i?void 0:i.id)&&(l.clip={id:null===(r=null==e?void 0:e._parentClip)||void 0===r?void 0:r.id,name:null==e?void 0:e._parentClip.name}),(null===(a=null==e?void 0:e._parentVideo)||void 0===a?void 0:a.id)&&(l.video={id:null===(o=null==e?void 0:e._parentVideo)||void 0===o?void 0:o.id,name:null==e?void 0:e._parentVideo.name}),l},getCanBeConsumed:function(e){var t,n;return e&&h.isVideoType(e)?e._canBeConsumed?{canNavigate:"login-required"===(null===(t=e._canBeConsumed)||void 0===t?void 0:t.reason)&&h.isVideo(e)||!0===e._canBeConsumed.value,canConsume:e._canBeConsumed.value,reason:null===(n=e._canBeConsumed)||void 0===n?void 0:n.reason}:{canNavigate:!0,canConsume:!0}:{canNavigate:!1,canConsume:!1}},getPrivacyReasoning:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=h.getCanBeConsumed(e),r=i.canConsume,a=i.canNavigate,o=i.reason,c=function(){return h.isClip(e)?f("clipLoginRequired"):h.isInteractive(e)?f("interactiveLoginRequired"):f("videoLoginRequired")};if(!r&&!a){if(n)return c();switch(o){case"rating-not-allowed":return f("ratingNotAllowed");case"video-deleted":return h.isClip(e)?f("clipParentDeleted"):h.isInteractive(e)?f("interactiveParentDeleted"):f("videoDeleted");case"clickview-private":return f("clickViewPrivate");case"private":default:return f("genericCannotAccess");case"login-required":return c();case"restricted-access":var s=y.l.getWeightedRestriction(null===(t=e._restrictions)||void 0===t?void 0:t.value);return(null==s?void 0:s.type)===d.c.Custom?f("awaitingApproval"):f("restrictedAccess")}}return h.isInteractive(e)&&e.status===l.X.Draft?f("draftInteractive"):""},getTitle:function(e){if(e.name)return h.isInteractive(e)&&e.status===l.X.Draft?f("draftInteractiveTitle",{name:e.name}):e.name;var t=h.getCanBeConsumed(e),n=t.canConsume,i=t.reason;return f(n||"private"!==i?n||"video-deleted"!==i?"privateVideo":"videoUnavailable":"privateVideo")},getParentVideo:function(e){return h.isVideo(e)?e:h.isClip(e)||h.isInteractive(e)?e._parentVideo:void 0},getRating:function(e){var t;return h.isVideo(e)?e.rating:null===(t=null==e?void 0:e._parentVideo)||void 0===t?void 0:t.rating},getVideoRequest:function(e,t,n){if(n){switch(t){case u.E.Video:return g.R.sharedVideo(e,n);case u.E.Clip:return function(e,t,n,i){return{key:"shared:clip:".concat(e),url:v._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:m.v.CLIP}),success:n,error:i}}(e,n);case u.E.Interactive:return function(e,t,n,i){return{url:v._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:m.v.INTERACTIVE}),key:"shared:interactive:metadata:".concat(e),success:n,error:i}}(e,n)}o.Q.Ry.throw(new r.H("Unsupported master type"))}switch(t){case u.E.Video:return g.R.video(e);case u.E.Clip:return p(e);case u.E.Interactive:return i=e,{url:v._.urlBuilder("{gateway}/v1/objects/".concat(i),{query:m.v.INTERACTIVE,permissionFilterOption:a}),key:"interactive:metadata:".concat(i,":").concat(a)}}var i,a;o.Q.Ry.throw(new r.H("Unsupported master type"))},isBroadcast:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.contentLicences)||void 0===t?void 0:t.data)||void 0===n?void 0:n.some((function(e){return e.systemName===i.Era||e.systemName===i.Screenrights})))},getReleaseDate:function(e){return e&&e.dateReleased&&h.isBroadcast(e)?c.O.format(e.dateReleased,"DD/MM/YYYY"):""},canViewOriginalVideo:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e._parentVideo)||void 0===t?void 0:t._canBeConsumed)||void 0===n?void 0:n.value)},getTrackingCode:function(e){return h.isVideo(e)?e.trackingCode:h.isClip(e)||h.isInteractive(e)?e._parentVideo.trackingCode:void 0},isInExchange:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.libraries)||void 0===t?void 0:t.data)||void 0===n?void 0:n.some((function(e){return e.typeId===u.E.ExchangeCollection})))},canViewUploadDate:function(e){return!(!e||!e.dateCreated||!e._isClickViewCurated||e._isClickViewCurated.value)}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[484],{27898:(e,t,r)=>{r.d(t,{Q:()=>b,z:()=>m});var n=r(23481),o=r(75896),i=r(1048);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){return function(e){if(Array.isArray(e))return u(e)}(e)||s(e)||c(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.")}()}function c(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}var f={"featured-result":1,"topic-list":8,company:8,"playlist-with-videos":1,"series-with-videos":1,"series-thumbnail":1,"playlist-thumbnail":1,"video-item":1,"companies-and-topics":16},m="curriculumCode",b={flattenResults:function(e){return e?e.results?Object.assign(Object.assign({},e),{results:o.m.flatten(e.results)}):Object.assign(Object.assign({},e),{results:[]}):null},getContextualSearchQueryParams:function(e){return e&&e.get("filterParam")?(t={},r=e.get("filterParam"),n=e.get("filterValue"),(r=function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.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+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t):{};var t,r,n},mapMaxScoreToSearchResults:function(e,t){return e.map((function(e){return t?Object.assign(Object.assign({},e),{_maxScore:t}):e}))},groupResults:function(e,t,r,o,a){var u,m;if(!(null==e?void 0:e.length)&&!(null===(u=null==t?void 0:t.results)||void 0===u?void 0:u.length)&&!(null===(m=null==r?void 0:r.results)||void 0===m?void 0:m.length))return[];var b,d,y,v,g=function(e){if(Array.isArray(e))return e}(v=e)||s(v)||c(v)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),h=g[0],S=g.slice(1),j=a.xs||a.sm,w=function(e,t,r,o,a){var c,u,s,m,b,d,y,v=a?"playlist-thumbnail":"playlist-with-videos",g=a?"series-thumbnail":"series-with-videos",h=[{type:"companies-and-topics",items:null!==(b=[].concat(l(null!==(u=null===(c=null==r?void 0:r.results)||void 0===c?void 0:c.slice(0,f.company))&&void 0!==u?u:[]),l(null!==(m=null===(s=null==t?void 0:t.results)||void 0===s?void 0:s.slice(0,f["topic-list"]))&&void 0!==m?m:[])))&&void 0!==b?b:[]},{type:"featured-result",items:i.t.isEmpty(o)?[]:[o]},{type:"video-item",items:[]},{type:"video-item",items:[]},{type:"video-item",items:[]},{type:v,items:[]},{type:g,items:[]},{heading:n.T.getPhrase("sharedSearch.utils","relatedTopics"),type:"topic-list",items:null!==(y=null===(d=null==t?void 0:t.results)||void 0===d?void 0:d.slice(f["topic-list"],2*f["topic-list"]))&&void 0!==y?y:[]}],S=!1;return null==e||e.forEach((function(e){var t=p(e,a);if(!e._featured||S||"video"!==e._index)if(h[2].items.length<f["video-item"]&&"video-item"===t)h[2].items.push(e);else if(h[3].items.length<f["video-item"]&&"video-item"===t)h[3].items.push(e);else if(h[4].items.length<f["video-item"]&&"video-item"===t)h[4].items.push(e);else if(h[5].items.length<f[v]&&t===v)h[5].items.push(e);else if(h[6].items.length<f[g]&&t===g)h[6].items.push(e);else{var r=h[h.length-1];if((null==r?void 0:r.type)===t){var n=f[t];r.items.length>=n?h.push({type:t,items:[e]}):r.items.push(e)}else h.push({type:t,items:[e]})}else S=!0})),h.filter((function(e){var t;return null===(t=e.items)||void 0===t?void 0:t.length}))}(h,t,r,o,j);return(null==S?void 0:S.length)?(d=w,y=j,(b=S)?(b.forEach((function(e){var t=d[d.length-1],r=!0;e.forEach((function(e){var n=p(e,y);if(r&&t.type===n)t.items.length>=f[n]?(r=!1,d.push({type:n,items:[e]})):t.items.push(e);else{var o=d[d.length-1];(null==o?void 0:o.type)===n?o.items.length>=f[n]?d.push({type:n,items:[e]}):o.items.push(e):d.push({type:n,items:[e]})}}))})),d):d):w}};function p(e,t){var r;return"video"===e._index||"interactive"===e._index||"clip"===e._index?"video-item":"series"===e._index?(null===(r=e.tallPoster)||void 0===r?void 0:r.id)&&!t?"series-with-videos":"series-thumbnail":"classification"===e._index?"topic-list":"playlist"===e._index?t?"playlist-thumbnail":"playlist-with-videos":void 0}},87611:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(32735),o=r(1048),i=r(28825),a=r(40320),l=r(54610),c=r(67453);const u={image:"vdd4V",thumbnail:"Ez0E7",tallPoster:"H9bQA",cover:"Nudts",banner:"IOvDH",poster:"iiY56",pdf:"aDJiJ",link:"wDpui"};function s(e){var t=u.image,r="";return e.imageType===l.__.Thumbnails&&(r="thumbnail ".concat(u.thumbnail)),e.imageType===l.__.TallPosters&&(r=u.tallPoster),e.imageType===l.__.Covers&&(r=u.cover),e.imageType===l.__.Banners&&(r=u.banner),e.imageType===l.__.Posters&&(r=u.poster),e.imageType===l.__.Pdf&&(r=u.pdf),e.imageType===l.__.Link&&(r=u.link),r&&(t+=" ".concat(r)),e.className&&(t+=" ".concat(e.className)),t}function f(e){var t=e.data,r=e.imageOptions,l=e.appLink,u=e.preload,f=e.preventLoad,m=e.analyticsOptions,b=e.analyticsData,p=e.imageClassName,d=e.alt,y="";"string"==typeof t?y=t:o.t.isObject(t)&&(y=t.url);var v=y&&r?c.j.createUrl(y,r):y;return n.createElement("div",{className:s(e),style:e.imageStyle},n.createElement(i.F,{appLink:l,analyticsData:b,analyticsOptions:m,onClick:e.onClick,preventFocus:e.preventFocus,className:e.appLinkClassName},e.children,v&&n.createElement(a.w,{src:v,alt:d,forceLoad:u,preventLoad:f,extraClasses:p,errorFallbackImageSrc:e.errorFallbackImageSrc,errorFallbackImageClassName:e.errorFallbackImageClassName,onLoad:e.onLoad})))}},26533:(e,t,r)=>{r.d(t,{oy:()=>m,mS:()=>u});var n=r(32735),o=r(83914),i=r(7733),a=r(9085),l=r(35223);const c={baseFallbackContainer:"ZvbeV",svgFallbackContainer:"atIHN",subjectFallbackContainer:"m20L7",subjectFallbackContainerSmall:"QIbxu",subjectFallbackContainerLarge:"z_sHT",seriesItemFallback:"epoLB",playlistItemFallback:"h1S5T",playlistFallback:"ZbKBN",posterFallback:"I1mTo",subjectFallback:"kNG8Z",fallbackThumbnailImage:"nKsWZ",videoFallback:"LolCW",folderFallback:"mdrT5"};var u,s,f;function m(e){var t,r=e.type,m=e.mediaType,b=e.extraClasses,p=e.containerClassSize;if(r===u.Video)return n.createElement("div",{className:"".concat(c.videoFallback," ").concat(e.extraClasses," bg-light-blue")});if(r===u.Folder)return n.createElement("div",{className:"".concat(c.folderFallback," ").concat(e.extraClasses," ").concat((0,a.x)(e.name,i.o))});var d=function(e){return e===u.SeriesThumbnail?c.seriesItemFallback:e===u.PlaylistThumbnail?c.playlistItemFallback:e===u.Playlist?c.playlistFallback:e===u.Series||e===u.TallSubject?c.posterFallback:e===u.Subject?"".concat(c.subjectFallback," svg-container d-inline-block"):""}(r),y=function(e){return e===u.SeriesThumbnail||e===u.PlaylistThumbnail?l.vn.Play:e===u.Playlist?l.vn.Image:e===u.Series?l.vn.Series:e===u.Subject||e===u.TallSubject?l.vn.FileImg:""}(r),v=function(e){return e===u.Subject?o.S.ExtraLarge:o.S.Standard}(r),g="".concat(function(e,t,r){if(t===u.Subject){var n=r===f.Large?c.subjectFallbackContainerLarge:c.subjectFallbackContainerSmall;return"".concat(c.subjectFallbackContainer," ").concat(n)}return e===s.Svg?t===u.SeriesThumbnail||t===u.PlaylistThumbnail?"".concat(c.svgFallbackContainer," rounded-3"):c.svgFallbackContainer:c.baseFallbackContainer}(m,r,p));return b&&(g+=" ".concat(e.extraClasses)),n.createElement("div",{className:g},m===s.Svg?n.createElement(o.x,{svgName:y,className:"".concat(d," ").concat(null!==(t=e.svgContainerClassName)&&void 0!==t?t:""),tagName:"div",size:v}):n.createElement("div",{className:c.fallbackThumbnailImage,style:{backgroundImage:"url('".concat(y,"')")}}))}!function(e){e[e.Playlist=0]="Playlist",e[e.PlaylistThumbnail=1]="PlaylistThumbnail",e[e.Series=2]="Series",e[e.SeriesThumbnail=3]="SeriesThumbnail",e[e.Subject=4]="Subject",e[e.TallSubject=5]="TallSubject",e[e.Video=6]="Video",e[e.Folder=7]="Folder"}(u||(u={})),function(e){e[e.Svg=0]="Svg",e[e.Image=1]="Image"}(s||(s={})),function(e){e[e.Large=0]="Large",e[e.Small=1]="Small"}(f||(f={})),m.defaultProps={mediaType:s.Svg,containerClassSize:f.Large}},40320:(e,t,r)=>{r.d(t,{w:()=>l});var n=r(32735),o=r(65294);const i="fVSzb";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var l=n.memo((function(e){var t,r,l=e.forceLoad,c=e.extraClasses,u=void 0===c?"":c,s=e.errorFallbackImageSrc,f=e.preventLoad,m=void 0!==f&&f,b=e.errorFallbackImageClassName,p=e.src,d=e.alt,y=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["forceLoad","extraClasses","errorFallbackImageSrc","preventLoad","errorFallbackImageClassName","src","alt"]),v=(0,o.Y)({rootMargin:"500px"}),g=v.ref,h=v.inView,S=(t=n.useState(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=S[0],w=S[1];function O(){return j&&s?s:e.src}if(n.useEffect((function(){if((l||h)&&!m){var e=new Image;return e.onerror=function(){w(!0),s&&(e.src=s)},e.src=p,function(){return e.onerror=null}}}),[h,m]),j&&!s)return n.createElement(n.Fragment,null);if(!g)return n.createElement("img",Object.assign({className:"".concat(i," ").concat(u," ").concat(j&&b||""),alt:d,src:O()},y));var k=Object.assign(Object.assign({alt:d},y),!h&&!l||m?{src:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}:{src:O()});return l||(k.ref=g),n.createElement("img",Object.assign({className:"".concat(i," ").concat(u," ").concat(j&&b||"")},k))}))},7733:(e,t,r)=>{r.d(t,{o:()=>n});var n=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},69834:(e,t,r)=>{r.d(t,{r:()=>P});var n=r(50242),o=r(81886),i=r(67058),a=r(23481),l=r(64364);function c(e){return c="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},c(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=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 p="shared.privateResourceError",d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=m(t),function(e,t){if(t&&("object"==c(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,f()?Reflect.construct(t,r||[],m(e).constructor):t.apply(e,r))}(this,t,[a.T.getPhrase(p,"title")])}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),r=t,(n=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return a.T.getPhrase(p,"heading")}},{key:"description",get:function(){return a.T.getPhrase(p,"description")}}])&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(l.H);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function g(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.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 h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var w="shared.regionLockedResourceError",O=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=S(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,r||[],S(e).constructor):t.apply(e,r))}(this,t,[a.T.getPhrase(w,"title")])}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&&j(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return a.T.getPhrase(w,"heading")}},{key:"description",get:function(){return a.T.getPhrase(w,"description")}}])&&v(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(l.H),k=r(49075),F={notFound:i.d,forbidden:{rating:d,yearLevel:d,region:O,privacy:d},badRequest:k._,internalServerError:k._};function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var i;i="number"==typeof e?e:e.status;var a=Object.assign(Object.assign({},F),t);i&&o.Q.Ry.isStatusCodeError(i)&&(i!==n.o.InternalServer?i!==n.o.NotFound?i!==n.o.Forbidden?r.badRequest||o.Q.Ry.throw(new a.badRequest):r.forbidden||o.Q.Ry.throw(new a.forbidden.privacy):r.notFound||o.Q.Ry.throw(new a.notFound):r.internalServerError||o.Q.Ry.throw(new k._))}}},65294:(e,t,r)=>{r.d(t,{Y:()=>i});var n=r(34152);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.prevent,a=r.rootMargin,l=r.triggerOnce,c=void 0===l||l,u=(e=(0,n.YD)({triggerOnce:c,rootMargin:a}),t=3,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=u[0],f=u[1],m=u[2];return!0!==i&&void 0!==window.IntersectionObserver||(f=!0,s=null),{ref:s,inView:f,initialized:!!m}}},45719:(e,t,r)=>{r.d(t,{P:()=>s});var n=r(32735),o=r(70680),i=r(50242),a=r(79014),l=r(20354);function c(e){return function(e){if(Array.isArray(e))return u(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 u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(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.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t,r){function i(e){if(e)return a.q.isFunction(t)?c(t(e)):c(e.data)}function u(e){var t,n;if(e)return r?r(e):null===(n=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===n?void 0:n.next}return(0,o.v9)((0,n.useMemo)((function(){return function(t){if(a.q.isFunction(e)){for(var r=e,n=a.q.isFunction(e)&&r(),o=n&&l.a.getResponse(t,n),s=o&&o.isFetching,f=o&&o.statusCode,m=o&&o.hasCompleted,b=m,p=o&&o.shouldFetch,d=i(o&&o.data),y=u(o&&o.data),v=function(e){if(e)return null==e?void 0:e.count}(o&&o.data);y&&(o=l.a.getResponse(t,r(y)),s=s||o.isFetching,f=o.statusCode,m=o.hasCompleted,!o.shouldFetch);){var g=i(o.data);g&&d.push.apply(d,c(g));var h=u(o.data);y=h===y?null:h}var S={shouldInitialFetch:p,items:d,nextCursor:y,isFetching:s,statusCode:f,hasCompleted:m,hasFirstPageCompleted:b};return"number"==typeof v&&(S.totalItems=v),S}}}),[e]))}i.o.Ok},79967:(e,t,r)=>{r.d(t,{k:()=>i});var n=r(32735),o=r(49677);function i(){return n.useContext(o.X)}},9085:(e,t,r)=>{function n(e,t){return t[e.charCodeAt(0)%t.length]}r.d(t,{x:()=>n})}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 494-fb999f8f33-exchange.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[494],{32119:(e,t,r)=>{r.d(t,{G:()=>o});var a=r(32735),n=r(71365);function o(e){var t,r;return t=e,r=n.u.getInstance(t),a.useEffect((function(){return function(){n.u.releaseInstance(t)}})),r}},69883:(e,t,r)=>{r.d(t,{Z:()=>i});var a=r(79976),n=r(60139),o=r(32119);function i(){var e=(0,o.G)(a.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:n.NK.Warning,heading:n.R6.Warning,message:t})},info:function(t,r){e.createAlert({heading:t,message:r,type:n.NK.Info})}}}},23455:(e,t,r)=>{r.d(t,{h:()=>i});var a=r(32735),n=r(81886),o=r(20470);function i(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.useEffect((function(){t.length&&t.some(n.Q.Ry.isStatusCodeError)&&n.Q.Ry.throw(new o.x)}),t)}},5353:(e,t,r)=>{r.d(t,{i:()=>d});var a,n=r(99940),o=r(97395),i=r(14965);!function(e){e[e.AllResults=0]="AllResults",e[e.Subtitles=1]="Subtitles",e[e.TitleAndDescription=2]="TitleAndDescription"}(a||(a={}));var c=r(55812);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function u(e){return Object.entries(e).reduce((function(e,t){var r,a,n=(a=2,function(e){if(Array.isArray(e))return e}(r=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,c=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=o.call(r)).done)&&(c.push(a.value),c.length!==t);s=!0);}catch(e){u=!0,n=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw n}}return c}}(r,a)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];return e[o.charAt(0).toLowerCase()+o.slice(1)]=i,e}),{})}function l(e){return e?Array.isArray(e)?function(e){return e.map(u)}(e):u(e):null}var d={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:l}},region:function(e){return{url:"/api/tv/api/v2/regions/".concat(e),key:"tv:region:".concat(e),normalize:!1,formatData:l}},dateRange:function(e){return{url:"/api/tv/api/v2/regions/".concat(e,"/daterange"),key:"tv:region:".concat(e,":daterange"),normalize:!1,formatData:l}},channels:function(e){return{url:o._.urlBuilder("/api/tv/api/v2/channels",{region:e}),key:"tv:channels:".concat(e),normalize:!1,formatData:function(e){return l(e).sort((function(e,t){return e.sortOrder-t.sortOrder}))}}},payTvChannels:function(){return{url:"/api/tv/v1/pay-tv/channels/all",key:"pay:tv:channels",normalize:!1,formatData:l}},programsByChannel:function(e,t,r,a){return{url:o._.urlBuilder("/api/tv/api/v3/regions/".concat(e,"/channels/programs"),{channel:t,startDate:r,endDate:a}),key:["tv:programs:by:channel",e,t,r,a].join(":"),normalize:!1,formatData:l}},programsByLetter:function(e,t,r,a){return{url:o._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:e,startsWith:t,startDate:r,endDate:a}),key:["tv:programs:by:letter",e,t,r,a].join(":"),normalize:!1,formatData:l}},program:function(e){return{url:"/api/tv/api/v3/programs/".concat(e),key:"tv:programs:".concat(e),normalize:!1,formatData:function(e){var t=l(e);return t.region=l(e.Region),t}}},search:function(e,t,r){var n=t.query,i=t.dateBroadcast,s=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}(t,["query","dateBroadcast"]),u=r||1,d=s.filter||a.AllResults;return{url:o._.urlBuilder("/api/tv/api/v4/search",Object.assign(Object.assign(Object.assign({region:e,query:n,filter:d},c.a.getDateBroadcastParams(i)),s),{page:u,size:25})),key:["tv:search",n,e,Object.values(Object.assign({filter:d,dateBroadcast:i},s)).join(":"),u].join(":"),normalize:!1,formatData:function(e){var t=l(e);return t.results=l(e.Results),t.page=u,t}}},addFullVideo:function(e,t){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:n.k.POST,data:e,invalidationKeys:"tv:workspace:video:".concat(t)}},addAdFreeVideo:function(e,t){return{url:o._.urlBuilder("/api/tv/v4/programs/".concat(e.id,"/ad-free"),{customerId:e.customerId,userId:e.userId}),key:"tv:add:ad:free:video",normalize:!1,type:n.k.POST,invalidationKeys:"tv:workspace:video:".concat(t)}},adFreeCredits:function(e,t,r){var a=new Date;a.setHours(0,0,0,0),a.setMinutes(a.getMinutes()+a.getTimezoneOffset());var n=i.O.add(a,1,"day");return{url:o._.urlBuilder("/api/tv/v4/user-requests",{userId:e,customerId:t,regionCode:r,from:i.O.convertUTCToLocal(a).toISOString(),to:i.O.convertUTCToLocal(n).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:l}},createAdFreeRequest:function(e){return{url:o._.urlBuilder("/api/tv/v4/user-requests/ad-free",{userId:e.userId,customerId:e.customerId}),key:"tv:create:add:free:request",normalize:!1,type:n.k.POST,data:{programId:e.programId,regionCode:e.regionCode},invalidationKeys:["tv:add:free:credits"]}},workspaceVideo:function(e,t,r){return{url:o._.urlBuilder("/api/tv/v4/workspace/programs/".concat(e),{userId:t,customerId:r}),key:"tv:workspace:video:".concat(e),formatData:l}},requestProgram:function(e){return{url:"/api/tv/v1/pay-tv/user-requests",key:"tv:request:program",type:n.k.POST,data:e}},requestProgramUk:function(e){return{url:"/api/tv/api/v1/user-requests/program",key:"tv:request:program:uk",type:n.k.POST,data:e}}}},55812:(e,t,r)=>{r.d(t,{a:()=>i});var a=r(67624),n=r(14965),o=r(1048),i={getFormattedDateRange:function(e,t){return"".concat(n.O.format(e,"Do MMMM YYYY")," - ").concat(n.O.format(t,"Do MMMM YYYY"))},getDateBroadcastParams:function(e){var t=function(e){return n.O.format(e,"YYYY-MM-DD")},r=t(new Date);switch(e){case"yesterday":return{from:t(n.O.subtract(r,1,"day")),to:r};case"last-week":return{from:t(n.O.subtract(r,7,"days")),to:r};case"last-2-weeks":return{from:t(n.O.subtract(r,14,"days")),to:r}}},isHolidayPeriod:function(){var e,t=(e=a.SG.get("cv:holiday:dates"),o.t.isObject(e)?e:{startMonth:12,startDay:15,endMonth:1,endDay:6}),r=t.startMonth,n=t.startDay,i=t.endMonth,c=t.endDay,s=new Date,u=s.getMonth()+1,l=s.getDate();return u===r&&l>=n||u===i&&l<=c}}},22494:(e,t,r)=>{r.r(t),r.d(t,{TvAddView:()=>P});var a=r(32735),n=r(23481),o=r(81886),i=r(20354),c=r(11607);const s={selected:"zWik0",disabled:"bMSMv"};function u(e){var t,r,n,o,i,u="text-center cursor-pointer p-3 border rounded-3 mx-2 user-select-none w-50";return e.selected&&(u+=" border-info ".concat(s.selected)),(null===(t=e.option)||void 0===t?void 0:t.disabled)&&(u+=" ".concat(s.disabled)),a.createElement(c.L,{onClick:function(){var t;(null===(t=e.option)||void 0===t?void 0:t.disabled)||e.onSelect(e.option)},className:u},(null===(r=e.option)||void 0===r?void 0:r.imageUrl)&&a.createElement("img",{src:e.option.imageUrl,className:"img-fluid my-3 ".concat(null!==(n=e.option.imageClassName)&&void 0!==n?n:""),draggable:!1}),(null===(o=e.option)||void 0===o?void 0:o.title)&&a.createElement("h2",{className:"h3"},e.option.title),(null===(i=e.option)||void 0===i?void 0:i.description)&&a.createElement("p",{className:"mb-0",dangerouslySetInnerHTML:{__html:e.option.description}}),e.children)}var l=r(77696),d=r(13876),f=r(83345),p=r(31949),m=r(23455),v=r(73818),h=r(82329),y=r(99742),g=r(5353),b=r(60139),w=r(49985),E=r(65858),A=r(69883),k=r(65185);function O(e){return O="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},O(e)}function x(){x=function(){return t};var e,t={},r=Object.prototype,a=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,a){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new L(a||[]);return n(i,"_invoke",{value:T(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",p="suspendedYield",m="executing",v="completed",h={};function y(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,A=E&&E(E(C([])));A&&A!==r&&a.call(A,i)&&(w=A);var k=b.prototype=y.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function D(e,t){function r(n,o,i,c){var s=d(e[n],e,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==O(l)&&a.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(l).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(s.arg)}var o;n(this,"_invoke",{value:function(e,a){function n(){return new t((function(t,n){r(e,a,t,n)}))}return o=o?o.then(n,n):n()}})}function T(t,r,a){var n=f;return function(o,i){if(n===m)throw Error("Generator is already running");if(n===v){if("throw"===o)throw i;return{value:e,done:!0}}for(a.method=o,a.arg=i;;){var c=a.delegate;if(c){var s=I(c,a);if(s){if(s===h)continue;return s}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===f)throw n=v,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=m;var u=d(t,r,a);if("normal"===u.type){if(n=a.done?v:p,u.arg===h)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(n=v,a.method="throw",a.arg=u.arg)}}}function I(t,r){var a=r.method,n=t.iterator[a];if(n===e)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),h;var o=d(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function N(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 F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function C(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function r(){for(;++n<t.length;)if(a.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(O(t)+" is not iterable")}return g.prototype=b,n(k,"constructor",{value:b,configurable:!0}),n(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,s,"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,u(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},S(D.prototype),u(D.prototype,c,(function(){return this})),t.AsyncIterator=D,t.async=function(e,r,a,n,o){void 0===o&&(o=Promise);var i=new D(l(e,r,a,n),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},S(k),u(k,s,"Generator"),u(k,i,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},t.values=C,L.prototype={constructor:L,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(F),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function n(a,n){return c.type="throw",c.arg=t,r.next=a,n&&(r.method="next",r.arg=e),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(i)},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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),F(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;F(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,a){return this.delegate={iterator:C(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=e),h}},t}var S=function(e,t,r,a){return new(r||(r=Promise))((function(n,o){function i(e){try{s(a.next(e))}catch(e){o(e)}}function c(e){try{s(a.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}s((a=a.apply(e,t||[])).next())}))},D=n.T.encloseNamespace("tv.addRequests"),T=r(55812);const I={circle:"v0QaY"};function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}var F="tv.add",L=n.T.encloseNamespace(F),C={id:"ad-free",title:"adFreeTitle",description:"adFreeDescription",imageUrl:y.W.General.MOUNTAINS_FRAMED},_={id:"request-ad-free",title:"adFreeTitle",imageUrl:y.W.General.MOUNTAINS_FRAMED},j={id:"full-video",title:"fullVideoTitle",description:"fullVideoDescription",imageUrl:y.W.General.ANNOUNCEMENT_FRAMED};function P(e){var t=i.a.useBasicFetch(p.N.currentUser()),r=i.a.useBasicFetch(g.i.program(e.id)),n=i.a.useBasicFetch(t.data&&g.i.adFreeCredits(t.data.id,t.data.customerId,e.region)),c=function(e,t){var r=i.a.useGetFetchAsync(),a=(0,A.Z)(),n=i.a.useBasicFetch(p.N.currentUser()),c=i.a.useBasicFetch(p.N.workspace()),s=i.a.useBasicFetch(g.i.program(e)),u=i.a.useBasicFetch(g.i.region(t)),l=i.a.useBasicFetch(s.data&&n.data&&g.i.workspaceVideo(s.data.id,n.data.id,n.data.customerId));return{requestAdFreeVideo:function(){var e;return S(this,void 0,void 0,x().mark((function t(){var i,c;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r(g.i.createAdFreeRequest({programId:s.data.id,regionCode:u.data.code,userId:n.data.id,customerId:n.data.customerId}));case 3:a.success({heading:k.R.Success,message:D("requestAdFreeSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.AD_FREE_REQUEST,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AdFreeRequest,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(0),(i=null===(e=t.t0.responseJSON)||void 0===e?void 0:e.message)?(c=JSON.parse(i),a.error(D(c.Type,{video:s.data.title}))):a.error(D("error"));case 12:case"end":return t.stop()}}),t,null,[[0,8]])})))},addAdFreeVideo:function(){return S(this,void 0,void 0,x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l.data.exists||!l.data.hasAdFree){e.next=3;break}return o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,params:{alreadyAdded:!0}}),e.abrupt("return");case 3:return e.prev=3,t={id:s.data.id,userId:n.data.id,customerId:n.data.customerId},e.next=7,r(g.i.addAdFreeVideo(t,s.data.id));case 7:a.success({heading:k.R.Success,message:D("addAdFreeSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AddAdFreeVideo,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),a.error(D("error"));case 15:case"end":return e.stop()}}),e,null,[[3,12]])})))},addFullVideo:function(){return S(this,void 0,void 0,x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l.data.exists){e.next=3;break}return o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,params:{alreadyAdded:!0}}),e.abrupt("return");case 3:return e.prev=3,t={userId:n.data.id,customerId:n.data.customerId,globalId:s.data.globalId,libraryId:c.data.id},e.next=7,r(g.i.addFullVideo(t,s.data.id));case 7:a.success({heading:k.R.Success,message:D("addFullSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AddFullVideo,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),a.error(D("error"));case 15:case"end":return e.stop()}}),e,null,[[3,12]])})))}}}(e.id,e.region),s=c.requestAdFreeVideo,y=c.addAdFreeVideo,O=c.addFullVideo;(0,m.h)(r.statusCode);var P,M,R=(P=a.useState(null),M=2,function(e){if(Array.isArray(e))return e}(P)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,c=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=o.call(r)).done)&&(c.push(a.value),c.length!==t);s=!0);}catch(e){u=!0,n=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw n}}return c}}(P,M)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N(e,t):void 0}}(P,M)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),V=R[0],q=R[1],B=!Number.isNaN(e.currentTime),U=n.data&&n.data.userRequests<n.data.maxAvailableCredit,Y=n.data&&n.data.maxAvailableCredit-n.data.userRequests;a.useEffect((function(){n.hasCompleted&&(U||q(j))}),[n,U]);var z=t.hasCompleted&&r.hasCompleted&&n.hasCompleted,G=(null==V?void 0:V.id)===_.id&&T.a.isHolidayPeriod();return a.createElement(l.G,{size:"lg",title:L("title"),showLoadingSpinner:!z,closePopup:e.closePopup},z&&a.createElement(a.Fragment,null,a.createElement("div",{className:"d-flex mb-3 mx-n2"},r.data.hasAdsFree&&a.createElement(u,{option:{id:C.id},onSelect:q,selected:(null==V?void 0:V.id)===C.id},a.createElement("img",{src:C.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:C.title})),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:C.description}))),!r.data.hasAdsFree&&a.createElement(u,{option:{id:_.id,disabled:!U},onSelect:q,selected:(null==V?void 0:V.id)===_.id},a.createElement("img",{src:_.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("div",{className:"d-flex justify-content-center align-items-center mb-1"},a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:_.title})),a.createElement("span",{className:"badge bg-dark rounded-circle ms-2 ".concat(I.circle)},Y)),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:U?"requestAdFreeDescription":"noRequestsDescription"}))),a.createElement(u,{option:{id:j.id},onSelect:q,selected:(null==V?void 0:V.id)===j.id},a.createElement("img",{src:j.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:j.title})),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:j.description})))),G&&a.createElement("div",{className:"alert alert-warning",role:"alert"},a.createElement("h3",{className:"h5"},a.createElement(f.x,{namespace:F,phrase:"adFreeAlertHeading"})),a.createElement("p",{className:"m-0"},a.createElement(f.x,{namespace:F,phrase:"adFreeAlertBody"})))),a.createElement(d.u,null,a.createElement(d.u.Cancel,{text:L(B?"back":"close"),onClick:function(){B?o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.PREVIEW,args:[e.region,r.data.id],params:{currentTime:e.currentTime}}):e.closePopup()},variant:"link"}),a.createElement(d.u.Submit,{text:L("continue"),onClick:function(){V&&(V.id===j.id&&O(),V.id===C.id&&y(),V.id===_.id&&s())},variant:"dark",disabled:!V})))}}}]);
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */