1"use strict";(self.webpackChunkswiftlane_gatsby=self.webpackChunkswiftlane_gatsby||[]).push([[6147],{6147:function(e,l,n){n.r(l),n.d(l,{default:function(){return F}});var t=n(4506),u=n(6540),c=n(1266),r=n(2815);const s={auto:!1,ref:null},a=e=>({...s,...e}),o=u.createContext(null),i=(0,c.makeUseContext)("useFullscreen","FullscreenContext",o);function v({fullscreen:e,on:l,children:n}){const{auto:s,ref:i}=a(e),v=u.useRef(null),[d,m]=u.useState(),[f,F]=u.useState(!1),E=u.useRef(!1),{getOwnerDocument:h}=(0,c.useDocumentContext)();(0,c.useLayoutEffect)(()=>{var e,l,n,t;const u=h();m(!(null!==(t=null!==(n=null!==(l=null!==(e=u.fullscreenEnabled)&&void 0!==e?e:u.webkitFullscreenEnabled)&&void 0!==l?l:u.mozFullScreenEnabled)&&void 0!==n?n:u.msFullscreenEnabled)&&void 0!==t&&t))},[h]);const b=u.useCallback(()=>{var e;const l=h(),n=l.fullscreenElement||l.webkitFullscreenElement||l.mozFullScreenElement||l.msFullscreenElement;return(null===(e=null==n?void 0:n.shadowRoot)||void 0===e?void 0:e.fullscreenElement)||n},[h]),C=u.useCallback(()=>{const e=v.current;try{e.requestFullscreen?e.requestFullscreen().catch(()=>{}):e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}catch(l){}},[]),k=u.useCallback(()=>{if(!b())return;const e=h();try{e.exitFullscreen?e.exitFullscreen().catch(()=>{}):e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen()}catch(l){}},[b,h]);u.useEffect(()=>{const e=h(),l=()=>{F(b()===v.current)};return c.cleanup.apply(void 0,(0,t.A)(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].map(n=>(e.addEventListener(n,l),()=>e.removeEventListener(n,l)))))},[b,h]);const x=(0,c.useEventCallback)(()=>{var e;return null===(e=l.enterFullscreen)||void 0===e?void 0:e.call(l)}),z=(0,c.useEventCallback)(()=>{var e;return null===(e=l.exitFullscreen)||void 0===e?void 0:e.call(l)});u.useEffect(()=>{f&&(E.current=!0),E.current&&(f?x:z)()},[f,x,z]);const w=(0,c.useEventCallback)(()=>{var e;return null===(e=s?C:null)||void 0===e||e(),k});u.useEffect(w,[w]);const p=u.useMemo(()=>({fullscreen:f,disabled:d,enter:C,exit:k}),[f,d,C,k]);return u.useImperativeHandle(i,()=>p,[p]),u.createElement("div",{ref:v,className:(0,c.clsx)((0,c.cssClass)(r.Qe),(0,c.cssClass)(r.CC))},u.createElement(o.Provider,{value:p},n))}const d=(0,c.createIcon)("EnterFullscreen",u.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})),m=(0,c.createIcon)("ExitFullscreen",u.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}));function f(){var e;const{fullscreen:l,disabled:n,enter:t,exit:r}=i(),{render:s}=(0,c.useLightboxProps)();return n?null:s.buttonFullscreen?u.createElement(u.Fragment,null,null===(e=s.buttonFullscreen)||void 0===e?void 0:e.call(s,{fullscreen:l,disabled:n,enter:t,exit:r})):u.createElement(c.IconButton,{disabled:n,label:l?"Exit Fullscreen":"Enter Fullscreen",icon:l?m:d,renderIcon:l?s.iconExitFullscreen:s.iconEnterFullscreen,onClick:l?r:t})}function F({augment:e,contains:l,addParent:n}){e(({fullscreen:e,toolbar:l,...n})=>({toolbar:(0,c.addToolbarButton)(l,r.Qe,u.createElement(f,null)),fullscreen:a(e),...n})),n(l(r.QQ)?r.QQ:r.Kv,(0,c.createModule)(r.Qe,v))}}}]); 2//# sourceMappingURL=6147-3c90fb7a0ad475f750f8.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.