@opengovsg/confetti 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ModalContainer-CDEl2ap2.js +11 -0
- package/build/client-internals.js +1 -1
- package/build/confetti.css +2 -2
- package/build/index.d.ts +91 -44
- package/build/index.js +1 -1
- package/build/{internals-pYkbsaWU.js → internals-Dzl6abGJ.js} +1 -1
- package/build/internals.d.ts +4 -2
- package/build/internals.js +1 -1
- package/build/snapdom-VnBlM9vL.js +8 -0
- package/build/{types-BUY-8MBx.d.ts → types-JeyKtT3p.d.ts} +1 -1
- package/package.json +4 -4
- package/build/ModalContainer-TykfTV77.js +0 -11
- package/build/html2canvas-pro.esm-C4mKZXvx.js +0 -10
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{i as e,r as t,t as n}from"./internals-Dzl6abGJ.js";import r,{createContext as i,forwardRef as a,useCallback as o,useContext as s,useEffect as c,useMemo as l,useReducer as u,useRef as d,useState as f}from"react";import{useLocalStorage as p,useTimeout as m}from"usehooks-ts";import{z as h}from"zod/v4/mini";import g from"ky";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";import b from"clsx";import x,{flushSync as S}from"react-dom";const C=h.object({type:h.literal(`next`)}),w=h.object({type:h.literal(`end`)}),ee=h.object({type:h.literal(`jump`),target:h.number({error:`Target question is required`})}),T=h.discriminatedUnion(`type`,[C,ee,w]),E=h.object({type:h.literal(`value`),value:h.union([h.string().check(h.trim(),h.minLength(1,{error:`Value is required`})),h.number({error:`Value is required`})])}),D=h.object({type:h.literal(`binary-operator`),operator:h.union([h.literal(`equal`),h.literal(`not-equal`),h.literal(`greater`),h.literal(`greater-or-equal`),h.literal(`less`),h.literal(`less-or-equal`),h.literal(`contains`),h.literal(`not-contains`)]),value:E,target:T}),O=h.object({type:h.literal(`switch`),cases:h.array(D),default:T}),te=h.object({type:h.literal(`always`),target:T}),k=h.discriminatedUnion(`type`,[te,O]),ne=h.string().check(h.trim(),h.url({protocol:/^(https|mailto)/,error:`Link must start with https:// or mailto:`})),re=h.optional(h.string().check(h.trim(),h.maxLength(50))),ie=h.object({value:h.string().check(h.trim(),h.minLength(1,{error:`Value is required`})),description:h.optional(h.string().check(h.trim()))}),ae=h.nullable(h.object({label:h.string().check(h.trim(),h.minLength(1,{error:`Value is required`})),max:h.number(),description:h.optional(h.string().check(h.trim()))})),oe=h.optional(h.boolean()),se=h.object({type:h.literal(`rating`),buttonLabel:re,shouldAutoProgress:oe,scale:h.number().check(h.minimum(2),h.maximum(10)),labels:h.optional(h.object({lower:h.optional(h.pipe(h.string().check(h.trim()),h.transform(e=>e===``?void 0:e))),upper:h.optional(h.pipe(h.string().check(h.trim()),h.transform(e=>e===``?void 0:e)))})),display:h.optional(h.literal([`star`,`emoji`,`number`]))}),ce=h.object({type:h.literal(`open-ended`),placeholder:h.optional(h.string()),buttonLabel:re,max:h.number()}),le=h.object({type:h.literal(`single-select`),shouldAutoProgress:oe,options:h.array(ie),buttonLabel:re,editable:ae}),ue=h.object({type:h.literal(`multi-select`),buttonLabel:re,options:h.array(ie),editable:ae,max:h.optional(h.number()),display:h.optional(h.literal([`checkbox`,`tag`]))}),de=h.object({type:h.literal(`statement`),buttonLabel:re,buttonUrl:h.optional(ne)}),fe=h.object({type:h.literal(`bug-report`),placeholder:h.optional(h.string()),buttonLabel:re,enableScreenshot:h.boolean(),enableRecording:h.boolean(),detailsLabel:h.string().check(h.trim(),h.minLength(1,{error:`Label is required`}),h.maxLength(128)),detailsPlaceholder:h.optional(h.string()),redactClasses:h.optional(h.array(h.string()))}),pe=h.discriminatedUnion(`type`,[se,le,ce,ue,de,fe]),me=`__CONFETTI_CHECKBOX_Others`,he=`__CONFETTI_RADIO_Others`,ge=h.optional(h.catchall(h.partial(h.looseObject({userAgent:h.string().check(h.trim(),h.maxLength(1e3)),screenResolution:h.string().check(h.trim(),h.maxLength(100)),viewportSize:h.string().check(h.trim(),h.maxLength(100)),pageUrl:h.string(),pageTitle:h.string().check(h.trim(),h.maxLength(1e3)),referrer:h.string(),datadogTraceId:h.optional(h.string()),datadogSessionId:h.optional(h.string()),datadogSessionReplayLink:h.optional(h.string())})),h.optional(h.string())));h.cuid2();const _e=h.looseObject({type:h.literal([0,1,2,3,4,5,6]),data:h.unknown(),timestamp:h.number(),delay:h.optional(h.number())});h.array(_e);const ve=h.array(_e),ye=h.string().check(h.refine(e=>{try{return ve.safeParse(JSON.parse(e)).success}catch{return!1}},{error:`Invalid recording events`})),be=h.string().check(h.regex(/^data:image\/(png|jpeg|jpg|webp|gif);base64,[A-Za-z0-9+/]+=*$/,{error:`Invalid image data URL`})),xe=e=>h.object({title:h.string().check(h.trim(),...e?[h.minLength(1,{error:`Title is required`})]:[],h.maxLength(256)),description:h.optional(h.string().check(h.trim(),h.maxLength(4096))),screenshotDataUrl:h.optional(be),recordingEventsJson:h.optional(ye),metadata:ge}),Se=xe(!0),Ce=(e,{required:t})=>xe(t),we=e=>h.number().check(h.int(),h.minimum(1),h.maximum(e)),Te=({scale:e},{required:t})=>{let n=we(e);return t?n:h.optional(n)},Ee=({maxLength:e},{required:t})=>h.string().check(h.trim(),...t?[h.minLength(1,{error:`This field is required`})]:[],h.maxLength(e??2048,{error:({maximum:e})=>`Please enter less than ${e} characters`})),De=(e,t)=>h.string().check(h.trim(),...t?[h.minLength(1,{error:`This field is required`})]:[],h.maxLength(e??1024,{error:({maximum:e})=>`Please enter less than ${e} characters`}),h.refine(e=>e!==he,{error:`Please fill out the free text field`})),Oe=({maxLength:e},{required:t})=>{let n=De(e,t);return t?n:h.optional(n)},ke=({maxSelected:e,maxLength:t},{required:n})=>h.array(h.string().check(h.trim(),...n?[h.minLength(1,{error:`This field is required`})]:[],h.maxLength(t??1024,{error:({maximum:e})=>`Please enter less than ${e} characters`}),h.refine(e=>e!==me,{error:`Please fill out the free text field`}))).check(...n?[h.minLength(1,{error:`Please select at least one option`})]:[],h.maxLength(e??1024,{error:({maximum:e})=>`Please select less than ${e} options`})),Ae=()=>h.optional(h.string()),je=h.object({title:h.string().check(h.trim()),description:h.string().check(h.trim()),buttonText:h.string().check(h.trim())}),Me=h.object({title:h.string(),description:h.nullable(h.string()),questions:h.array(h.object({id:h.string(),title:h.string(),description:h.nullable(h.string()),position:h.number(),required:h.boolean(),properties:pe,routingLogic:k})),confirmation:je});h.object({surveyId:h.cuid2(),responseId:h.union([h.cuid2(),h.uuid()])}),h.object({respondent:h.string().check(h.trim(),h.minLength(1),h.maxLength(2048)),data:h.record(h.string(),h.union([h.string().check(h.trim(),h.maxLength(2048)),h.number(),h.array(h.string().check(h.trim(),h.maxLength(2048))).check(h.maxLength(1024)),Se])),metadata:h.record(h.string().check(h.trim(),h.maxLength(1e3)),h.string().check(h.trim(),h.maxLength(1e3)))}),h.object({surveyId:h.cuid2(),respondent:h.string().check(h.trim(),h.minLength(1),h.maxLength(2048))}),h.object({surveyId:h.cuid2(),respondent:h.string().check(h.trim(),h.minLength(1),h.maxLength(2048))}),h.object({surveyId:h.cuid2()});const Ne=h.object({lastRespondedAt:h.nullable(h.union([h.iso.datetime(),h.date()])),lastViewedAt:h.nullable(h.union([h.iso.datetime(),h.date()])),lastDismissedAt:h.nullable(h.union([h.iso.datetime(),h.date()]))});h.object({type:h.enum([`view`,`dismiss`])});const Pe=g.create({prefixUrl:`https://confetti.gov.sg/api`,retry:{limit:3,methods:[`get`]},timeout:6e4}),Fe=i(null),Ie=({children:e,surveyId:t,publishableKey:n,respondent:r,metadata:i={},isSurveyVisible:a,apiBaseUrl:s,alwaysRenderChildren:u})=>{let m=d(!1),[h,g]=f(),[_,y]=f(!1),[b,x]=f(null),[S,C]=f(null),[w,ee]=p(`cfti:${t}:respondent`,``);c(()=>{w||ee(crypto.randomUUID())},[w,ee]);let T=l(()=>r||w,[r,w]),E=l(()=>{let e={headers:{"x-cfti-pk":n}};return s&&(e.prefixUrl=s),Pe.extend(e)},[s,n]),D=o(async()=>{if(!T)return;let e=await E.get(`v1/cfti/${t}/respondent/${T}`).json(),n=Ne.safeParse(e);n.success&&(x(n.data.lastRespondedAt?new Date(n.data.lastRespondedAt):null),C(n.data.lastDismissedAt?new Date(n.data.lastDismissedAt):null))},[E,T,t]);c(()=>{if(typeof window>`u`||typeof document>`u`)return;let e=()=>{document.visibilityState===`visible`&&D()};return document.addEventListener(`visibilitychange`,e),()=>{document.removeEventListener(`visibilitychange`,e)}},[D]),c(()=>{(async()=>{m.current=!1,y(!1),g(void 0),x(null),C(null);try{let e=await E.get(`v1/cfti/${t}`).json(),n=Me.safeParse(e);if(!n.success)return;g(n.data),await D()}catch{}finally{y(!0)}})()},[E,D,t]);let O=o(async({answers:e})=>{let n=crypto.randomUUID();await E.put(`v1/cfti/${t}/response/${n}`,{json:{respondent:T,data:e,metadata:i}})},[E,i,T,t]),te=o(()=>{u||g(void 0),E.post(`v1/cfti/${t}/respondent/${T}/event`,{json:{type:`dismiss`}}).catch(()=>{})},[u,E,T,t]),k=l(()=>_?a===void 0?!0:typeof a==`boolean`?a:a({lastRespondedAt:b,lastDismissedAt:S}):!1,[_,a,b,S]);c(()=>{m.current||k&&h&&T&&(m.current=!0,E.post(`v1/cfti/${t}/respondent/${T}/event`,{json:{type:`view`}}).catch(()=>{}))},[E,k,T,h,t]);let ne=k&&!!h;return!u&&!ne?null:v(Fe.Provider,{value:{submit:O,dismiss:te,surveyId:t,survey:h,metadata:i,isVisible:ne},children:e})},Le=e=>s(Fe)?v(_,{children:e.children}):v(Ie,{...e,surveyId:e.surveyId,publishableKey:e.publishableKey}),Re=()=>{let e=s(Fe);if(!e)throw Error(`useConfetti must be used within a ConfettiProvider`);return e},ze=i(null);i(null),i(null),i(null),i(null);const Be=i({});i(null);const Ve=i(null);function He(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function Ue(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function A(e){let t=null;return()=>(t??=e(),t)}const We=A(function(){return Ue(/^Mac/i)}),Ge=A(function(){return Ue(/^iPhone/i)}),Ke=A(function(){return Ue(/^iPad/i)||We()&&navigator.maxTouchPoints>1}),qe=A(function(){return Ge()||Ke()}),Je=A(function(){return He(/AppleWebKit/i)&&!Ye()}),Ye=A(function(){return He(/Chrome/i)}),Xe=A(function(){return He(/Android/i)}),Ze=A(function(){return He(/Firefox/i)});function Qe(e){if(et())e.focus({preventScroll:!0});else{let t=tt(e);e.focus(),nt(t)}}let $e=null;function et(){if($e==null){$e=!1;try{document.createElement(`div`).focus({get preventScroll(){return $e=!0,!0}})}catch{}}return $e}function tt(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function nt(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function rt(e,t,n=!0){let{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o}=t;Ze()&&window.event?.type?.startsWith(`key`)&&e.target===`_blank`&&(We()?r=!0:i=!0);let s=Je()&&We()&&!Ke()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:r,ctrlKey:i,altKey:a,shiftKey:o}):new MouseEvent(`click`,{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o,detail:1,bubbles:!0,cancelable:!0});rt.isOpening=n,Qe(e),e.dispatchEvent(s),rt.isOpening=!1}rt.isOpening=!1;const j=typeof document<`u`?r.useLayoutEffect:()=>{},it={prefix:String(Math.round(Math.random()*1e10)),current:0},at=r.createContext(it),ot=r.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement;let st=new WeakMap;function ct(e=!1){let t=s(at),n=d(null);if(n.current===null&&!e){let e=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let n=st.get(e);n==null?st.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,st.delete(e))}n.current=++t.current}return n.current}function lt(e){let t=s(at),n=ct(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function ut(e){let t=r.useId(),[n]=f(ht()),i=n?`react-aria`:`react-aria${it.prefix}`;return e||`${i}-${t}`}const dt=typeof r.useId==`function`?ut:lt;function ft(){return!1}function pt(){return!0}function mt(e){return()=>{}}function ht(){return typeof r.useSyncExternalStore==`function`?r.useSyncExternalStore(mt,ft,pt):s(ot)}function gt(e){let[t,n]=f(e),r=d(t),i=d(null),a=d(()=>{if(!i.current)return;let e=i.current.next();if(e.done){i.current=null;return}r.current===e.value?a.current():n(e.value)});return j(()=>{r.current=t,i.current&&a.current()}),[t,o(e=>{i.current=e(r.current),a.current()},[a])]}let _t=!!(typeof window<`u`&&window.document&&window.document.createElement),vt=new Map,yt;typeof FinalizationRegistry<`u`&&(yt=new FinalizationRegistry(e=>{vt.delete(e)}));function bt(e){let[t,n]=f(e),r=d(null),i=dt(t),a=d(null);if(yt&&yt.register(a,i),_t){let e=vt.get(i);e&&!e.includes(r)?e.push(r):vt.set(i,[r])}return j(()=>{let e=i;return()=>{yt&&yt.unregister(a),vt.delete(e)}},[i]),c(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),i}function xt(e,t){if(e===t)return e;let n=vt.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=vt.get(t);return r?(r.forEach(t=>t.current=e),e):t}function St(e=[]){let t=bt(),[n,r]=gt(t),i=o(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return j(i,[t,i,...e]),n}function Ct(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}const M=e=>e?.ownerDocument??document,N=e=>e&&`window`in e&&e.window===e?e:M(e).defaultView||window;function wt(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function Tt(e){return wt(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in e}function P(){return!1}function F(e,t){if(!P())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName===`SLOT`&&n.assignedSlot?n.assignedSlot.parentNode:Tt(n)?n.host:n.parentNode}return!1}const I=(e=document)=>{if(!P())return e.activeElement;let t=e.activeElement;for(;t&&`shadowRoot`in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function L(e){if(P()&&e.target instanceof Element&&e.target.shadowRoot){if(`composedPath`in e)return e.composedPath()[0]??null;if(`composedPath`in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function Et(e){if(!e)return!1;let t=e.getRootNode(),n=N(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let r=t.activeElement;return r!=null&&e.contains(r)}var Dt=class{constructor(e,t,n,r){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.shadowRoot;if(t){let e=this._doc.createTreeWalker(t,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(e),NodeFilter.FILTER_ACCEPT}else if(typeof this.filter==`function`)return this.filter(e);else if(this.filter?.acceptNode)return this.filter.acceptNode(e);else if(this.filter===null)return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=r??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));let i=t.shadowRoot;if(i){let e=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(e)}}get currentNode(){return this._currentNode}set currentNode(e){if(!F(this.root,e))throw Error(`Cannot set currentNode to a node that is not contained by the root node.`);let t=[],n=e,r=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=n,i=this._doc.createTreeWalker(e,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),n=r=e.host}else n=n.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();return F(e,t)?(t&&(this.currentNode=t),t):(this.currentNode=e,null)}lastChild(){let e=this._walkerStack[0].lastChild();return e&&(this.currentNode=e),e}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let t;if(typeof this.filter==`function`?t=this.filter(e):this.filter?.acceptNode&&(t=this.filter.acceptNode(e)),t===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let n=this.nextNode();return n&&(this.currentNode=n),n}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.nextNode();return e&&(this.currentNode=e),e}else return null}previousNode(){let e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null;return null}let t=e.previousNode();if(t){if(t.shadowRoot){let e;if(typeof this.filter==`function`?e=this.filter(t):this.filter?.acceptNode&&(e=this.filter.acceptNode(t)),e===NodeFilter.FILTER_ACCEPT)return t&&(this.currentNode=t),t;let n=this.lastChild();return n&&(this.currentNode=n),n}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}};function Ot(e,t,n,r){return P()?new Dt(e,t,n,r):e.createTreeWalker(t,n,r)}function kt(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=At(e,t);return n||=typeof r==`function`,r});if(n)return()=>{r.forEach((t,n)=>{typeof t==`function`?t():At(e[n],null)})}}}function At(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function R(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];typeof n==`function`&&typeof i==`function`&&e[0]===`o`&&e[1]===`n`&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=Ct(n,i):(e===`className`||e===`UNSAFE_className`)&&typeof n==`string`&&typeof i==`string`?t[e]=b(n,i):e===`id`&&n&&i?t.id=xt(n,i):e===`ref`&&n&&i?t.ref=kt(n,i):t[e]=i===void 0?n:i}}return t}const jt=new Set([`id`]),Mt=new Set([`aria-label`,`aria-labelledby`,`aria-describedby`,`aria-details`]),Nt=new Set([`href`,`hrefLang`,`target`,`rel`,`download`,`ping`,`referrerPolicy`]),Pt=new Set([`dir`,`lang`,`hidden`,`inert`,`translate`]),Ft=new Set(`onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart`.split(`.`)),It=/^(data-.*)$/;function z(e,t={}){let{labelable:n,isLink:r,global:i,events:a=i,propNames:o}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(jt.has(t)||n&&Mt.has(t)||r&&Nt.has(t)||i&&Pt.has(t)||a&&(Ft.has(t)||t.endsWith(`Capture`)&&Ft.has(t.slice(0,-7)))||o?.has(t)||It.test(t))&&(s[t]=e[t]);return s}let B=new Map,Lt=new Set;function Rt(){if(typeof window>`u`)return;function e(e){return`propertyName`in e}let t=t=>{let r=L(t);if(!e(t)||!r)return;let i=B.get(r);i||(i=new Set,B.set(r,i),r.addEventListener(`transitioncancel`,n,{once:!0})),i.add(t.propertyName)},n=t=>{let r=L(t);if(!e(t)||!r)return;let i=B.get(r);if(i&&(i.delete(t.propertyName),i.size===0&&(r.removeEventListener(`transitioncancel`,n),B.delete(r)),B.size===0)){for(let e of Lt)e();Lt.clear()}};document.body.addEventListener(`transitionrun`,t),document.body.addEventListener(`transitionend`,n)}typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,Rt):Rt());function zt(){for(let[e]of B)`isConnected`in e&&!e.isConnected&&B.delete(e)}function Bt(e){requestAnimationFrame(()=>{zt(),B.size===0?e():Lt.add(e)})}function Vt(){let e=d(new Map),t=o((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=o((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=o(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return c(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Ht(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=bt(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(` `):i&&=i.trim().split(/\s+/).join(` `),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function Ut(e){let t=d(null),n=d(void 0),r=o(t=>{if(typeof e==`function`){let n=e,r=n(t);return()=>{typeof r==`function`?r():n(null)}}else if(e)return e.current=t,()=>{e.current=null}},[e]);return l(()=>({get current(){return t.current},set current(e){t.current=e,n.current&&=(n.current(),void 0),e!=null&&(n.current=r(e))}}),[r])}const Wt=r.useInsertionEffect??j;function Gt(e){let t=d(null);return Wt(()=>{t.current=e},[e]),o((...e)=>{let n=t.current;return n?.(...e)},[])}function Kt(e,t){j(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function qt(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=document.scrollingElement||document.documentElement,i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return e===r&&n.overflow!==`hidden`&&(i=!0),i&&t&&(i=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),i}function Jt(e,t){let n=e;for(qt(n,t)&&(n=n.parentElement);n&&!qt(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}const Yt=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Xt(e){return e instanceof HTMLInputElement&&!Yt.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let V=typeof document<`u`&&window.visualViewport;function Zt(){let e=ht(),[t,n]=f(()=>e?{width:0,height:0}:Qt());return c(()=>{let e=e=>{n(t=>e.width===t.width&&e.height===t.height?t:e)},t=()=>{V&&V.scale>1||e(Qt())},r,i=t=>{V&&V.scale>1||Xt(L(t))&&(r=requestAnimationFrame(()=>{let t=I();(!t||!Xt(t))&&e({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}))};return e(Qt()),qe()&&window.addEventListener(`blur`,i,!0),V?V.addEventListener(`resize`,t):window.addEventListener(`resize`,t),()=>{cancelAnimationFrame(r),qe()&&window.removeEventListener(`blur`,i,!0),V?V.removeEventListener(`resize`,t):window.removeEventListener(`resize`,t)}},[]),t}function Qt(){return{width:V?Math.min(V.width*V.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:V?V.height*V.scale:document.documentElement.clientHeight}}function $t(e){return e.pointerType===``&&e.isTrusted?!0:Xe()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function en(e){return!Xe()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`}function tn(e,t=!0){let[n,r]=f(!0),i=n&&t;return j(()=>{if(i&&e.current&&`getAnimations`in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,i]),rn(e,i,o(()=>r(!1),[])),i}function nn(e,t){let[n,r]=f(t?`open`:`closed`);switch(n){case`open`:t||r(`exiting`);break;case`closed`:case`exiting`:t&&r(`open`);break}let i=n===`exiting`;return rn(e,i,o(()=>{r(e=>e===`exiting`?`closed`:e)},[])),i}function rn(e,t,n){j(()=>{if(t&&e.current){if(!(`getAnimations`in e.current)){n();return}let t=e.current.getAnimations();if(t.length===0){n();return}let r=!1;return Promise.allSettled(t.map(e=>e.finished)).then(()=>{r||S(()=>{n()})}),()=>{r=!0}}},[e,t,n])}const an=typeof Element<`u`&&`checkVisibility`in Element.prototype;function on(e){let t=N(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!==`none`&&r!==`hidden`&&r!==`collapse`;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);i=n!==`none`&&r!==`hidden`&&r!==`collapse`}return i}function sn(e,t){return!e.hasAttribute(`hidden`)&&!e.hasAttribute(`data-react-aria-prevent-focus`)&&(e.nodeName===`DETAILS`&&t&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0)}function cn(e,t){return an?e.checkVisibility({visibilityProperty:!0})&&!e.closest(`[data-react-aria-prevent-focus]`):e.nodeName!==`#comment`&&on(e)&&sn(e,t)&&(!e.parentElement||cn(e.parentElement,e))}const ln=[`input:not([disabled]):not([type=hidden])`,`select:not([disabled])`,`textarea:not([disabled])`,`button:not([disabled])`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable^="false"])`,`permission`],un=ln.join(`:not([hidden]),`)+`,[tabindex]:not([disabled]):not([hidden])`;ln.push(`[tabindex]:not([tabindex="-1"]):not([disabled])`);const dn=ln.join(`:not([hidden]):not([tabindex="-1"]),`);function fn(e,t){return e.matches(un)&&!mn(e)&&(t?.skipVisibilityCheck||cn(e))}function pn(e){return e.matches(dn)&&cn(e)&&!mn(e)}function mn(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function hn(e){return e?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let gn=new WeakMap;function _n(e){let t=e??(typeof document<`u`?document:void 0);if(!t)return hn(t);if(gn.has(t))return gn.get(t);let n=t.querySelector(`meta[property="csp-nonce"]`),r=n&&n instanceof N(n).HTMLMetaElement&&(n.nonce||n.content)||hn(t)||void 0;return r!==void 0&&gn.set(t,r),r}const vn=Symbol(`default`);function yn({values:e,children:t}){for(let[n,i]of e)t=r.createElement(n.Provider,{value:i},t);return t}function bn(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:c}=e;return l(()=>{let e,l,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,l=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:l||o?{...o,...l}:void 0,children:u??a,"data-rac":``,render:c?e=>c(e,s):void 0}},[t,n,r,i,a,o,s,c])}function xn(e,t){return n=>t(typeof e==`function`?e(n):e,n)}function Sn(e,t){let n=s(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||vn;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function Cn(e,t,n){let{ref:r,...i}=Sn(n,e.slot)||{},a=Ut(l(()=>kt(t,r),[t,r])),o=R(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(typeof i.style==`function`||typeof e.style==`function`?o.style=t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:o.style={...i.style,...e.style}),[o,a]}function wn(e=!0){let[t,n]=f(e),r=d(!1),i=o(e=>{r.current=!0,n(!!e)},[]);return j(()=>{r.current||n(!1)},[]),[i,t]}function Tn(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}function En(e,t,n){let{render:i,...a}=t,o=d(null),s=l(()=>kt(n,o),[n,o]);j(()=>{},[e,i]);let c={...a,ref:s};return i?i(c,void 0):r.createElement(e,c)}const Dn={},On=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=Dn[t];return n||(n=a(En.bind(null,t)),Dn[t]=n),n}}),kn=typeof HTMLElement<`u`&&`inert`in HTMLElement.prototype;function An(e){return e.dataset.liveAnnouncer===`true`||e.dataset.reactAriaTopLayer!==void 0}let jn=new WeakMap,H=[];function Mn(e,t){let n=N(e?.[0]),r=t instanceof n.Element?{root:t}:t,i=r?.root??document.body,a=r?.shouldUseInert&&kn,o=new Set(e),s=new Set,c=e=>a&&e instanceof n.HTMLElement?e.inert:e.getAttribute(`aria-hidden`)===`true`,l=(e,t)=>{a&&e instanceof n.HTMLElement?e.inert=t:t?e.setAttribute(`aria-hidden`,`true`):(e.removeAttribute(`aria-hidden`),e instanceof n.HTMLElement&&(e.inert=!1))},u=new Set;if(P())for(let t of e){let e=t;for(;e&&e!==i;){let t=e.getRootNode();`shadowRoot`in t&&u.add(t.shadowRoot),e=t.parentNode}}let d=e=>{for(let t of e.querySelectorAll(`[data-live-announcer], [data-react-aria-top-layer]`))o.add(t);let t=e=>{if(s.has(e)||o.has(e)||e.parentElement&&s.has(e.parentElement)&&e.parentElement.getAttribute(`role`)!==`row`)return NodeFilter.FILTER_REJECT;for(let t of o)if(F(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=Ot(M(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),r=t(e);if(r===NodeFilter.FILTER_ACCEPT&&f(e),r!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;e!=null;)f(e),e=n.nextNode()}},f=e=>{let t=jn.get(e)??0;c(e)&&t===0||(t===0&&l(e,!0),s.add(e),jn.set(e,t+1))};H.length&&H[H.length-1].disconnect(),d(i);let p=new MutationObserver(e=>{for(let t of e)if(t.type===`childList`){if(t.target.isConnected&&![...o,...s].some(e=>F(e,t.target)))for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&An(e)?o.add(e):e instanceof Element&&d(e);if(P()){for(let e of u)if(!e.isConnected){p.disconnect();break}}}});p.observe(i,{childList:!0,subtree:!0});let m=new Set;if(P())for(let e of u){let t=new MutationObserver(e=>{for(let t of e)if(t.type===`childList`){if(t.target.isConnected&&![...o,...s].some(e=>F(e,t.target)))for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&An(e)?o.add(e):e instanceof Element&&d(e);if(P()){for(let e of u)if(!e.isConnected){p.disconnect();break}}}});t.observe(e,{childList:!0,subtree:!0}),m.add(t)}let h={visibleNodes:o,hiddenNodes:s,observe(){p.observe(i,{childList:!0,subtree:!0})},disconnect(){p.disconnect()}};return H.push(h),()=>{if(p.disconnect(),P())for(let e of m)e.disconnect();for(let e of s){let t=jn.get(e);t!=null&&(t===1?(l(e,!1),jn.delete(e)):jn.set(e,t-1))}h===H[H.length-1]?(H.pop(),H.length&&H[H.length-1].observe()):H.splice(H.indexOf(h),1)}}const Nn=new Set([`Arab`,`Syrc`,`Samr`,`Mand`,`Thaa`,`Mend`,`Nkoo`,`Adlm`,`Rohg`,`Hebr`]),Pn=new Set([`ae`,`ar`,`arc`,`bcc`,`bqi`,`ckb`,`dv`,`fa`,`glk`,`he`,`ku`,`mzn`,`nqo`,`pnb`,`ps`,`sd`,`ug`,`ur`,`yi`]);function Fn(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n=typeof t.getTextInfo==`function`?t.getTextInfo():t.textInfo;if(n)return n.direction===`rtl`;if(t.script)return Nn.has(t.script)}let t=e.split(`-`)[0];return Pn.has(t)}const In=Symbol.for(`react-aria.i18n.locale`);function Ln(){let e=typeof window<`u`&&window[In]||typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`;try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e=`en-US`}return{locale:e,direction:Fn(e)?`rtl`:`ltr`}}let Rn=Ln(),zn=new Set;function Bn(){Rn=Ln();for(let e of zn)e(Rn)}function Vn(){let e=ht(),[t,n]=f(Rn);return c(()=>(zn.size===0&&window.addEventListener(`languagechange`,Bn),zn.add(n),()=>{zn.delete(n),zn.size===0&&window.removeEventListener(`languagechange`,Bn)}),[]),e?{locale:typeof window<`u`&&window[In]||`en-US`,direction:`ltr`}:t}const Hn=r.createContext(null);function Un(){let e=Vn();return s(Hn)||e}const Wn=Symbol.for(`react-aria.i18n.locale`),Gn=Symbol.for(`react-aria.i18n.strings`);let Kn;var qn=class e{constructor(e,t=`en-US`){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=Jn(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(t){if(typeof window>`u`)return null;let n=window[Wn];if(Kn===void 0){let t=window[Gn];if(!t)return null;for(let r in Kn={},t)Kn[r]=new e({[n]:t[r]},n)}let r=Kn?.[t];if(!r)throw Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}};function Jn(e,t,n=`en-US`){if(t[e])return t[e];let r=Yn(e);if(t[r])return t[r];for(let e in t)if(e.startsWith(r+`-`))return t[e];return t[n]}function Yn(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}const Xn=new Map,Zn=new Map;var Qn=class{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n==`function`?n(t,this):n}plural(e,t,n=`cardinal`){let r=t[`=`+e];if(r)return typeof r==`function`?r():r;let i=this.locale+`:`+n,a=Xn.get(i);return a||(a=new Intl.PluralRules(this.locale,{type:n}),Xn.set(i,a)),r=t[a.select(e)]||t.other,typeof r==`function`?r():r}number(e){let t=Zn.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),Zn.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n==`function`?n():n}};const $n=new WeakMap;function er(e){let t=$n.get(e);return t||(t=new qn(e),$n.set(e,t)),t}function tr(e,t){return t&&qn.getGlobalDictionaryForPackage(t)||er(e)}function nr(e,t){let{locale:n}=Un(),r=tr(e,t);return l(()=>new Qn(n,r),[n,r])}function rr(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function ir(e,t){Object.defineProperty(e,`target`,{value:t}),Object.defineProperty(e,`currentTarget`,{value:t})}function ar(e){let t=d({isFocused:!1,observer:null});return j(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]),o(n=>{let r=L(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r;n.addEventListener(`focusout`,r=>{if(t.current.isFocused=!1,n.disabled){let t=rr(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer?.disconnect();let e=n===I()?null:I();n.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:e})),n.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:[`disabled`]})}},[e])}let or=!1;function sr(e){for(;e&&!fn(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=N(e),n=t.document.activeElement;if(!n||n===e)return;or=!0;let r=!1,i=e=>{(L(e)===n||r)&&e.stopImmediatePropagation()},a=t=>{(L(t)===n||r)&&(t.stopImmediatePropagation(),!e&&!r&&(r=!0,Qe(n),c()))},o=t=>{(L(t)===e||r)&&t.stopImmediatePropagation()},s=t=>{(L(t)===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,Qe(n),c()))};t.addEventListener(`blur`,i,!0),t.addEventListener(`focusout`,a,!0),t.addEventListener(`focusin`,s,!0),t.addEventListener(`focus`,o,!0);let c=()=>{cancelAnimationFrame(l),t.removeEventListener(`blur`,i,!0),t.removeEventListener(`focusout`,a,!0),t.removeEventListener(`focusin`,s,!0),t.removeEventListener(`focus`,o,!0),or=!1,r=!1},l=requestAnimationFrame(c);return c}let cr=`default`,lr=``,ur=new WeakMap;function dr(e){if(qe()){if(cr===`default`){let t=M(e);lr=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect=`none`}cr=`disabled`}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;ur.set(e,e.style[t]),e.style[t]=`none`}}function fr(e){if(qe()){if(cr!==`disabled`)return;cr=`restoring`,setTimeout(()=>{Bt(()=>{if(cr===`restoring`){let t=M(e);t.documentElement.style.webkitUserSelect===`none`&&(t.documentElement.style.webkitUserSelect=lr||``),lr=``,cr=`default`}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&ur.has(e)){let t=ur.get(e),n=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;e.style[n]===`none`&&(e.style[n]=t),e.getAttribute(`style`)===``&&e.removeAttribute(`style`),ur.delete(e)}}const pr=r.createContext({register:()=>{}});pr.displayName=`PressResponderContext`;function mr(e){let t=s(pr);if(t){let{register:n,ref:r,...i}=t;e=R(i,e),n()}return Kt(t,e.ref),e}var hr=class{#e;constructor(e,t,n,r){this.#e=!0;let i=(r?.target??n.currentTarget)?.getBoundingClientRect(),a,o=0,s,c=null;n.clientX!=null&&n.clientY!=null&&(s=n.clientX,c=n.clientY),i&&(s!=null&&c!=null?(a=s-i.left,o=c-i.top):(a=i.width/2,o=i.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=a,this.y=o,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}};const gr=Symbol(`linkClicked`),_r=`react-aria-pressable-style`,vr=`data-react-aria-pressable`;function yr(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,onClick:s,isDisabled:u,isPressed:p,preventFocusOnPress:m,shouldCancelOnPointerExit:h,allowTextSelectionOnPress:g,ref:_,...v}=mr(e),[y,b]=f(!1),x=d({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:S,removeAllGlobalListeners:C}=Vt(),w=o((e,t)=>{let i=x.current;if(u||i.didFirePressStart)return!1;let a=!0;if(i.isTriggeringEvent=!0,r){let n=new hr(`pressstart`,t,e);r(n),a=n.shouldStopPropagation}return n&&n(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,b(!0),a},[u,r,n]),ee=o((e,r,a=!0)=>{let o=x.current;if(!o.didFirePressStart)return!1;o.didFirePressStart=!1,o.isTriggeringEvent=!0;let s=!0;if(i){let t=new hr(`pressend`,r,e);i(t),s=t.shouldStopPropagation}if(n&&n(!1),b(!1),t&&a&&!u){let n=new hr(`press`,r,e);t(n),s&&=n.shouldStopPropagation}return o.isTriggeringEvent=!1,s},[u,i,n,t]),T=Gt(ee),E=Gt(o((e,t)=>{let n=x.current;if(u)return!1;if(a){n.isTriggeringEvent=!0;let r=new hr(`pressup`,t,e);return a(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0},[u,a])),D=o(e=>{let t=x.current;if(t.isPressed&&t.target){t.didFirePressStart&&t.pointerType!=null&&ee(U(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,C(),g||fr(t.target);for(let e of t.disposables)e();t.disposables=[]}},[g,C,ee]),O=Gt(D),te=o(e=>{h&&D(e)},[h,D]),k=o(e=>{u||s?.(e)},[u,s]),ne=o((e,t)=>{if(!u&&s){let n=new MouseEvent(`click`,e);ir(n,t),s(rr(n))}},[u,s]),re=l(()=>{let e=x.current,t={onKeyDown(t){if(xr(t.nativeEvent,t.currentTarget)&&F(t.currentTarget,L(t))){Cr(L(t),t.key)&&t.preventDefault();let r=!0;!e.isPressed&&!t.repeat&&(e.target=t.currentTarget,e.isPressed=!0,e.pointerType=`keyboard`,r=w(t,`keyboard`));let i=t.currentTarget;S(M(t.currentTarget),`keyup`,Ct(t=>{xr(t,i)&&!t.repeat&&F(i,L(t))&&e.target&&E(U(e.target,t),`keyboard`)},n),!0),r&&t.stopPropagation(),t.metaKey&&We()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else t.key===`Meta`&&(e.metaKeyEvents=new Map)},onClick(t){if(!(t&&!F(t.currentTarget,L(t)))&&t&&t.button===0&&!e.isTriggeringEvent&&!rt.isOpening){let n=!0;if(u&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType===`virtual`||$t(t.nativeEvent))){let e=w(t,`virtual`),r=E(t,`virtual`),i=T(t,`virtual`);k(t),n=e&&r&&i}else if(e.isPressed&&e.pointerType!==`keyboard`){let r=e.pointerType||t.nativeEvent.pointerType||`virtual`,i=E(U(t.currentTarget,t),r),a=T(U(t.currentTarget,t),r,!0);n=i&&a,e.isOverTarget=!1,k(t),O(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{if(e.isPressed&&e.target&&xr(t,e.target)){Cr(L(t),t.key)&&t.preventDefault();let n=L(t),r=F(e.target,n);T(U(e.target,t),`keyboard`,r),r&&ne(t,e.target),C(),t.key!==`Enter`&&br(e.target)&&F(e.target,n)&&!t[gr]&&(t[gr]=!0,rt(e.target,t,!1)),e.isPressed=!1,e.metaKeyEvents?.delete(t.key)}else if(t.key===`Meta`&&e.metaKeyEvents?.size){let t=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let n of t.values())e.target?.dispatchEvent(new KeyboardEvent(`keyup`,n))}};if(typeof PointerEvent<`u`){t.onPointerDown=t=>{if(t.button!==0||!F(t.currentTarget,L(t)))return;if(en(t.nativeEvent)){e.pointerType=`virtual`;return}e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,g||dr(e.target),i=w(t,e.pointerType);let a=L(t);`releasePointerCapture`in a&&(`hasPointerCapture`in a?a.hasPointerCapture(t.pointerId)&&a.releasePointerCapture(t.pointerId):a.releasePointerCapture(t.pointerId)),S(M(t.currentTarget),`pointerup`,n,!1),S(M(t.currentTarget),`pointercancel`,r,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(F(t.currentTarget,L(t))&&t.button===0){if(m){let n=sr(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{!F(t.currentTarget,L(t))||e.pointerType===`virtual`||t.button===0&&!e.isPressed&&E(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,w(U(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,T(U(e.target,t),e.pointerType,!1),te(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&t.button===0&&e.target){if(F(e.target,L(t))&&e.pointerType!=null){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?O(t):(Qe(e.target),e.target.click()))},80);S(t.currentTarget,`click`,()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else O(t);e.isOverTarget=!1}},r=e=>{O(e)};t.onDragStart=e=>{F(e.currentTarget,L(e))&&O(e)}}return t},[S,u,m,C,g,te,w,k,ne]);return c(()=>{if(!_)return;let e=M(_.current);if(!e||!e.head||e.getElementById(_r))return;let t=e.createElement(`style`);t.id=_r;let n=_n(e);n&&(t.nonce=n),t.textContent=`
|
|
2
|
+
@layer {
|
|
3
|
+
[${vr}] {
|
|
4
|
+
touch-action: pan-x pan-y pinch-zoom;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
`.trim(),e.head.prepend(t)},[_]),c(()=>{let e=x.current;return()=>{g||fr(e.target??void 0);for(let t of e.disposables)t();e.disposables=[]}},[g]),{isPressed:p||y,pressProps:R(v,re,{[vr]:!0})}}function br(e){return e.tagName===`A`&&e.hasAttribute(`href`)}function xr(e,t){let{key:n,code:r}=e,i=t,a=i.getAttribute(`role`);return(n===`Enter`||n===` `||n===`Spacebar`||r===`Space`)&&!(i instanceof N(i).HTMLInputElement&&!Tr(i,n)||i instanceof N(i).HTMLTextAreaElement||i.isContentEditable)&&!((a===`link`||!a&&br(i))&&n!==`Enter`)}function U(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r,key:t.key}}function Sr(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!==`submit`&&e.type!==`reset`:!br(e)}function Cr(e,t){return e instanceof HTMLInputElement?!Tr(e,t):Sr(e)}const wr=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Tr(e,t){return e.type===`checkbox`||e.type===`radio`?t===` `:wr.has(e.type)}let W=null;const Er=new Set;let Dr=new Map,G=!1,Or=!1;const kr={Tab:!0,Escape:!0};function Ar(e,t){for(let n of Er)n(e,t)}function jr(e){return!(e.metaKey||!We()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}function Mr(e){G=!0,!rt.isOpening&&jr(e)&&(W=`keyboard`,Ar(`keyboard`,e))}function Nr(e){W=`pointer`,`pointerType`in e&&e.pointerType,(e.type===`mousedown`||e.type===`pointerdown`)&&(G=!0,Ar(`pointer`,e))}function Pr(e){!rt.isOpening&&$t(e)&&(G=!0,W=`virtual`)}function Fr(e){let t=N(L(e)),n=M(L(e));L(e)===t||L(e)===n||or||!e.isTrusted||(!G&&!Or&&(W=`virtual`,Ar(`virtual`,e)),G=!1,Or=!1)}function Ir(){or||(G=!1,Or=!0)}function Lr(e){if(typeof window>`u`||typeof document>`u`)return;let t=N(e),n=M(e);if(Dr.get(t))return;let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){G=!0,r.apply(this,arguments)},n.addEventListener(`keydown`,Mr,!0),n.addEventListener(`keyup`,Mr,!0),n.addEventListener(`click`,Pr,!0),t.addEventListener(`focus`,Fr,!0),t.addEventListener(`blur`,Ir,!1),typeof PointerEvent<`u`&&(n.addEventListener(`pointerdown`,Nr,!0),n.addEventListener(`pointermove`,Nr,!0),n.addEventListener(`pointerup`,Nr,!0)),t.addEventListener(`beforeunload`,()=>{Rr(e)},{once:!0}),Dr.set(t,{focus:r})}const Rr=(e,t)=>{let n=N(e),r=M(e);t&&r.removeEventListener(`DOMContentLoaded`,t),Dr.has(n)&&(n.HTMLElement.prototype.focus=Dr.get(n).focus,r.removeEventListener(`keydown`,Mr,!0),r.removeEventListener(`keyup`,Mr,!0),r.removeEventListener(`click`,Pr,!0),n.removeEventListener(`focus`,Fr,!0),n.removeEventListener(`blur`,Ir,!1),typeof PointerEvent<`u`&&(r.removeEventListener(`pointerdown`,Nr,!0),r.removeEventListener(`pointermove`,Nr,!0),r.removeEventListener(`pointerup`,Nr,!0)),Dr.delete(n))};function zr(e){let t=M(e),n;return t.readyState===`loading`?(n=()=>{Lr(e)},t.addEventListener(`DOMContentLoaded`,n)):Lr(e),()=>Rr(e,n)}typeof document<`u`&&zr();function Br(){return W!==`pointer`}function Vr(){return W}function Hr(e){W=e,Ar(e,null)}const Ur=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Wr(e,t,n){let r=n?L(n):void 0,i=M(r),a=N(r),o=a===void 0?HTMLInputElement:a.HTMLInputElement,s=a===void 0?HTMLTextAreaElement:a.HTMLTextAreaElement,c=a===void 0?HTMLElement:a.HTMLElement,l=a===void 0?KeyboardEvent:a.KeyboardEvent,u=I(i);return e=e||u instanceof o&&!Ur.has(u.type)||u instanceof s||u instanceof c&&u.isContentEditable,!(e&&t===`keyboard`&&n instanceof l&&!kr[n.key])}function Gr(e,t,n){Lr(),c(()=>{if(n?.enabled===!1)return;let t=(t,r)=>{Wr(!!n?.isTextInput,t,r)&&e(Br())};return Er.add(t),()=>{Er.delete(t)}},t)}function Kr(e){if(!e.isConnected)return;let t=M(e);if(Vr()===`virtual`){let n=I(t);Bt(()=>{let r=I(t);(r===n||r===t.body)&&e.isConnected&&Qe(e)})}else Qe(e)}const qr=r.createContext(null),Jr=`react-aria-focus-scope-restore`;let K=null;function Yr(e){let{children:t,contain:n,restoreFocus:i,autoFocus:a}=e,o=d(null),u=d(null),f=d([]),{parentNode:p}=s(qr)||{},m=l(()=>new fi({scopeRef:f}),[f]);j(()=>{let e=p||Q.root;if(Q.getTreeNode(e.scopeRef)&&K&&!ri(K,e.scopeRef)){let t=Q.getTreeNode(K);t&&(e=t)}e.addChild(m),Q.addNode(m)},[m,p]),j(()=>{let e=Q.getTreeNode(f);e&&(e.contain=!!n)},[n]),j(()=>{let e=o.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==u.current;)t.push(e),e.addEventListener(Jr,n),e=e.nextSibling;return f.current=t,()=>{for(let e of t)e.removeEventListener(Jr,n)}},[t]),si(f,i,n),ei(f,n),li(f,i,n),oi(f,a),c(()=>{let e=I(M(f.current?f.current[0]:void 0)),t=null;if(J(e,f.current)){for(let n of Q.traverse())n.scopeRef&&J(e,n.scopeRef.current)&&(t=n);t===Q.getTreeNode(f)&&(K=t.scopeRef)}},[f]),j(()=>()=>{let e=Q.getTreeNode(f)?.parent?.scopeRef??null;(f===K||ri(f,K))&&(!e||Q.getTreeNode(e))&&(K=e),Q.removeTreeNode(f)},[f]);let h=l(()=>Xr(f),[]),g=l(()=>({focusManager:h,parentNode:m}),[m,h]);return r.createElement(qr.Provider,{value:g},r.createElement(`span`,{"data-focus-scope-start":!0,hidden:!0,ref:o}),t,r.createElement(`span`,{"data-focus-scope-end":!0,hidden:!0,ref:u}))}function Xr(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||I(M(n[0]??void 0)),c=n[0].previousElementSibling,l=Z(q(n),{tabbable:i,accept:o},n);l.currentNode=J(s,n)?s:c;let u=l.nextNode();return!u&&a&&(l.currentNode=c,u=l.nextNode()),u&&X(u,!0),u},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||I(M(n[0]??void 0)),c=n[n.length-1].nextElementSibling,l=Z(q(n),{tabbable:i,accept:o},n);l.currentNode=J(s,n)?s:c;let u=l.previousNode();return!u&&a&&(l.currentNode=c,u=l.previousNode()),u&&X(u,!0),u},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=Z(q(n),{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let o=a.nextNode();return o&&X(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=Z(q(n),{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let o=a.previousNode();return o&&X(o,!0),o}}}function q(e){return e[0].parentElement}function Zr(e){let t=Q.getTreeNode(K);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function Qr(e){if(!e.form)return Array.from(M(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),n=N(e);return t instanceof n.RadioNodeList?Array.from(t).filter(e=>e instanceof n.HTMLInputElement):t instanceof n.HTMLInputElement?[t]:[]}function $r(e){if(e.checked)return!0;let t=Qr(e);return t.length>0&&!t.some(e=>e.checked)}function ei(e,t){let n=d(void 0),r=d(void 0);j(()=>{let i=e.current;if(!t){r.current&&=(cancelAnimationFrame(r.current),void 0);return}let a=M(i?i[0]:void 0),o=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!Zr(e)||t.isComposing)return;let n=I(a),r=e.current;if(!r||!J(n,r))return;let i=Z(q(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let o=t.shiftKey?i.previousNode():i.nextNode();o||=(i.currentNode=t.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,t.shiftKey?i.previousNode():i.nextNode()),t.preventDefault(),o&&(X(o,!0),o instanceof N(o).HTMLInputElement&&o.select())},s=t=>{(!K||ri(K,e))&&J(L(t),e.current)?(K=e,n.current=L(t)):Zr(e)&&!Y(L(t),e)?n.current?n.current.focus():K&&K.current&&ai(K.current):Zr(e)&&(n.current=L(t))},c=t=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let r=Vr(),i=(r===`virtual`||r===null)&&Xe()&&Ye(),o=I(a);if(!i&&o&&Zr(e)&&!Y(o,e)){K=e;let r=L(t);r&&r.isConnected?(n.current=r,n.current?.focus()):K.current&&ai(K.current)}})};return a.addEventListener(`keydown`,o,!1),a.addEventListener(`focusin`,s,!1),i?.forEach(e=>e.addEventListener(`focusin`,s,!1)),i?.forEach(e=>e.addEventListener(`focusout`,c,!1)),()=>{a.removeEventListener(`keydown`,o,!1),a.removeEventListener(`focusin`,s,!1),i?.forEach(e=>e.removeEventListener(`focusin`,s,!1)),i?.forEach(e=>e.removeEventListener(`focusout`,c,!1))}},[e,t]),j(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function ti(e){return Y(e)}function J(e,t){return!e||!t?!1:t.some(t=>F(t,e))}function Y(e,t=null){if(e instanceof Element&&e.closest(`[data-react-aria-top-layer]`))return!0;for(let{scopeRef:n}of Q.traverse(Q.getTreeNode(t)))if(n&&J(e,n.current))return!0;return!1}function ni(e){return Y(e,K)}function ri(e,t){let n=Q.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function X(e,t=!1){if(e!=null&&!t)try{Kr(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function ii(e,t=!0){let n=e[0].previousElementSibling,r=q(e),i=Z(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();return t&&!a&&(r=q(e),i=Z(r,{tabbable:!1},e),i.currentNode=n,a=i.nextNode()),a}function ai(e,t=!0){X(ii(e,t))}function oi(e,t){let n=r.useRef(t);c(()=>{n.current&&(K=e,!J(I(M(e.current?e.current[0]:void 0)),K.current)&&e.current&&ai(e.current)),n.current=!1},[e])}function si(e,t,n){j(()=>{if(t||n)return;let r=e.current,i=M(r?r[0]:void 0),a=t=>{let n=L(t);J(n,e.current)?K=e:ti(n)||(K=null)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,t,n])}function ci(e){let t=Q.getTreeNode(K);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function li(e,t,n){let r=d(typeof document<`u`?I(M(e.current?e.current[0]:void 0)):null);j(()=>{let r=e.current,i=M(r?r[0]:void 0);if(!t||n)return;let a=()=>{(!K||ri(K,e))&&J(I(i),e.current)&&(K=e)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,n]),j(()=>{let r=M(e.current?e.current[0]:void 0);if(!t)return;let i=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!Zr(e)||t.isComposing)return;let n=r.activeElement;if(!Y(n,e)||!ci(e))return;let i=Q.getTreeNode(e);if(!i)return;let a=i.nodeToRestore,o=Z(r.body,{tabbable:!0});o.currentNode=n;let s=t.shiftKey?o.previousNode():o.nextNode();if((!a||!a.isConnected||a===r.body)&&(a=void 0,i.nodeToRestore=void 0),(!s||!Y(s,e))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(Y(s,e));t.preventDefault(),t.stopPropagation(),s?X(s,!0):ti(a)?X(a,!0):n.blur()}};return n||r.addEventListener(`keydown`,i,!0),()=>{n||r.removeEventListener(`keydown`,i,!0)}},[e,t,n]),j(()=>{let n=M(e.current?e.current[0]:void 0);if(!t)return;let i=Q.getTreeNode(e);if(i)return i.nodeToRestore=r.current??void 0,()=>{let r=Q.getTreeNode(e);if(!r)return;let i=r.nodeToRestore,a=I(n);if(t&&i&&(a&&Y(a,e)||a===n.body&&ci(e))){let t=Q.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=t.getTreeNode(e);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected){ui(n.nodeToRestore);return}n=n.parent}for(n=t.getTreeNode(e);n;){if(n.scopeRef&&n.scopeRef.current&&Q.getTreeNode(n.scopeRef)){ui(ii(n.scopeRef.current,!0));return}n=n.parent}}})}}},[e,t])}function ui(e){e.dispatchEvent(new CustomEvent(Jr,{bubbles:!0,cancelable:!0}))&&X(e)}function Z(e,t,n){let r=t?.tabbable?pn:fn,i=M(e?.nodeType===Node.ELEMENT_NODE?e:null),a=Ot(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return F(t?.from,e)||t?.tabbable&&e.tagName===`INPUT`&&e.getAttribute(`type`)===`radio`&&(!$r(e)||a.currentNode.tagName===`INPUT`&&a.currentNode.type===`radio`&&a.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:r(e)&&(!n||J(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}var di=class e{constructor(){this.fastMap=new Map,this.root=new fi({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let i=new fi({scopeRef:e});r.addChild(i),i.parent=r,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&J(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let t=new e;for(let e of this.traverse())t.addTreeNode(e.scopeRef,e.parent?.scopeRef??null,e.nodeToRestore);return t}},fi=class{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}};let Q=new di;function pi(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=o(e=>{if(L(e)===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),s=ar(a),c=o(e=>{let t=L(e),r=M(t),a=r?I(r):I();t===e.currentTarget&&t===a&&(n&&n(e),i&&i(!0),s(e))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?c:void 0,onBlur:!t&&(r||i)?a:void 0}}}function mi(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}}),t&&n.stopPropagation()}}function hi(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:mi(e.onKeyDown),onKeyUp:mi(e.onKeyUp)}}}let gi=r.createContext(null);function _i(e){let t=s(gi)||{};Kt(t,e);let{ref:n,...r}=t;return r}function vi(e,t){let{focusProps:n}=pi(e),{keyboardProps:r}=hi(e),i=R(n,r),a=_i(t),o=e.isDisabled?{}:a,s=d(e.autoFocus);c(()=>{s.current&&t.current&&Kr(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:R({...i,tabIndex:l},o)}}const yi=typeof document<`u`?r.useInsertionEffect??r.useLayoutEffect:()=>{};function bi(e,t,n){let[r,i]=f(e||t),a=d(r),s=d(e!==void 0),l=e!==void 0;c(()=>{s.current,s.current=l},[l]);let p=l?e:r;yi(()=>{a.current=p});let[,m]=u(()=>({}),{});return[p,o((e,...t)=>{let r=typeof e==`function`?e(a.current):e;Object.is(a.current,r)||(a.current=r,i(r),m(),n?.(r,...t))},[n])]}function xi(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=d({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:c}=Vt(),l=o(e=>{F(e.currentTarget,L(e))&&a.current.isFocusWithin&&!F(e.currentTarget,e.relatedTarget)&&(a.current.isFocusWithin=!1,c(),n&&n(e),i&&i(!1))},[n,i,a,c]),u=ar(l),f=o(e=>{if(!F(e.currentTarget,L(e)))return;let t=L(e),n=M(t),o=I(n);if(!a.current.isFocusWithin&&o===t){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,u(e);let t=e.currentTarget;s(n,`focus`,e=>{let r=L(e);if(a.current.isFocusWithin&&!F(t,r)){let e=new n.defaultView.FocusEvent(`blur`,{relatedTarget:r});ir(e,t),l(rr(e))}},{capture:!0})}},[r,i,u,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:f,onBlur:l}}}function Si(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=d({isFocused:!1,isFocusVisible:t||Br()}),[a,s]=f(!1),[c,l]=f(()=>i.current.isFocused&&i.current.isFocusVisible),u=o(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),p=o(e=>{i.current.isFocused=e,i.current.isFocusVisible=Br(),s(e),u()},[u]);Gr(e=>{i.current.isFocusVisible=e,u()},[n,a],{enabled:a,isTextInput:n});let{focusProps:m}=pi({isDisabled:r,onFocusChange:p}),{focusWithinProps:h}=xi({isDisabled:!r,onFocusWithinChange:p});return{isFocused:a,isFocusVisible:c,focusProps:r?h:m}}function Ci({children:e}){let t=l(()=>({register:()=>{}}),[]);return r.createElement(pr.Provider,{value:t},e)}let wi=!1,Ti=0;function Ei(){wi=!0,setTimeout(()=>{wi=!1},500)}function Di(e){e.pointerType===`touch`&&Ei()}function Oi(){let e=M(null);if(e!==void 0)return Ti===0&&typeof PointerEvent<`u`&&e.addEventListener(`pointerup`,Di),Ti++,()=>{Ti--,!(Ti>0)&&typeof PointerEvent<`u`&&e.removeEventListener(`pointerup`,Di)}}function ki(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=f(!1),s=d({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;c(Oi,[]);let{addGlobalListener:u,removeAllGlobalListeners:p}=Vt(),{hoverProps:m,triggerHoverEnd:h}=l(()=>{let e=(e,r)=>{if(s.pointerType=r,i||r===`touch`||s.isHovered||!F(e.currentTarget,L(e)))return;s.isHovered=!0;let c=e.currentTarget;s.target=c,u(M(L(e)),`pointerover`,e=>{s.isHovered&&s.target&&!F(s.target,L(e))&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:c,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=s.target;s.pointerType=``,s.target=null,!(t===`touch`||!s.isHovered||!i)&&(s.isHovered=!1,p(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},c={};return typeof PointerEvent<`u`&&(c.onPointerEnter=t=>{wi&&t.pointerType===`mouse`||e(t,t.pointerType)},c.onPointerLeave=e=>{!i&&F(e.currentTarget,L(e))&&a(e,e.pointerType)}),{hoverProps:c,triggerHoverEnd:a}},[t,n,r,i,s,u,p]);return c(()=>{i&&h({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:m,isHovered:a}}function Ai(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,a=d({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=Gt(e=>{n&&ji(e,t)&&(i&&i(e),a.current.isPointerDown=!0)}),s=Gt(e=>{n&&n(e)});c(()=>{let e=a.current;if(r)return;let n=t.current,i=M(n);if(typeof PointerEvent<`u`){let n=n=>{e.isPointerDown&&ji(n,t)&&s(n),e.isPointerDown=!1};return i.addEventListener(`pointerdown`,o,!0),i.addEventListener(`click`,n,!0),()=>{i.removeEventListener(`pointerdown`,o,!0),i.removeEventListener(`click`,n,!0)}}},[t,r])}function ji(e,t){if(e.button>0)return!1;let n=L(e);if(n){let e=n.ownerDocument;if(!e||!F(e.documentElement,n)||n.closest(`[data-react-aria-top-layer]`))return!1}return t.current?!e.composedPath().includes(t.current):!1}typeof HTMLTemplateElement<`u`&&(Object.defineProperty(HTMLTemplateElement.prototype,`firstChild`,{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,`appendChild`,{configurable:!0,enumerable:!0,value:function(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,`removeChild`,{configurable:!0,enumerable:!0,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,`insertBefore`,{configurable:!0,enumerable:!0,value:function(e,t){return this.content.insertBefore(e,t)}}));const Mi=i(!1);function Ni(e){let t=(t,n)=>s(Mi)?null:e(t,n);return t.displayName=e.displayName||e.name,a(t)}function Pi(e,t){let{elementType:n=`button`,isDisabled:r,onPress:i,onPressStart:a,onPressEnd:o,onPressUp:s,onPressChange:c,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:d,href:f,target:p,rel:m,type:h=`button`}=e,g;g=n===`button`?{type:h,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:`button`,href:n===`a`&&!r?f:void 0,target:n===`a`?p:void 0,type:n===`input`?h:void 0,disabled:n===`input`?r:void 0,"aria-disabled":!r||n===`input`?void 0:r,rel:n===`a`?m:void 0};let{pressProps:_,isPressed:v}=yr({onPressStart:a,onPressEnd:o,onPressChange:c,onPress:i,onPressUp:s,onClick:d,isDisabled:r,preventFocusOnPress:l,ref:t}),{focusableProps:y}=vi(e,t);u&&(y.tabIndex=r?-1:y.tabIndex);let b=R(y,_,z(e,{labelable:!0}));return{isPressed:v,buttonProps:R(g,b,{"aria-haspopup":e[`aria-haspopup`],"aria-expanded":e[`aria-expanded`],"aria-controls":e[`aria-controls`],"aria-pressed":e[`aria-pressed`],"aria-current":e[`aria-current`],"aria-disabled":e[`aria-disabled`]})}}const Fi={border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`};function Ii(e={}){let{style:t,isFocusable:n}=e,[r,i]=f(!1),{focusWithinProps:a}=xi({isDisabled:!n,onFocusWithinChange:e=>i(e)}),o=l(()=>r?t:t?{...Fi,...t}:Fi,[r]);return{visuallyHiddenProps:{...a,style:o}}}function Li(e){let{children:t,elementType:n=`div`,isFocusable:i,style:a,...o}=e,{visuallyHiddenProps:s}=Ii(e);return r.createElement(n,R(o,s),t)}const Ri=i({});function zi(){return s(Ri)??{}}const Bi=r.createContext(null);function Vi(e){let t=ht(),{portalContainer:n=t?null:document.body,isExiting:i}=e,[a,o]=f(!1),s=l(()=>({contain:a,setContain:o}),[a,o]),{getContainer:c}=zi();if(!e.portalContainer&&c&&(n=c()),!n)return null;let u=e.children;return e.disableFocusManagement||(u=r.createElement(Yr,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!i},u)),u=r.createElement(Bi.Provider,{value:s},r.createElement(Ci,null,u)),x.createPortal(u,n)}function Hi(){let e=s(Bi)?.setContain;j(()=>{e?.(!0)},[e])}function Ui(e,t){let{role:n=`dialog`}=e,r=St();r=e[`aria-label`]?void 0:r;let i=d(!1);return c(()=>{if(t.current&&!Et(t.current)){Kr(t.current);let e=setTimeout(()=>{(I()===t.current||I()===document.body)&&(i.current=!0,t.current&&(t.current.blur(),Kr(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),Hi(),d(!1),c(()=>{}),{dialogProps:{...z(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e[`aria-labelledby`]||r,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:r}}}var Wi={};Wi={dismiss:`تجاهل`};var Gi={};Gi={dismiss:`Отхвърляне`};var Ki={};Ki={dismiss:`Odstranit`};var qi={};qi={dismiss:`Luk`};var Ji={};Ji={dismiss:`Schließen`};var Yi={};Yi={dismiss:`Απόρριψη`};var Xi={};Xi={dismiss:`Dismiss`};var Zi={};Zi={dismiss:`Descartar`};var Qi={};Qi={dismiss:`Lõpeta`};var $i={};$i={dismiss:`Hylkää`};var ea={};ea={dismiss:`Rejeter`};var ta={};ta={dismiss:`התעלם`};var na={};na={dismiss:`Odbaci`};var ra={};ra={dismiss:`Elutasítás`};var ia={};ia={dismiss:`Ignora`};var aa={};aa={dismiss:`閉じる`};var oa={};oa={dismiss:`무시`};var sa={};sa={dismiss:`Atmesti`};var ca={};ca={dismiss:`Nerādīt`};var la={};la={dismiss:`Lukk`};var ua={};ua={dismiss:`Negeren`};var da={};da={dismiss:`Zignoruj`};var fa={};fa={dismiss:`Descartar`};var pa={};pa={dismiss:`Dispensar`};var ma={};ma={dismiss:`Revocare`};var ha={};ha={dismiss:`Пропустить`};var ga={};ga={dismiss:`Zrušiť`};var _a={};_a={dismiss:`Opusti`};var va={};va={dismiss:`Odbaci`};var ya={};ya={dismiss:`Avvisa`};var ba={};ba={dismiss:`Kapat`};var xa={};xa={dismiss:`Скасувати`};var Sa={};Sa={dismiss:`取消`};var Ca={};Ca={dismiss:`關閉`};var wa={};wa={"ar-AE":Wi,"bg-BG":Gi,"cs-CZ":Ki,"da-DK":qi,"de-DE":Ji,"el-GR":Yi,"en-US":Xi,"es-ES":Zi,"et-EE":Qi,"fi-FI":$i,"fr-FR":ea,"he-IL":ta,"hr-HR":na,"hu-HU":ra,"it-IT":ia,"ja-JP":aa,"ko-KR":oa,"lt-LT":sa,"lv-LV":ca,"nb-NO":la,"nl-NL":ua,"pl-PL":da,"pt-BR":fa,"pt-PT":pa,"ro-RO":ma,"ru-RU":ha,"sk-SK":ga,"sl-SI":_a,"sr-SP":va,"sv-SE":ya,"tr-TR":ba,"uk-UA":xa,"zh-CN":Sa,"zh-TW":Ca};function Ta(e){return e&&e.__esModule?e.default:e}function Ea(e){let{onDismiss:t,...n}=e,i=Ht(n,nr(Ta(wa),`@react-aria/overlays`).format(`dismiss`)),a=()=>{t&&t()};return r.createElement(Li,null,r.createElement(`button`,{...i,tabIndex:-1,onClick:a,style:{width:1,height:1}}))}const $=[];function Da(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:a=!1,isKeyboardDismissDisabled:o=!1,shouldCloseOnInteractOutside:s}=e,l=d(void 0);c(()=>{if(i&&!$.includes(t))return $.push(t),()=>{let e=$.indexOf(t);e>=0&&$.splice(e,1)}},[i,t]);let u=()=>{$[$.length-1]===t&&n&&n()},f=e=>{let n=$[$.length-1];l.current=n,(!s||s(L(e)))&&n===t&&e.stopPropagation()},p=e=>{(!s||s(L(e)))&&($[$.length-1]===t&&e.stopPropagation(),l.current===t&&u()),l.current=void 0},m=e=>{e.key===`Escape`&&!o&&!e.nativeEvent.isComposing&&(e.stopPropagation(),e.preventDefault(),u())};Ai({ref:t,onInteractOutside:a&&i?p:void 0,onInteractOutsideStart:f});let{focusWithinProps:h}=xi({isDisabled:!r,onBlurWithin:e=>{!e.relatedTarget||ni(e.relatedTarget)||(!s||s(e.relatedTarget))&&n?.()}});return{overlayProps:{onKeyDown:m,...h},underlayProps:{}}}const Oa=typeof document<`u`&&window.visualViewport;let ka=0,Aa;function ja(e={}){let{isDisabled:t}=e;j(()=>{if(!t)return ka++,ka===1&&(Aa=qe()?Na():Ma()),()=>{ka--,ka===0&&Aa()}},[t])}function Ma(){let e=window.innerWidth-document.documentElement.clientWidth;return Ct(e>0&&(`scrollbarGutter`in document.documentElement.style?Pa(document.documentElement,`scrollbarGutter`,`stable`):Pa(document.documentElement,`paddingRight`,`${e}px`)),Pa(document.documentElement,`overflow`,`hidden`))}function Na(){let e=Pa(document.documentElement,`overflow`,`hidden`),t,n=!1,r=e=>{let r=L(e);t=qt(r)?r:Jt(r,!0),n=!1;let i=r.ownerDocument.defaultView.getSelection();i&&!i.isCollapsed&&i.containsNode(r,!0)&&(n=!0),e.composedPath().some(e=>e instanceof HTMLInputElement&&e.type===`range`)&&(n=!0),`selectionStart`in r&&`selectionEnd`in r&&r.selectionStart<r.selectionEnd&&r.ownerDocument.activeElement===r&&(n=!0)},i=document.createElement(`style`),a=_n();a&&(i.nonce=a),i.textContent=`@layer {
|
|
8
|
+
* {
|
|
9
|
+
overscroll-behavior: contain;
|
|
10
|
+
}
|
|
11
|
+
}`,document.head.prepend(i);let o=e=>{if(!(e.touches.length===2||n)){if(!t||t===document.documentElement||t===document.body){e.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&e.preventDefault()}},s=e=>{let t=L(e),n=e.relatedTarget;n&&Xt(n)?(n.focus({preventScroll:!0}),Ia(n,Xt(t))):n||(t.parentElement?.closest(`[tabindex]`))?.focus({preventScroll:!0})},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(e){let t=I(),n=t!=null&&Xt(t);c.call(this,{...e,preventScroll:!0}),(!e||!e.preventScroll)&&Ia(this,n)};let l=Ct(Fa(document,`touchstart`,r,{passive:!1,capture:!0}),Fa(document,`touchmove`,o,{passive:!1,capture:!0}),Fa(document,`blur`,s,!0));return()=>{e(),l(),i.remove(),HTMLElement.prototype.focus=c}}function Pa(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Fa(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ia(e,t){t||!Oa?La(e):Oa.addEventListener(`resize`,()=>La(e),{once:!0})}function La(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=Jt(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top<t.top||r.bottom>t.top+n.clientHeight){let n=t.bottom;Oa&&(n=Math.min(n,Oa.offsetTop+Oa.height));let i=r.top-t.top-((n-t.top)/2-r.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+i)),behavior:`smooth`})}}n=e.parentElement}}function Ra(e,t,n){let{overlayProps:r,underlayProps:i}=Da({...e,isOpen:t.isOpen,onClose:t.close},n);return ja({isDisabled:!t.isOpen}),Hi(),c(()=>{if(t.isOpen&&n.current)return Mn([n.current],{shouldUseInert:!0})},[t.isOpen,n]),{modalProps:R(r),underlayProps:i}}const za=i({}),Ba=Ni(function(e,t){[e,t]=Cn(e,t,za);let{elementType:n=`label`,...i}=e,a=On[n];return r.createElement(a,{className:`react-aria-Label`,...i,ref:t})}),Va=i(null),Ha=7e3;let Ua=null;function Wa(e,t=`assertive`,n=Ha){Ua?Ua.announce(e,t,n):(Ua=new Ga,(typeof IS_REACT_ACT_ENVIRONMENT==`boolean`?IS_REACT_ACT_ENVIRONMENT:typeof jest<`u`)?Ua.announce(e,t,n):setTimeout(()=>{Ua?.isAttached()&&Ua?.announce(e,t,n)},100))}var Ga=class{isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement(`div`);return t.setAttribute(`role`,`log`),t.setAttribute(`aria-live`,e),t.setAttribute(`aria-relevant`,`additions`),t}destroy(){this.node&&=(document.body.removeChild(this.node),null)}announce(e,t=`assertive`,n=Ha){var r,i;if(!this.node)return;let a=document.createElement(`div`);typeof e==`object`?(a.setAttribute(`role`,`img`),a.setAttribute(`aria-labelledby`,e[`aria-labelledby`])):a.textContent=e,t===`assertive`?(r=this.assertiveLog)==null||r.appendChild(a):(i=this.politeLog)==null||i.appendChild(a),e!==``&&setTimeout(()=>{a.remove()},n)}clear(e){this.node&&((!e||e===`assertive`)&&this.assertiveLog&&(this.assertiveLog.innerHTML=``),(!e||e===`polite`)&&this.politeLog&&(this.politeLog.innerHTML=``))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<`u`&&(this.node=document.createElement(`div`),this.node.dataset.liveAnnouncer=`true`,Object.assign(this.node.style,{border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`}),this.assertiveLog=this.createLog(`assertive`),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog(`polite`),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}};const Ka=i({}),qa=Ni(function(e,t){[e,t]=Cn(e,t,Ka);let n=e,{isPending:i}=n,{buttonProps:a,isPressed:o}=Pi(e,t);a=Ya(a,i);let{focusProps:s,isFocused:l,isFocusVisible:u}=Si(e),{hoverProps:f,isHovered:p}=ki({...e,isDisabled:e.isDisabled||i}),m={isHovered:p,isPressed:(n.isPressed||o)&&!i,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:i??!1},h=bn({...e,values:m,defaultClassName:`react-aria-Button`}),g=bt(a.id),_=bt(),v=a[`aria-labelledby`];i&&(v?v=`${v} ${_}`:a[`aria-label`]&&(v=`${g} ${_}`));let y=d(i);c(()=>{let e={"aria-labelledby":v||g};(!y.current&&l&&i||y.current&&l&&!i)&&Wa(e,`assertive`),y.current=i},[i,l,v,g]);let b=z(e,{global:!0});return delete b.onClick,r.createElement(On.button,{...R(b,h,a,s,f),type:a.type===`submit`&&i?`button`:a.type,id:g,ref:t,"aria-labelledby":v,slot:e.slot||void 0,"aria-disabled":i?`true`:a[`aria-disabled`],"data-disabled":e.isDisabled||void 0,"data-pressed":m.isPressed||void 0,"data-hovered":p||void 0,"data-focused":l||void 0,"data-pending":i||void 0,"data-focus-visible":u||void 0},r.createElement(Va.Provider,{value:{id:_}},h.children))}),Ja=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function Ya(e,t){if(t){for(let t in e)t.startsWith(`on`)&&!Ja.test(t)&&(e[t]=void 0);e.href=void 0,e.target=void 0}return e}function Xa(e){let[t,n]=bi(e.isOpen,e.defaultOpen||!1,e.onOpenChange);return{isOpen:t,setOpen:n,open:o(()=>{n(!0)},[n]),close:o(()=>{n(!1)},[n]),toggle:o(()=>{n(!t)},[n,t])}}const Za=i(null),Qa=i(null),$a=a(function(e,t){let n=e[`aria-labelledby`];[e,t]=Cn(e,t,Za);let{dialogProps:i,titleProps:a}=Ui({...e,"aria-labelledby":n},t),o=s(Qa);!i[`aria-label`]&&!i[`aria-labelledby`]&&e[`aria-labelledby`]&&(i[`aria-labelledby`]=e[`aria-labelledby`]);let c=bn({defaultClassName:`react-aria-Dialog`,className:e.className,style:e.style,children:e.children,values:{close:o?.close||(()=>{})}}),l=z(e,{global:!0});return r.createElement(On.section,{...R(l,c,i),render:e.render,ref:t,slot:e.slot||void 0},r.createElement(yn,{values:[[Be,{slots:{[vn]:{},title:{...a,level:2}}}],[Ka,{slots:{[vn]:{},close:{onPress:()=>o?.close()}}}]]},c.children))}),eo=i(null),to=i(null),no=a(function(e,t){if(s(to))return r.createElement(oo,{...e,modalRef:t},e.children);let{isDismissable:n,isKeyboardDismissDisabled:i,isOpen:a,defaultOpen:o,onOpenChange:c,children:l,isEntering:u,isExiting:d,UNSTABLE_portalContainer:f,shouldCloseOnInteractOutside:p,...m}=e;return r.createElement(io,{isDismissable:n,isKeyboardDismissDisabled:i,isOpen:a,defaultOpen:o,onOpenChange:c,isEntering:u,isExiting:d,UNSTABLE_portalContainer:f,shouldCloseOnInteractOutside:p},r.createElement(oo,{...m,modalRef:t},l))});function ro(e,t){[e,t]=Cn(e,t,eo);let n=s(Qa),i=Xa(e),a=e.isOpen!=null||e.defaultOpen!=null||!n?i:n,o=Ut(t),c=d(null),l=nn(o,a.isOpen),u=nn(c,a.isOpen),f=l||u||e.isExiting||!1,p=ht();return!a.isOpen&&!f||p?null:r.createElement(ao,{...e,state:a,isExiting:f,overlayRef:o,modalRef:c})}const io=a(ro);function ao({UNSTABLE_portalContainer:e,...t}){let n=t.modalRef,{state:i}=t,{modalProps:a,underlayProps:o}=Ra(t,i,n),s=tn(t.overlayRef)||t.isEntering||!1,c=bn({...t,defaultClassName:`react-aria-ModalOverlay`,values:{isEntering:s,isExiting:t.isExiting,state:i}}),l=Zt(),u;if(typeof document<`u`){let e=qt(document.body)?document.body:document.scrollingElement||document.documentElement,t=e.getBoundingClientRect().height%1;u=e.scrollHeight-t}let d={...c.style,"--visual-viewport-height":l.height+`px`,"--page-height":u===void 0?void 0:u+`px`};return r.createElement(Vi,{isExiting:t.isExiting,portalContainer:e},r.createElement(On.div,{...R(z(t,{global:!0}),o),...c,style:d,ref:t.overlayRef,"data-entering":s||void 0,"data-exiting":t.isExiting||void 0},r.createElement(yn,{values:[[to,{modalProps:a,modalRef:n,isExiting:t.isExiting,isDismissable:t.isDismissable}],[Qa,i]]},c.children)))}function oo(e){let{modalProps:t,modalRef:n,isExiting:i,isDismissable:a}=s(to),o=s(Qa),c=Ut(l(()=>kt(e.modalRef,n),[e.modalRef,n])),u=tn(c),d=bn({...e,defaultClassName:`react-aria-Modal`,values:{isEntering:u,isExiting:i,state:o}});return r.createElement(On.div,{...R(z(e,{global:!0}),t),...d,ref:c,"data-entering":u||void 0,"data-exiting":i||void 0},a&&r.createElement(Ea,{onDismiss:o.close}),d.children)}const so=()=>{let[n,r]=f(!1);return c(()=>{let n=t=>{let n=e.safeParse(t);n.error||r(n.data.detail.isRecording)};return document.addEventListener(t,n),()=>{document.removeEventListener(t,n)}},[]),n},co=({className:e,iconClassName:t,onClose:n})=>so()?null:v(`button`,{type:`button`,className:e,"aria-label":`Dismiss`,onClick:n,children:v(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 16 16`,fill:`none`,className:t,children:v(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M3.53 3.529c.26-.26.682-.26.942 0l3.529 3.528 3.528-3.528a.667.667 0 0 1 .943.942L8.943 8l3.53 3.528a.667.667 0 0 1-.944.943L8.001 8.943 4.472 12.47a.667.667 0 1 1-.943-.943L7.058 8 3.529 4.47a.667.667 0 0 1 0-.942Z`,clipRule:`evenodd`})})}),lo=({children:e,classNames:t,isDismissable:r,onDismiss:i,closeOnFinishMs:a})=>{let{survey:o,surveyId:s,dismiss:c}=Re(),[l,u]=f(!1);return m(()=>{o&&c()},l?a:null),y($a,{"aria-label":`Survey`,id:`${s}-popover`,className:b(`confetti-modal-dialog ${n}`,t?.dialog),children:[r&&v(co,{className:b(`confetti-modal-dialog-close`,t?.closeButton),iconClassName:t?.icon,onClose:async()=>{await c(),i?.()}}),typeof e==`function`?e({setIsFinished:()=>u(!0)}):e]})},uo=({children:e,classNames:t,onDismiss:r,isDismissable:i=!0,closeOnFinishMs:a=3e3})=>{let{dismiss:o}=Re();return v(io,{isOpen:!0,isDismissable:i,isKeyboardDismissDisabled:!i,onOpenChange:async e=>{e||(await o(),r?.())},className:b(`confetti-modal-overlay ${n}`,t?.overlay),children:v(no,{className:b(`confetti-modal ${n}`,t?.modal),children:v(lo,{classNames:t,isDismissable:i,onDismiss:r,closeOnFinishMs:a,children:e})})})};export{z as A,Fe as B,xn as C,Gt as D,Sn as E,St as F,Ee as G,Re as H,bt as I,Ae as J,Te as K,j as L,kt as M,L as N,Ut as O,N as P,Ve as R,wn as S,Tn as T,Ce as U,Le as V,ke as W,he as X,me as Y,ne as Z,yr as _,qa as a,Cn as b,Li as c,Si as d,xi as f,Hr as g,Z as h,so as i,R as j,Ht as k,Ni as l,vi as m,lo as n,za as o,bi as p,Oe as q,co as r,Ba as s,uo as t,ki as u,Un as v,On as w,bn as x,yn as y,ze as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./ModalContainer-
|
|
1
|
+
import{n as e}from"./ModalContainer-CDEl2ap2.js";export{e as UnstableModalContent};
|
package/build/confetti.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
:root{--confetti-font-scale: 16px;--confetti-box-padding: 24px;--confetti-max-width: 300px;--confetti-z-index: 2147483647;--confetti-border-color: #e4e4e7;--confetti-border-bottom: 1.5px solid var(--confetti-border-color);--confetti-border-radius: 12px;--confetti-background-color: #ffffff;--confetti-hover-background-color: #f5f5f5;--confetti-box-shadow:
|
|
2
|
-
0 4px 6px -4px rgba(16, 24, 40, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.1);--confetti-focus-shadow: 0 0 0 2px rgba(9, 9, 11, 0.3);--confetti-submit-button-color: #18181b;--confetti-submit-button-text-color: #fafafa;--confetti-rating-bg-color: white;--confetti-rating-text-color: #09090b;--confetti-rating-active-bg-color: #09090b;--confetti-rating-active-text-color: white;--confetti-indicator-active-bg-color: var(--confetti-rating-text-color);--confetti-indicator-active-dot-color: white;--confetti-bug-report-button-color: #18181b;--confetti-bug-report-record-button-color: #ff2c2c;--confetti-bug-report-record-button-active-color: #dc2626;--confetti-bug-report-button-text-color: white;--confetti-bug-report-overlay-color: rgba(9, 9, 11, 0.4);--confetti-text-primary-color: #09090b;--confetti-text-subtle-color: #71717a;--confetti-widget-color: #e0a045;--confetti-widget-text-color: white;--confetti-scrollbar-thumb-color: var(--confetti-border-color);--confetti-scrollbar-track-color: var(--confetti-background-color);--confetti-outline-color: rgba(9, 9, 11, 0.8);--confetti-input-background: white;--confetti-input-text-color: #020617;--confetti-disabled-button-opacity: 0.6;}@keyframes confetti-record-pulse{0%, 100%{background-color:var(--pulse-color-start)}50%{background-color:color-mix( in srgb, var(--pulse-color-start), rgb(70, 70, 70) 20% )}}@keyframes confetti-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.confetti-dialog{width:var(--confetti-max-width);max-height:95dvh;overflow:auto;max-width:100%;background:transparent;position:relative;box-shadow:var(--confetti-box-shadow);border:1px solid var(--confetti-border-color);border-radius:var(--confetti-border-radius);background:var(--confetti-background-color);padding:var(--confetti-box-padding)}.confetti-dialog .confetti-dialog-close{position:absolute;top:8px;right:8px;background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;transition:background 200ms}.confetti-dialog .confetti-dialog-close svg{width:16px;height:16px;color:var(--confetti-text-subtle-color)}.confetti-dialog .confetti-dialog-close:hover{background:rgba(0, 0, 0, 0.05)}.confetti-dialog .confetti-dialog-close:focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti-dialog .cf-header .cf-title{padding-right:20px}.confetti-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--confetti-z-index);background:rgba(0, 0, 0, 0.4);display:flex;justify-content:center;overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:none;padding:10vh 0}.confetti-modal{margin:auto}.confetti-modal .confetti-modal-dialog{width:var(--confetti-max-width);max-width:100%;position:relative;box-shadow:var(--confetti-box-shadow);border:1px solid var(--confetti-border-color);border-radius:var(--confetti-border-radius);background:var(--confetti-background-color);padding:var(--confetti-box-padding)}.confetti-modal .confetti-modal-dialog:focus-visible{outline:none}.confetti-modal .confetti-modal-dialog .confetti-modal-dialog-close{position:absolute;top:8px;right:8px;background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;transition:background 200ms}.confetti-modal .confetti-modal-dialog .confetti-modal-dialog-close svg{width:16px;height:16px;color:var(--confetti-text-subtle-color)}.confetti-modal .confetti-modal-dialog .confetti-modal-dialog-close:hover{background:rgba(0, 0, 0, 0.05)}.confetti-modal .confetti-modal-dialog .confetti-modal-dialog-close:focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti-modal .confetti-modal-dialog .cf-header .cf-title{padding-right:20px}.confetti{font-family:var(--confetti-font-family);display:flex;flex-direction:column;gap:16px;color:var(--confetti-text-primary-color);font-size:var(--confetti-font-scale);width:100%}.confetti .cf-submit-button{align-self:end;color:var(--confetti-submit-button-text-color);background:var(--confetti-submit-button-color);padding:8px 16px;border-radius:8px;cursor:pointer;transition:transform 200ms;font-size:0.875em;font-weight:500;line-height:20px;transition:background 200ms ease-out}.confetti .cf-submit-button:focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-submit-button[data-disabled]{opacity:var(--confetti-disabled-button-opacity);cursor:not-allowed;transform:none}.confetti .cf-submit-button:hover{background:color-mix( in srgb, white 10%, var(--confetti-submit-button-color) )}.confetti .cf-submit-button:active{background:color-mix( in srgb, white 5%, var(--confetti-submit-button-color) )}.confetti .sr-only{clip:rect(0, 0, 0, 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.confetti .cf-response-choices{display:flex;flex-direction:column;gap:12px}.confetti .cf-choice{font-size:1em;cursor:pointer;padding:8px 10px;border-radius:6px;border:1px solid var(--confetti-border-color);transition:background 200ms ease-out}.confetti .cf-choice:hover{background:var(--confetti-hover-background-color)}.confetti .cf-choice .cf-choice-label{gap:8px;display:inline-flex;align-items:center}.confetti .cf-choice .cf-choice-description{font-size:0.875em;margin-left:26px;white-space:pre-wrap;word-wrap:anywhere;color:var(--confetti-text-subtle-color)}.confetti .cf-response-choices-tag{flex-direction:row;flex-wrap:wrap;gap:8px}.confetti .cf-tag-input{display:none}.confetti .cf-tag-input[data-visible='true']{display:inline}.confetti .cf-tag{border-radius:8px;padding:6px 12px;font-weight:500;font-size:0.875em;transition:background 200ms ease-out, border-color 200ms ease-out}.confetti .cf-tag[data-selected='true']{background:var(--confetti-indicator-active-bg-color);border-color:var(--confetti-indicator-active-bg-color);color:var(--confetti-indicator-active-dot-color)}.confetti .cf-tag[data-focus-visible='true']{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-tag:active{scale:0.96}.confetti .cf-radio,.confetti .cf-checkbox{cursor:pointer;display:flex;flex-direction:column;position:relative;align-items:start;color:var(--confetti-text-primary-color);forced-color-adjust:none}.confetti .cf-checkbox{--checkmark-color: var(--confetti-indicator-active-dot-color);}.confetti .cf-checkbox .cf-checkbox-indicator{background:white;border:1px solid var(--confetti-border-color);width:18px;height:18px;box-sizing:border-box;border-radius:4px;transition:color 200ms ease-out;display:flex;align-items:center;justify-content:center;flex-shrink:0}.confetti .cf-checkbox svg{width:calc(100% - 8px);height:calc(100% - 8px);fill:none;stroke:var(--checkmark-color);stroke-width:3px;stroke-dasharray:22px;stroke-dashoffset:66;stroke-linecap:round;stroke-linejoin:round;transition:all 200ms}.confetti .cf-checkbox[data-focus-visible='true'] .cf-checkbox-indicator{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-checkbox[data-selected] .cf-checkbox-indicator,.confetti .cf-checkbox[data-indeterminate] .cf-checkbox-indicator{background:var(--confetti-indicator-active-bg-color);border:none}.confetti .cf-checkbox[data-selected] svg,.confetti .cf-checkbox[data-indeterminate] svg{stroke-dashoffset:44}.confetti .cf-checkbox[data-indeterminate] svg{stroke:none;fill:var(--checkmark-color)}.confetti .cf-radio{-webkit-tap-highlight-color:transparent;--dot-color: var(--confetti-indicator-active-dot-color);}.confetti .cf-radio .cf-radio-indicator{position:relative;width:18px;height:18px;flex-shrink:0;box-sizing:border-box;border-radius:50%;transition:color 200ms ease-out;border:1px solid var(--confetti-border-color);background:white}.confetti .cf-radio .cf-radio-indicator::after{content:'';position:absolute;top:1px;right:1px;bottom:1px;left:1px;border-radius:inherit;background:transparent;transition:scale 200ms;scale:0}.confetti .cf-radio[data-selected] .cf-radio-indicator{background:var(--confetti-indicator-active-bg-color);border-color:var(--confetti-indicator-active-bg-color)}.confetti .cf-radio[data-selected] .cf-radio-indicator::after{background:var(--dot-color);scale:0.4}.confetti .cf-radio[data-disabled]{color:var(--text-color-disabled);--dot-color: var(--text-color-disabled);}.confetti .cf-radio[data-focus-visible='true'] .cf-radio-indicator{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-input,.confetti .cf-textarea{background:var(--confetti-input-background);border:1px solid var(--confetti-border-color);border-radius:8px;color:var(--confetti-input-text-color);padding:10px;transition:border-color 0.2s ease-out, box-shadow 0.2s ease-out, transform 0.15s ease-out}.confetti .cf-input:focus,.confetti .cf-textarea:focus{border-color:var(--confetti-outline-color);box-shadow:var(--confetti-focus-shadow);outline:none}.confetti .cf-question{display:flex;flex-direction:column;gap:16px}.confetti .cf-question .cf-error{display:none}.confetti .cf-question .cf-header{display:flex;flex-direction:column;gap:2px}.confetti .cf-question .cf-title{line-height:24px;font-weight:500}.confetti .cf-question .cf-label-optional{font-weight:400;color:var(--confetti-text-subtle-color)}.confetti .cf-question .cf-description{font-size:0.875em;line-height:20px;font-weight:400;white-space:pre-wrap;word-wrap:anywhere;color:var(--confetti-text-subtle-color)}.confetti .cf-question .cf-others-choice{display:flex;flex-direction:column;gap:8px}.confetti .cf-bug-report{display:flex;flex-direction:column;gap:16px}.confetti .cf-bug-report .cf-bug-report-screenshot-section,.confetti .cf-bug-report .cf-bug-report-recording-section{display:flex;flex-direction:column;gap:8px}.confetti .cf-bug-report .cf-bug-report-actions{display:flex;flex-direction:column;gap:12px}.confetti .cf-bug-report .cf-bug-report-button-action{padding:8px 8px}.confetti .cf-bug-report .cf-bug-report-media-preview{position:relative;width:100%;aspect-ratio:16 / 9;border:1px solid var(--confetti-border-color);border-radius:8px;overflow:hidden;display:flex;align-items:center;justify-content:center}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-player-loading{width:1.5em;height:1.5em;border:2px solid var(--confetti-submit-button-color);border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:confetti-spinner 1s linear infinite}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-player-container{height:100%;width:100%;position:relative}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-player-container .cf-bug-report-player{height:100%;width:auto;overflow:hidden}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-player-container .cf-bug-report-progress-bar{position:absolute;bottom:0;left:0;height:2px;background:var(--confetti-text-primary-color);opacity:0.5;transition-property:width;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;width:0%}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-player-container .cf-bug-report-time{position:absolute;right:4px;bottom:4px;font-size:0.75em;color:color-mix( in oklab, var(--confetti-text-primary-color) 50%, transparent )}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-media-actions{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:var(--confetti-bug-report-overlay-color);opacity:0;transition:opacity 200ms ease-out}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-media-actions:hover{opacity:1}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-screenshot-img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.confetti .cf-bug-report-button{color:var(--confetti-bug-report-button-text-color);background:var(--confetti-bug-report-button-color);padding:8px 16px;border-radius:8px;cursor:pointer;transition:transform 200ms;font-size:0.875em;font-weight:500;line-height:20px;transition:background 200ms ease-out}.confetti .cf-bug-report-button:focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-bug-report-button[data-disabled]{opacity:var(--confetti-disabled-button-opacity);cursor:not-allowed;transform:none}.confetti .cf-bug-report-button:hover{background:color-mix( in srgb, white 10%, var(--confetti-submit-button-color) )}.confetti .cf-bug-report-button:active{background:color-mix( in srgb, white 5%, var(--confetti-submit-button-color) )}.confetti .cf-bug-report-button.cf-bug-report-record-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 8px;--pulse-color-start: var(--confetti-bug-report-record-button-color);background-color:var(--pulse-color-start);animation:confetti-record-pulse 2s ease-in-out infinite}.confetti .cf-bug-report-button.cf-bug-report-record-button:hover{--pulse-color-start: var(
|
|
2
|
+
0 4px 6px -4px rgba(16, 24, 40, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.1);--confetti-focus-shadow: 0 0 0 2px rgba(9, 9, 11, 0.3);--confetti-submit-button-color: #18181b;--confetti-submit-button-text-color: #fafafa;--confetti-rating-bg-color: white;--confetti-rating-text-color: #09090b;--confetti-rating-active-bg-color: #09090b;--confetti-rating-active-text-color: white;--confetti-indicator-active-bg-color: var(--confetti-rating-text-color);--confetti-indicator-active-dot-color: white;--confetti-bug-report-button-color: #18181b;--confetti-bug-report-record-button-color: #ff2c2c;--confetti-bug-report-record-button-active-color: #dc2626;--confetti-bug-report-button-text-color: white;--confetti-bug-report-overlay-color: rgba(9, 9, 11, 0.4);--confetti-text-primary-color: #09090b;--confetti-text-subtle-color: #71717a;--confetti-trigger-bg-color: #18181b;--confetti-trigger-text-color: #fafafa;--confetti-trigger-size: 40px;--confetti-widget-color: #e0a045;--confetti-widget-text-color: white;--confetti-scrollbar-thumb-color: var(--confetti-border-color);--confetti-scrollbar-track-color: var(--confetti-background-color);--confetti-outline-color: rgba(9, 9, 11, 0.8);--confetti-input-background: white;--confetti-input-text-color: #020617;--confetti-disabled-button-opacity: 0.6;}@keyframes confetti-record-pulse{0%, 100%{background-color:var(--pulse-color-start)}50%{background-color:color-mix( in srgb, var(--pulse-color-start), rgb(70, 70, 70) 20% )}}@keyframes confetti-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.confetti-trigger{font-size:var(--confetti-font-scale);cursor:pointer;position:relative;display:inline-grid;grid-template-columns:0fr;align-items:center;justify-content:center;min-width:var(--confetti-trigger-size);height:var(--confetti-trigger-size);padding:0;border:none;border-radius:9999px;background:var(--confetti-trigger-bg-color);color:var(--confetti-trigger-text-color);overflow:hidden;transition:grid-template-columns 220ms ease, background 220ms ease}.confetti-trigger .confetti-trigger-icon-wrapper{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;opacity:1;transition:opacity 180ms ease;pointer-events:none}.confetti-trigger .confetti-trigger-label{opacity:0;pointer-events:none;min-width:0;overflow:hidden;padding:0 20px;font-size:0.875em;font-weight:500;line-height:20px;white-space:nowrap;transition:opacity 180ms ease}.confetti-trigger:hover,.confetti-trigger:focus-visible,.confetti-trigger[data-hovered],.confetti-trigger[data-focus-visible]{grid-template-columns:1fr}.confetti-trigger:focus-visible .confetti-trigger-icon-wrapper{opacity:0}.confetti-trigger:hover .confetti-trigger-icon-wrapper,.confetti-trigger[data-hovered] .confetti-trigger-icon-wrapper,.confetti-trigger[data-focus-visible] .confetti-trigger-icon-wrapper{opacity:0}.confetti-trigger:focus-visible .confetti-trigger-label{opacity:1}.confetti-trigger:hover .confetti-trigger-label,.confetti-trigger[data-hovered] .confetti-trigger-label,.confetti-trigger[data-focus-visible] .confetti-trigger-label{opacity:1}.confetti-trigger:focus-visible,.confetti-trigger[data-focus-visible]{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti-dialog{width:var(--confetti-max-width);max-height:95dvh;overflow:auto;max-width:100%;background:transparent;position:relative;box-shadow:var(--confetti-box-shadow);border:1px solid var(--confetti-border-color);border-radius:var(--confetti-border-radius);background:var(--confetti-background-color);padding:var(--confetti-box-padding)}.confetti-dialog .confetti-dialog-close{position:absolute;top:8px;right:8px;background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;transition:background 200ms}.confetti-dialog .confetti-dialog-close svg{width:16px;height:16px;color:var(--confetti-text-subtle-color)}.confetti-dialog .confetti-dialog-close:hover{background:rgba(0, 0, 0, 0.05)}.confetti-dialog .confetti-dialog-close:focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti-dialog .cf-header .cf-title{padding-right:20px}.confetti-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--confetti-z-index);background:rgba(0, 0, 0, 0.4);display:flex;justify-content:center;overflow-y:auto;overscroll-behavior:none;padding:10vh 0}.confetti-modal{margin:auto}.confetti-modal .confetti-modal-dialog{width:var(--confetti-max-width);max-width:100%;position:relative;box-shadow:var(--confetti-box-shadow);border:1px solid var(--confetti-border-color);border-radius:var(--confetti-border-radius);background:var(--confetti-background-color);padding:var(--confetti-box-padding)}.confetti-modal .confetti-modal-dialog:focus-visible{outline:none}.confetti-modal .confetti-modal-dialog .confetti-modal-dialog-close{position:absolute;top:8px;right:8px;background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;transition:background 200ms}.confetti-modal .confetti-modal-dialog .confetti-modal-dialog-close svg{width:16px;height:16px;color:var(--confetti-text-subtle-color)}.confetti-modal .confetti-modal-dialog .confetti-modal-dialog-close:hover{background:rgba(0, 0, 0, 0.05)}.confetti-modal .confetti-modal-dialog .confetti-modal-dialog-close:focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti-modal .confetti-modal-dialog .cf-header .cf-title{padding-right:20px}.confetti{font-family:var(--confetti-font-family);display:flex;flex-direction:column;gap:16px;color:var(--confetti-text-primary-color);font-size:var(--confetti-font-scale);width:100%}.confetti .cf-submit-button{align-self:end;color:var(--confetti-submit-button-text-color);background:var(--confetti-submit-button-color);padding:8px 16px;border-radius:8px;cursor:pointer;transition:transform 200ms;font-size:0.875em;font-weight:500;line-height:20px;transition:background 200ms ease-out}.confetti .cf-submit-button:focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-submit-button[data-disabled]{opacity:var(--confetti-disabled-button-opacity);cursor:not-allowed;-ms-transform:none;transform:none}.confetti .cf-submit-button:hover{background:color-mix( in srgb, white 10%, var(--confetti-submit-button-color) )}.confetti .cf-submit-button:active{background:color-mix( in srgb, white 5%, var(--confetti-submit-button-color) )}.confetti .sr-only{clip:rect(0, 0, 0, 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.confetti .cf-response-choices{display:flex;flex-direction:column;gap:12px}.confetti .cf-choice{font-size:1em;cursor:pointer;padding:8px 10px;border-radius:6px;border:1px solid var(--confetti-border-color);transition:background 200ms ease-out}.confetti .cf-choice:hover{background:var(--confetti-hover-background-color)}.confetti .cf-choice .cf-choice-label{gap:8px;display:inline-flex;align-items:center}.confetti .cf-choice .cf-choice-description{font-size:0.875em;margin-left:26px;white-space:pre-wrap;word-wrap:anywhere;color:var(--confetti-text-subtle-color)}.confetti .cf-response-choices-tag{flex-direction:row;flex-wrap:wrap;gap:8px}.confetti .cf-tag-input{display:none}.confetti .cf-tag-input[data-visible='true']{display:inline}.confetti .cf-tag{border-radius:8px;padding:6px 12px;font-weight:500;font-size:0.875em;transition:background 200ms ease-out, border-color 200ms ease-out}.confetti .cf-tag[data-selected='true']{background:var(--confetti-indicator-active-bg-color);border-color:var(--confetti-indicator-active-bg-color);color:var(--confetti-indicator-active-dot-color)}.confetti .cf-tag[data-focus-visible='true']{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-tag:active{scale:0.96}.confetti .cf-radio,.confetti .cf-checkbox{cursor:pointer;display:flex;flex-direction:column;position:relative;align-items:start;color:var(--confetti-text-primary-color);forced-color-adjust:none}.confetti .cf-checkbox{--checkmark-color: var(--confetti-indicator-active-dot-color);}.confetti .cf-checkbox .cf-checkbox-indicator{background:white;border:1px solid var(--confetti-border-color);width:18px;height:18px;box-sizing:border-box;border-radius:4px;transition:color 200ms ease-out;display:flex;align-items:center;justify-content:center;flex-shrink:0}.confetti .cf-checkbox svg{width:calc(100% - 8px);height:calc(100% - 8px);fill:none;stroke:var(--checkmark-color);stroke-width:3px;stroke-dasharray:22px;stroke-dashoffset:66;stroke-linecap:round;stroke-linejoin:round;transition:all 200ms}.confetti .cf-checkbox[data-focus-visible='true'] .cf-checkbox-indicator{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-checkbox[data-selected] .cf-checkbox-indicator,.confetti .cf-checkbox[data-indeterminate] .cf-checkbox-indicator{background:var(--confetti-indicator-active-bg-color);border:none}.confetti .cf-checkbox[data-selected] svg,.confetti .cf-checkbox[data-indeterminate] svg{stroke-dashoffset:44}.confetti .cf-checkbox[data-indeterminate] svg{stroke:none;fill:var(--checkmark-color)}.confetti .cf-radio{-webkit-tap-highlight-color:transparent;--dot-color: var(--confetti-indicator-active-dot-color);}.confetti .cf-radio .cf-radio-indicator{position:relative;width:18px;height:18px;flex-shrink:0;box-sizing:border-box;border-radius:50%;transition:color 200ms ease-out;border:1px solid var(--confetti-border-color);background:white}.confetti .cf-radio .cf-radio-indicator::after{content:'';position:absolute;top:1px;right:1px;bottom:1px;left:1px;border-radius:inherit;background:transparent;transition:scale 200ms;scale:0}.confetti .cf-radio[data-selected] .cf-radio-indicator{background:var(--confetti-indicator-active-bg-color);border-color:var(--confetti-indicator-active-bg-color)}.confetti .cf-radio[data-selected] .cf-radio-indicator::after{background:var(--dot-color);scale:0.4}.confetti .cf-radio[data-disabled]{color:var(--text-color-disabled);--dot-color: var(--text-color-disabled);}.confetti .cf-radio[data-focus-visible='true'] .cf-radio-indicator{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-input,.confetti .cf-textarea{background:var(--confetti-input-background);border:1px solid var(--confetti-border-color);border-radius:8px;color:var(--confetti-input-text-color);padding:10px;transition:border-color 0.2s ease-out, box-shadow 0.2s ease-out, transform 0.15s ease-out}.confetti .cf-input:focus,.confetti .cf-textarea:focus{border-color:var(--confetti-outline-color);box-shadow:var(--confetti-focus-shadow);outline:none}.confetti .cf-question{display:flex;flex-direction:column;gap:16px}.confetti .cf-question .cf-error{display:none}.confetti .cf-question .cf-header{display:flex;flex-direction:column;gap:2px}.confetti .cf-question .cf-title{line-height:24px;font-weight:500}.confetti .cf-question .cf-label-optional{font-weight:400;color:var(--confetti-text-subtle-color)}.confetti .cf-question .cf-description{font-size:0.875em;line-height:20px;font-weight:400;white-space:pre-wrap;word-wrap:anywhere;color:var(--confetti-text-subtle-color)}.confetti .cf-question .cf-others-choice{display:flex;flex-direction:column;gap:8px}.confetti .cf-bug-report{display:flex;flex-direction:column;gap:16px}.confetti .cf-bug-report .cf-bug-report-screenshot-section,.confetti .cf-bug-report .cf-bug-report-recording-section{display:flex;flex-direction:column;gap:8px}.confetti .cf-bug-report .cf-bug-report-actions{display:flex;flex-direction:column;gap:12px}.confetti .cf-bug-report .cf-bug-report-button-action{padding:8px 8px}.confetti .cf-bug-report .cf-bug-report-media-preview{position:relative;width:100%;aspect-ratio:16 / 9;border:1px solid var(--confetti-border-color);border-radius:8px;overflow:hidden;display:flex;align-items:center;justify-content:center}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-player-loading{width:1.5em;height:1.5em;border:2px solid var(--confetti-submit-button-color);border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:confetti-spinner 1s linear infinite}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-player-container{height:100%;width:100%;position:relative}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-player-container .cf-bug-report-player{height:100%;width:auto;overflow:hidden}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-player-container .cf-bug-report-progress-bar{position:absolute;bottom:0;left:0;height:2px;background:var(--confetti-text-primary-color);opacity:0.5;transition-property:width;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;width:0%}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-player-container .cf-bug-report-time{position:absolute;right:4px;bottom:4px;font-size:0.75em;color:color-mix( in oklab, var(--confetti-text-primary-color) 50%, transparent )}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-media-actions{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:var(--confetti-bug-report-overlay-color);opacity:0;transition:opacity 200ms ease-out}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-media-actions:hover{opacity:1}.confetti .cf-bug-report .cf-bug-report-media-preview .cf-bug-report-screenshot-img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.confetti .cf-bug-report-button{color:var(--confetti-bug-report-button-text-color);background:var(--confetti-bug-report-button-color);padding:8px 16px;border-radius:8px;cursor:pointer;transition:transform 200ms;font-size:0.875em;font-weight:500;line-height:20px;transition:background 200ms ease-out}.confetti .cf-bug-report-button:focus-visible{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-bug-report-button[data-disabled]{opacity:var(--confetti-disabled-button-opacity);cursor:not-allowed;-ms-transform:none;transform:none}.confetti .cf-bug-report-button:hover{background:color-mix( in srgb, white 10%, var(--confetti-submit-button-color) )}.confetti .cf-bug-report-button:active{background:color-mix( in srgb, white 5%, var(--confetti-submit-button-color) )}.confetti .cf-bug-report-button.cf-bug-report-record-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 8px;--pulse-color-start: var(--confetti-bug-report-record-button-color);background-color:var(--pulse-color-start);animation:confetti-record-pulse 2s ease-in-out infinite}.confetti .cf-bug-report-button.cf-bug-report-record-button:hover{--pulse-color-start: var(
|
|
3
3
|
--confetti-bug-report-record-button-active-color
|
|
4
|
-
);}.confetti .cf-rating-section{display:flex;flex-direction:column;gap:4px}.confetti .cf-rating-emoji{opacity:0.5}.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji{display:grid;grid-template-columns:repeat(auto-fit, 40px);justify-content:space-between;grid-gap:8px;gap:8px}.confetti .cf-rating-display-star .cf-rating-emoji,.confetti .cf-rating-display-emoji .cf-rating-emoji,.confetti .cf-rating-display-star .cf-rating-star,.confetti .cf-rating-display-emoji .cf-rating-star{font-size:1em;background-color:transparent;border:none;padding:0;transition:transform 0.15s ease-out;color:var(--confetti-rating-active-bg-color)}.confetti .cf-rating-display-star .cf-rating-emoji[data-focus-visible='true'],.confetti .cf-rating-display-emoji .cf-rating-emoji[data-focus-visible='true'],.confetti .cf-rating-display-star .cf-rating-star[data-focus-visible='true'],.confetti .cf-rating-display-emoji .cf-rating-star[data-focus-visible='true']{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-rating-display-star .cf-rating-emoji:hover,.confetti .cf-rating-display-emoji .cf-rating-emoji:hover,.confetti .cf-rating-display-star .cf-rating-star:hover,.confetti .cf-rating-display-emoji .cf-rating-star:hover{cursor:pointer;transform:scale(1.15);opacity:1!important}.confetti .cf-rating-display-star .cf-rating-emoji[data-filled='true'],.confetti .cf-rating-display-emoji .cf-rating-emoji[data-filled='true'],.confetti .cf-rating-display-star .cf-rating-star[data-filled='true'],.confetti .cf-rating-display-emoji .cf-rating-star[data-filled='true']{opacity:1}.confetti .cf-rating-display-star .cf-rating-emoji[data-selected='true'],.confetti .cf-rating-display-emoji .cf-rating-emoji[data-selected='true'],.confetti .cf-rating-display-star .cf-rating-star[data-selected='true'],.confetti .cf-rating-display-emoji .cf-rating-star[data-selected='true']{opacity:1}.confetti .cf-rating-display-star .cf-rating-emoji svg,.confetti .cf-rating-display-emoji .cf-rating-emoji svg,.confetti .cf-rating-display-star .cf-rating-star svg,.confetti .cf-rating-display-emoji .cf-rating-star svg{transition:fill 0.15s ease-out}.confetti .cf-rating-text{display:flex;justify-content:space-between;font-size:0.75em;color:var(--confetti-text-subtle-color);font-weight:500;line-height:1}.confetti .cf-rating-text .cf-rating-text-lower{flex:1;text-align:left}.confetti .cf-rating-text .cf-rating-text-upper{flex:1;text-align:right}.confetti .cf-rating-display-star .cf-rating-star[data-selected='true'] ~ .cf-rating-star{opacity:0.5}.confetti .cf-rating-display-number{display:grid;grid-auto-columns:1fr;grid-auto-flow:column;border:1px solid var(--confetti-border-color);border-radius:8px;overflow:hidden}.confetti .cf-rating-display-number .cf-rating-number{border-right:1px solid var(--confetti-border-color);text-align:center;cursor:pointer;color:var(--confetti-rating-text-color);border-left:none;border-top:none;border-bottom:none;font-weight:700;padding:8px 0;margin-top:-1px;margin-bottom:-1px}.confetti .cf-rating-display-number .cf-rating-number:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}.confetti .cf-rating-display-number .cf-rating-number:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px;border-right:0}.confetti .cf-rating-display-number .cf-rating-number[data-focus-visible='true']{box-shadow:inset 0 0 0 1px var(--confetti-outline-color)}.confetti .cf-rating-display-number .cf-rating-number[data-selected='true']{background:var(--confetti-rating-active-bg-color);color:var(--confetti-rating-active-text-color)}
|
|
4
|
+
);}.confetti .cf-rating-section{display:flex;flex-direction:column;gap:4px}.confetti .cf-rating-emoji{opacity:0.5}.confetti .cf-rating-display-star,.confetti .cf-rating-display-emoji{display:grid;grid-template-columns:repeat(auto-fit, 40px);justify-content:space-between;grid-gap:8px;gap:8px}.confetti .cf-rating-display-star .cf-rating-emoji,.confetti .cf-rating-display-emoji .cf-rating-emoji,.confetti .cf-rating-display-star .cf-rating-star,.confetti .cf-rating-display-emoji .cf-rating-star{font-size:1em;background-color:transparent;border:none;padding:0;transition:transform 0.15s ease-out;color:var(--confetti-rating-active-bg-color)}.confetti .cf-rating-display-star .cf-rating-emoji[data-focus-visible='true'],.confetti .cf-rating-display-emoji .cf-rating-emoji[data-focus-visible='true'],.confetti .cf-rating-display-star .cf-rating-star[data-focus-visible='true'],.confetti .cf-rating-display-emoji .cf-rating-star[data-focus-visible='true']{outline:2px solid var(--confetti-outline-color);outline-offset:2px}.confetti .cf-rating-display-star .cf-rating-emoji:hover,.confetti .cf-rating-display-emoji .cf-rating-emoji:hover,.confetti .cf-rating-display-star .cf-rating-star:hover,.confetti .cf-rating-display-emoji .cf-rating-star:hover{cursor:pointer;-ms-transform:scale(1.15);transform:scale(1.15);opacity:1!important}.confetti .cf-rating-display-star .cf-rating-emoji[data-filled='true'],.confetti .cf-rating-display-emoji .cf-rating-emoji[data-filled='true'],.confetti .cf-rating-display-star .cf-rating-star[data-filled='true'],.confetti .cf-rating-display-emoji .cf-rating-star[data-filled='true']{opacity:1}.confetti .cf-rating-display-star .cf-rating-emoji[data-selected='true'],.confetti .cf-rating-display-emoji .cf-rating-emoji[data-selected='true'],.confetti .cf-rating-display-star .cf-rating-star[data-selected='true'],.confetti .cf-rating-display-emoji .cf-rating-star[data-selected='true']{opacity:1}.confetti .cf-rating-display-star .cf-rating-emoji svg,.confetti .cf-rating-display-emoji .cf-rating-emoji svg,.confetti .cf-rating-display-star .cf-rating-star svg,.confetti .cf-rating-display-emoji .cf-rating-star svg{transition:fill 0.15s ease-out}.confetti .cf-rating-text{display:flex;justify-content:space-between;font-size:0.75em;color:var(--confetti-text-subtle-color);font-weight:500;line-height:1}.confetti .cf-rating-text .cf-rating-text-lower{flex:1;text-align:left}.confetti .cf-rating-text .cf-rating-text-upper{flex:1;text-align:right}.confetti .cf-rating-display-star .cf-rating-star[data-selected='true'] ~ .cf-rating-star{opacity:0.5}.confetti .cf-rating-display-number{display:grid;grid-auto-columns:1fr;grid-auto-flow:column;border:1px solid var(--confetti-border-color);border-radius:8px;overflow:hidden}.confetti .cf-rating-display-number .cf-rating-number{border-right:1px solid var(--confetti-border-color);text-align:center;cursor:pointer;color:var(--confetti-rating-text-color);border-left:none;border-top:none;border-bottom:none;font-weight:700;padding:8px 0;margin-top:-1px;margin-bottom:-1px}.confetti .cf-rating-display-number .cf-rating-number:first-of-type{border-top-left-radius:8px;border-bottom-left-radius:8px}.confetti .cf-rating-display-number .cf-rating-number:last-of-type{border-top-right-radius:8px;border-bottom-right-radius:8px;border-right:0}.confetti .cf-rating-display-number .cf-rating-number[data-focus-visible='true']{box-shadow:inset 0 0 0 1px var(--confetti-outline-color)}.confetti .cf-rating-display-number .cf-rating-number[data-selected='true']{background:var(--confetti-rating-active-bg-color);color:var(--confetti-rating-active-text-color)}
|
package/build/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as ModalContainerProps, t as ModalContainer } from "./ModalContainer-D7lgJ6Vl.js";
|
|
2
|
-
import { a as MultiSelectQuestionProperties, c as StatementQuestionProperties, i as PublicGetSurveyOutput, l as TextQuestionProperties, n as ConfettiState, o as RatingQuestionProperties, r as Question, s as SingleSelectQuestionProperties, t as Answer } from "./types-
|
|
2
|
+
import { a as MultiSelectQuestionProperties, c as StatementQuestionProperties, i as PublicGetSurveyOutput, l as TextQuestionProperties, n as ConfettiState, o as RatingQuestionProperties, r as Question, s as SingleSelectQuestionProperties, t as Answer } from "./types-JeyKtT3p.js";
|
|
3
3
|
import * as react0 from "react";
|
|
4
|
-
import { HTMLAttributes, PropsWithChildren } from "react";
|
|
5
|
-
import * as
|
|
4
|
+
import { HTMLAttributes, PropsWithChildren, SVGProps } from "react";
|
|
5
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/core/ConfettiController.d.ts
|
|
8
8
|
interface ConfettiControllerProps {
|
|
@@ -20,7 +20,7 @@ declare const ConfettiController: ({
|
|
|
20
20
|
shouldAutoSubmit,
|
|
21
21
|
onFinished,
|
|
22
22
|
children
|
|
23
|
-
}: ConfettiControllerProps) =>
|
|
23
|
+
}: ConfettiControllerProps) => react_jsx_runtime11.JSX.Element;
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/core/ConfettiProvider.d.ts
|
|
26
26
|
interface ConfettiContextValue {
|
|
@@ -33,6 +33,7 @@ interface ConfettiContextValue {
|
|
|
33
33
|
}) => Promise<void>;
|
|
34
34
|
dismiss: () => Promise<void> | void;
|
|
35
35
|
survey: PublicGetSurveyOutput | undefined;
|
|
36
|
+
isVisible: boolean;
|
|
36
37
|
}
|
|
37
38
|
declare const ConfettiContext: react0.Context<ConfettiContextValue | null>;
|
|
38
39
|
interface ConfettiProviderProps {
|
|
@@ -46,26 +47,39 @@ interface ConfettiProviderProps {
|
|
|
46
47
|
lastRespondedAt: Date | null;
|
|
47
48
|
lastDismissedAt: Date | null;
|
|
48
49
|
}) => boolean);
|
|
50
|
+
alwaysRenderChildren?: boolean;
|
|
49
51
|
}
|
|
50
|
-
declare const ConfettiProvider: (
|
|
51
|
-
children,
|
|
52
|
-
surveyId,
|
|
53
|
-
publishableKey,
|
|
54
|
-
respondent: respondentInput,
|
|
55
|
-
metadata,
|
|
56
|
-
isSurveyVisible: isSurveyVisibleInput,
|
|
57
|
-
apiBaseUrl
|
|
58
|
-
}: ConfettiProviderProps) => react_jsx_runtime6.JSX.Element | null;
|
|
52
|
+
declare const ConfettiProvider: (props: ConfettiProviderProps) => react_jsx_runtime11.JSX.Element;
|
|
59
53
|
declare const useConfetti: () => ConfettiContextValue;
|
|
60
54
|
//#endregion
|
|
55
|
+
//#region src/components/questions/types.d.ts
|
|
56
|
+
type Question$1 = PublicGetSurveyOutput['questions'][number];
|
|
57
|
+
interface BaseFieldProps {
|
|
58
|
+
id: string;
|
|
59
|
+
title: string | null | undefined;
|
|
60
|
+
description?: string | null | undefined;
|
|
61
|
+
required?: boolean;
|
|
62
|
+
onChange: (answer: Answer) => void;
|
|
63
|
+
error?: string;
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/questions/BugReport/BugReport.d.ts
|
|
67
|
+
interface BugReportOptions {
|
|
68
|
+
maskAllInputs?: boolean;
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
61
71
|
//#region src/components/Confetti.d.ts
|
|
62
|
-
interface ConfettiProps extends Omit<ConfettiProviderProps, 'children'>, Pick<ConfettiControllerProps, 'onFinished' | 'shouldAutoSubmit'> {
|
|
72
|
+
interface ConfettiProps extends Omit<ConfettiProviderProps, 'children'>, Pick<ConfettiControllerProps, 'onFinished' | 'shouldAutoSubmit'> {
|
|
73
|
+
options?: {
|
|
74
|
+
bugReport?: BugReportOptions;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
63
77
|
declare const Confetti: ({
|
|
64
78
|
children,
|
|
65
79
|
onFinished,
|
|
66
80
|
shouldAutoSubmit,
|
|
67
81
|
...props
|
|
68
|
-
}: ConfettiProps & Pick<ConfettiControllerProps, "children" | "shouldAutoSubmit">) =>
|
|
82
|
+
}: ConfettiProps & Pick<ConfettiControllerProps, "children" | "shouldAutoSubmit">) => react_jsx_runtime11.JSX.Element;
|
|
69
83
|
//#endregion
|
|
70
84
|
//#region src/components/ThankYouMessage.d.ts
|
|
71
85
|
interface ThankYouMessageProps {
|
|
@@ -82,7 +96,7 @@ declare const ThankYouMessage: ({
|
|
|
82
96
|
title,
|
|
83
97
|
description,
|
|
84
98
|
classNames
|
|
85
|
-
}: ThankYouMessageProps) =>
|
|
99
|
+
}: ThankYouMessageProps) => react_jsx_runtime11.JSX.Element | null;
|
|
86
100
|
//#endregion
|
|
87
101
|
//#region src/components/container/PopoverContainer.d.ts
|
|
88
102
|
interface PopoverContainerProps {
|
|
@@ -104,21 +118,10 @@ declare const PopoverContainer: ({
|
|
|
104
118
|
containerProps,
|
|
105
119
|
onDismiss,
|
|
106
120
|
closeOnFinishMs
|
|
107
|
-
}: PopoverContainerProps) =>
|
|
108
|
-
//#endregion
|
|
109
|
-
//#region src/components/questions/types.d.ts
|
|
110
|
-
type Question$1 = PublicGetSurveyOutput['questions'][number];
|
|
111
|
-
interface BaseFieldProps {
|
|
112
|
-
id: string;
|
|
113
|
-
title: string | null | undefined;
|
|
114
|
-
description?: string | null | undefined;
|
|
115
|
-
required?: boolean;
|
|
116
|
-
onChange: (answer: Answer) => void;
|
|
117
|
-
error?: string;
|
|
118
|
-
}
|
|
121
|
+
}: PopoverContainerProps) => react_jsx_runtime11.JSX.Element;
|
|
119
122
|
//#endregion
|
|
120
123
|
//#region src/components/questions/factory.d.ts
|
|
121
|
-
interface SurveyQuestionFactoryProps {
|
|
124
|
+
interface SurveyQuestionFactoryProps extends BugReportOptions {
|
|
122
125
|
question: Question$1;
|
|
123
126
|
onChange: (answer: Answer) => void;
|
|
124
127
|
error?: string;
|
|
@@ -126,8 +129,9 @@ interface SurveyQuestionFactoryProps {
|
|
|
126
129
|
declare const SurveyQuestionFactory: ({
|
|
127
130
|
question,
|
|
128
131
|
onChange,
|
|
129
|
-
error
|
|
130
|
-
|
|
132
|
+
error,
|
|
133
|
+
maskAllInputs
|
|
134
|
+
}: SurveyQuestionFactoryProps) => react_jsx_runtime11.JSX.Element;
|
|
131
135
|
//#endregion
|
|
132
136
|
//#region src/components/questions/Rating.d.ts
|
|
133
137
|
interface RatingProps extends BaseFieldProps {
|
|
@@ -161,7 +165,7 @@ declare const Rating: ({
|
|
|
161
165
|
id,
|
|
162
166
|
error,
|
|
163
167
|
required
|
|
164
|
-
}: RatingProps) =>
|
|
168
|
+
}: RatingProps) => react_jsx_runtime11.JSX.Element;
|
|
165
169
|
//#endregion
|
|
166
170
|
//#region src/components/questions/FreeText.d.ts
|
|
167
171
|
interface FreeTextProps extends BaseFieldProps {
|
|
@@ -185,7 +189,7 @@ declare const FreeText: ({
|
|
|
185
189
|
classNames,
|
|
186
190
|
required,
|
|
187
191
|
error
|
|
188
|
-
}: FreeTextProps) =>
|
|
192
|
+
}: FreeTextProps) => react_jsx_runtime11.JSX.Element;
|
|
189
193
|
//#endregion
|
|
190
194
|
//#region src/components/questions/SingleChoice.d.ts
|
|
191
195
|
interface SingleChoiceProps extends BaseFieldProps {
|
|
@@ -215,7 +219,7 @@ declare const SingleChoice: ({
|
|
|
215
219
|
id,
|
|
216
220
|
required,
|
|
217
221
|
error
|
|
218
|
-
}: SingleChoiceProps) =>
|
|
222
|
+
}: SingleChoiceProps) => react_jsx_runtime11.JSX.Element;
|
|
219
223
|
//#endregion
|
|
220
224
|
//#region src/components/questions/MultiChoice.d.ts
|
|
221
225
|
interface MultiChoiceProps extends BaseFieldProps {
|
|
@@ -248,7 +252,7 @@ declare const MultiChoice: ({
|
|
|
248
252
|
id,
|
|
249
253
|
required,
|
|
250
254
|
error
|
|
251
|
-
}: MultiChoiceProps) =>
|
|
255
|
+
}: MultiChoiceProps) => react_jsx_runtime11.JSX.Element;
|
|
252
256
|
//#endregion
|
|
253
257
|
//#region src/components/questions/Statement.d.ts
|
|
254
258
|
interface StatementProps extends BaseFieldProps {
|
|
@@ -266,7 +270,7 @@ declare const Statement: ({
|
|
|
266
270
|
title,
|
|
267
271
|
description,
|
|
268
272
|
classNames
|
|
269
|
-
}: StatementProps) =>
|
|
273
|
+
}: StatementProps) => react_jsx_runtime11.JSX.Element;
|
|
270
274
|
//#endregion
|
|
271
275
|
//#region src/components/presentation/Flow.d.ts
|
|
272
276
|
type ChildField = (_: {
|
|
@@ -285,7 +289,7 @@ declare const Flow: ({
|
|
|
285
289
|
children,
|
|
286
290
|
question,
|
|
287
291
|
isLastQuestion
|
|
288
|
-
}: FlowProps) =>
|
|
292
|
+
}: FlowProps) => react_jsx_runtime11.JSX.Element;
|
|
289
293
|
//#endregion
|
|
290
294
|
//#region src/components/presentation/Embed.d.ts
|
|
291
295
|
declare const Embed: ({
|
|
@@ -295,7 +299,7 @@ declare const Embed: ({
|
|
|
295
299
|
}: PropsWithChildren<{
|
|
296
300
|
isCompleted: boolean;
|
|
297
301
|
onSubmit: () => void;
|
|
298
|
-
}>) =>
|
|
302
|
+
}>) => react_jsx_runtime11.JSX.Element;
|
|
299
303
|
//#endregion
|
|
300
304
|
//#region src/components/CloseButton.d.ts
|
|
301
305
|
interface CloseButtonProps {
|
|
@@ -307,10 +311,53 @@ declare const CloseButton: ({
|
|
|
307
311
|
className,
|
|
308
312
|
iconClassName,
|
|
309
313
|
onClose
|
|
310
|
-
}: CloseButtonProps) =>
|
|
314
|
+
}: CloseButtonProps) => react_jsx_runtime11.JSX.Element | null;
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region src/components/trigger/ConfettiTriggerIcon.d.ts
|
|
317
|
+
declare const ConfettiTriggerIcon: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime11.JSX.Element;
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region src/components/trigger/DefaultConfettiTrigger.d.ts
|
|
320
|
+
interface DefaultConfettiTriggerProps {
|
|
321
|
+
onClick: () => void;
|
|
322
|
+
isWidgetOpen: boolean;
|
|
323
|
+
label?: string;
|
|
324
|
+
classNames?: {
|
|
325
|
+
trigger?: string;
|
|
326
|
+
icon?: string;
|
|
327
|
+
iconWrapper?: string;
|
|
328
|
+
label?: string;
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
declare const DefaultConfettiTrigger: ({
|
|
332
|
+
onClick,
|
|
333
|
+
isWidgetOpen,
|
|
334
|
+
classNames,
|
|
335
|
+
label
|
|
336
|
+
}: DefaultConfettiTriggerProps) => react_jsx_runtime11.JSX.Element | null;
|
|
337
|
+
//#endregion
|
|
338
|
+
//#region src/templates/ConfettiTrigger.d.ts
|
|
339
|
+
interface TriggerRenderProps {
|
|
340
|
+
onClick: () => void;
|
|
341
|
+
isWidgetOpen: boolean;
|
|
342
|
+
hasSubmitted: boolean;
|
|
343
|
+
}
|
|
344
|
+
interface TriggerChildProps extends Pick<ConfettiProviderProps, 'publishableKey' | 'surveyId'> {
|
|
345
|
+
onDismiss: () => void;
|
|
346
|
+
}
|
|
347
|
+
interface ConfettiTriggerProps extends Omit<ConfettiProviderProps, 'children' | 'alwaysRenderChildren'> {
|
|
348
|
+
surveyId: string;
|
|
349
|
+
publishableKey: string;
|
|
350
|
+
trigger?: (renderProps: TriggerRenderProps) => React.ReactNode;
|
|
351
|
+
children: (triggerProps: TriggerChildProps) => React.ReactNode;
|
|
352
|
+
}
|
|
353
|
+
declare const ConfettiTrigger: ({
|
|
354
|
+
trigger,
|
|
355
|
+
children,
|
|
356
|
+
...providerProps
|
|
357
|
+
}: ConfettiTriggerProps) => react_jsx_runtime11.JSX.Element;
|
|
311
358
|
//#endregion
|
|
312
359
|
//#region src/templates/EmbeddedConfetti.d.ts
|
|
313
|
-
declare const EmbeddedConfetti: (props: ConfettiProps) =>
|
|
360
|
+
declare const EmbeddedConfetti: (props: ConfettiProps) => react_jsx_runtime11.JSX.Element;
|
|
314
361
|
//#endregion
|
|
315
362
|
//#region src/templates/ModalConfetti.d.ts
|
|
316
363
|
interface ModalConfettiProps extends ConfettiProps {
|
|
@@ -323,7 +370,7 @@ declare const ModalConfetti: ({
|
|
|
323
370
|
closeOnFinishMs,
|
|
324
371
|
isDismissable,
|
|
325
372
|
...props
|
|
326
|
-
}: ModalConfettiProps) =>
|
|
373
|
+
}: ModalConfettiProps) => react_jsx_runtime11.JSX.Element;
|
|
327
374
|
//#endregion
|
|
328
375
|
//#region src/templates/PopoverConfetti.d.ts
|
|
329
376
|
interface PopoverConfettiProps extends ConfettiProps {
|
|
@@ -343,10 +390,10 @@ declare const PopoverConfetti: ({
|
|
|
343
390
|
onDismiss,
|
|
344
391
|
closeOnFinishMs,
|
|
345
392
|
...props
|
|
346
|
-
}: PopoverConfettiProps) =>
|
|
393
|
+
}: PopoverConfettiProps) => react_jsx_runtime11.JSX.Element;
|
|
347
394
|
//#endregion
|
|
348
395
|
//#region src/templates/StepperConfetti.d.ts
|
|
349
|
-
declare const StepperConfetti: (props: ConfettiProps) =>
|
|
396
|
+
declare const StepperConfetti: (props: ConfettiProps) => react_jsx_runtime11.JSX.Element;
|
|
350
397
|
//#endregion
|
|
351
398
|
//#region src/hooks/useVisibleAfterDelay.d.ts
|
|
352
399
|
interface UseVisibleAfterDelayOptions {
|
|
@@ -388,4 +435,4 @@ declare const useVisibleAfterScroll: ({
|
|
|
388
435
|
isVisible: boolean;
|
|
389
436
|
};
|
|
390
437
|
//#endregion
|
|
391
|
-
export { type Answer, CloseButton, Confetti, ConfettiContext, ConfettiController, type ConfettiControllerProps, type ConfettiProps, ConfettiProvider, type ConfettiProviderProps, type ConfettiState, Embed, EmbeddedConfetti, Flow, FreeText, type FreeTextProps, ModalConfetti, ModalContainer, type ModalContainerProps, MultiChoice, type MultiChoiceProps, PopoverConfetti, PopoverContainer, type PopoverContainerProps, type Question, Rating, type RatingProps, SingleChoice, type SingleChoiceProps, Statement, type StatementProps, StepperConfetti, SurveyQuestionFactory, type SurveyQuestionFactoryProps, ThankYouMessage, useConfetti, useVisibleAfterDelay, useVisibleAfterPageVisits, useVisibleAfterScroll, useVisibleAfterSessionPageVisits };
|
|
438
|
+
export { type Answer, CloseButton, Confetti, ConfettiContext, ConfettiController, type ConfettiControllerProps, type ConfettiProps, ConfettiProvider, type ConfettiProviderProps, type ConfettiState, ConfettiTrigger, ConfettiTriggerIcon, type ConfettiTriggerProps, DefaultConfettiTrigger, type DefaultConfettiTriggerProps, Embed, EmbeddedConfetti, Flow, FreeText, type FreeTextProps, ModalConfetti, ModalContainer, type ModalContainerProps, MultiChoice, type MultiChoiceProps, PopoverConfetti, PopoverContainer, type PopoverContainerProps, type Question, Rating, type RatingProps, SingleChoice, type SingleChoiceProps, Statement, type StatementProps, StepperConfetti, SurveyQuestionFactory, type SurveyQuestionFactoryProps, ThankYouMessage, type TriggerChildProps, type TriggerRenderProps, useConfetti, useVisibleAfterDelay, useVisibleAfterPageVisits, useVisibleAfterScroll, useVisibleAfterSessionPageVisits };
|