-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbundle.min.js
1 lines (1 loc) · 55.6 KB
/
bundle.min.js
1
"use strict";(()=>{var d=(e,i)=>()=>(i||e((i={exports:{}}).exports,i),i.exports);var oe=d(l=>{"use strict";var _e=l&&l.__extends||function(){var e=function(i,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])},e(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(i,n);function a(){this.constructor=i}i.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),ee=l&&l.__assign||function(){return ee=Object.assign||function(e){for(var i,n=1,a=arguments.length;n<a;n++){i=arguments[n];for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t])}return e},ee.apply(this,arguments)},ne=l&&l.__awaiter||function(e,i,n,a){function t(r){return r instanceof n?r:new n(function(u){u(r)})}return new(n||(n=Promise))(function(r,u){function c(s){try{o(a.next(s))}catch(h){u(h)}}function f(s){try{o(a.throw(s))}catch(h){u(h)}}function o(s){s.done?r(s.value):t(s.value).then(c,f)}o((a=a.apply(e,i||[])).next())})},re=l&&l.__generator||function(e,i){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,t,r,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(o){return function(s){return f([o,s])}}function f(o){if(a)throw new TypeError("Generator is already executing.");for(;u&&(u=0,o[0]&&(n=0)),n;)try{if(a=1,t&&(r=o[0]&2?t.return:o[0]?t.throw||((r=t.return)&&r.call(t),0):t.next)&&!(r=r.call(t,o[1])).done)return r;switch(t=0,r&&(o=[o[0]&2,r.value]),o[0]){case 0:case 1:r=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,t=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(r=n.trys,!(r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(o[0]===6&&n.label<r[1]){n.label=r[1],r=o;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(o);break}r[2]&&n.ops.pop(),n.trys.pop();continue}o=i.call(e,n)}catch(s){o=[6,s],t=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(l,"__esModule",{value:!0});l.TextApiResponse=l.BlobApiResponse=l.VoidApiResponse=l.JSONApiResponse=l.canConsumeForm=l.mapValues=l.querystring=l.COLLECTION_FORMATS=l.RequiredError=l.FetchError=l.ResponseError=l.BaseAPI=l.DefaultConfig=l.Configuration=l.BASE_PATH=void 0;l.BASE_PATH="https://streaming-availability.p.rapidapi.com".replace(/\/+$/,"");var Ye=function(){function e(i){i===void 0&&(i={}),this.configuration=i}return Object.defineProperty(e.prototype,"config",{set:function(i){this.configuration=i},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"basePath",{get:function(){return this.configuration.basePath!=null?this.configuration.basePath:l.BASE_PATH},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fetchApi",{get:function(){return this.configuration.fetchApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"middleware",{get:function(){return this.configuration.middleware||[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"queryParamsStringify",{get:function(){return this.configuration.queryParamsStringify||ve},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"username",{get:function(){return this.configuration.username},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"password",{get:function(){return this.configuration.password},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apiKey",{get:function(){var i=this.configuration.apiKey;if(i)return typeof i=="function"?i:function(){return i}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"accessToken",{get:function(){var i=this,n=this.configuration.accessToken;if(n)return typeof n=="function"?n:function(){return ne(i,void 0,void 0,function(){return re(this,function(a){return[2,n]})})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headers",{get:function(){return this.configuration.headers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"credentials",{get:function(){return this.configuration.credentials},enumerable:!1,configurable:!0}),e}();l.Configuration=Ye;l.DefaultConfig=new Ye;var Sr=function(){function e(i){i===void 0&&(i=l.DefaultConfig);var n=this;this.configuration=i,this.fetchApi=function(a,t){return ne(n,void 0,void 0,function(){var r,u,c,w,f,o,s,h,w,g,T,w;return re(this,function(O){switch(O.label){case 0:r={url:a,init:t},u=0,c=this.middleware,O.label=1;case 1:return u<c.length?(w=c[u],w.pre?[4,w.pre(ee({fetch:this.fetchApi},r))]:[3,3]):[3,4];case 2:r=O.sent()||r,O.label=3;case 3:return u++,[3,1];case 4:f=void 0,O.label=5;case 5:return O.trys.push([5,7,,12]),[4,(this.configuration.fetchApi||fetch)(r.url,r.init)];case 6:return f=O.sent(),[3,12];case 7:o=O.sent(),s=0,h=this.middleware,O.label=8;case 8:return s<h.length?(w=h[s],w.onError?[4,w.onError({fetch:this.fetchApi,url:r.url,init:r.init,error:o,response:f?f.clone():void 0})]:[3,10]):[3,11];case 9:f=O.sent()||f,O.label=10;case 10:return s++,[3,8];case 11:if(f===void 0)throw o instanceof Error?new Ve(o,"The request failed and the interceptors did not return an alternative response"):o;return[3,12];case 12:g=0,T=this.middleware,O.label=13;case 13:return g<T.length?(w=T[g],w.post?[4,w.post({fetch:this.fetchApi,url:r.url,init:r.init,response:f.clone()})]:[3,15]):[3,16];case 14:f=O.sent()||f,O.label=15;case 15:return g++,[3,13];case 16:return[2,f]}})})},this.middleware=i.middleware}return e.prototype.withMiddleware=function(){for(var i,n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];var t=this.clone();return t.middleware=(i=t.middleware).concat.apply(i,n),t},e.prototype.withPreMiddleware=function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var a=i.map(function(t){return{pre:t}});return this.withMiddleware.apply(this,a)},e.prototype.withPostMiddleware=function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var a=i.map(function(t){return{post:t}});return this.withMiddleware.apply(this,a)},e.prototype.isJsonMime=function(i){return i?e.jsonRegex.test(i):!1},e.prototype.request=function(i,n){return ne(this,void 0,void 0,function(){var a,t,r,u;return re(this,function(c){switch(c.label){case 0:return[4,this.createFetchParams(i,n)];case 1:return a=c.sent(),t=a.url,r=a.init,[4,this.fetchApi(t,r)];case 2:if(u=c.sent(),u&&u.status>=200&&u.status<300)return[2,u];throw new ze(u,"Response returned an error code")}})})},e.prototype.createFetchParams=function(i,n){return ne(this,void 0,void 0,function(){var a,t,r,u,c,f,o,s,h=this;return re(this,function(g){switch(g.label){case 0:return a=this.configuration.basePath+i.path,i.query!==void 0&&Object.keys(i.query).length!==0&&(a+="?"+this.configuration.queryParamsStringify(i.query)),t=Object.assign({},this.configuration.headers,i.headers),Object.keys(t).forEach(function(T){return t[T]===void 0?delete t[T]:{}}),r=typeof n=="function"?n:function(){return ne(h,void 0,void 0,function(){return re(this,function(T){return[2,n]})})},u={method:i.method,headers:t,body:i.body,credentials:this.configuration.credentials},f=[ee({},u)],[4,r({init:u,context:i})];case 1:return c=ee.apply(void 0,f.concat([g.sent()])),mr(c.body)||c.body instanceof URLSearchParams||gr(c.body)?o=c.body:this.isJsonMime(t["Content-Type"])?o=JSON.stringify(c.body):o=c.body,s=ee(ee({},c),{body:o}),[2,{url:a,init:s}]}})})},e.prototype.clone=function(){var i=this.constructor,n=new i(this.configuration);return n.middleware=this.middleware.slice(),n},e.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i"),e}();l.BaseAPI=Sr;function gr(e){return typeof Blob<"u"&&e instanceof Blob}function mr(e){return typeof FormData<"u"&&e instanceof FormData}var ze=function(e){_e(i,e);function i(n,a){var t=e.call(this,a)||this;return t.response=n,t.name="ResponseError",t}return i}(Error);l.ResponseError=ze;var Ve=function(e){_e(i,e);function i(n,a){var t=e.call(this,a)||this;return t.cause=n,t.name="FetchError",t}return i}(Error);l.FetchError=Ve;var Or=function(e){_e(i,e);function i(n,a){var t=e.call(this,a)||this;return t.field=n,t.name="RequiredError",t}return i}(Error);l.RequiredError=Or;l.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:" ",pipes:"|"};function ve(e,i){return i===void 0&&(i=""),Object.keys(e).map(function(n){return He(n,e[n],i)}).filter(function(n){return n.length>0}).join("&")}l.querystring=ve;function He(e,i,n){n===void 0&&(n="");var a=n+(n.length?"[".concat(e,"]"):e);if(i instanceof Array){var t=i.map(function(u){return encodeURIComponent(String(u))}).join("&".concat(encodeURIComponent(a),"="));return"".concat(encodeURIComponent(a),"=").concat(t)}if(i instanceof Set){var r=Array.from(i);return He(e,r,n)}return i instanceof Date?"".concat(encodeURIComponent(a),"=").concat(encodeURIComponent(i.toISOString())):i instanceof Object?ve(i,a):"".concat(encodeURIComponent(a),"=").concat(encodeURIComponent(String(i)))}function wr(e,i){return Object.keys(e).reduce(function(n,a){var t;return ee(ee({},n),(t={},t[a]=i(e[a]),t))},{})}l.mapValues=wr;function Tr(e){for(var i=0,n=e;i<n.length;i++){var a=n[i];if(a.contentType==="multipart/form-data")return!0}return!1}l.canConsumeForm=Tr;var Nr=function(){function e(i,n){n===void 0&&(n=function(a){return a}),this.raw=i,this.transformer=n}return e.prototype.value=function(){return ne(this,void 0,void 0,function(){var i;return re(this,function(n){switch(n.label){case 0:return i=this.transformer,[4,this.raw.json()];case 1:return[2,i.apply(this,[n.sent()])]}})})},e}();l.JSONApiResponse=Nr;var Jr=function(){function e(i){this.raw=i}return e.prototype.value=function(){return ne(this,void 0,void 0,function(){return re(this,function(i){return[2,void 0]})})},e}();l.VoidApiResponse=Jr;var br=function(){function e(i){this.raw=i}return e.prototype.value=function(){return ne(this,void 0,void 0,function(){return re(this,function(i){switch(i.label){case 0:return[4,this.raw.blob()];case 1:return[2,i.sent()]}})})},e}();l.BlobApiResponse=br;var _r=function(){function e(i){this.raw=i}return e.prototype.value=function(){return ne(this,void 0,void 0,function(){return re(this,function(i){switch(i.label){case 0:return[4,this.raw.text()];case 1:return[2,i.sent()]}})})},e}();l.TextApiResponse=_r});var fe=d(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.ServiceImageSetToJSON=R.ServiceImageSetFromJSONTyped=R.ServiceImageSetFromJSON=R.instanceOfServiceImageSet=void 0;function vr(e){return!(!("lightThemeImage"in e)||!("darkThemeImage"in e)||!("whiteImage"in e))}R.instanceOfServiceImageSet=vr;function Fr(e){return Xe(e,!1)}R.ServiceImageSetFromJSON=Fr;function Xe(e,i){return e==null?e:{lightThemeImage:e.lightThemeImage,darkThemeImage:e.darkThemeImage,whiteImage:e.whiteImage}}R.ServiceImageSetFromJSONTyped=Xe;function Cr(e){return e==null?e:{lightThemeImage:e.lightThemeImage,darkThemeImage:e.darkThemeImage,whiteImage:e.whiteImage}}R.ServiceImageSetToJSON=Cr});var le=d(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.AddonToJSON=M.AddonFromJSONTyped=M.AddonFromJSON=M.instanceOfAddon=void 0;var Ue=fe();function Ir(e){return!(!("id"in e)||!("name"in e)||!("homePage"in e)||!("themeColorCode"in e)||!("imageSet"in e))}M.instanceOfAddon=Ir;function Ar(e){return Qe(e,!1)}M.AddonFromJSON=Ar;function Qe(e,i){return e==null?e:{id:e.id,name:e.name,homePage:e.homePage,themeColorCode:e.themeColorCode,imageSet:(0,Ue.ServiceImageSetFromJSON)(e.imageSet)}}M.AddonFromJSONTyped=Qe;function Er(e){return e==null?e:{id:e.id,name:e.name,homePage:e.homePage,themeColorCode:e.themeColorCode,imageSet:(0,Ue.ServiceImageSetToJSON)(e.imageSet)}}M.AddonToJSON=Er});var Fe=d(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.ChangeTypeToJSON=J.ChangeTypeFromJSONTyped=J.ChangeTypeFromJSON=J.instanceOfChangeType=J.ChangeType=void 0;J.ChangeType={New:"new",Removed:"removed",Updated:"updated",Expiring:"expiring",Upcoming:"upcoming"};function Rr(e){return Object.values(J.ChangeType).includes(e)}J.instanceOfChangeType=Rr;function Mr(e){return We(e,!1)}J.ChangeTypeFromJSON=Mr;function We(e,i){return e}J.ChangeTypeFromJSONTyped=We;function Pr(e){return e}J.ChangeTypeToJSON=Pr});var Ce=d(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.ItemTypeToJSON=b.ItemTypeFromJSONTyped=b.ItemTypeFromJSON=b.instanceOfItemType=b.ItemType=void 0;b.ItemType={Show:"show",Season:"season",Episode:"episode"};function Gr(e){return Object.values(b.ItemType).includes(e)}b.instanceOfItemType=Gr;function Lr(e){return $e(e,!1)}b.ItemTypeFromJSON=Lr;function $e(e,i){return e}b.ItemTypeFromJSONTyped=$e;function Br(e){return e}b.ItemTypeToJSON=Br});var he=d(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.ServiceInfoToJSON=P.ServiceInfoFromJSONTyped=P.ServiceInfoFromJSON=P.instanceOfServiceInfo=void 0;var Ze=fe();function Dr(e){return!(!("id"in e)||!("name"in e)||!("homePage"in e)||!("themeColorCode"in e)||!("imageSet"in e))}P.instanceOfServiceInfo=Dr;function qr(e){return je(e,!1)}P.ServiceInfoFromJSON=qr;function je(e,i){return e==null?e:{id:e.id,name:e.name,homePage:e.homePage,themeColorCode:e.themeColorCode,imageSet:(0,Ze.ServiceImageSetFromJSON)(e.imageSet)}}P.ServiceInfoFromJSONTyped=je;function xr(e){return e==null?e:{id:e.id,name:e.name,homePage:e.homePage,themeColorCode:e.themeColorCode,imageSet:(0,Ze.ServiceImageSetToJSON)(e.imageSet)}}P.ServiceInfoToJSON=xr});var pe=d(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});_.ShowTypeToJSON=_.ShowTypeFromJSONTyped=_.ShowTypeFromJSON=_.instanceOfShowType=_.ShowType=void 0;_.ShowType={Movie:"movie",Series:"series"};function kr(e){return Object.values(_.ShowType).includes(e)}_.instanceOfShowType=kr;function Kr(e){return en(e,!1)}_.ShowTypeFromJSON=Kr;function en(e,i){return e}_.ShowTypeFromJSONTyped=en;function Yr(e){return e}_.ShowTypeToJSON=Yr});var ye=d(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.StreamingOptionTypeToJSON=v.StreamingOptionTypeFromJSONTyped=v.StreamingOptionTypeFromJSON=v.instanceOfStreamingOptionType=v.StreamingOptionType=void 0;v.StreamingOptionType={Free:"free",Subscription:"subscription",Buy:"buy",Rent:"rent",Addon:"addon"};function zr(e){return Object.values(v.StreamingOptionType).includes(e)}v.instanceOfStreamingOptionType=zr;function Vr(e){return nn(e,!1)}v.StreamingOptionTypeFromJSON=Vr;function nn(e,i){return e}v.StreamingOptionTypeFromJSONTyped=nn;function Hr(e){return e}v.StreamingOptionTypeToJSON=Hr});var Ie=d(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.ChangeToJSON=G.ChangeFromJSONTyped=G.ChangeFromJSON=G.instanceOfChange=void 0;var rn=le(),tn=Fe(),on=Ce(),an=he(),un=pe(),sn=ye();function Xr(e){return!(!("changeType"in e)||!("itemType"in e)||!("showId"in e)||!("showType"in e)||!("service"in e)||!("streamingOptionType"in e))}G.instanceOfChange=Xr;function Ur(e){return cn(e,!1)}G.ChangeFromJSON=Ur;function cn(e,i){return e==null?e:{changeType:(0,tn.ChangeTypeFromJSON)(e.changeType),itemType:(0,on.ItemTypeFromJSON)(e.itemType),showId:e.showId,showType:(0,un.ShowTypeFromJSON)(e.showType),season:e.season==null?void 0:e.season,episode:e.episode==null?void 0:e.episode,service:(0,an.ServiceInfoFromJSON)(e.service),streamingOptionType:(0,sn.StreamingOptionTypeFromJSON)(e.streamingOptionType),addon:e.addon==null?void 0:(0,rn.AddonFromJSON)(e.addon),timestamp:e.timestamp==null?void 0:e.timestamp,link:e.link==null?void 0:e.link}}G.ChangeFromJSONTyped=cn;function Qr(e){return e==null?e:{changeType:(0,tn.ChangeTypeToJSON)(e.changeType),itemType:(0,on.ItemTypeToJSON)(e.itemType),showId:e.showId,showType:(0,un.ShowTypeToJSON)(e.showType),season:e.season,episode:e.episode,service:(0,an.ServiceInfoToJSON)(e.service),streamingOptionType:(0,sn.StreamingOptionTypeToJSON)(e.streamingOptionType),addon:(0,rn.AddonToJSON)(e.addon),timestamp:e.timestamp,link:e.link}}G.ChangeToJSON=Qr});var dn=d(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.ChangesResultToJSON=L.ChangesResultFromJSONTyped=L.ChangesResultFromJSON=L.instanceOfChangesResult=void 0;var fn=Ie();function Wr(e){return!(!("changes"in e)||!("shows"in e)||!("hasMore"in e))}L.instanceOfChangesResult=Wr;function $r(e){return ln(e,!1)}L.ChangesResultFromJSON=$r;function ln(e,i){return e==null?e:{changes:e.changes.map(fn.ChangeFromJSON),shows:e.shows,hasMore:e.hasMore,nextCursor:e.nextCursor==null?void 0:e.nextCursor}}L.ChangesResultFromJSONTyped=ln;function Zr(e){return e==null?e:{changes:e.changes.map(fn.ChangeToJSON),shows:e.shows,hasMore:e.hasMore,nextCursor:e.nextCursor}}L.ChangesResultToJSON=Zr});var Ae=d(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.StreamingOptionTypesToJSON=B.StreamingOptionTypesFromJSONTyped=B.StreamingOptionTypesFromJSON=B.instanceOfStreamingOptionTypes=void 0;function jr(e){return!(!("addon"in e)||!("buy"in e)||!("rent"in e)||!("free"in e)||!("subscription"in e))}B.instanceOfStreamingOptionTypes=jr;function et(e){return hn(e,!1)}B.StreamingOptionTypesFromJSON=et;function hn(e,i){return e==null?e:{addon:e.addon,buy:e.buy,rent:e.rent,free:e.free,subscription:e.subscription}}B.StreamingOptionTypesFromJSONTyped=hn;function nt(e){return e==null?e:{addon:e.addon,buy:e.buy,rent:e.rent,free:e.free,subscription:e.subscription}}B.StreamingOptionTypesToJSON=nt});var Ee=d(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.ServiceToJSON=D.ServiceFromJSONTyped=D.ServiceFromJSON=D.instanceOfService=void 0;var pn=le(),yn=fe(),Sn=Ae();function rt(e){return!(!("id"in e)||!("name"in e)||!("homePage"in e)||!("themeColorCode"in e)||!("imageSet"in e)||!("streamingOptionTypes"in e)||!("addons"in e))}D.instanceOfService=rt;function tt(e){return gn(e,!1)}D.ServiceFromJSON=tt;function gn(e,i){return e==null?e:{id:e.id,name:e.name,homePage:e.homePage,themeColorCode:e.themeColorCode,imageSet:(0,yn.ServiceImageSetFromJSON)(e.imageSet),streamingOptionTypes:(0,Sn.StreamingOptionTypesFromJSON)(e.streamingOptionTypes),addons:e.addons.map(pn.AddonFromJSON)}}D.ServiceFromJSONTyped=gn;function it(e){return e==null?e:{id:e.id,name:e.name,homePage:e.homePage,themeColorCode:e.themeColorCode,imageSet:(0,yn.ServiceImageSetToJSON)(e.imageSet),streamingOptionTypes:(0,Sn.StreamingOptionTypesToJSON)(e.streamingOptionTypes),addons:e.addons.map(pn.AddonToJSON)}}D.ServiceToJSON=it});var wn=d(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.CountryToJSON=q.CountryFromJSONTyped=q.CountryFromJSON=q.instanceOfCountry=void 0;var mn=Ee();function ot(e){return!(!("countryCode"in e)||!("name"in e)||!("services"in e))}q.instanceOfCountry=ot;function at(e){return On(e,!1)}q.CountryFromJSON=at;function On(e,i){return e==null?e:{countryCode:e.countryCode,name:e.name,services:e.services.map(mn.ServiceFromJSON)}}q.CountryFromJSONTyped=On;function ut(e){return e==null?e:{countryCode:e.countryCode,name:e.name,services:e.services.map(mn.ServiceToJSON)}}q.CountryToJSON=ut});var Re=d(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.EpisodeToJSON=x.EpisodeFromJSONTyped=x.EpisodeFromJSON=x.instanceOfEpisode=void 0;function st(e){return!(!("itemType"in e)||!("title"in e)||!("airYear"in e)||!("streamingOptions"in e))}x.instanceOfEpisode=st;function ct(e){return Tn(e,!1)}x.EpisodeFromJSON=ct;function Tn(e,i){return e==null?e:{itemType:e.itemType,title:e.title,overview:e.overview==null?void 0:e.overview,airYear:e.airYear,streamingOptions:e.streamingOptions}}x.EpisodeFromJSONTyped=Tn;function ft(e){return e==null?e:{itemType:e.itemType,title:e.title,overview:e.overview,airYear:e.airYear,streamingOptions:e.streamingOptions}}x.EpisodeToJSON=ft});var Me=d(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.GenreToJSON=k.GenreFromJSONTyped=k.GenreFromJSON=k.instanceOfGenre=void 0;function lt(e){return!(!("id"in e)||!("name"in e))}k.instanceOfGenre=lt;function dt(e){return Nn(e,!1)}k.GenreFromJSON=dt;function Nn(e,i){return e==null?e:{id:e.id,name:e.name}}k.GenreFromJSONTyped=Nn;function ht(e){return e==null?e:{id:e.id,name:e.name}}k.GenreToJSON=ht});var Pe=d(K=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.HorizontalImageToJSON=K.HorizontalImageFromJSONTyped=K.HorizontalImageFromJSON=K.instanceOfHorizontalImage=void 0;function pt(e){return!(!("w360"in e)||!("w480"in e)||!("w720"in e)||!("w1080"in e)||!("w1440"in e))}K.instanceOfHorizontalImage=pt;function yt(e){return Jn(e,!1)}K.HorizontalImageFromJSON=yt;function Jn(e,i){return e==null?e:{w360:e.w360,w480:e.w480,w720:e.w720,w1080:e.w1080,w1440:e.w1440}}K.HorizontalImageFromJSONTyped=Jn;function St(e){return e==null?e:{w360:e.w360,w480:e.w480,w720:e.w720,w1080:e.w1080,w1440:e.w1440}}K.HorizontalImageToJSON=St});var Se=d(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.LocaleToJSON=Y.LocaleFromJSONTyped=Y.LocaleFromJSON=Y.instanceOfLocale=void 0;function gt(e){return"language"in e}Y.instanceOfLocale=gt;function mt(e){return bn(e,!1)}Y.LocaleFromJSON=mt;function bn(e,i){return e==null?e:{language:e.language,region:e.region==null?void 0:e.region}}Y.LocaleFromJSONTyped=bn;function Ot(e){return e==null?e:{language:e.language,region:e.region}}Y.LocaleToJSON=Ot});var vn=d(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.ModelErrorToJSON=z.ModelErrorFromJSONTyped=z.ModelErrorFromJSON=z.instanceOfModelError=void 0;function wt(e){return"message"in e}z.instanceOfModelError=wt;function Tt(e){return _n(e,!1)}z.ModelErrorFromJSON=Tt;function _n(e,i){return e==null?e:{message:e.message}}z.ModelErrorFromJSONTyped=_n;function Nt(e){return e==null?e:{message:e.message}}z.ModelErrorToJSON=Nt});var Cn=d(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.OrderDirectionToJSON=F.OrderDirectionFromJSONTyped=F.OrderDirectionFromJSON=F.instanceOfOrderDirection=F.OrderDirection=void 0;F.OrderDirection={Asc:"asc",Desc:"desc"};function Jt(e){return Object.values(F.OrderDirection).includes(e)}F.instanceOfOrderDirection=Jt;function bt(e){return Fn(e,!1)}F.OrderDirectionFromJSON=bt;function Fn(e,i){return e}F.OrderDirectionFromJSONTyped=Fn;function _t(e){return e}F.OrderDirectionToJSON=_t});var Ge=d(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.PriceToJSON=V.PriceFromJSONTyped=V.PriceFromJSON=V.instanceOfPrice=void 0;function vt(e){return!(!("amount"in e)||!("currency"in e)||!("formatted"in e))}V.instanceOfPrice=vt;function Ft(e){return In(e,!1)}V.PriceFromJSON=Ft;function In(e,i){return e==null?e:{amount:e.amount,currency:e.currency,formatted:e.formatted}}V.PriceFromJSONTyped=In;function Ct(e){return e==null?e:{amount:e.amount,currency:e.currency,formatted:e.formatted}}V.PriceToJSON=Ct});var Le=d(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.SeasonToJSON=H.SeasonFromJSONTyped=H.SeasonFromJSON=H.instanceOfSeason=void 0;var An=Re();function It(e){return!(!("itemType"in e)||!("title"in e)||!("firstAirYear"in e)||!("lastAirYear"in e)||!("streamingOptions"in e))}H.instanceOfSeason=It;function At(e){return En(e,!1)}H.SeasonFromJSON=At;function En(e,i){return e==null?e:{itemType:e.itemType,title:e.title,firstAirYear:e.firstAirYear,lastAirYear:e.lastAirYear,streamingOptions:e.streamingOptions,episodes:e.episodes==null?void 0:e.episodes.map(An.EpisodeFromJSON)}}H.SeasonFromJSONTyped=En;function Et(e){return e==null?e:{itemType:e.itemType,title:e.title,firstAirYear:e.firstAirYear,lastAirYear:e.lastAirYear,streamingOptions:e.streamingOptions,episodes:e.episodes==null?void 0:e.episodes.map(An.EpisodeToJSON)}}H.SeasonToJSON=Et});var Be=d(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.VerticalImageToJSON=X.VerticalImageFromJSONTyped=X.VerticalImageFromJSON=X.instanceOfVerticalImage=void 0;function Rt(e){return!(!("w240"in e)||!("w360"in e)||!("w480"in e)||!("w600"in e)||!("w720"in e))}X.instanceOfVerticalImage=Rt;function Mt(e){return Rn(e,!1)}X.VerticalImageFromJSON=Mt;function Rn(e,i){return e==null?e:{w240:e.w240,w360:e.w360,w480:e.w480,w600:e.w600,w720:e.w720}}X.VerticalImageFromJSONTyped=Rn;function Pt(e){return e==null?e:{w240:e.w240,w360:e.w360,w480:e.w480,w600:e.w600,w720:e.w720}}X.VerticalImageToJSON=Pt});var De=d(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.ShowImageSetToJSON=U.ShowImageSetFromJSONTyped=U.ShowImageSetFromJSON=U.instanceOfShowImageSet=void 0;var ge=Pe(),me=Be();function Gt(e){return!(!("verticalPoster"in e)||!("horizontalPoster"in e))}U.instanceOfShowImageSet=Gt;function Lt(e){return Mn(e,!1)}U.ShowImageSetFromJSON=Lt;function Mn(e,i){return e==null?e:{verticalPoster:(0,me.VerticalImageFromJSON)(e.verticalPoster),horizontalPoster:(0,ge.HorizontalImageFromJSON)(e.horizontalPoster),verticalBackdrop:e.verticalBackdrop==null?void 0:(0,me.VerticalImageFromJSON)(e.verticalBackdrop),horizontalBackdrop:e.horizontalBackdrop==null?void 0:(0,ge.HorizontalImageFromJSON)(e.horizontalBackdrop)}}U.ShowImageSetFromJSONTyped=Mn;function Bt(e){return e==null?e:{verticalPoster:(0,me.VerticalImageToJSON)(e.verticalPoster),horizontalPoster:(0,ge.HorizontalImageToJSON)(e.horizontalPoster),verticalBackdrop:(0,me.VerticalImageToJSON)(e.verticalBackdrop),horizontalBackdrop:(0,ge.HorizontalImageToJSON)(e.horizontalBackdrop)}}U.ShowImageSetToJSON=Bt});var qe=d(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.ShowToJSON=Q.ShowFromJSONTyped=Q.ShowFromJSON=Q.instanceOfShow=void 0;var Pn=Me(),Gn=Le(),Ln=De(),Bn=pe();function Dt(e){return!(!("itemType"in e)||!("showType"in e)||!("id"in e)||!("imdbId"in e)||!("tmdbId"in e)||!("title"in e)||!("overview"in e)||!("originalTitle"in e)||!("genres"in e)||!("cast"in e)||!("rating"in e)||!("imageSet"in e)||!("streamingOptions"in e))}Q.instanceOfShow=Dt;function qt(e){return Dn(e,!1)}Q.ShowFromJSON=qt;function Dn(e,i){return e==null?e:{itemType:e.itemType,showType:(0,Bn.ShowTypeFromJSON)(e.showType),id:e.id,imdbId:e.imdbId,tmdbId:e.tmdbId,title:e.title,overview:e.overview,releaseYear:e.releaseYear==null?void 0:e.releaseYear,firstAirYear:e.firstAirYear==null?void 0:e.firstAirYear,lastAirYear:e.lastAirYear==null?void 0:e.lastAirYear,originalTitle:e.originalTitle,genres:e.genres.map(Pn.GenreFromJSON),directors:e.directors==null?void 0:e.directors,creators:e.creators==null?void 0:e.creators,cast:e.cast,rating:e.rating,seasonCount:e.seasonCount==null?void 0:e.seasonCount,episodeCount:e.episodeCount==null?void 0:e.episodeCount,runtime:e.runtime==null?void 0:e.runtime,imageSet:(0,Ln.ShowImageSetFromJSON)(e.imageSet),streamingOptions:e.streamingOptions,seasons:e.seasons==null?void 0:e.seasons.map(Gn.SeasonFromJSON)}}Q.ShowFromJSONTyped=Dn;function xt(e){return e==null?e:{itemType:e.itemType,showType:(0,Bn.ShowTypeToJSON)(e.showType),id:e.id,imdbId:e.imdbId,tmdbId:e.tmdbId,title:e.title,overview:e.overview,releaseYear:e.releaseYear,firstAirYear:e.firstAirYear,lastAirYear:e.lastAirYear,originalTitle:e.originalTitle,genres:e.genres.map(Pn.GenreToJSON),directors:e.directors,creators:e.creators,cast:e.cast,rating:e.rating,seasonCount:e.seasonCount,episodeCount:e.episodeCount,runtime:e.runtime,imageSet:(0,Ln.ShowImageSetToJSON)(e.imageSet),streamingOptions:e.streamingOptions,seasons:e.seasons==null?void 0:e.seasons.map(Gn.SeasonToJSON)}}Q.ShowToJSON=xt});var kn=d(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.SearchResultToJSON=W.SearchResultFromJSONTyped=W.SearchResultFromJSON=W.instanceOfSearchResult=void 0;var qn=qe();function kt(e){return!(!("shows"in e)||!("hasMore"in e))}W.instanceOfSearchResult=kt;function Kt(e){return xn(e,!1)}W.SearchResultFromJSON=Kt;function xn(e,i){return e==null?e:{shows:e.shows.map(qn.ShowFromJSON),hasMore:e.hasMore,nextCursor:e.nextCursor==null?void 0:e.nextCursor}}W.SearchResultFromJSONTyped=xn;function Yt(e){return e==null?e:{shows:e.shows.map(qn.ShowToJSON),hasMore:e.hasMore,nextCursor:e.nextCursor}}W.SearchResultToJSON=Yt});var xe=d($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.SubtitleToJSON=$.SubtitleFromJSONTyped=$.SubtitleFromJSON=$.instanceOfSubtitle=void 0;var Kn=Se();function zt(e){return!(!("closedCaptions"in e)||!("locale"in e))}$.instanceOfSubtitle=zt;function Vt(e){return Yn(e,!1)}$.SubtitleFromJSON=Vt;function Yn(e,i){return e==null?e:{closedCaptions:e.closedCaptions,locale:(0,Kn.LocaleFromJSON)(e.locale)}}$.SubtitleFromJSONTyped=Yn;function Ht(e){return e==null?e:{closedCaptions:e.closedCaptions,locale:(0,Kn.LocaleToJSON)(e.locale)}}$.SubtitleToJSON=Ht});var $n=d(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.StreamingOptionToJSON=I.StreamingOptionFromJSONTyped=I.StreamingOptionFromJSON=I.instanceOfStreamingOption=I.StreamingOptionQualityEnum=void 0;var zn=le(),Vn=Se(),Hn=Ge(),Xn=he(),Un=ye(),Qn=xe();I.StreamingOptionQualityEnum={Sd:"sd",Hd:"hd",Qhd:"qhd",Uhd:"uhd"};function Xt(e){return!(!("service"in e)||!("type"in e)||!("link"in e)||!("audios"in e)||!("subtitles"in e)||!("expiresSoon"in e)||!("availableSince"in e))}I.instanceOfStreamingOption=Xt;function Ut(e){return Wn(e,!1)}I.StreamingOptionFromJSON=Ut;function Wn(e,i){return e==null?e:{service:(0,Xn.ServiceInfoFromJSON)(e.service),type:(0,Un.StreamingOptionTypeFromJSON)(e.type),addon:e.addon==null?void 0:(0,zn.AddonFromJSON)(e.addon),link:e.link,videoLink:e.videoLink==null?void 0:e.videoLink,quality:e.quality==null?void 0:e.quality,audios:e.audios.map(Vn.LocaleFromJSON),subtitles:e.subtitles.map(Qn.SubtitleFromJSON),price:e.price==null?void 0:(0,Hn.PriceFromJSON)(e.price),expiresSoon:e.expiresSoon,expiresOn:e.expiresOn==null?void 0:e.expiresOn,availableSince:e.availableSince}}I.StreamingOptionFromJSONTyped=Wn;function Qt(e){return e==null?e:{service:(0,Xn.ServiceInfoToJSON)(e.service),type:(0,Un.StreamingOptionTypeToJSON)(e.type),addon:(0,zn.AddonToJSON)(e.addon),link:e.link,videoLink:e.videoLink,quality:e.quality,audios:e.audios.map(Vn.LocaleToJSON),subtitles:e.subtitles.map(Qn.SubtitleToJSON),price:(0,Hn.PriceToJSON)(e.price),expiresSoon:e.expiresSoon,expiresOn:e.expiresOn,availableSince:e.availableSince}}I.StreamingOptionToJSON=Qt});var ae=d(p=>{"use strict";var Wt=p&&p.__createBinding||(Object.create?function(e,i,n,a){a===void 0&&(a=n);var t=Object.getOwnPropertyDescriptor(i,n);(!t||("get"in t?!i.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(e,a,t)}:function(e,i,n,a){a===void 0&&(a=n),e[a]=i[n]}),S=p&&p.__exportStar||function(e,i){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(i,n)&&Wt(i,e,n)};Object.defineProperty(p,"__esModule",{value:!0});S(le(),p);S(Ie(),p);S(Fe(),p);S(dn(),p);S(wn(),p);S(Re(),p);S(Me(),p);S(Pe(),p);S(Ce(),p);S(Se(),p);S(vn(),p);S(Cn(),p);S(Ge(),p);S(kn(),p);S(Le(),p);S(Ee(),p);S(fe(),p);S(he(),p);S(qe(),p);S(De(),p);S(pe(),p);S($n(),p);S(ye(),p);S(Ae(),p);S(xe(),p);S(Be(),p)});var er=d(A=>{"use strict";var $t=A&&A.__extends||function(){var e=function(i,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])},e(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(i,n);function a(){this.constructor=i}i.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),Zn=A&&A.__awaiter||function(e,i,n,a){function t(r){return r instanceof n?r:new n(function(u){u(r)})}return new(n||(n=Promise))(function(r,u){function c(s){try{o(a.next(s))}catch(h){u(h)}}function f(s){try{o(a.throw(s))}catch(h){u(h)}}function o(s){s.done?r(s.value):t(s.value).then(c,f)}o((a=a.apply(e,i||[])).next())})},jn=A&&A.__generator||function(e,i){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,t,r,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(o){return function(s){return f([o,s])}}function f(o){if(a)throw new TypeError("Generator is already executing.");for(;u&&(u=0,o[0]&&(n=0)),n;)try{if(a=1,t&&(r=o[0]&2?t.return:o[0]?t.throw||((r=t.return)&&r.call(t),0):t.next)&&!(r=r.call(t,o[1])).done)return r;switch(t=0,r&&(o=[o[0]&2,r.value]),o[0]){case 0:case 1:r=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,t=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(r=n.trys,!(r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(o[0]===6&&n.label<r[1]){n.label=r[1],r=o;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(o);break}r[2]&&n.ops.pop(),n.trys.pop();continue}o=i.call(e,n)}catch(s){o=[6,s],t=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(A,"__esModule",{value:!0});A.GetChangesOutputLanguageEnum=A.ChangesApi=void 0;var ue=oe(),Zt=ae(),jt=function(e){$t(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}return i.prototype.getChangesRaw=function(n,a){return Zn(this,void 0,void 0,function(){var t,r,u,c,f;return jn(this,function(o){switch(o.label){case 0:if(n.country==null)throw new ue.RequiredError("country",'Required parameter "country" was null or undefined when calling getChanges().');if(n.changeType==null)throw new ue.RequiredError("changeType",'Required parameter "changeType" was null or undefined when calling getChanges().');if(n.itemType==null)throw new ue.RequiredError("itemType",'Required parameter "itemType" was null or undefined when calling getChanges().');return t={},n.country!=null&&(t.country=n.country),n.catalogs!=null&&(t.catalogs=n.catalogs.join(ue.COLLECTION_FORMATS.csv)),n.changeType!=null&&(t.change_type=n.changeType),n.itemType!=null&&(t.item_type=n.itemType),n.showType!=null&&(t.show_type=n.showType),n.from!=null&&(t.from=n.from),n.to!=null&&(t.to=n.to),n.includeUnknownDates!=null&&(t.include_unknown_dates=n.includeUnknownDates),n.cursor!=null&&(t.cursor=n.cursor),n.orderDirection!=null&&(t.order_direction=n.orderDirection),n.outputLanguage!=null&&(t.output_language=n.outputLanguage),r={},this.configuration&&this.configuration.apiKey?(u=r,c="X-RapidAPI-Key",[4,this.configuration.apiKey("X-RapidAPI-Key")]):[3,2];case 1:u[c]=o.sent(),o.label=2;case 2:return[4,this.request({path:"/changes",method:"GET",headers:r,query:t},a)];case 3:return f=o.sent(),[2,new ue.JSONApiResponse(f,function(s){return(0,Zt.ChangesResultFromJSON)(s)})]}})})},i.prototype.getChanges=function(n,a){return Zn(this,void 0,void 0,function(){var t;return jn(this,function(r){switch(r.label){case 0:return[4,this.getChangesRaw(n,a)];case 1:return t=r.sent(),[4,t.value()];case 2:return[2,r.sent()]}})})},i}(ue.BaseAPI);A.ChangesApi=jt;A.GetChangesOutputLanguageEnum={En:"en",Es:"es",Tr:"tr",Fr:"fr"}});var rr=d(N=>{"use strict";var ei=N&&N.__extends||function(){var e=function(i,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])},e(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(i,n);function a(){this.constructor=i}i.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),Oe=N&&N.__awaiter||function(e,i,n,a){function t(r){return r instanceof n?r:new n(function(u){u(r)})}return new(n||(n=Promise))(function(r,u){function c(s){try{o(a.next(s))}catch(h){u(h)}}function f(s){try{o(a.throw(s))}catch(h){u(h)}}function o(s){s.done?r(s.value):t(s.value).then(c,f)}o((a=a.apply(e,i||[])).next())})},we=N&&N.__generator||function(e,i){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,t,r,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(o){return function(s){return f([o,s])}}function f(o){if(a)throw new TypeError("Generator is already executing.");for(;u&&(u=0,o[0]&&(n=0)),n;)try{if(a=1,t&&(r=o[0]&2?t.return:o[0]?t.throw||((r=t.return)&&r.call(t),0):t.next)&&!(r=r.call(t,o[1])).done)return r;switch(t=0,r&&(o=[o[0]&2,r.value]),o[0]){case 0:case 1:r=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,t=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(r=n.trys,!(r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(o[0]===6&&n.label<r[1]){n.label=r[1],r=o;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(o);break}r[2]&&n.ops.pop(),n.trys.pop();continue}o=i.call(e,n)}catch(s){o=[6,s],t=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(N,"__esModule",{value:!0});N.GetCountryOutputLanguageEnum=N.GetCountriesOutputLanguageEnum=N.CountriesApi=void 0;var de=oe(),nr=ae(),ni=function(e){ei(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}return i.prototype.getCountriesRaw=function(n,a){return Oe(this,void 0,void 0,function(){var t,r,u,c,f;return we(this,function(o){switch(o.label){case 0:return t={},n.outputLanguage!=null&&(t.output_language=n.outputLanguage),r={},this.configuration&&this.configuration.apiKey?(u=r,c="X-RapidAPI-Key",[4,this.configuration.apiKey("X-RapidAPI-Key")]):[3,2];case 1:u[c]=o.sent(),o.label=2;case 2:return[4,this.request({path:"/countries",method:"GET",headers:r,query:t},a)];case 3:return f=o.sent(),[2,new de.JSONApiResponse(f,function(s){return de.mapValues(s,nr.CountryFromJSON)})]}})})},i.prototype.getCountries=function(n,a){return n===void 0&&(n={}),Oe(this,void 0,void 0,function(){var t;return we(this,function(r){switch(r.label){case 0:return[4,this.getCountriesRaw(n,a)];case 1:return t=r.sent(),[4,t.value()];case 2:return[2,r.sent()]}})})},i.prototype.getCountryRaw=function(n,a){return Oe(this,void 0,void 0,function(){var t,r,u,c,f;return we(this,function(o){switch(o.label){case 0:if(n.countryCode==null)throw new de.RequiredError("countryCode",'Required parameter "countryCode" was null or undefined when calling getCountry().');return t={},n.outputLanguage!=null&&(t.output_language=n.outputLanguage),r={},this.configuration&&this.configuration.apiKey?(u=r,c="X-RapidAPI-Key",[4,this.configuration.apiKey("X-RapidAPI-Key")]):[3,2];case 1:u[c]=o.sent(),o.label=2;case 2:return[4,this.request({path:"/countries/{country-code}".replace("{".concat("country-code","}"),encodeURIComponent(String(n.countryCode))),method:"GET",headers:r,query:t},a)];case 3:return f=o.sent(),[2,new de.JSONApiResponse(f,function(s){return(0,nr.CountryFromJSON)(s)})]}})})},i.prototype.getCountry=function(n,a){return Oe(this,void 0,void 0,function(){var t;return we(this,function(r){switch(r.label){case 0:return[4,this.getCountryRaw(n,a)];case 1:return t=r.sent(),[4,t.value()];case 2:return[2,r.sent()]}})})},i}(de.BaseAPI);N.CountriesApi=ni;N.GetCountriesOutputLanguageEnum={En:"en",Es:"es",Tr:"tr",Fr:"fr"};N.GetCountryOutputLanguageEnum={En:"en",Es:"es",Tr:"tr",Fr:"fr"}});var ar=d(E=>{"use strict";var ri=E&&E.__extends||function(){var e=function(i,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])},e(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(i,n);function a(){this.constructor=i}i.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),tr=E&&E.__awaiter||function(e,i,n,a){function t(r){return r instanceof n?r:new n(function(u){u(r)})}return new(n||(n=Promise))(function(r,u){function c(s){try{o(a.next(s))}catch(h){u(h)}}function f(s){try{o(a.throw(s))}catch(h){u(h)}}function o(s){s.done?r(s.value):t(s.value).then(c,f)}o((a=a.apply(e,i||[])).next())})},ir=E&&E.__generator||function(e,i){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,t,r,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(o){return function(s){return f([o,s])}}function f(o){if(a)throw new TypeError("Generator is already executing.");for(;u&&(u=0,o[0]&&(n=0)),n;)try{if(a=1,t&&(r=o[0]&2?t.return:o[0]?t.throw||((r=t.return)&&r.call(t),0):t.next)&&!(r=r.call(t,o[1])).done)return r;switch(t=0,r&&(o=[o[0]&2,r.value]),o[0]){case 0:case 1:r=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,t=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(r=n.trys,!(r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(o[0]===6&&n.label<r[1]){n.label=r[1],r=o;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(o);break}r[2]&&n.ops.pop(),n.trys.pop();continue}o=i.call(e,n)}catch(s){o=[6,s],t=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(E,"__esModule",{value:!0});E.GetGenresOutputLanguageEnum=E.GenresApi=void 0;var or=oe(),ti=ae(),ii=function(e){ri(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}return i.prototype.getGenresRaw=function(n,a){return tr(this,void 0,void 0,function(){var t,r,u,c,f;return ir(this,function(o){switch(o.label){case 0:return t={},n.outputLanguage!=null&&(t.output_language=n.outputLanguage),r={},this.configuration&&this.configuration.apiKey?(u=r,c="X-RapidAPI-Key",[4,this.configuration.apiKey("X-RapidAPI-Key")]):[3,2];case 1:u[c]=o.sent(),o.label=2;case 2:return[4,this.request({path:"/genres",method:"GET",headers:r,query:t},a)];case 3:return f=o.sent(),[2,new or.JSONApiResponse(f,function(s){return s.map(ti.GenreFromJSON)})]}})})},i.prototype.getGenres=function(n,a){return n===void 0&&(n={}),tr(this,void 0,void 0,function(){var t;return ir(this,function(r){switch(r.label){case 0:return[4,this.getGenresRaw(n,a)];case 1:return t=r.sent(),[4,t.value()];case 2:return[2,r.sent()]}})})},i}(or.BaseAPI);E.GenresApi=ii;E.GetGenresOutputLanguageEnum={En:"en",Es:"es",Tr:"tr",Fr:"fr"}});var ur=d(y=>{"use strict";var oi=y&&y.__extends||function(){var e=function(i,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])},e(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(i,n);function a(){this.constructor=i}i.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),te=y&&y.__awaiter||function(e,i,n,a){function t(r){return r instanceof n?r:new n(function(u){u(r)})}return new(n||(n=Promise))(function(r,u){function c(s){try{o(a.next(s))}catch(h){u(h)}}function f(s){try{o(a.throw(s))}catch(h){u(h)}}function o(s){s.done?r(s.value):t(s.value).then(c,f)}o((a=a.apply(e,i||[])).next())})},ie=y&&y.__generator||function(e,i){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,t,r,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(o){return function(s){return f([o,s])}}function f(o){if(a)throw new TypeError("Generator is already executing.");for(;u&&(u=0,o[0]&&(n=0)),n;)try{if(a=1,t&&(r=o[0]&2?t.return:o[0]?t.throw||((r=t.return)&&r.call(t),0):t.next)&&!(r=r.call(t,o[1])).done)return r;switch(t=0,r&&(o=[o[0]&2,r.value]),o[0]){case 0:case 1:r=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,t=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(r=n.trys,!(r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(o[0]===6&&n.label<r[1]){n.label=r[1],r=o;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(o);break}r[2]&&n.ops.pop(),n.trys.pop();continue}o=i.call(e,n)}catch(s){o=[6,s],t=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(y,"__esModule",{value:!0});y.SearchShowsByTitleOutputLanguageEnum=y.SearchShowsByTitleSeriesGranularityEnum=y.SearchShowsByFiltersOrderByEnum=y.SearchShowsByFiltersSeriesGranularityEnum=y.SearchShowsByFiltersGenresRelationEnum=y.SearchShowsByFiltersOutputLanguageEnum=y.GetTopShowsOutputLanguageEnum=y.GetShowOutputLanguageEnum=y.GetShowSeriesGranularityEnum=y.ShowsApi=void 0;var C=oe(),Te=ae(),ai=function(e){oi(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}return i.prototype.getShowRaw=function(n,a){return te(this,void 0,void 0,function(){var t,r,u,c,f;return ie(this,function(o){switch(o.label){case 0:if(n.id==null)throw new C.RequiredError("id",'Required parameter "id" was null or undefined when calling getShow().');return t={},n.country!=null&&(t.country=n.country),n.seriesGranularity!=null&&(t.series_granularity=n.seriesGranularity),n.outputLanguage!=null&&(t.output_language=n.outputLanguage),r={},this.configuration&&this.configuration.apiKey?(u=r,c="X-RapidAPI-Key",[4,this.configuration.apiKey("X-RapidAPI-Key")]):[3,2];case 1:u[c]=o.sent(),o.label=2;case 2:return[4,this.request({path:"/shows/{id}".replace("{".concat("id","}"),encodeURIComponent(String(n.id))),method:"GET",headers:r,query:t},a)];case 3:return f=o.sent(),[2,new C.JSONApiResponse(f,function(s){return(0,Te.ShowFromJSON)(s)})]}})})},i.prototype.getShow=function(n,a){return te(this,void 0,void 0,function(){var t;return ie(this,function(r){switch(r.label){case 0:return[4,this.getShowRaw(n,a)];case 1:return t=r.sent(),[4,t.value()];case 2:return[2,r.sent()]}})})},i.prototype.getTopShowsRaw=function(n,a){return te(this,void 0,void 0,function(){var t,r,u,c,f;return ie(this,function(o){switch(o.label){case 0:if(n.country==null)throw new C.RequiredError("country",'Required parameter "country" was null or undefined when calling getTopShows().');if(n.service==null)throw new C.RequiredError("service",'Required parameter "service" was null or undefined when calling getTopShows().');return t={},n.country!=null&&(t.country=n.country),n.service!=null&&(t.service=n.service),n.outputLanguage!=null&&(t.output_language=n.outputLanguage),n.showType!=null&&(t.show_type=n.showType),r={},this.configuration&&this.configuration.apiKey?(u=r,c="X-RapidAPI-Key",[4,this.configuration.apiKey("X-RapidAPI-Key")]):[3,2];case 1:u[c]=o.sent(),o.label=2;case 2:return[4,this.request({path:"/shows/top",method:"GET",headers:r,query:t},a)];case 3:return f=o.sent(),[2,new C.JSONApiResponse(f,function(s){return s.map(Te.ShowFromJSON)})]}})})},i.prototype.getTopShows=function(n,a){return te(this,void 0,void 0,function(){var t;return ie(this,function(r){switch(r.label){case 0:return[4,this.getTopShowsRaw(n,a)];case 1:return t=r.sent(),[4,t.value()];case 2:return[2,r.sent()]}})})},i.prototype.searchShowsByFiltersRaw=function(n,a){return te(this,void 0,void 0,function(){var t,r,u,c,f;return ie(this,function(o){switch(o.label){case 0:if(n.country==null)throw new C.RequiredError("country",'Required parameter "country" was null or undefined when calling searchShowsByFilters().');return t={},n.country!=null&&(t.country=n.country),n.catalogs!=null&&(t.catalogs=n.catalogs.join(C.COLLECTION_FORMATS.csv)),n.outputLanguage!=null&&(t.output_language=n.outputLanguage),n.showType!=null&&(t.show_type=n.showType),n.genres!=null&&(t.genres=n.genres.join(C.COLLECTION_FORMATS.csv)),n.genresRelation!=null&&(t.genres_relation=n.genresRelation),n.showOriginalLanguage!=null&&(t.show_original_language=n.showOriginalLanguage),n.yearMin!=null&&(t.year_min=n.yearMin),n.yearMax!=null&&(t.year_max=n.yearMax),n.ratingMin!=null&&(t.rating_min=n.ratingMin),n.ratingMax!=null&&(t.rating_max=n.ratingMax),n.keyword!=null&&(t.keyword=n.keyword),n.seriesGranularity!=null&&(t.series_granularity=n.seriesGranularity),n.orderBy!=null&&(t.order_by=n.orderBy),n.orderDirection!=null&&(t.order_direction=n.orderDirection),n.cursor!=null&&(t.cursor=n.cursor),r={},this.configuration&&this.configuration.apiKey?(u=r,c="X-RapidAPI-Key",[4,this.configuration.apiKey("X-RapidAPI-Key")]):[3,2];case 1:u[c]=o.sent(),o.label=2;case 2:return[4,this.request({path:"/shows/search/filters",method:"GET",headers:r,query:t},a)];case 3:return f=o.sent(),[2,new C.JSONApiResponse(f,function(s){return(0,Te.SearchResultFromJSON)(s)})]}})})},i.prototype.searchShowsByFilters=function(n,a){return te(this,void 0,void 0,function(){var t;return ie(this,function(r){switch(r.label){case 0:return[4,this.searchShowsByFiltersRaw(n,a)];case 1:return t=r.sent(),[4,t.value()];case 2:return[2,r.sent()]}})})},i.prototype.searchShowsByTitleRaw=function(n,a){return te(this,void 0,void 0,function(){var t,r,u,c,f;return ie(this,function(o){switch(o.label){case 0:if(n.title==null)throw new C.RequiredError("title",'Required parameter "title" was null or undefined when calling searchShowsByTitle().');if(n.country==null)throw new C.RequiredError("country",'Required parameter "country" was null or undefined when calling searchShowsByTitle().');return t={},n.title!=null&&(t.title=n.title),n.showType!=null&&(t.show_type=n.showType),n.country!=null&&(t.country=n.country),n.seriesGranularity!=null&&(t.series_granularity=n.seriesGranularity),n.outputLanguage!=null&&(t.output_language=n.outputLanguage),r={},this.configuration&&this.configuration.apiKey?(u=r,c="X-RapidAPI-Key",[4,this.configuration.apiKey("X-RapidAPI-Key")]):[3,2];case 1:u[c]=o.sent(),o.label=2;case 2:return[4,this.request({path:"/shows/search/title",method:"GET",headers:r,query:t},a)];case 3:return f=o.sent(),[2,new C.JSONApiResponse(f,function(s){return s.map(Te.ShowFromJSON)})]}})})},i.prototype.searchShowsByTitle=function(n,a){return te(this,void 0,void 0,function(){var t;return ie(this,function(r){switch(r.label){case 0:return[4,this.searchShowsByTitleRaw(n,a)];case 1:return t=r.sent(),[4,t.value()];case 2:return[2,r.sent()]}})})},i}(C.BaseAPI);y.ShowsApi=ai;y.GetShowSeriesGranularityEnum={Show:"show",Season:"season",Episode:"episode"};y.GetShowOutputLanguageEnum={En:"en",Es:"es",Tr:"tr",Fr:"fr"};y.GetTopShowsOutputLanguageEnum={En:"en",Es:"es",Tr:"tr",Fr:"fr"};y.SearchShowsByFiltersOutputLanguageEnum={En:"en",Es:"es",Tr:"tr",Fr:"fr"};y.SearchShowsByFiltersGenresRelationEnum={And:"and",Or:"or"};y.SearchShowsByFiltersSeriesGranularityEnum={Show:"show",Season:"season",Episode:"episode"};y.SearchShowsByFiltersOrderByEnum={OriginalTitle:"original_title",ReleaseDate:"release_date",Rating:"rating",PopularityAlltime:"popularity_alltime",Popularity1year:"popularity_1year",Popularity1month:"popularity_1month",Popularity1week:"popularity_1week"};y.SearchShowsByTitleSeriesGranularityEnum={Show:"show",Season:"season",Episode:"episode"};y.SearchShowsByTitleOutputLanguageEnum={En:"en",Es:"es",Tr:"tr",Fr:"fr"}});var ke=d(Z=>{"use strict";var ui=Z&&Z.__createBinding||(Object.create?function(e,i,n,a){a===void 0&&(a=n);var t=Object.getOwnPropertyDescriptor(i,n);(!t||("get"in t?!i.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(e,a,t)}:function(e,i,n,a){a===void 0&&(a=n),e[a]=i[n]}),Ne=Z&&Z.__exportStar||function(e,i){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(i,n)&&ui(i,e,n)};Object.defineProperty(Z,"__esModule",{value:!0});Ne(er(),Z);Ne(rr(),Z);Ne(ar(),Z);Ne(ur(),Z)});var hr=d(m=>{"use strict";var sr=m&&m.__extends||function(){var e=function(i,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])},e(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(i,n);function a(){this.constructor=i}i.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),se=m&&m.__assign||function(){return se=Object.assign||function(e){for(var i,n=1,a=arguments.length;n<a;n++){i=arguments[n];for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t])}return e},se.apply(this,arguments)},cr=m&&m.__awaiter||function(e,i,n,a){function t(r){return r instanceof n?r:new n(function(u){u(r)})}return new(n||(n=Promise))(function(r,u){function c(s){try{o(a.next(s))}catch(h){u(h)}}function f(s){try{o(a.throw(s))}catch(h){u(h)}}function o(s){s.done?r(s.value):t(s.value).then(c,f)}o((a=a.apply(e,i||[])).next())})},Ke=m&&m.__generator||function(e,i){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,t,r,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(o){return function(s){return f([o,s])}}function f(o){if(a)throw new TypeError("Generator is already executing.");for(;u&&(u=0,o[0]&&(n=0)),n;)try{if(a=1,t&&(r=o[0]&2?t.return:o[0]?t.throw||((r=t.return)&&r.call(t),0):t.next)&&!(r=r.call(t,o[1])).done)return r;switch(t=0,r&&(o=[o[0]&2,r.value]),o[0]){case 0:case 1:r=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,t=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(r=n.trys,!(r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(o[0]===6&&n.label<r[1]){n.label=r[1],r=o;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(o);break}r[2]&&n.ops.pop(),n.trys.pop();continue}o=i.call(e,n)}catch(s){o=[6,s],t=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},ce=m&&m.__await||function(e){return this instanceof ce?(this.v=e,this):new ce(e)},si=m&&m.__asyncGenerator||function(e,i,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(e,i||[]),t,r=[];return t={},u("next"),u("throw"),u("return"),t[Symbol.asyncIterator]=function(){return this},t;function u(g){a[g]&&(t[g]=function(T){return new Promise(function(w,O){r.push([g,T,w,O])>1||c(g,T)})})}function c(g,T){try{f(a[g](T))}catch(w){h(r[0][3],w)}}function f(g){g.value instanceof ce?Promise.resolve(g.value.v).then(o,s):h(r[0][2],g)}function o(g){c("next",g)}function s(g){c("throw",g)}function h(g,T){g(T),r.shift(),r.length&&c(r[0][0],r[0][1])}};Object.defineProperty(m,"__esModule",{value:!0});m.ChangesApiExtended=m.ShowsApiExtended=m.Client=void 0;var Je=ke(),ci=function(){function e(i){this.showsApi=new lr(i),this.genresApi=new Je.GenresApi(i),this.countriesApi=new Je.CountriesApi(i),this.changesApi=new dr(i)}return e}();m.Client=ci;function fr(e,i){return si(this,arguments,function(){var a,t,r,u,c;return Ke(this,function(f){switch(f.label){case 0:return[4,ce(i())];case 1:a=f.sent(),t=1,f.label=2;case 2:r=0,u=a.items,f.label=3;case 3:return r<u.length?(c=u[r],[4,ce(c)]):[3,7];case 4:return[4,f.sent()];case 5:f.sent(),f.label=6;case 6:return r++,[3,3];case 7:return a.hasMorePages?e>0&&t<=e?[3,10]:[4,ce(i(a.nextPageCursor))]:[3,10];case 8:a=f.sent(),f.label=9;case 9:return t++,[3,2];case 10:return[2]}})})}var lr=function(e){sr(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}return i.prototype.searchShowsByFiltersWithAutoPagination=function(n,a,t){var r=this;return fr(a,function(u){return cr(r,void 0,void 0,function(){var c,f;return Ke(this,function(o){switch(o.label){case 0:return c=se({},n),u&&(c.cursor=u),[4,this.searchShowsByFilters(c,t)];case 1:return f=o.sent(),[2,{items:f.shows,hasMorePages:f.hasMore,nextPageCursor:f.nextCursor}]}})})})},i}(Je.ShowsApi);m.ShowsApiExtended=lr;var dr=function(e){sr(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}return i.prototype.getChangesWithAutoPagination=function(n,a,t){var r=this;return fr(a,function(u){return cr(r,void 0,void 0,function(){var c,f;return Ke(this,function(o){switch(o.label){case 0:return c=se({},n),u&&(c.cursor=u),[4,this.getChanges(c,t)];case 1:return f=o.sent(),[2,{items:f.changes.map(function(s){return se(se({},s),{show:f.shows[s.showId]})}),hasMorePages:f.hasMore,nextPageCursor:f.nextCursor}]}})})})},i}(Je.ChangesApi);m.ChangesApiExtended=dr});var pr=d(j=>{"use strict";var fi=j&&j.__createBinding||(Object.create?function(e,i,n,a){a===void 0&&(a=n);var t=Object.getOwnPropertyDescriptor(i,n);(!t||("get"in t?!i.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(e,a,t)}:function(e,i,n,a){a===void 0&&(a=n),e[a]=i[n]}),be=j&&j.__exportStar||function(e,i){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(i,n)&&fi(i,e,n)};Object.defineProperty(j,"__esModule",{value:!0});be(oe(),j);be(ke(),j);be(ae(),j);be(hr(),j)});var di=d(yr=>{Object.defineProperty(yr,"__esModule",{value:!0});var li=pr();globalThis.streamingAvailability=li});di();})();