vendor: 5,522 bytes, line 1
1var e=[`input:not([inert])`,`select:not([inert])`,`textarea:not([inert])`,`a[href]:not([inert])`,`button:not([inert])`,`[tabindex]:not(slot):not([inert])`,`audio[controls]:not([inert])`,`video[controls]:not([inert])`,`[contenteditable]:not([contenteditable="false"]):not([inert])`,`details>summary:first-of-type:not([inert])`,`details:not([inert])`],t=e.join(`,`),n=typeof Element>`u`,r=n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,i=!n&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},a=function e(t,n){n===void 0&&(n=!0);var r=t?.getAttribute?.call(t,`inert`);return r===``||r===`true`||n&&t&&e(t.parentNode)},o=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},s=function(e,n,i){if(a(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(t));return n&&r.call(e,t)&&o.unshift(e),o=o.filter(i),o},c=function e(n,i,o){for(var s=[],c=Array.from(n);c.length;){var l=c.shift();if(!a(l,!1))if(l.tagName===`SLOT`){var u=l.assignedElements(),d=e(u.length?u:l.children,!0,o);o.flatten?s.push.apply(s,d):s.push({scopeParent:l,candidates:d})}else{r.call(l,t)&&o.filter(l)&&(i||!n.includes(l))&&s.push(l);var f=l.shadowRoot||typeof o.getShadowRoot==`function`&&o.getShadowRoot(l),p=!a(f,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(l));if(f&&p){var m=e(f===!0?l.children:f.children,!0,o);o.flatten?s.push.apply(s,m):s.push({scopeParent:l,candidates:m})}else c.unshift.apply(c,l.children)}}return s},l=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},u=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||o(e))&&!l(e)?0:e.tabIndex},d=function(e,t){var n=u(e);return n<0&&t&&!l(e)?0:n},f=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},p=function(e){return e.tagName===`INPUT`},m=function(e){return p(e)&&e.type===`hidden`},h=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},g=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},_=function(e){if(!e.name)return!0;var t=e.form||i(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var a=g(r,e.form);return!a||a===e},v=function(e){return p(e)&&e.type===`radio`},y=function(e){return v(e)&&!_(e)},b=function(e){var t=e&&i(e),n=t?.host,r=!1;if(t&&t!==e){var a,o,s;for(r=!!((a=n)!=null&&(o=a.ownerDocument)!=null&&o.contains(n)||e!=null&&(s=e.ownerDocument)!=null&&s.contains(e));!r&&n;){var c,l;t=i(n),n=t?.host,r=!!((c=n)!=null&&(l=c.ownerDocument)!=null&&l.contains(n))}}return r},x=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},S=function(e,t){var n=t.displayCheck,a=t.getShadowRoot;if(getComputedStyle(e).visibility===`hidden`)return!0;var o=r.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(r.call(o,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`legacy-full`){if(typeof a==`function`){for(var s=e;e;){var c=e.parentElement,l=i(e);if(c&&!c.shadowRoot&&a(c)===!0)return x(e);e=e.assignedSlot?e.assignedSlot:!c&&l!==e.ownerDocument?l.host:c}e=s}if(b(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return x(e);return!1},C=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var i=t.children.item(n);if(i.tagName===`LEGEND`)return r.call(t,`fieldset[disabled] *`)?!0:!i.contains(e)}return!0}t=t.parentElement}return!1},w=function(e,t){return!(t.disabled||a(t)||m(t)||S(t,e)||h(t)||C(t))},T=function(e,t){return!(y(t)||u(t)<0||!w(e,t))},E=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},D=function e(t){var n=[],r=[];return t.forEach(function(t,i){var a=!!t.scopeParent,o=a?t.scopeParent:t,s=d(o,a),c=a?e(t.candidates):o;s===0?a?n.push.apply(n,c):n.push(o):r.push({documentOrder:i,tabIndex:s,item:t,isScope:a,content:c})}),r.sort(f).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(n)},O=function(e,t){return t||={},D(t.getShadowRoot?c([e],t.includeContainer,{filter:T.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:E}):s(e,t.includeContainer,T.bind(null,t)))},k=function(e,t){return t||={},t.getShadowRoot?c([e],t.includeContainer,{filter:w.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s(e,t.includeContainer,w.bind(null,t))},A=function(e,n){if(n||={},!e)throw Error(`No node provided`);return r.call(e,t)!==!1&&T(n,e)},j=e.concat(`iframe`).join(`,`),M=function(e,t){if(t||={},!e)throw Error(`No node provided`);return r.call(e,j)!==!1&&w(t,e)};function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
1t%2?N(Object(n),!0).forEach(function(t){F(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function F(e,t,n){return t=L(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function L(e){var t=I(e,`string`);return typeof t==`symbol`?t:String(t)}var R={activateTrap:function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n.pause()}var r=e.indexOf(t);r===-1||e.splice(r,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},z=function(e){return e.tagName&&e.tagName.toLowerCase()===`input`&&typeof e.select==`function`},B=function(e){return e?.key===`Escape`||e?.key===`Esc`||e?.keyCode===27},V=function(e){return e?.key===`Tab`||e?.keyCode===9},H=function(e){return V(e)&&!e.shiftKey},U=function(e){return V(e)&&e.shiftKey},W=function(e){return setTimeout(e,0)},G=function(e,t){var n=-1;return e.every(function(e,r){return t(e)?(n=r,!1):!0}),n},K=function(e){var t=[...arguments].slice(1);return typeof e==`function`?e.apply(void 0,t):e},q=function(e){return e.target.shadowRoot&&typeof e.composedPath==`function`?e.composedPath()[0]:e.target},J=[],Y=function(e,t){var n=t?.document||document,r=t?.trapStack||J,i=P({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:H,isKeyBackward:U},t),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,s=function(e,t,n){return e&&e[t]!==void 0?e[t]:i[n||t]},c=function(e,t){var n=typeof t?.composedPath==`function`?t.composedPath():void 0;return a.containerGroups.findIndex(function(t){var r=t.container,i=t.tabbableNodes;return r.contains(e)||n?.includes(r)||i.find(function(t){return t===e})})},l=function(e){var t=i[e];if(typeof t==`function`){var r=[...arguments].slice(1);t=t.apply(void 0,r)}if(t===!0&&(t=void 0),!t){if(t===void 0||t===!1)return t;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}var a=t;if(typeof t==`string`&&(a=n.querySelector(t),!a))throw Error(`\`${e}\` as selector refers to no known node`);return a},d=function(){var e=l(`initialFocus`);if(e===!1)return!1;if(e===void 0||!M(e,i.tabbableOptions))if(c(n.activeElement)>=0)e=n.activeElement;else{var t=a.tabbableGroups[0];e=t&&t.firstTabbableNode||l(`fallbackFocus`)}if(!e)throw Error(`Your focus-trap needs to have at least one focusable element`);return e},f=function(){if(a.containerGroups=a.containers.map(function(e){var t=O(e,i.tabbableOptions),n=k(e,i.tabbableOptions),r=t.length>0?t[0]:void 0,a=t.length>0?t[t.length-1]:void 0,o=n.find(function(e){return A(e)}),s=n.slice().reverse().find(function(e){return A(e)});return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:!!t.find(function(e){return u(e)>0}),firstTabbableNode:r,lastTabbableNode:a,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=t.indexOf(e);return i<0?r?n.slice(n.indexOf(e)+1).find(function(e){return A(e)}):n.slice(0,n.indexOf(e)).reverse().find(function(e){return A(e)}):t[i+(r?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(e){return e.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!l(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(a.containerGroups.find(function(e){return e.posTabIndexesFound})&&a.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)},p=function e(t){var n=t.activeElement;if(n)return n.shadowRoot&&n.shadowRoot.activeElement!==null?e(n.shadowRoot):n},m=function e(t){if(t!==!1&&t!==p(document)){if(!t||!t.focus){e(d());return}t.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=t,z(t)&&t.select()}},h=function(e){var t=l(`setReturnFocus`,e);return t||t!==!1&&e},g=function(e){var t=e.target,n=e.event,r=e.isBackward,o=r!==void 0&&r;t||=q(n),f();var s=null;if(a.tabbableGroups.length>0){var d=c(t,n),p=d>=0?a.containerGroups[d]:void 0;if(d<0)s=o?a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:a.tabbableGroups[0].firstTabbableNode;else if(o){var m=G(a.tabbableGroups,function(e){var n=e.firstTabbableNode;return t===n});if(m<0&&(p.container===t||M(t,i.tabbableOptions)&&!A(t,i.tabbableOptions)&&!p.nextTabbableNode(t,!1))&&(m=d),m>=0){var h=m===0?a.tabbableGroups.length-1:m-1,g=a.tabbableGroups[h];s=u(t)>=0?g.lastTabbableNode:g.lastDomTabbableNode}else V(n)||(s=p.nextTabbableNode(t,!1))}
1else{var _=G(a.tabbableGroups,function(e){var n=e.lastTabbableNode;return t===n});if(_<0&&(p.container===t||M(t,i.tabbableOptions)&&!A(t,i.tabbableOptions)&&!p.nextTabbableNode(t))&&(_=d),_>=0){var v=_===a.tabbableGroups.length-1?0:_+1,y=a.tabbableGroups[v];s=u(t)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else V(n)||(s=p.nextTabbableNode(t))}}else s=l(`fallbackFocus`);return s},_=function(e){if(!(c(q(e),e)>=0)){if(K(i.clickOutsideDeactivates,e)){o.deactivate({returnFocus:i.returnFocusOnDeactivate});return}K(i.allowOutsideClick,e)||e.preventDefault()}},v=function(e){var t=q(e),n=c(t,e)>=0;if(n||t instanceof Document)n&&(a.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();var r,o=!0;if(a.mostRecentlyFocusedNode)if(u(a.mostRecentlyFocusedNode)>0){var s=c(a.mostRecentlyFocusedNode),l=a.containerGroups[s].tabbableNodes;if(l.length>0){var f=l.findIndex(function(e){return e===a.mostRecentlyFocusedNode});f>=0&&(i.isKeyForward(a.recentNavEvent)?f+1<l.length&&(r=l[f+1],o=!1):f-1>=0&&(r=l[f-1],o=!1))}}else a.containerGroups.some(function(e){return e.tabbableNodes.some(function(e){return u(e)>0})})||(o=!1);else o=!1;o&&(r=g({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),m(r||a.mostRecentlyFocusedNode||d())}a.recentNavEvent=void 0},y=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a.recentNavEvent=e;var n=g({event:e,isBackward:t});n&&(V(e)&&e.preventDefault(),m(n))},b=function(e){if(B(e)&&K(i.escapeDeactivates,e)!==!1){e.preventDefault(),o.deactivate();return}(i.isKeyForward(e)||i.isKeyBackward(e))&&y(e,i.isKeyBackward(e))},x=function(e){c(q(e),e)>=0||K(i.clickOutsideDeactivates,e)||K(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},S=function(){if(a.active)return R.activateTrap(r,o),a.delayInitialFocusTimer=i.delayInitialFocus?W(function(){m(d())}):m(d()),n.addEventListener(`focusin`,v,!0),n.addEventListener(`mousedown`,_,{capture:!0,passive:!1}),n.addEventListener(`touchstart`,_,{capture:!0,passive:!1}),n.addEventListener(`click`,x,{capture:!0,passive:!1}),n.addEventListener(`keydown`,b,{capture:!0,passive:!1}),o},C=function(){if(a.active)return n.removeEventListener(`focusin`,v,!0),n.removeEventListener(`mousedown`,_,!0),n.removeEventListener(`touchstart`,_,!0),n.removeEventListener(`click`,x,!0),n.removeEventListener(`keydown`,b,!0),o},w=typeof window<`u`&&`MutationObserver`in window?new MutationObserver(function(e){e.some(function(e){return Array.from(e.removedNodes).some(function(e){return e===a.mostRecentlyFocusedNode})})&&m(d())}):void 0,T=function(){w&&(w.disconnect(),a.active&&!a.paused&&a.containers.map(function(e){w.observe(e,{subtree:!0,childList:!0})}))};return o={get active(){return a.active},get paused(){return a.paused},activate:function(e){if(a.active)return this;var t=s(e,`onActivate`),r=s(e,`onPostActivate`),i=s(e,`checkCanFocusTrap`);i||f(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=n.activeElement,t?.();var o=function(){i&&f(),S(),T(),r?.()};return i?(i(a.containers.concat()).then(o,o),this):(o(),this)},deactivate:function(e){if(!a.active)return this;var t=P({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,C(),a.active=!1,a.paused=!1,T(),R.deactivateTrap(r,o);var n=s(t,`onDeactivate`),c=s(t,`onPostDeactivate`),l=s(t,`checkCanReturnFocus`),u=s(t,`returnFocus`,`returnFocusOnDeactivate`);n?.();var d=function(){W(function(){u&&m(h(a.nodeFocusedBeforeActivation)),c?.()})};return u&&l?(l(h(a.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(e){if(a.paused||!a.active)return this;var t=s(e,`onPause`),n=s(e,`onPostPause`);return a.paused=!0,t?.(),C(),T(),n?.(),this},unpause:function(e){if(!a.paused||!a.active)return this;var t=s(e,`onUnpause`),n=s(e,`onPostUnpause`);return a.paused=!1,t?.(),f(),S(),T(),n?.(),this},updateContainerElements:function(e){return a.containers=[].concat(e).filter(
1Boolean).map(function(e){return typeof e==`string`?n.querySelector(e):e}),a.active&&f(),T(),this}},o.updateContainerElements(e),o};function X(){document.body.classList.remove(`no-js`);let e=document.querySelector(`.fullscreen-overlay`);if(!e){console.error(`Missing modal root`);return}let t=e.querySelector(`.pricing-modal`),n=document.getElementById(`close-modal`),r=document.getElementById(`modal-contact-form`),i=document.getElementById(`modal-submit`),a=e.querySelectorAll(`.on-prem-only`),o=e.querySelectorAll(`.oss-only`),s=e.querySelector(`.modal-content`),c=e.querySelector(`input[name='kind']`),l=e.querySelectorAll(`.contact-field`),u=document.getElementById(`switch-to-on-prem`),d=e.querySelector(`textarea[name='message']`),f=!1,p=document.querySelectorAll(`.plan-on-prem .bottom-segment a:not([data-target='oss-support-form']), a[data-target='on-prem-form']`),m=document.querySelectorAll(`a[data-target='oss-support-form']`);if(!e||!t||!p||!n||!r||!i||!s||!c||!d){console.error(`Missing modal or modal openers`);return}let h=Y(t,{clickOutsideDeactivates:!0,escapeDeactivates:!0});for(let e of l){let t=e.querySelector(`textarea`),n=e.querySelector(`.char-count`);!t||!n||t.addEventListener(`input`,()=>{let e=t.value.length,r=t.maxLength??3e3;n.textContent=e.toString()+`/`+r,n.style.color=e>=r?`#ea3e47`:`#565565`,n.style.opacity=Math.min(1,Math.max(0,1/(r/4-250)*e-250/(r/4-250))).toString()})}let g=(t,n)=>{if(e.classList.remove(`hidden`),i.innerHTML=`Send`,s.querySelector(`#modal-success-message`)?.classList.add(`hidden`),s.querySelector(`#modal-error-notice`)?.classList.add(`hidden`),f=!1,t!==`on-prem`&&t!==`oss-support`)throw Error(`Invalid kind`);let r=n?.dataset.placeholder??`How do you want to use Typst?`;d.placeholder=r;let l=t===`oss-support`;c.value=t,a.forEach(e=>{e.classList.toggle(`hidden`,l)}),o.forEach(e=>{e.classList.toggle(`hidden`,!l)}),h.activate()},_=()=>{e.classList.add(`hidden`),h&&h.deactivate()};p.forEach(e=>{e.addEventListener(`click`,t=>{t.preventDefault(),g(`on-prem`,e)})}),m.forEach(e=>{e.addEventListener(`click`,t=>{t.preventDefault(),g(`oss-support`,e)})}),n.addEventListener(`click`,_),window.addEventListener(`keydown`,e=>{e.key===`Escape`&&_()}),e.addEventListener(`click`,t=>{t.target===e&&_()});let v=new URLSearchParams(window.location.search);v.has(`on-prem`)?g(`on-prem`):v.has(`oss-support`)&&g(`oss-support`);let y=r.getAttribute(`action`);if(!y){console.error(`Missing form target`);return}let b=async()=>{if(r.reportValidity()===!1)return;let e=new FormData(r),t=new URLSearchParams(e),n=document.getElementById(`modal-error-notice`),a=!1,o=`Please try again later.`;i.setAttribute(`disabled`,`disabled`);let l=new AbortController,u=setTimeout(()=>l.abort(),1e4),d=c.value,p;try{if(p=await fetch(y+`?no_redirect=1`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},signal:l.signal,body:t,credentials:`include`}),p.ok&&p.headers.get(`content-type`)?.startsWith(`application/json`)&&(a=(await p.json()).success===!0),!p.ok&&p.headers.get(`content-type`)?.startsWith(`application/json`)){let e=await p.json();typeof e==`object`&&e.code&&Array.isArray(e.code)&&(e.code.includes(`USER_INVALID_EMAIL`)&&(o=`Please enter a valid email address.`),e.code.includes(`NAME_INVALID`)&&(o=`Please make sure you completed all required fields.`),e.code.includes(`MESSAGE_TOO_LONG`)&&(o=`Please make sure you provide a message. It can't be longer than 3000 characters.`),e.code.includes(`RATE_LIMIT_EXCEEDED`)&&(o=`You've interacted a lot with Typst in the last few minutes! Please try again later.`),e.code.includes(`INVALID_CAPTCHA`)&&(o=`Please enter our name ("Typst") spelled backwards and with exclusively capital letters into the last field to prove that you are not a robot.`))}}catch(e){e&&typeof e==`object`&&`name`in e&&e.name===`AbortError`&&(o=`The request took too long. Please try again later.`)}finally{i.removeAttribute(`disabled`),clearTimeout(u)}if(a)s.querySelector(`#modal-success-message`)?.classList.remove(`hidden`),n?.classList.add(`hidden`),r.reset(),f=!0,i.innerHTML=`Close`,plausible&&typeof plausible==`function`&&plausible(`contact-form`,{props:{product:d,medium:`pricing-page`}});else{if(!n)throw Error(`Missing error notice`);n.classList.add(`error`),n.classList.remove(`hidden`),n.textContent=`Failed to send message. `+o}};r.addEventListener(`submit`,e=>{e.preventDefault(),b()}),i.addEventListener(`click`,e=>{e.preventDefault(),f?_():b()}),u&&u.addEventListener(`click`,e=>{e.preventDefault(),g(`on-prem`)})}X();
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.