1"use strict";(globalThis.rspackChunknotion_next=globalThis.rspackChunknotion_next||[]).push([[22031],{408287(e,n,t){t.r(n),t.d(n,{NotionCalendarLaunchModal:()=>s});var o=t(635790),a=t(440302);let l=(0,t(327219).YK)({getNotionCalendar:{id:"notionCalendarLaunchButton.getNotionCalendar",defaultMessage:"Get Notion Calendar"},downloadApp:{id:"notionCalendarLaunchButton.downloadApp",defaultMessage:"Download app"},openCalendar:{id:"notionCalendarLaunchButton.openCalendar",defaultMessage:"Open Calendar"}});function r(e){let{style:n,openCalendarFrom:r,getNotionCalendarFrom:i,onOpenCalendarClick:s,onGetNotionCalendarClick:d,onDownloadClick:c}=e,u=(0,t(533992).v3)(),p=(0,t(960253).I)(()=>({button:{marginInlineStart:8,whiteSpace:"nowrap",...n}}),[n]),y=(0,t(579993).O$)(t(610463).X),g=(0,t(579993).O$)(t(728372).AppStoreSidebarSpaceStore),h=(0,t(579993).K8)(()=>{let e=(0,t(328765).S)();return e&&(0,t(453737).d)({spaceStore:e})},[]),[{value:m}]=(0,t(97668).Yb)(async()=>!!(null!==t(884972).Ht&&void 0!==t(884972).Ht&&t(884972).Ht.isProtocolRegistered)&&t(884972).Ht.isProtocolRegistered(t(139424).A.calendar.desktopProtocol),[]),S=(0,o.useCallback)(()=>{t(297971).Op({environment:u,spaceStore:g,collectionViewStore:void 0,from:r}),null==s||s()},[u,r,s,g]),f=(0,o.useCallback)(()=>{t(728372).AppStoreCurrentUserSettingsStore.state&&g&&(t(297971).Op({environment:u,spaceStore:g,collectionViewStore:void 0,from:i}),null==d||d())},[u,i,d,g]),b=(0,o.useCallback)(()=>{(0,t(624621).L)({environment:u,url:t(139424).A.calendar.downloadUrl}),null==c||c()},[u,c]);return u.device.isElectron?m?(0,a.jsx)(t(912946).j,{colorPalette:"blue",style:p.button,size:"lg",onClick:S,children:(0,a.jsx)(t(327219).sA,{...l.openCalendar})}):(0,a.jsx)(t(912946).j,{colorPalette:"blue",style:p.button,size:"lg",onClick:b,children:(0,a.jsx)(t(327219).sA,{...l.downloadApp})}):y||h?(0,a.jsx)(t(912946).j,{colorPalette:"blue",style:p.button,size:"lg",onClick:S,children:(0,a.jsx)(t(327219).sA,{...l.openCalendar})}):(0,a.jsx)(t(912946).j,{style:p.button,size:"lg",onClick:f,children:(0,a.jsx)(t(327219).sA,{...l.getNotionCalendar})})}let i={container:{maxWidth:442},closeButton:{position:"absolute",top:12,insetInlineEnd:12,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"100%",background:t(632079).Tj.outlineButtonPressedBackground,width:18,height:18},closeButtonHovered:{background:t(632079).Tj.outlineButtonPressedBackground},title:{fontWeight:t(699422).Wy.bold,fontSize:25,display:"flex",marginBottom:6},divider:{backgroundColor:t(632079).Tj.border.secondary,opacity:.5},successTitle:{fontSize:25,fontWeight:t(699422).Wy.bold,margin:"8px 0"},downloadContainer:{display:"flex",padding:"16px 20px",marginTop:28,borderRadius:12,background:t(632079).Tj.background.secondaryTranslucent},downloadTitle:{fontSize:16,fontWeight:t(699422).Wy.semibold,marginBottom:4},downloadButton:{height:32,marginTop:12}};function s(){let e=(0,t(533992).v3)();(0,o.useEffect)(()=>{let n=()=>{!t(825244).A.state.isVisible||t(328373).o.state.isConnectingCalendar&&(t(328373).o.setState({isConnectingCalendar:!1}),t(250044).refreshExternalIntegrationStore({environment:e}))};return t(825244).A.addListener(n),()=>{t(825244).A.removeListener(n)}},[e]);let n=(0,t(579993).K8)(()=>t(328373).o.state.signupCtaAttribution||"onboardingModalSignIn",[]),s=(0,o.useCallback)(()=>{let n=t(728372).AppStoreCurrentUserSettingsStore.state;n&&(t(357709).Sq(e,{callout_key:"notion_calendar_launch_promo",dismiss_type:"modal_dismiss_clicked",placement_key:"Modal"}),(0,t(59579).a)(e,"notion_calendar_launch_promo"),t(297971).MR({environment:e,userSettingsStore:n}),t(328373).o.setState({signupCtaAttribution:void 0}))},[e]),c=(0,o.useCallback)(()=>{let n=t(728372).AppStoreCurrentUserSettingsStore.state,o=t(728372).AppStoreSidebarSpaceStore.state;n&&o&&(t(357709).Y5(e,{callout_key:"notion_calendar_launch_promo",click_type:"primary_cta",placement_key:"Modal"}),(0,t(59579).a)(e,"notion_calendar_launch_promo"),t(297971).rI(e,{phase:"dismissed_completely",transactionUserAction:"NotionCalendarLaunchModal.openCalendar",userSettingsStore:n}))},[e]),u=(0,o.useCallback)(()=>{let n=t(728372).AppStoreCurrentUserSettingsStore.state,o=t(728372).AppStoreSidebarSpaceStore.state;n&&o&&(t(357709).Y5(e,{callout_key:"notion_calendar_launch_promo",click_type:"primary_cta",placement_key:"Modal"}),e.device.isElectron&&(0,t(59579).a)(e,"notion_calendar_launch_promo"),t(297971).rI(e,{phase:"connected_notion_calendar",transactionUserAction:"NotionCalendarLaunchModal.getNotionCalendar",userSettingsStore:n}))},[e]),p=(0,o.useCallback)(()=>{let n=t(728372).AppStoreCurrentUserSettingsStore.state;n&&(t(357709).Y5(e,{callout_key:"notion_calendar_launch_promo",click_type:"primary_cta",placement_key:"Modal"}),(0,t(59579).a)(e,"notion_calendar_launch_promo"),t(297971).rI(e,{phase:"dismissed_completely",transactionUserAction:"NotionCalendarLaunchModal.clickDownload",userSettingsStore:n}))},[e]),y=(0,t(579993).K8)(()=>{var e;let n=null==(e=t(728372).AppStoreCurrentUserSettingsStore.state)?void 0:e.getSettings();return null==n?void 0:n.notion_calendar_launch_modal_phase},[]);return(0,a.jsx)(t(184799).l,{messageKey:"notion_calendar_launch_promo",desktopRenderInner:()=>(0,a.jsx)(d,{launchModalPhase:y,renderChild:()=>"connected_notion_calendar"===y?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t(226512).R,{onClick:s}),(0,a.jsxs)(t(4458).VP,{padding:24,children:[(0,a.jsx)(t(16275).I,{icon:t(853160).checkmarkCircleIcon,size:"xl",colorVariant:"secondary"}),(0,a.jsx)("div",{style:i.successTitle,children:(0,a.jsx)(t(327219).sA,{defaultMessage:"Success!",id:"notionCalendarLaunchModal.successTitle"})}),(0,a.jsx)(t(111010).D,{styleKey:"bodyRegular",colorVariant:"secondary",children:(0,a.jsx)(t(327219).sA,{defaultMessage:"You can now view Notion docs, projects, tasks, and timelines alongside calendar events on Notion Calendar",id:"notionCalendarLaunchModal.successCaption"})}),(0,a.jsxs)("div",{style:i.downloadContainer,children:[(0,a.jsxs)(t(4458).VP,{paddingInlineEnd:8,children:[(0,a.jsx)("div",{style:i.downloadTitle,children:(0,a.jsx)(t(327219).sA,{defaultMessage:"Get the desktop app",id:"notionCalendarLaunchModal.downloadTitle"})}),(0,a.jsx)(t(111010).D,{styleKey:"bodyRegular",colorVariant:"secondary",children:(0,a.jsx)(t(327219).sA,{defaultMessage:"See notifications, view your schedule, and join meetings from anywhere",id:"notionCalendarLaunchModal.downloadCaption"})}),(0,a.jsx)(t(4458).fI,{children:(0,a.jsx)(t(912946).j,{colorPalette:"blue",style:i.downloadButton,onClick:()=>{t(368690).Lt({cta:"download"}),(0,t(624621).L)({environment:e,url:t(139424).A.calendar.downloadUrl}),p()},children:(0,a.jsx)(t(327219).sA,{...l.downloadApp})})})]}),(0,a.jsx)(t(4458).fI,{alignSelf:"end",children:(0,a.jsx)(t(16275).I,{icon:t(227946).notionCalendarIcon,size:56})})]})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t(907790).Ay,{src:"https://player.vimeo.com/video/900939588?h=187435ef3c",defaultTextTrack:t(907790).VH[t(849917).locale]||"en",options:{muted:!0,autoplay:!0,loop:!0,background:!0,playsinline:!0}}),(0,a.jsx)(t(226512).R,{style:i.closeButton,hoveredStyle:i.closeButtonHovered,onClick:s}),(0,a.jsxs)(t(4458).VP,{padding:24,children:[(0,a.jsx)("div",{style:i.title,children:(0,a.jsx)(t(327219).sA,{defaultMessage:"Meet Notion Calendar",id:"notionCalendarLaunchModal.title"})}),(0,a.jsxs)(t(111010).D,{styleKey:"bodyRegular",colorVariant:"secondary",children:[(0,a.jsx)(t(327219).sA,{defaultMessage:"The beautifully designed calendar for your life and work. Integrated and synced with all your calendar events.",id:"notionCalendarLaunchModal.caption"})," "]})]}),(0,a.jsx)(t(346268).c,{size:1,style:i.divider}),(0,a.jsxs)(t(4458).fI,{paddingBlock:20,paddingInline:24,alignItems:"center",justifyContent:"space-between",children:[(0,a.jsx)(t(988022).p,{colorPalette:"gray",href:(0,t(313281).x)("blog.notionCalendarLaunch"),external:!0,iconTrailing:{icon:t(166568).arrowUpRightSquareSmallIcon,size:"sm"},children:(0,a.jsx)(t(327219).sA,{defaultMessage:"Learn more",id:"notionCalendarLaunchModal.learnMore"})}),(0,a.jsx)(r,{openCalendarFrom:"onboardingModalOpenCalendar",getNotionCalendarFrom:n,onOpenCalendarClick:()=>{t(368690).be({cta:"open_calendar"}),c()},onGetNotionCalendarClick:()=>{t(368690).be({cta:"get_calendar"}),u()},onDownloadClick:()=>{t(368690).be({cta:"download"}),p()}})]})]})}
1),desktopInnerStyle:i.container,desktopOnDismiss:s,phoneRenderInner:()=>null})}function d(e){let{launchModalPhase:n,renderChild:a}=e,l=(0,t(533992).v3)();return(0,o.useEffect)(()=>{"connected_notion_calendar"===n?t(368690).Y8():t(368690).aq()},[l,n]),a()}},453737(e,n,t){function o({spaceStore:e}){return!(0,t(573143).nH)({spaceBotSettings:e.getBotSettings(),integrationId:t(49361).io})||(0,t(916804).I)(e)||(0,t(529587).X)(e)}t.d(n,{d:()=>o})},253492(e,n,t){t(635790);var o=t(440302);function a(e){return(0,o.jsx)("div",{style:{width:"100%",position:"relative",paddingBottom:`${100*e.ratio}%`},children:e.children})}t.d(n,{A:()=>a})},749946(e,n,t){t(635790);var o=t(440302);function a(e){let{renderInner:n,innerStyle:a,onDismiss:l,onClosed:r,fullscreen:i}=e,s=(0,t(533992).v3)(),d=(0,t(533992).Y0)(),c=(0,t(579993).K8)(()=>s.WindowSizeStore.isLandscape(),[s.WindowSizeStore]),u=(0,t(960253).I)(()=>{let e;return(i||c)&&(e="100%"),{popupStyle:{background:t(632079).Tj.background.secondary,borderStartEndRadius:"24px",borderStartStartRadius:"24px",overflow:"hidden",width:"100%",height:e,display:"flex",alignItems:"center",justifyContent:"center"},scrollerStyle:{background:t(632079).Tj.background.secondary,width:c?"80%":"100%",height:e,display:"flex",flexDirection:c?"row":"column",alignItems:"center",...a}}},[c,a,i]),p=(0,t(51487).Y5)("top",44),y=(0,t(905189).o)();return(0,o.jsx)(t(182718).z,{open:!0,hidesMobileNativeBottomBar:!0,preventBlockRenderQueueOnEnter:!0,popupType:t(423291).n.SlideUp,onDismiss:l,onClosed:r,style:u.popupStyle,content:()=>(0,o.jsxs)(t(136508)._,{type:c?t(644154).A.Y:t(644154).A.None,style:u.scrollerStyle,children:[(0,o.jsx)(t(884877).A,{size:c?p:0}),n(),(0,o.jsx)(t(884877).A,{size:y+32*!!d.isMobileBrowser})]})})}t.d(n,{_:()=>a})},184799(e,n,t){var o=t(635790),a=t(440302);function l(e){return(0,a.jsx)(t(885779).W,{messageKey:e.messageKey,from:"AnnouncementModal",children:(0,a.jsx)(r,{...e})})}function r(e){let{messageKey:n,desktopRenderInner:l,desktopInnerStyle:r,desktopOnDismiss:s,phoneRenderInner:d,phoneInnerStyle:c,phoneOnly:u,calloutMetadata:p,variant:y,view:g,ctaVariant:h,ctaGroup:m,onShowingChange:S}=e,f=(0,t(533992).v3)(),b=(0,t(533992).Y0)(),C=(0,t(960253).I)(()=>({modalStyle:{background:t(632079).Tj.background.secondary,borderRadius:12,...r}}),[r]),x=(0,t(579993).K8)(()=>{var e;let n=(0,t(500880).Xz)(f.TabbedRouterStore.state);return"web"===n.type&&((null==(e=n.redirectedTo)?void 0:e.route)||n.route)},[f.TabbedRouterStore]),j=(0,t(579993).K8)(()=>!(b.isPhone&&(0,t(318355).A)(f)&&(!x||"page"!==x.name))&&!t(227947).Ay.state.open,[b.isPhone,f,x]),_=(0,t(579993).K8)(()=>t(696190).default.isVisible(n),[n])&&j;return((0,o.useEffect)(()=>{null==S||S(_)},[_,S]),(0,t(619772).A)(()=>{t(357709).DL(f,{callout_key:n,is_forced:t(696190).default.isForced(n),placement_key:"Modal",callout_metadata:p,variant:y,view:g,cta_variant:h,cta_group:m});let e=t(696190).default.state.messages.get(n);e&&(0,t(125542).bb)(e)&&(0,t(219094).qq)(f,e)},_),_)?b.isPhone?(0,a.jsx)(i,{messageKey:n,renderInner:d,innerStyle:c}):u&&!b.isPhone?null:(0,a.jsx)(t(171849).a,{open:!0,preventHideChildrenWhileOpening:!0,onDismiss:s,innerStyle:C.modalStyle,children:(0,a.jsx)(t(790124).O,{capture:!0,allowEsc:!0,children:l})}):null}function i(e){let{renderInner:n,innerStyle:l,messageKey:r}=e,i=(0,t(533992).v3)(),{clearSelection:s}=(0,t(766101).g)(),d=(0,o.useCallback)(()=>{t(357709).Sq(i,{callout_key:r,dismiss_type:"modal_background_clicked",placement_key:"Modal"})},[i,r]),c=(0,o.useCallback)(()=>{t(357709).Sq(i,{callout_key:r,dismiss_type:"modal_dismiss_clicked",placement_key:"Modal"})},[i,r]);return(0,o.useEffect)(()=>{s(),(0,t(854091).k)()},[s]),(0,a.jsx)(t(749946)._,{renderInner:n,innerStyle:l,onDismiss:d,onClosed:c})}t.d(n,{l:()=>l})},885779(e,n,t){t(635790);var o=t(440302);function a(e){let{messageKey:n,from:a,children:l}=e;return(0,o.jsx)(t(337336).K,{from:a??`InAppMessage.${n}`,team:"adoption",fallback:()=>null,onError:function(){t(696190).default.removeMessage(n),t(728372).AppStoreInAppCalloutStore.state.updateCalloutStatus({calloutId:n,visible:!1})},resetKey:n,children:l})}t.d(n,{W:()=>a})},905189(e,n,t){function o(){let e=(0,t(533992).v3)();return(0,t(579993).K8)(()=>(0,t(849584).y)(e,t(707785).A.state.estimatedKeyboardWebViewOverlap,t(707785).A.state.nativeBottomBarHeight),[e])}t.d(n,{o:()=>o})},907790(e,n,t){t(730330),t(218043),t(176765),t(851344),t(866491);var o=t(635790),a=t(440302);let l={innerStyle:{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",border:0,boxShadow:`0 1px 0 0 ${t(632079).Tj.border.secondary}`}},r=o.forwardRef(function(e,n){var r,s,d;let c,u=o.useRef(e);u.current=e;let p=o.useRef(void 0),[y,g]=o.useState(!!e.customPlayButton),[h,m]=o.useState(!1),[S,f]=o.useState(!!e.preloadThumbnailSrc);o.useEffect(()=>{f(!!e.preloadThumbnailSrc)},[e.preloadThumbnailSrc,e.src]),o.useEffect(()=>{let n,t=!0,o=()=>{let a=window.Vimeo;if(!a||!t)return;
1let l=document.getElementById(e.src);if(!l)return void setTimeout(o,50);try{var r,i;if(p.current=n=new a.Player(l,{logging:!1}),!t||!n)return;n.on("play",e=>{var n,t;g(!1),null==(n=(t=u.current).onPlay)||n.call(t,e)}),n.on("playing",()=>{f(!1)}),n.on("pause",e=>{var n,t;null==(n=(t=u.current).onPause)||n.call(t,e)}),n.on("ended",e=>{var n,t;null==(n=(t=u.current).onEnd)||n.call(t,e)}),null==(r=(i=u.current).onPlayerReady)||r.call(i,n),n.on("timeupdate",e=>{var n,t;null==(n=(t=u.current).onTimeUpdate)||n.call(t,e)})}catch(e){}};if(window.Vimeo)o();else{let e=document.createElement("script");e.src="https://player.vimeo.com/api/player.js",e.onload=o,document.body.appendChild(e)}return()=>{if(t=!1,p.current=void 0,n)try{n.off("play"),n.off("playing"),n.off("pause"),n.off("ended"),n.off("timeupdate")}catch(e){}}},[e.src]);let b=o.useCallback(()=>{let e=p.current;e&&(m(!0),e.play().catch(e=>{t(773352).log({level:"error",from:"VimeoVideoPlayer",type:"vimeo_play_failed",error:e})}))},[]),C=(s=e.src,d={texttrack:e.defaultTextTrack,playsinline:!1,dnt:(null==(r=e.options)?void 0:r.dnt)??!0,...e.options},c=new URL(s),(0,t(48697).WP)(d).forEach(([e,n])=>{void 0!==n&&c.searchParams.set(e,String(n))}),c.toString()),x=(0,t(960253).I)(()=>({preloadThumbnail:{zIndex:1,pointerEvents:"none",opacity:+!!S,transition:"opacity 0.15s ease-out"},customPlayButtonOverlay:{position:"absolute",top:0,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.4)",opacity:+!h,transition:"opacity 0.15s ease-out",pointerEvents:h?"none":"auto",zIndex:2}}),[h,S]);return(0,a.jsxs)(t(253492).A,{ratio:e.aspectRatioOverride??9/16,children:[(0,a.jsx)(i,{style:{...l.innerStyle,...x.preloadThumbnail,...e.preloadThumbnailStyle},src:e.preloadThumbnailSrc}),(0,a.jsx)("iframe",{ref:n,id:e.src,className:e.className,allowFullScreen:!0,allow:e.allow,src:C,style:{...l.innerStyle,...e.style}}),y&&e.customPlayButton?(0,a.jsx)("div",{style:x.customPlayButtonOverlay,children:(0,a.jsx)(t(912946).j,{onClick:b,size:"lg",colorPalette:"blue",children:e.customPlayButton})}):void 0]})});function i(e){return e.src?(0,a.jsx)("img",{alt:"",style:e.style,src:e.src}):null}t.d(n,{},{Ay:r,VH:{"en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","pt-BR":"pt-BR","es-ES":"es-ES"}})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.