mirror of
https://github.com/godotengine/godot-website.git
synced 2026-01-04 06:09:55 +03:00
This PR replaces the current CMS website with a static version of it built using Jekyll. - Everything should be working 1 to 1 with the same permalinks except for the `/news` page (not articles) which was renamed as `/blog` (old links will redirect to new ones). - The showcase entries on the home page now redirect to their showcase page in our site so that the user can choose which store front or page to visit next. - I also changed the first link from the nav bar to go to the showcase page since the features one is still pretty outdated. Co-authored-by: Yuri Sizov <yuris@humnom.net>
7 lines
32 KiB
JavaScript
7 lines
32 KiB
JavaScript
/**
|
|
* tobii 2.0.0-beta
|
|
* Licensed under the MIT license.
|
|
* https://github.com/midzer/tobii
|
|
*/
|
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Tobii=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=function(e){return e&&e.Math==Math&&e},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},o=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,c={f:u&&!a.call({1:2},1)?function(e){var t=u(this,e);return!!t&&t.enumerable}:a},l=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},s={}.toString,d=function(e){return s.call(e).slice(8,-1)},f="".split,p=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==d(e)?f.call(e,""):Object(e)}:Object,h=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},b=function(e){return p(h(e))},v=function(e){return"object"==typeof e?null!==e:"function"==typeof e},g=function(e,t){if(!v(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!v(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!v(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!v(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},m={}.hasOwnProperty,y=function(e,t){return m.call(e,t)},x=r.document,E=v(x)&&v(x.createElement),w=!o&&!i((function(){return 7!=Object.defineProperty((e="div",E?x.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),A=Object.getOwnPropertyDescriptor,L={f:o?A:function(e,t){if(e=b(e),t=g(t,!0),w)try{return A(e,t)}catch(e){}if(y(e,t))return l(!c.f.call(e,t),e[t])}},S=function(e){if(!v(e))throw TypeError(String(e)+" is not an object");return e},_=Object.defineProperty,C={f:o?_:function(e,t,n){if(S(e),t=g(t,!0),S(n),w)try{return _(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},I=o?function(e,t,n){return C.f(e,t,l(1,n))}:function(e,t,n){return e[t]=n,e},O=function(e,t){try{I(r,e,t)}catch(n){r[e]=t}return t},T=r["__core-js_shared__"]||O("__core-js_shared__",{}),P=Function.toString;"function"!=typeof T.inspectSource&&(T.inspectSource=function(e){return P.call(e)});var j,k,M,N,R=T.inspectSource,U=r.WeakMap,q="function"==typeof U&&/native code/.test(R(U)),D=t((function(e){(e.exports=function(e,t){return T[e]||(T[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),Y=0,X=Math.random(),z=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Y+X).toString(36)},V=D("keys"),H={},B=r.WeakMap;if(q){var G=new B,F=G.get,$=G.has,K=G.set;j=function(e,t){return K.call(G,e,t),t},k=function(e){return F.call(G,e)||{}},M=function(e){return $.call(G,e)}}else{var W=V[N="state"]||(V[N]=z(N));H[W]=!0,j=function(e,t){return I(e,W,t),t},k=function(e){return y(e,W)?e[W]:{}},M=function(e){return y(e,W)}}var J,Q,Z={set:j,get:k,has:M,enforce:function(e){return M(e)?k(e):j(e,{})},getterFor:function(e){return function(t){var n;if(!v(t)||(n=k(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ee=t((function(e){var t=Z.get,n=Z.enforce,i=String(String).split("String");(e.exports=function(e,t,o,a){var u=!!a&&!!a.unsafe,c=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet;"function"==typeof o&&("string"!=typeof t||y(o,"name")||I(o,"name",t),n(o).source=i.join("string"==typeof t?t:"")),e!==r?(u?!l&&e[t]&&(c=!0):delete e[t],c?e[t]=o:I(e,t,o)):c?e[t]=o:O(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||R(this)}))})),te=r,ne=function(e){return"function"==typeof e?e:void 0},re=function(e,t){return arguments.length<2?ne(te[e])||ne(r[e]):te[e]&&te[e][t]||r[e]&&r[e][t]},ie=Math.ceil,oe=Math.floor,ae=function(e){return isNaN(e=+e)?0:(e>0?oe:ie)(e)},ue=Math.min,ce=function(e){return e>0?ue(ae(e),9007199254740991):0},le=Math.max,se=Math.min,de=function(e,t){var n=ae(e);return n<0?le(n+t,0):se(n,t)},fe=function(e){return function(t,n,r){var i,o=b(t),a=ce(o.length),u=de(r,a);if(e&&n!=n){for(;a>u;)if((i=o[u++])!=i)return!0}else for(;a>u;u++)if((e||u in o)&&o[u]===n)return e||u||0;return!e&&-1}},pe={includes:fe(!0),indexOf:fe(!1)},he=pe.indexOf,be=function(e,t){var n,r=b(e),i=0,o=[];for(n in r)!y(H,n)&&y(r,n)&&o.push(n);for(;t.length>i;)y(r,n=t[i++])&&(~he(o,n)||o.push(n));return o},ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ge=ve.concat("length","prototype"),me={f:Object.getOwnPropertyNames||function(e){return be(e,ge)}},ye={f:Object.getOwnPropertySymbols},xe=re("Reflect","ownKeys")||function(e){var t=me.f(S(e)),n=ye.f;return n?t.concat(n(e)):t},Ee=function(e,t){for(var n=xe(t),r=C.f,i=L.f,o=0;o<n.length;o++){var a=n[o];y(e,a)||r(e,a,i(t,a))}},we=/#|\.prototype\./,Ae=function(e,t){var n=Se[Le(e)];return n==Ce||n!=_e&&("function"==typeof t?i(t):!!t)},Le=Ae.normalize=function(e){return String(e).replace(we,".").toLowerCase()},Se=Ae.data={},_e=Ae.NATIVE="N",Ce=Ae.POLYFILL="P",Ie=Ae,Oe=L.f,Te=function(e,t){var n,i,o,a,u,c=e.target,l=e.global,s=e.stat;if(n=l?r:s?r[c]||O(c,{}):(r[c]||{}).prototype)for(i in t){if(a=t[i],o=e.noTargetGet?(u=Oe(n,i))&&u.value:n[i],!Ie(l?i:c+(s?".":"#")+i,e.forced)&&void 0!==o){if(typeof a==typeof o)continue;Ee(a,o)}(e.sham||o&&o.sham)&&I(a,"sham",!0),ee(n,i,a,e)}},Pe=Array.isArray||function(e){return"Array"==d(e)},je=function(e){return Object(h(e))},ke=function(e,t,n){var r=g(t);r in e?C.f(e,r,l(0,n)):e[r]=n},Me=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),Ne=Me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Re=D("wks"),Ue=r.Symbol,qe=Ne?Ue:Ue&&Ue.withoutSetter||z,De=function(e){return y(Re,e)||(Me&&y(Ue,e)?Re[e]=Ue[e]:Re[e]=qe("Symbol."+e)),Re[e]},Ye=De("species"),Xe=function(e,t){var n;return Pe(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!Pe(n.prototype)?v(n)&&null===(n=n[Ye])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},ze=re("navigator","userAgent")||"",Ve=r.process,He=Ve&&Ve.versions,Be=He&&He.v8;Be?Q=(J=Be.split("."))[0]+J[1]:ze&&(!(J=ze.match(/Edge\/(\d+)/))||J[1]>=74)&&(J=ze.match(/Chrome\/(\d+)/))&&(Q=J[1]);var Ge=Q&&+Q,Fe=De("species"),$e=function(e){return Ge>=51||!i((function(){var t=[];return(t.constructor={})[Fe]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ke=De("isConcatSpreadable"),We=Ge>=51||!i((function(){var e=[];return e[Ke]=!1,e.concat()[0]!==e})),Je=$e("concat"),Qe=function(e){if(!v(e))return!1;var t=e[Ke];return void 0!==t?!!t:Pe(e)};Te({target:"Array",proto:!0,forced:!We||!Je},{concat:function(e){var t,n,r,i,o,a=je(this),u=Xe(a,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(Qe(o=-1===t?a:arguments[t])){if(c+(i=ce(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,c++)n in o&&ke(u,c,o[n])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");ke(u,c++,o)}return u.length=c,u}});var Ze=function(e,t,n){if(function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function")}(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},et=[].push,tt=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=5==e||o;return function(u,c,l,s){for(var d,f,h=je(u),b=p(h),v=Ze(c,l,3),g=ce(b.length),m=0,y=s||Xe,x=t?y(u,g):n?y(u,0):void 0;g>m;m++)if((a||m in b)&&(f=v(d=b[m],m,h),e))if(t)x[m]=f;else if(f)switch(e){case 3:return!0;case 5:return d;case 6:return m;case 2:et.call(x,d)}else if(i)return!1;return o?-1:r||i?i:x}},nt={forEach:tt(0),map:tt(1),filter:tt(2),some:tt(3),every:tt(4),find:tt(5),findIndex:tt(6)},rt=Object.defineProperty,it={},ot=function(e){throw e},at=function(e,t){if(y(it,e))return it[e];t||(t={});var n=[][e],r=!!y(t,"ACCESSORS")&&t.ACCESSORS,a=y(t,0)?t[0]:ot,u=y(t,1)?t[1]:void 0;return it[e]=!!n&&!i((function(){if(r&&!o)return!0;var e={length:-1};r?rt(e,1,{enumerable:!0,get:ot}):e[1]=1,n.call(e,a,u)}))},ut=nt.filter,ct=$e("filter"),lt=at("filter");Te({target:"Array",proto:!0,forced:!ct||!lt},{filter:function(e){return ut(this,e,arguments.length>1?arguments[1]:void 0)}});var st=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))},dt=nt.forEach,ft=st("forEach"),pt=at("forEach"),ht=ft&&pt?[].forEach:function(e){return dt(this,e,arguments.length>1?arguments[1]:void 0)};Te({target:"Array",proto:!0,forced:[].forEach!=ht},{forEach:ht});var bt=pe.indexOf,vt=[].indexOf,gt=!!vt&&1/[1].indexOf(1,-0)<0,mt=st("indexOf"),yt=at("indexOf",{ACCESSORS:!0,1:0});Te({target:"Array",proto:!0,forced:gt||!mt||!yt},{indexOf:function(e){return gt?vt.apply(this,arguments)||0:bt(this,e,arguments.length>1?arguments[1]:void 0)}});var xt=[].join,Et=p!=Object,wt=st("join",",");Te({target:"Array",proto:!0,forced:Et||!wt},{join:function(e){return xt.call(b(this),void 0===e?",":e)}});var At=$e("slice"),Lt=at("slice",{ACCESSORS:!0,0:0,1:2}),St=De("species"),_t=[].slice,Ct=Math.max;Te({target:"Array",proto:!0,forced:!At||!Lt},{slice:function(e,t){var n,r,i,o=b(this),a=ce(o.length),u=de(e,a),c=de(void 0===t?a:t,a);if(Pe(o)&&("function"!=typeof(n=o.constructor)||n!==Array&&!Pe(n.prototype)?v(n)&&null===(n=n[St])&&(n=void 0):n=void 0,n===Array||void 0===n))return _t.call(o,u,c);for(r=new(void 0===n?Array:n)(Ct(c-u,0)),i=0;u<c;u++,i++)u in o&&ke(r,i,o[u]);return r.length=i,r}});var It=Object.keys||function(e){return be(e,ve)},Ot=c.f,Tt=function(e){return function(t){for(var n,r=b(t),i=It(r),a=i.length,u=0,c=[];a>u;)n=i[u++],o&&!Ot.call(r,n)||c.push(e?[n,r[n]]:r[n]);return c}},Pt={entries:Tt(!0),values:Tt(!1)}.entries;Te({target:"Object",stat:!0},{entries:function(e){return Pt(e)}}),Te({target:"Object",stat:!0,forced:i((function(){It(1)}))},{keys:function(e){return It(je(e))}});var jt=function(){var e=S(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function kt(e,t){return RegExp(e,t)}var Mt,Nt,Rt={UNSUPPORTED_Y:i((function(){var e=kt("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:i((function(){var e=kt("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},Ut=RegExp.prototype.exec,qt=String.prototype.replace,Dt=Ut,Yt=(Mt=/a/,Nt=/b*/g,Ut.call(Mt,"a"),Ut.call(Nt,"a"),0!==Mt.lastIndex||0!==Nt.lastIndex),Xt=Rt.UNSUPPORTED_Y||Rt.BROKEN_CARET,zt=void 0!==/()??/.exec("")[1];(Yt||zt||Xt)&&(Dt=function(e){var t,n,r,i,o=this,a=Xt&&o.sticky,u=jt.call(o),c=o.source,l=0,s=e;return a&&(-1===(u=u.replace("y","")).indexOf("g")&&(u+="g"),s=String(e).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==e[o.lastIndex-1])&&(c="(?: "+c+")",s=" "+s,l++),n=new RegExp("^(?:"+c+")",u)),zt&&(n=new RegExp("^"+c+"$(?!\\s)",u)),Yt&&(t=o.lastIndex),r=Ut.call(a?n:o,s),a?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=o.lastIndex,o.lastIndex+=r[0].length):o.lastIndex=0:Yt&&r&&(o.lastIndex=o.global?r.index+r[0].length:t),zt&&r&&r.length>1&&qt.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r});var Vt=Dt;Te({target:"RegExp",proto:!0,forced:/./.exec!==Vt},{exec:Vt});var Ht=De("species"),Bt=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Gt="$0"==="a".replace(/./,"$0"),Ft=De("replace"),$t=!!/./[Ft]&&""===/./[Ft]("a","$0"),Kt=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Wt=function(e){return function(t,n){var r,i,o=String(h(t)),a=ae(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=o.charCodeAt(a))<55296||r>56319||a+1===u||(i=o.charCodeAt(a+1))<56320||i>57343?e?o.charAt(a):r:e?o.slice(a,a+2):i-56320+(r-55296<<10)+65536}},Jt={codeAt:Wt(!1),charAt:Wt(!0)}.charAt,Qt=function(e,t,n){return t+(n?Jt(e,t).length:1)},Zt=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==d(e))throw TypeError("RegExp#exec called on incompatible receiver");return Vt.call(e,t)};!function(e,t,n,r){var o=De(e),a=!i((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),u=a&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Ht]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!a||!u||"replace"===e&&(!Bt||!Gt||$t)||"split"===e&&!Kt){var c=/./[o],l=n(o,""[e],(function(e,t,n,r,i){return t.exec===Vt?a&&!i?{done:!0,value:c.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Gt,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:$t}),s=l[0],d=l[1];ee(String.prototype,e,s),ee(RegExp.prototype,o,2==t?function(e,t){return d.call(e,this,t)}:function(e){return d.call(e,this)})}r&&I(RegExp.prototype[o],"sham",!0)}("match",1,(function(e,t,n){return[function(t){var n=h(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var i=S(e),o=String(this);if(!i.global)return Zt(i,o);var a=i.unicode;i.lastIndex=0;for(var u,c=[],l=0;null!==(u=Zt(i,o));){var s=String(u[0]);c[l]=s,""===s&&(i.lastIndex=Qt(o,ce(i.lastIndex),a)),l++}return 0===l?null:c}]}));for(var en in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var tn=r[en],nn=tn&&tn.prototype;if(nn&&nn.forEach!==ht)try{I(nn,"forEach",ht)}catch(e){nn.forEach=ht}}if("function"!=typeof window.CustomEvent){var rn=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n};rn.prototype=window.Event.prototype,window.CustomEvent=rn}return function e(t){var n=window,r=['a[href]:not([tabindex^="-"]):not([inert])','area[href]:not([tabindex^="-"]):not([inert])',"input:not([disabled]):not([inert])","select:not([disabled]):not([inert])","textarea:not([disabled]):not([inert])","button:not([disabled]):not([inert])",'iframe:not([tabindex^="-"]):not([inert])','audio:not([tabindex^="-"]):not([inert])','video:not([tabindex^="-"]):not([inert])','[contenteditable]:not([tabindex^="-"]):not([inert])','[tabindex]:not([tabindex^="-"]):not([inert])'],i=[],o={gallery:[],slider:null,sliderElements:[],elementsLength:0,currentIndex:0,x:0},a=[],u={},c=0,l=null,s=null,d=null,f=null,p=null,h={},b=!1,v=!1,g=!1,m=null,y=null,x=null,E=!1,w=!1,A=0,L={},S=null,_=null,C={image:{checkSupport:function(e){return!e.hasAttribute("data-type")&&e.href.match(/\.(png|jpe?g|tiff|tif|gif|bmp|webp|svg|ico)(\?.*)?$/i)},init:function(e,t){var n=document.createElement("figure"),r=document.createElement("figcaption"),i=document.createElement("img"),o=e.querySelector("img"),a=document.createElement("div");n.style.opacity="0",o&&(i.alt=o.alt||""),i.setAttribute("src",""),i.setAttribute("data-src",e.href),n.appendChild(i),u.captions&&("self"===u.captionsSelector&&e.getAttribute(u.captionAttribute)?r.textContent=e.getAttribute(u.captionAttribute):"img"===u.captionsSelector&&o&&o.getAttribute(u.captionAttribute)&&(r.textContent=o.getAttribute(u.captionAttribute)),r.textContent&&(r.id="tobii-figcaption-".concat(c),n.appendChild(r),i.setAttribute("aria-labelledby",r.id),++c)),t.appendChild(n),a.className="tobii__loader",a.setAttribute("role","progressbar"),a.setAttribute("aria-label",u.loadingIndicatorLabel),t.appendChild(a),t.setAttribute("data-type","image")},onPreload:function(e){C.image.onLoad(e)},onLoad:function(e){var t=e.querySelector("img");if(t.hasAttribute("data-src")){var n=e.querySelector("figure"),r=e.querySelector(".tobii__loader");t.onload=function(){e.removeChild(r),n.style.opacity="1"},t.setAttribute("src",t.getAttribute("data-src")),t.removeAttribute("data-src")}},onLeave:function(e){},onCleanup:function(e){}},html:{checkSupport:function(e){return ae(e,"html")},init:function(e,t){var n=e.hasAttribute("href")?e.getAttribute("href"):e.getAttribute("data-target"),r=document.querySelector(n);if(!r)throw new Error("Ups, I can't find the target ".concat(n,"."));t.appendChild(r),t.setAttribute("data-type","html")},onPreload:function(e){},onLoad:function(e){var t=e.querySelector("video");t&&(t.hasAttribute("data-time")&&t.readyState>0&&(t.currentTime=t.getAttribute("data-time")),u.autoplayVideo&&t.play())},onLeave:function(e){var t=e.querySelector("video");t&&(t.paused||t.pause(),t.readyState>0&&t.setAttribute("data-time",t.currentTime))},onCleanup:function(e){var t=e.querySelector("video");if(t&&t.readyState>0&&t.readyState<3&&t.duration!==t.currentTime){var n=t.cloneNode(!0);ue(t),t.load(),t.parentNode.removeChild(t),e.appendChild(n)}}},iframe:{checkSupport:function(e){return ae(e,"iframe")},init:function(e,t){var n=document.createElement("iframe"),r=e.hasAttribute("href")?e.getAttribute("href"):e.getAttribute("data-target");n.setAttribute("frameborder","0"),n.setAttribute("src",""),n.setAttribute("data-src",r),e.getAttribute("data-width")&&(n.style.maxWidth="".concat(e.getAttribute("data-width"),"px")),e.getAttribute("data-height")&&(n.style.maxHeight="".concat(e.getAttribute("data-height"),"px")),t.appendChild(n),t.setAttribute("data-type","iframe")},onPreload:function(e){},onLoad:function(e){var t=e.querySelector("iframe");t.setAttribute("src",t.getAttribute("data-src"))},onLeave:function(e){},onCleanup:function(e){}},youtube:{checkSupport:function(e){return ae(e,"youtube")},init:function(e,t){var n=document.createElement("div");t.appendChild(n),a[A]=new window.YT.Player(n,{host:"https://www.youtube-nocookie.com",height:e.getAttribute("data-height")||"360",width:e.getAttribute("data-width")||"640",videoId:e.getAttribute("data-id"),playerVars:{controls:e.getAttribute("data-controls")||1,rel:0,playsinline:1}}),t.setAttribute("data-player",A),t.setAttribute("data-type","youtube"),A++},onPreload:function(e){},onLoad:function(e){u.autoplayVideo&&a[e.getAttribute("data-player")].playVideo()},onLeave:function(e){1===a[e.getAttribute("data-player")].getPlayerState()&&a[e.getAttribute("data-player")].pauseVideo()},onCleanup:function(e){1===a[e.getAttribute("data-player")].getPlayerState()&&a[e.getAttribute("data-player")].pauseVideo()}}},I=function(e){if(null===document.querySelector('[data-type="youtube"]')||w)T(e);else{if(null===document.getElementById("iframe_api")){var t=document.createElement("script"),n=document.getElementsByTagName("script")[0];t.id="iframe_api",t.src="https://www.youtube.com/iframe_api",n.parentNode.insertBefore(t,n)}-1===i.indexOf(e)&&i.push(e),window.onYouTubePlayerAPIReady=function(){i.forEach((function(e){T(e)})),w=!0}}},O=function(e){return e.hasAttribute("data-group")?e.getAttribute("data-group"):"default"},T=function(e){var t;if(S=O(e),Object.prototype.hasOwnProperty.call(L,S)||(L[S]=(t=o,JSON.parse(JSON.stringify(t))),k()),-1!==L[S].gallery.indexOf(e))throw new Error("Ups, element already added.");if(L[S].gallery.push(e),L[S].elementsLength++,u.zoom&&e.querySelector("img")){var n=document.createElement("div");n.className="tobii-zoom__icon",n.innerHTML=u.zoomText,e.classList.add("tobii-zoom"),e.appendChild(n)}e.addEventListener("click",F),M(e),de()&&S===_&&(ce(),le())},P=function(e){var t=O(e);if(-1===L[t].gallery.indexOf(e))throw new Error("Ups, I can't find a slide for the element ".concat(e,"."));var n=L[t].gallery.indexOf(e),r=L[t].sliderElements[n];if(de()&&t===_&&n===L[t].currentIndex){if(1===L[t].elementsLength)throw R(),new Error("Ups, I've closed. There are no slides more to show.");0===L[t].currentIndex?Y():D()}if(L[t].elementsLength--,u.zoom&&e.querySelector(".tobii-zoom__icon")){var i=e.querySelector(".tobii-zoom__icon");i.parentNode.classList.remove("tobii-zoom"),i.parentNode.removeChild(i)}e.removeEventListener("click",F),r.parentNode.removeChild(r)},j=function(){(l=document.createElement("div")).setAttribute("role","dialog"),l.setAttribute("aria-hidden","true"),l.classList.add("tobii"),l.classList.add(u.theme),(s=document.createElement("button")).className="tobii__btn tobii__btn--previous",s.setAttribute("type","button"),s.setAttribute("aria-label",u.navLabel[0]),s.innerHTML=u.navText[0],l.appendChild(s),(d=document.createElement("button")).className="tobii__btn tobii__btn--next",d.setAttribute("type","button"),d.setAttribute("aria-label",u.navLabel[1]),d.innerHTML=u.navText[1],l.appendChild(d),(f=document.createElement("button")).className="tobii__btn tobii__btn--close",f.setAttribute("type","button"),f.setAttribute("aria-label",u.closeLabel),f.innerHTML=u.closeText,l.appendChild(f),(p=document.createElement("div")).className="tobii__counter",l.appendChild(p),document.body.appendChild(l)},k=function(){L[S].slider=document.createElement("div"),L[S].slider.className="tobii__slider",L[S].slider.setAttribute("aria-hidden","true"),l.appendChild(L[S].slider)},M=function(e){for(var t in C)if(Object.prototype.hasOwnProperty.call(C,t)&&C[t].checkSupport(e)){var n=document.createElement("div"),r=document.createElement("div");n.className="tobii__slide",n.style.position="absolute",n.style.left="".concat(100*L[S].x,"%"),n.setAttribute("aria-hidden","true"),C[t].init(e,r),n.appendChild(r),L[S].slider.appendChild(n),L[S].sliderElements.push(n),++L[S].x;break}},N=function(e){if(_=null!==_?_:S,de())throw new Error("Ups, I'm aleady open.");if(!de()&&(e||(e=0),-1===e||e>=L[_].elementsLength))throw new Error("Ups, I can't find slide ".concat(e,"."));u.hideScrollbar&&(document.documentElement.classList.add("tobii-is-open"),document.body.classList.add("tobii-is-open")),ce(),u.close||(f.disabled=!1,f.setAttribute("aria-hidden","true")),m=document.activeElement;var t=window.location.href;history.pushState({tobii:"close"},"Image",t),L[_].currentIndex=e,H(),ie(),q(L[_].currentIndex),L[_].slider.setAttribute("aria-hidden","false"),l.setAttribute("aria-hidden","false"),le(),U(L[_].currentIndex+1),U(L[_].currentIndex-1),setTimeout((function(){L[_].slider.classList.add("tobii__slider--animate")}),1e3);var n=new CustomEvent("open");l.dispatchEvent(n)},R=function(){if(!de())throw new Error("Ups, I'm already closed.");u.hideScrollbar&&(document.documentElement.classList.remove("tobii-is-open"),document.body.classList.remove("tobii-is-open")),oe(),null!==history.state&&"close"===history.state.tobii&&history.back(),m.focus(),X(L[_].currentIndex),z(L[_].currentIndex),l.setAttribute("aria-hidden","true"),L[_].slider.setAttribute("aria-hidden","true"),L[_].currentIndex=0,L[_].slider.classList.remove("tobii__slider--animate")},U=function(e){if(void 0!==L[_].sliderElements[e]){var t=L[_].sliderElements[e].querySelector("[data-type]"),n=t.getAttribute("data-type");C[n].onPreload(t)}},q=function(e){if(void 0!==L[_].sliderElements[e]){var t=L[_].sliderElements[e].querySelector("[data-type]"),n=t.getAttribute("data-type");L[_].sliderElements[e].classList.add("tobii__slide--is-active"),L[_].sliderElements[e].setAttribute("aria-hidden","false"),C[n].onLoad(t)}},D=function(){if(!de())throw new Error("Ups, I'm closed.");L[_].currentIndex>0&&(X(L[_].currentIndex),q(--L[_].currentIndex),le("left"),z(L[_].currentIndex+1),U(L[_].currentIndex-1));var e=new CustomEvent("previous");l.dispatchEvent(e)},Y=function(){if(!de())throw new Error("Ups, I'm closed.");L[_].currentIndex<L[_].elementsLength-1&&(X(L[_].currentIndex),q(++L[_].currentIndex),le("right"),z(L[_].currentIndex-1),U(L[_].currentIndex+1));var e=new CustomEvent("next");l.dispatchEvent(e)},X=function(e){if(void 0!==L[_].sliderElements[e]){var t=L[_].sliderElements[e].querySelector("[data-type]"),n=t.getAttribute("data-type");L[_].sliderElements[e].classList.remove("tobii__slide--is-active"),L[_].sliderElements[e].setAttribute("aria-hidden","true"),C[n].onLeave(t)}},z=function(e){if(void 0!==L[_].sliderElements[e]){var t=L[_].sliderElements[e].querySelector("[data-type]"),n=t.getAttribute("data-type");C[n].onCleanup(t)}},V=function(){y=-L[_=null!==_?_:S].currentIndex*l.offsetWidth,L[_].slider.style.transform="translate3d(".concat(y,"px, 0, 0)"),x=y},H=function(){h={startX:0,endX:0,startY:0,endY:0}},B=function(){var e=h.endX-h.startX,t=h.endY-h.startY,n=Math.abs(e),r=Math.abs(t);e>0&&n>u.threshold&&L[_].currentIndex>0?D():e<0&&n>u.threshold&&L[_].currentIndex!==L[_].elementsLength-1?Y():t<0&&r>u.threshold&&u.swipeClose?R():V()},G=function(){E||(E=!0,n.requestAnimationFrame((function(){V(),E=!1})))},F=function(e){e.preventDefault(),_=O(this),N(L[_].gallery.indexOf(this))},$=function(e){e.target===s?D():e.target===d?Y():(e.target===f||!1===b&&!1===v&&e.target.classList.contains("tobii__slide")&&u.docClose)&&R(),e.stopPropagation()},K=function(e){var t=Array.prototype.slice.call(l.querySelectorAll(".tobii__btn:not([disabled]), .tobii__slide--is-active + ".concat(r.join(", .tobii__slide--is-active ")))).filter((function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)})),n=t.indexOf(document.activeElement);9===e.keyCode||"Tab"===e.code?e.shiftKey&&0===n?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||n!==t.length-1||(t[0].focus(),e.preventDefault()):27===e.keyCode||"Escape"===e.code?(e.preventDefault(),R()):37===e.keyCode||"ArrowLeft"===e.code?(e.preventDefault(),D()):39!==e.keyCode&&"ArrowRight"!==e.code||(e.preventDefault(),Y())},W=function(e){pe(e.target)||(e.stopPropagation(),b=!1,v=!1,g=!0,h.startX=e.touches[0].pageX,h.startY=e.touches[0].pageY,L[_].slider.classList.add("tobii__slider--is-dragging"))},J=function(e){e.stopPropagation(),g&&(e.preventDefault(),h.endX=e.touches[0].pageX,h.endY=e.touches[0].pageY,re())},Q=function(e){e.stopPropagation(),g=!1,L[_].slider.classList.remove("tobii__slider--is-dragging"),h.endX&&B(),H()},Z=function(e){pe(e.target)||(e.preventDefault(),e.stopPropagation(),b=!1,v=!1,g=!0,h.startX=e.pageX,h.startY=e.pageY,L[_].slider.classList.add("tobii__slider--is-dragging"))},ee=function(e){e.preventDefault(),g&&(h.endX=e.pageX,h.endY=e.pageY,re())},te=function(e){e.stopPropagation(),g=!1,L[_].slider.classList.remove("tobii__slider--is-dragging"),h.endX&&B(),H()},ne=function(){g=!1},re=function(){Math.abs(h.startX-h.endX)>0&&!v&&L[_].elementsLength>1?(L[_].slider.style.transform="translate3d(".concat(x-Math.round(h.startX-h.endX),"px, 0, 0)"),b=!0,v=!1):Math.abs(h.startY-h.endY)>0&&!b&&u.swipeClose&&(L[_].slider.style.transform="translate3d(".concat(x,"px, -").concat(Math.round(h.startY-h.endY),"px, 0)"),b=!1,v=!0)},ie=function(){u.keyboard&&n.addEventListener("keydown",K),n.addEventListener("resize",G),n.addEventListener("popstate",R),l.addEventListener("click",$),u.draggable&&(fe()&&(l.addEventListener("touchstart",W),l.addEventListener("touchmove",J),l.addEventListener("touchend",Q)),l.addEventListener("mousedown",Z),l.addEventListener("mouseup",te),l.addEventListener("mousemove",ee),l.addEventListener("contextmenu",ne))},oe=function(){u.keyboard&&n.removeEventListener("keydown",K),n.removeEventListener("resize",G),n.removeEventListener("popstate",R),l.removeEventListener("click",$),u.draggable&&(fe()&&(l.removeEventListener("touchstart",W),l.removeEventListener("touchmove",J),l.removeEventListener("touchend",Q)),l.removeEventListener("mousedown",Z),l.removeEventListener("mouseup",te),l.removeEventListener("mousemove",ee),l.removeEventListener("contextmenu",ne))},ae=function(e,t){return e.getAttribute("data-type")===t},ue=function(e){var t=e.querySelectorAll("src");t&&t.forEach((function(e){e.setAttribute("src","")}))},ce=function(){(u.draggable&&u.swipeClose&&!L[_].slider.classList.contains("tobii__slider--is-draggable")||u.draggable&&L[_].elementsLength>1&&!L[_].slider.classList.contains("tobii__slider--is-draggable"))&&L[_].slider.classList.add("tobii__slider--is-draggable"),!u.nav||1===L[_].elementsLength||"auto"===u.nav&&fe()?(s.setAttribute("aria-hidden","true"),s.disabled=!0,d.setAttribute("aria-hidden","true"),d.disabled=!0):(s.setAttribute("aria-hidden","false"),s.disabled=!1,d.setAttribute("aria-hidden","false"),d.disabled=!1),u.counter&&1!==L[_].elementsLength?p.setAttribute("aria-hidden","false"):p.setAttribute("aria-hidden","true")},le=function(e){V(),p.textContent="".concat(L[_].currentIndex+1,"/").concat(L[_].elementsLength),function(e){(!0===u.nav||"auto"===u.nav)&&!fe()&&L[_].elementsLength>1?(s.setAttribute("aria-hidden","true"),s.disabled=!0,d.setAttribute("aria-hidden","true"),d.disabled=!0,1===L[_].elementsLength?u.close&&f.focus():0===L[_].currentIndex?(d.setAttribute("aria-hidden","false"),d.disabled=!1,d.focus()):L[_].currentIndex===L[_].elementsLength-1?(s.setAttribute("aria-hidden","false"),s.disabled=!1,s.focus()):(s.setAttribute("aria-hidden","false"),s.disabled=!1,d.setAttribute("aria-hidden","false"),d.disabled=!1,"left"===e?s.focus():d.focus())):u.close&&f.focus()}(e)},se=function(){de()&&R(),Object.entries(L).forEach((function(e){e[1].gallery.forEach((function(e){P(e)}))})),L={},S=_=null,c=0},de=function(){return"false"===l.getAttribute("aria-hidden")},fe=function(){return"ontouchstart"in window},pe=function(e){return-1!==["TEXTAREA","OPTION","INPUT","SELECT"].indexOf(e.nodeName)||e===s||e===d||e===f};return function(e){u=function(e){var t={selector:".lightbox",captions:!0,captionsSelector:"img",captionAttribute:"alt",nav:"auto",navText:['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">\n <path stroke="none" d="M0 0h24v24H0z"/>\n <polyline points="15 6 9 12 15 18" />\n </svg>','<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">\n <path stroke="none" d="M0 0h24v24H0z"/>\n <polyline points="9 6 15 12 9 18" />\n </svg>'],navLabel:["Previous image","Next image"],close:!0,closeText:'\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">\n <path stroke="none" d="M0 0h24v24H0z"/>\n <line x1="18" y1="6" x2="6" y2="18" />\n <line x1="6" y1="6" x2="18" y2="18" />\n </svg>\n ',closeLabel:"Close lightbox",loadingIndicatorLabel:"Image loading",counter:!0,download:!1,downloadText:"",downloadLabel:"Download image",keyboard:!0,zoom:!0,zoomText:'\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">\n <path stroke="none" d="M0 0h24v24H0z"/>\n <polyline points="16 4 20 4 20 8" />\n <line x1="14" y1="10" x2="20" y2="4" />\n <polyline points="8 20 4 20 4 16" />\n <line x1="4" y1="20" x2="10" y2="14" />\n <polyline points="16 20 20 20 20 16" />\n <line x1="14" y1="14" x2="20" y2="20" />\n <polyline points="8 4 4 4 4 8" />\n <line x1="4" y1="4" x2="10" y2="10" />\n </svg>\n ',docClose:!0,swipeClose:!0,hideScrollbar:!0,draggable:!0,threshold:100,rtl:!1,loop:!1,autoplayVideo:!1,modal:!1,theme:"tobii--theme-default"};return e&&Object.keys(e).forEach((function(n){t[n]=e[n]})),t}(e),l||j();var t=document.querySelectorAll(u.selector);if(!t)throw new Error("Ups, I can't find the selector ".concat(u.selector," on this website."));t.forEach((function(e){I(e)}))}(t),e.open=N,e.previous=D,e.next=Y,e.close=R,e.add=I,e.remove=P,e.reset=se,e.destroy=function(){se(),l.parentNode.removeChild(l)},e.isOpen=de,e.slidesIndex=function(){return L[_].currentIndex},e.select=function(e){var t=L[_].currentIndex;if(!de())throw new Error("Ups, I'm closed.");if(de()){if(!e&&0!==e)throw new Error("Ups, no slide specified.");if(e===L[_].currentIndex)throw new Error("Ups, slide ".concat(e," is already selected."));if(-1===e||e>=L[_].elementsLength)throw new Error("Ups, I can't find slide ".concat(e,"."))}L[_].currentIndex=e,X(t),q(e),e<t&&(le("left"),z(t),U(e-1)),e>t&&(le("right"),z(t),U(e+1))},e.slidesCount=function(){return L[_].elementsLength},e.selectGroup=function(e){if(de())throw new Error("Ups, I'm open.");if(!e)throw new Error("Ups, no group specified.");if(e&&!Object.prototype.hasOwnProperty.call(L,e))throw new Error("Ups, I don't have a group called \"".concat(e,'".'));_=e},e.currentGroup=function(){return null!==_?_:S},e.on=function(e,t){l.addEventListener(e,t)},e.off=function(e,t){l.removeEventListener(e,t)},e}}));
|