PageSourceSearch

https://community.moneyhabitudes.com/packs/js/76939-94b2aa04e82dd5be.js

js moneyhabitudes.com collected 2026-09-28 10:19:32 UTC 2,457,392 bytes, 2 lines download raw bytes

1(self.rspackChunkcircle=self.rspackChunkcircle||[]).push([[76939],{655774(e){function t(e){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=655774,e.exports=t},165454(e){function t(e){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=165454,e.exports=t},881088(e,t,n){"use strict";e.exports=n.p+"static/images/CircleAIBot-avatar-57a70a007ac7811e.png"},430192(e,t,n){"use strict";e.exports=n.p+"static/images/[email protected]"},419584(e,t,n){"use strict";e.exports=n.p+"static/images/opt-in/circle-wordmark-737fe564bf2c8065.svg"},972867(e,t,n){"use strict";e.exports=n.p+"static/images/opt-in/eclipse-waitlist-modal-bg-lq-2e2b2988fbcbb623.webp"},508853(e,t,n){"use strict";e.exports=n.p+"static/images/opt-in/eclipse-waitlist-modal-bg-dcc7f4513cd1054a.webp"},897817(e,t,n){"use strict";e.exports=n.p+"static/images/opt-in/eclipse-wordmark-0bab4e715b7da1a2.svg"},385260(e,t,n){"use strict";var r=(0,n(797069).QW)();n.d(t,{e:()=>r})},705705(e,t,n){"use strict";var r=n(451430),o=n(598567),i=n(385260);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e){if(Array.isArray(e))return e}function l(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}function d(e,t){return s(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||f(e,t)||c()}function p(e){return s(e)||l(e)||f(e)||c()}function f(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}}var m=new Map,b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0,n=p([e,t]),s=n[0],c=void 0===s?{}:s,b=n.slice(1),y=c.channel,h=u(c,["channel"]),g=d(b,1)[0];if(y&&g){m.has(y)||m.set(y,[]);var v=m.get(y),x=v.find(function(e){var t=e.params;return(0,r.isEqual)(h,t)});return x?x.callbacks.push(g):(x={subscription:i.e.subscribeTo(y,h),params:h,callbacks:[g]},v.push(x),x.subscription.on("message",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];x.callbacks.forEach(function(e){return e.apply(void 0,function(e){if(Array.isArray(e))return a(e)}(t)||l(t)||f(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})}),x.subscription.on("connect",function(){o.j.emitSubscriptionStateChange({channel:y,subscriptionState:"connected"})}),x.subscription.on("disconnect",function(){o.j.emitSubscriptionStateChange({channel:y,subscriptionState:"disconnected"})})),x}},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0,n=p([e,t]),o=n[0],i=void 0===o?{}
1:o,a=n.slice(1),s=i.channel,l=u(i,["channel"]),c=d(a,1)[0];if(s&&c){var f=m.get(s);if(f){var b=f.find(function(e){var t=e.params;return(0,r.isEqual)(l,t)});b&&(b.callbacks=b.callbacks.filter(function(e){return e!==c}),b.callbacks.length||(b.subscription.disconnect(),m.set(s,f.filter(function(e){var t=e.params;return!(0,r.isEqual)(l,t)}))))}}};n.d(t,{a:()=>y,h:()=>b})},526715(e,t,n){"use strict";var r=n(51730),o=n(915779),i={update:function(e,t,n){return(0,r.$H)(o.iK.AccountSubscriptions.update(e,t,n))},renew:function(e){return(0,r.oK)(o.iK.AccountSubscriptions.renew(e))},canDowngrade:function(e){return(0,r.i_)(o.iK.AccountSubscriptions.canDowngrade(e))},createEmailHubSubscription:function(){return(0,r.oK)(o.iK.AccountSubscriptions.createEmailHubSubscription())},reactivateEmailHubSubscription:function(){return(0,r.oK)(o.iK.AccountSubscriptions.reactivateEmailHubSubscription())}};n.d(t,{F:()=>i})},603595(e,t,n){"use strict";var r=n(915779),o=n(51730),i={PENDING:"pending",DETACHED:"detached",IGNORED:"ignored",WITHDRAWN:"withdrawn",ACTIVE:"active"},a=function(){return{getMetrics:function(){return(0,o.i_)(r.iK.admin.connections.metrics())},getTopConnectors:function(e){return(0,o.i_)(r.iK.admin.connections.topConnectors(e))},getLatestConnections:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return(0,o.i_)(r.iK.admin.connections.latestConnections(e,t))}}};n.d(t,{K:()=>a,v:()=>i})},475637(e,t,n){"use strict";var r=n(51730),o=n(915779),i={list:function(e){var t=e.params;return(0,r.i_)(o.iK.broadcasts.list({params:void 0===t?{}:t}))},create:function(e){return(0,r.oK)(o.iK.broadcasts.create(),e)},show:function(e){var t=e.id;return(0,r.i_)(o.iK.broadcasts.show({id:t}))},update:function(e){var t=e.id,n=e.body;return(0,r.$H)(o.iK.broadcasts.show({id:t}),n)},sendNow:function(e){var t=e.id;return(0,r.kS)(o.iK.broadcasts.sendNow({id:t}))},duplicate:function(e){var t=e.id;return(0,r.$H)(o.iK.broadcasts.duplicate({id:t}))},recipientList:function(e){var t=e.id,n=e.params;return(0,r.i_)(o.iK.broadcasts.recipientList({id:t,params:void 0===n?{}:n}))},report:function(e){var t=e.id;return(0,r.i_)(o.iK.broadcasts.report({id:t}))},recipients:function(e){var t=e.id,n=e.params;return(0,r.i_)(o.iK.broadcasts.recipients({id:t,params:void 0===n?{}:n}))},cancelSchedule:function(e){var t=e.id;return(0,r.kS)(o.iK.broadcasts.cancelSchedule({id:t}))},rename:function(e){var t=e.id,n=e.body;return(0,r.kS)(o.iK.broadcasts.rename({id:t}),n)},sendTestEmail:function(e){var t=e.id;return(0,r.kS)(o.iK.broadcasts.sendTestEmail({id:t}))},deleteBroadcast:function(e){var t=e.id;return(0,r.Dc)(o.iK.broadcasts.deleteBroadcast({id:t}))},updateTemplate:function(e){var t=e.id,n=e.body;return(0,r.kS)(o.iK.broadcasts.updateTemplate({id:t}),n)},createFromSource:function(e){return(0,r.oK)(o.iK.broadcasts.createFromSource(),e)},resetContent:function(e){var t=e.id;return(0,r.kS)(o.iK.broadcasts.resetContent({id:t}))},exportRecipients:function(e){var t=e.id,n=e.params;return(0,r.i_)(o.iK.broadcasts.exportRecipients({id:t,params:void 0===n?{}:n}))}};n.d(t,{P:()=>i})},388217(e,t,n){"use strict";var r=n(915779),o=n(51730),i=function(e){return(0,o.oK)(r.iK.communityMembers.batchCanReceiveDm(),{community_member_ids:e})};n.d(t,{J:()=>i})},479674(e,t,n){"use strict";var r=n(51730),o=n(915779);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var a={update:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.uuid,a=e.chat_room;return(0,r.Ez)(o.iK.chatRooms.update({uuid:n}),i({method:"PATCH",body:JSON.stringify({chat_room:a})},t))},destroy:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.uuid;return(0,r.Ez)(o.iK.chatRooms.destroy({uuid:n}),i({method:"DELETE"},t))},reportMessage:function(e,t,n){return(0,r.kS)(o.iK.chatRoomMessages.report({uuid:e,id:t}),{report:n})},getChatRoomCurrentParticipant:function(e){return(0,r.i_)(o.iK.chatRooms.currentParticipant({uuid:e}))},getMessageActions:function(e,t){return(0,r.Gv)(o.iK.chatRoomMessages.actions({uuid:e,id:t}),{method:"GET"})},pinMessage:function(e){var t=e.uuid,n=e.chat_room;return(0,r.kS)(o.iK.chatRooms.pinMessage({uuid:t}),{chat_room:n})},markAsUnread:function(e){var t=e.uuid,n=e.chat_room.message_id;return(0,r.kS)(o.iK.chatRoomMessages.markAsUnread({uuid:t,id:n}))},spotlightMessage:function(e,t){return(0,r.kS)(o.iK.chatRooms.spotlightMessage({uuid:e,messageId:t}))},removeSpotlightMessage:function(e,t){return(0,r.kS)(o.iK.chatRooms.removeSpotlightMessage({uuid:e,messageId:t}))}};n.d(t,{E:()=>a})},253615(e,t,n){"use strict";var r=n(51730),o=n(915779),i={create:function(e){var t=e||{},n=t.uuid,i=t.chat_room_participant;return(0,r.oK)(o.iK.chatRoomParticipants.create({uuid:n}),{chat_room_participant:i})},update:function(e){var t=e||{},n=t.uuid,i=t.id,a=t.admin,s=t.archived,l=t.muted;return(0,r.kS)(o.iK.chatRoomParticipants.update({uuid:n,id:i}),{admin:a,archived:s,muted:l})},destroy:function(e){var t=e||{},n=t.uuid,i=t.id;return(0,r.Dc)(o.iK.chatRoomParticipants.destroy({uuid:n,id:i}))}};n.d(t,{L:()=>i})}
1,606580(e,t,n){"use strict";var r=n(51730),o=n(915779),i=function(e){return(0,r.oK)(o.iK.chatThreads.markAsRead({id:e}))};n.d(t,{r:()=>i})},796159(e,t,n){"use strict";var r=n(51730),o=n(915779),i={list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.params;return(0,r.i_)(o.iK.circleAiConversations.list({params:void 0===t?{}:t}))},archive:function(e){var t=e.id;return(0,r.$H)(o.iK.circleAiConversations.archive({id:t}))},update:function(e){var t=e.id,n=e.title,i=e.projectId,a={};return void 0!==n&&(a.title=n),void 0!==i&&(a.project_id=i),(0,r.$H)(o.iK.circleAiConversations.update({id:t}),a)},destroy:function(e){var t=e.id;return(0,r.Dc)(o.iK.circleAiConversations.destroy({id:t}))}};n.d(t,{D:()=>i})},864861(e,t,n){"use strict";var r=n(51730),o=n(915779),i={list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.params;return(0,r.i_)(o.iK.circleAiProjects.list({params:void 0===t?{}:t}))},archivedList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.params;return(0,r.i_)(o.iK.circleAiProjects.archived({params:void 0===t?{}:t}))},show:function(e){var t=e.uuid;return(0,r.i_)(o.iK.circleAiProjects.show({uuid:t}))},create:function(e){var t=e.project;return(0,r.oK)(o.iK.circleAiProjects.create(),{project:t})},update:function(e){var t=e.uuid,n=e.project;return(0,r.kS)(o.iK.circleAiProjects.update({uuid:t}),{project:n})},archive:function(e){var t=e.uuid;return(0,r.oK)(o.iK.circleAiProjects.archive({uuid:t}))},unarchive:function(e){var t=e.uuid;return(0,r.oK)(o.iK.circleAiProjects.unarchive({uuid:t}))},destroy:function(e){var t=e.uuid;return(0,r.Dc)(o.iK.circleAiProjects.destroy({uuid:t}))},filesList:function(e){var t=e.uuid,n=e.params;return(0,r.i_)(o.iK.circleAiProjects.files.index({uuid:t,params:void 0===n?{}:n}))},fileCreate:function(e){var t=e.uuid,n=e.signedId;return(0,r.oK)(o.iK.circleAiProjects.files.index({uuid:t}),{file:{signed_id:n}})},fileDestroy:function(e){var t=e.uuid,n=e.id;return(0,r.Dc)(o.iK.circleAiProjects.files.destroy({uuid:t,id:n}))}};n.d(t,{v:()=>i})},955348(e,t,n){"use strict";var r=n(51730),o=n(915779),i={adminMarkAsRead:function(e){var t=e.id;return(0,r.kS)(o.iK.communityInbox.adminMarkAsRead({id:t}))},adminMarkAllAsRead:function(){return(0,r.kS)(o.iK.communityInbox.adminMarkAllAsRead())},memberMarkAsRead:function(e){var t=e.id;return(0,r.kS)(o.iK.communityInbox.memberMarkAsRead({id:t}))},previewChat:function(e){var t=e.community_bot_profile;return(0,r.oK)(o.iK.communityInbox.preview(),{community_bot_profile:t})},fetchChat:function(e){var t=e.id;return(0,r.i_)(o.iK.communityInbox.show({id:t}))},pauseAi:function(e){var t=e.id;return(0,r.kS)(o.iK.communityInbox.pauseAi({id:t}))},resumeAi:function(e){var t=e.id;return(0,r.kS)(o.iK.communityInbox.resumeAi({id:t}))},unreadMemberChatsCount:function(){return(0,r.i_)(o.iK.communityInbox.unreadMemberChatsCount())},unreadAdminPausedAiChatsCount:function(){return(0,r.i_)(o.iK.communityInbox.unreadAdminPausedAiChatsCount())}};n.d(t,{St:()=>i})},254209(e,t,n){"use strict";var r=n(51730),o=n(915779),i={index:function(){return(0,r.i_)(o.iK.communityPlanAddons.index())},create:function(e){return(0,r.oK)(o.iK.communityPlanAddons.create(),{community_plan_addons:e})}};n.d(t,{v:()=>i})},952476(e,t,n){"use strict";n.d(t,{K:()=>a});var r=n(51730),o=n(533877),i="connect/connections",a={createConnection:function(e){return(0,r.oK)((0,o.H)("".concat(i)),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({recipient_id:e.memberId,note:e.note},void 0!==e.recommendationId&&{recommendation_id:e.recommendationId}))},acceptConnection:function(e){var t;return(0,r.$H)((t=e,(0,o.H)("".concat(i,"/").concat(t,"/accept"))))},ignoreConnection:function(e){var t;return(0,r.$H)((t=e,(0,o.H)("".concat(i,"/").concat(t,"/ignore"))))},withdrawConnection:function(e){var t;return(0,r.$H)((t=e,(0,o.H)("".concat(i,"/").concat(t,"/withdraw"))))},flagConnection:function(e){var t;return(0,r.$H)((t=e.connectionId,(0,o.H)("".concat(i,"/").concat(t,"/flag"))),{reported_reason_type:e.reported_reason_type,reported_reason_body:e.reported_reason_body})}}},918336(e,t,n){"use strict";var r=n(915779),o=n(51730),i={balance:function(){return(0,o.i_)(r.iK.credits.balance())}};n.d(t,{n:()=>i})},410924(e,t,n){"use strict";n.d(t,{v:()=>l});var r=n(250313),o=n(51730),i=n(915779);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function s(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}var l={create:function(e){var t=e.formData,n=s(e,["formData"]),r=t.space_id;return(0,o.Ez)(i.iK.events.create({spaceId:r}),a({method:"POST",body:JSON.stringify({event:t})},n))},update:function(e){var t=e.event,n=e.formData,r=s(e,["event","formData"]),l=t.slug,c=t.space_id;return(0,o.Ez)(i.iK.events.update({slug:l,spaceId:c}),a({method:"PATCH",body:JSON.stringify({event:n})},r))},destroy:function(e){var t=e.event,n=e.params,r=t.slug,a=t.space_id;
1return(0,o.Ez)(i.iK.events.destroy({slug:r,spaceId:a,params:void 0===n?{}:n}),{method:"DELETE"})},fetchEvent:function(e){var t=e.id,n=e.params;return(0,o.i_)(r.L.events.show({id:t,params:void 0===n?{}:n}))},pin:function(e){var t=e.event,n=e.formData;return(0,o.Ez)(i.iK.events.pin({spaceId:t.space_id,slug:t.slug}),{method:"PATCH",body:JSON.stringify({event:n})})},rsvp:function(e){var t=e.event,n=e.params,r=t.slug,a=t.space_id;return(0,o.oK)(i.iK.events.attendees({slug:r,spaceId:a,params:void 0===n?{}:n}))},unRsvp:function(e){var t=e.event,n=t.slug,r=t.space_id;return(0,o.Dc)(i.iK.events.attendees({slug:n,spaceId:r}))},searchCommunityMembers:function(e){var t=e.event,n=e.params,r=t.id;return(0,o.i_)(i.iK.eventAttendees.searchCommunityMembers({eventId:r,params:n}))},downloadCSV:function(e){var t=e.event,n=t.slug,r=t.space_id;return(0,o.i_)(i.iK.eventAttendees.exportCsv({spaceId:r,slug:n}))},bulkRsvp:function(e){var t=e.event,n=e.params,r=void 0===n?{}:n,a=t.slug,s=t.space_id,l=r.community_member_ids,c=r.invited_entities_ids,u=r.role;return(0,o.$H)(i.iK.eventAttendees.bulkRsvp({slug:a,spaceId:s}),{community_member_ids:l,invited_entities_ids:c,role:u})},fetchRecurring:function(e){var t=e.event,n=t.slug,r=t.space_id;return(0,o.i_)(i.iK.recurringEvents.index({slug:n,spaceId:r}))},recurringRsvp:function(e){var t,n,r=e.event,s=e.params,l=void 0===s?{}:s,c=r.slug,u=r.space_id,d=l.eventIds;return(0,o.$H)(i.iK.recurringEvents.rsvp({slug:c,spaceId:u}),(t=a({},l),n=n={event_ids:d},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},recurringUnRsvp:function(e){var t=e.event,n=e.params,r=t.slug,a=t.space_id;return(0,o.Dc)(i.iK.eventAttendees.index({slug:r,spaceId:a,params:{unrsvp_mode:n}}))},createLiveRoomForEvent:function(e){var t=e.event.id;return(0,o.Ez)(i.iK.eventLiveStreams.create(),{method:"POST",body:JSON.stringify({event_id:t}),forReactQuery:!0})},removeAttendeeById:function(e){var t=e.event,n=e.attendeeId,r=t.slug,a=t.space_id;return(0,o.Ez)(i.iK.eventAttendees.destroyById({slug:r,spaceId:a,attendeeId:n}),{method:"DELETE"})},fetchUpcomingEvents:function(e){var t=e.params;return(0,o.i_)(i.iK.workflowsUpcomingEvents.index(void 0===t?{}:t))},listEvents:function(e){var t=e.params;return(0,o.i_)(r.L.events.index({params:void 0===t?{}:t}))},addToCalendar:function(e){var t=e.event,n=e.params;return(0,o.i_)(i.iK.events.addToCalendar({spaceId:t.space_id,slug:t.slug,params:n}))},rsvpAsGuest:function(e){var t=e.event,n=e.formData,r=e.params,a=t.slug,s=t.space_id;return(0,o.oK)(i.iK.eventAttendees.guestRsvp({slug:a,spaceId:s,params:void 0===r?{}:r}),n)},fetchGuestRecurringOccurrences:function(e){var t=e.event,n=e.params,r=t.slug,a=t.space_id;return(0,o.i_)(i.iK.eventAttendees.guestRecurringOccurrences({slug:r,spaceId:a,params:void 0===n?{}:n}))}}},68176(e,t,n){"use strict";var r=n(51730),o=n(915779),i=function(e){var t=e.spaceId,n=e.payload;return(0,r.oK)(o.iK.imagePosts.create(t),n)},a=function(e){var t=e.spaceId,n=e.postSlug,i=e.payload;return(0,r.$H)(o.iK.imagePosts.update(t,n),i)},s=function(e){var t=e.spaceId,n=e.postSlug,i=e.payload;return(0,r.$H)(o.iK.imagePosts.duplicate(t,n),i)};n.d(t,{Ql:()=>i,h7:()=>a,xi:()=>s})},686648(e,t,n){"use strict";n.d(t,{R:()=>c});var r=n(51730),o=n(915779);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function a(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function l(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}var c=s({create:function(e){var t=e.formData,n=l(e,["formData"]);return(0,r.Ez)(o.iK.liveStreams.create(),s({method:"POST",body:JSON.stringify(t)},n))},update:function(e){var t=e.id,n=e.formData;return(0,r.$H)(o.iK.liveStreams.update({id:t}),n)}
1,goLive:function(e){var t=e.id,n=l(e,["id"]);return(0,r.Ez)(o.iK.liveStreams.goLive({id:t}),s({method:"PUT"},n))},chatTranscript:function(e){var t=e.id,n=l(e,["id"]);return(0,r.Ez)(o.iK.liveStreams.chatTranscript({id:t}),s({method:"GET"},n))},qaTranscript:function(e){var t=e.roomId,n=l(e,["roomId"]);return(0,r.Ez)(o.iK.liveStreams.qaTranscript({roomId:t}),s({method:"POST"},n))},join:function(e){var t=e.id,n=e.role,i=e.environment_data,a=l(e,["id","role","environment_data"]);return(0,r.Ez)(o.iK.liveStreams.join({id:t}),s({method:"POST",body:JSON.stringify({role:n,environment_data:i})},a))},leave:function(e){var t=e.id,n=e.participantId,i=e.reason,a=e.clientError;return(0,r.Dc)(o.iK.liveStreams.leave({id:t,participantId:n}),{reason:i,client_error:a})},addCohosts:function(e){var t=e.roomId,n=e.formData;return(0,r.oK)(o.iK.liveStreams.addCohosts({roomId:t}),n)},removeCohost:function(e){var t=e.id,n=e.roomId,i=l(e,["id","roomId"]);return(0,r.Ez)(o.iK.liveStreams.removeCohost({id:t,roomId:n}),s({method:"DELETE"},i))},changeRole:function(e){var t=e.roomId,n=e.participantId,i=e.role;return(0,r.kS)(o.iK.liveStreams.changeRole({roomId:t,participantId:n}),{role:i})},endStream:function(e){var t=e.id,n=l(e,["id"]);return(0,r.Ez)(o.iK.liveStreams.endStream({id:t}),s({method:"DELETE"},n))},endStreamDelayed:function(e){var t=e.id,n=l(e,["id"]);return(0,r.Ez)(o.iK.liveStreams.endStreamDelayed({id:t}),s({method:"DELETE"},n))},leaveFeedback:function(e){var t=e.id,n=e.participantId,i=e.formData,a=l(e,["id","participantId","formData"]);return(0,r.Ez)(o.iK.liveStreams.leaveFeedback({id:t,participantId:n}),s({method:"POST",body:JSON.stringify(i)},a))},createRecorder:function(e){var t=e.id,n=e.recording_key;return(0,r.oK)(o.iK.liveStreams.createRecorder({id:t}),{recording_key:n})},deleteRoomRecording:function(e){var t=e.roomId,n=e.id;return(0,r.Dc)(o.iK.liveStreams.deleteRoomRecording({roomId:t,id:n}))},createLiveReport:function(e){var t=e.roomId,n=e.formData;return(0,r.oK)(o.iK.liveStreams.createLiveReport({roomId:t}),n)},addModerator:function(e){var t=e.roomId,n=e.formData,i=l(e,["roomId","formData"]);return(0,r.Ez)(o.iK.liveStreams.addModerator({roomId:t}),s({method:"POST",body:JSON.stringify(n)},i))}},{createQAQuestion:function(e){var t=e.roomId,n=e.formData;return(0,r.oK)(o.iK.liveStreams.createQAQuestion({roomId:t}),n)},removeQAQuestion:function(e){var t=e.roomId,n=e.id;return(0,r.Dc)(o.iK.liveStreams.removeQAQuestion({roomId:t,id:n}))},approveQAQuestion:function(e){var t=e.roomId,n=e.id;return(0,r.kS)(o.iK.liveStreams.approveQAQuestion({roomId:t,id:n}))},dismissQAQuestion:function(e){var t=e.roomId,n=e.id;return(0,r.kS)(o.iK.liveStreams.dismissQAQuestion({roomId:t,id:n}))},markQAQuestionAsAnswered:function(e){var t=e.roomId,n=e.id;return(0,r.kS)(o.iK.liveStreams.markQAQuestionAsAnswered({roomId:t,id:n}))},bringBackQAQuestion:function(e){var t=e.roomId,n=e.id;return(0,r.kS)(o.iK.liveStreams.bringBackQAQuestion({roomId:t,id:n}))},upvoteQAQuestion:function(e){var t=e.roomId,n=e.id;return(0,r.kS)(o.iK.liveStreams.upvoteQAQuestion({roomId:t,id:n}))},removeUpvoteQAQuestion:function(e){var t=e.roomId,n=e.id;return(0,r.kS)(o.iK.liveStreams.removeUpvoteQAQuestion({roomId:t,id:n}))},spotlightQAQuestion:function(e){var t=e.roomId,n=e.id;return(0,r.kS)(o.iK.liveStreams.spotlightQAQuestion({roomId:t,id:n}))},removeSpotlightQAQuestion:function(e){var t=e.roomId,n=e.id;return(0,r.kS)(o.iK.liveStreams.removeSpotlightQAQuestion({roomId:t,id:n}))},updateQASession:function(e){var t=e.roomId,n=e.formData;return(0,r.$H)(o.iK.liveStreams.updateQASession({roomId:t}),n)}},{pinQAReply:function(e){var t=e.roomId,n=e.questionId,i=e.id;return(0,r.kS)(o.iK.liveStreams.pinQAReply({roomId:t,questionId:n,id:i}))},unpinQAReply:function(e){var t=e.roomId,n=e.questionId,i=e.id;return(0,r.kS)(o.iK.liveStreams.unpinQAReply({roomId:t,questionId:n,id:i}))}},{getSpotlightItems:function(e){var t=e.roomId,n=e.params;return(0,r.i_)(o.iK.liveStreams.spotlightItems({roomId:t,params:void 0===n?{}:n}))},clearSpotlightItems:function(e){var t=e.roomId;return(0,r.Dc)(o.iK.liveStreams.clearSpotlightItems({roomId:t}))}},{downloadParticipantsCSV:function(e){var t=e.id,n=a(e,["id"]);return(0,r.Ez)(o.iK.liveStreams.downloadParticipantsCSV({id:t}),i({method:"GET"},n))},inviteParticipants:function(e){var t=e.roomId,n=e.formData;return(0,r.oK)(o.iK.liveStreams.inviteParticipants({roomId:t}),n)},removeParticipant:function(e){var t=e.roomId,n=e.participantId,s=e.peerId,l=a(e,["roomId","participantId","peerId"]);return(0,r.oK)(o.iK.liveStreams.removeParticipant({roomId:t,participantId:n}),i({peerId:s},l))}})},769942(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(857933),a=function(e){var t=e.entityId,n=e.entityType,a=e.mode;return(0,r.oK)(o.iK.masquerading.masquerades.create({entityId:t,entityType:void 0===n?"CommunityMember":n,mode:void 0===a?"view":a}),{method:"POST"}).then(function(e){return(0,i.I)(null),e})};n.d(t,{c:()=>a})},632022(e,t,n){"use strict";var r=n(913961),o=n(51730),i={show:function(e){return(0,o.i_)(r.i.mediaSettings.show({id:e}))},update:function(e,t){return(0,o.$H)(r.i.mediaSettings.update({id:e}),t)}};n.d(t,{E:()=>i})},96970(e,t,n){"use strict";var r=n(51730),o=n(913961),i={create:function(e){var t=e.blobSignedId;return(0,r.oK)(o.i.mediaTranscodings.create(),{blob_signed_id:t})}};n.d(t,{o:()=>i})},552767(e,t,n){"use strict";var r=n(913961),o=n(51730),i={show:function(e){return(0,o.i_)(r.i.mediaTranscripts.show({id:e}))},update:function(e,t){return(0,o.$H)(r.i.mediaTranscripts.update({id:e}),t)}};n.d(t,{n:()=>i})},374412(e,t,n){"use strict";var r=n(51730),o=n(915779),i={proration:function(e){return(0,r.i_)(o.iK.plans.proration(e))},fetch:function(e){return(0,r.i_)(o.iK.plans.fetch(e))},fetchPlans:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.i_)(o.iK.plans.fetchPlans(e))},fetchEmailHubPlan:function(e){return(0,r.i_)(o.iK.plans.fetchEmailHubPlan(e))}};n.d(t,{u:()=>i})},475323(e,t,n){"use strict";var r=n(51730),o=n(915779),i=function(e){var t=e.post,n=e.formData;return(0,r.Ez)(o.iK.posts.create({spaceId:t.space_id}),{method:"POST",body:JSON.stringify({post:n})})},a=function(e){var t=e.post,n=e.formData;return(0,r.Ez)(o.iK.posts.update({spaceId:t.space_id,postSlug:t.slug}),{method:"PATCH",body:JSON.stringify({post:n})})},s={index:function(e){var t=e.spaceId,n=e.params;return(0,r.i_)(o.iK.posts.index({spaceId:t,params:n}))},createOrUpdate:function(e){var t=e.post,n=e.formData;return t.id?a({post:t,formData:n}):i({post:t,formData:n})},show:function(e){var t=e.spaceId,n=e.postSlug;return(0,r.Ez)(o.iK.posts.show({spaceId:t,postSlug:n}),{method:"GET"})},destroy:function(e){var t=e.post;return(0,r.Ez)(o.iK.posts.update({spaceId:t.space_id,postSlug:t.slug}),{method:"DELETE",forReactQuery:!0})},pin:function(e){var t=e.post,n=e.formData;return(0,r.Ez)(o.iK.posts.pin({spaceId:null==t?void 0:t.space_id,postSlug:null==t?void 0:t.slug}),{method:"PATCH",body:JSON.stringify({post:n}),forReactQuery:!0})},hideFromFeaturedAreas:function(e){var t=e.post;return(0,r.Ez)(o.iK.posts.featuredAreasVisibility.destroy({postSlug:t.slug,spaceId:t.space_id}),{method:"DELETE",forReactQuery:!0})},showInFeaturedAreas:function(e){var t=e.post;return(0,r.Ez)(o.iK.posts.featuredAreasVisibility.create({postSlug:t.slug,spaceId:t.space_id}),{method:"POST",forReactQuery:!0})},updateKnowledgeBasePost:function(e){var t=e.post;return(0,r.Ez)(o.iK.posts.updateKnowledgeBasePost({postId:t.id}),{method:"PATCH"})}};n.d(t,{d:()=>s})},361379(e,t,n){"use strict";n.d(t,{z:()=>s});var r=n(51730),o=n(533877),i="connect/recommendations",a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.H)("".concat(i),e)},s={getRecommendations:function(e){return(0,r.i_)(a(e))}
1,dismissRecommendation:function(e){var t;return(0,r.$H)((t=e,(0,o.H)("".concat(i,"/").concat(t,"/dismiss"))))}}},632623(e,t,n){"use strict";var r=n(51730),o=n(915779);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function a(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function s(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}var l={index:function(e){var t=e.params,n=s(e,["params"]);return(0,r.Ez)(o.iK.spaces.index({params:void 0===t?{}:t}),a(i({},n),{method:"GET"}))},list:function(e){var t=e.params;return(0,r.i_)(o.iK.spaces.index({params:void 0===t?{}:t}))},show:function(e){var t=e.id,n=s(e,["id"]);return(0,r.Ez)(o.iK.spaces.show({id:t}),a(i({},n),{method:"GET"}))},addMemberToSpace:function(e){var t=e.spaceId,n=e.body;return(0,r.oK)(o.iK.spaces.addMemberToSpace({spaceId:t}),n)},destroy:function(e){var t=e.id,n=s(e,["id"]);return(0,r.Ez)(o.iK.spaces.destroy({id:t}),a(i({},n),{method:"DELETE"}))},restore:function(e){var t=e.id;return(0,r.oK)(o.iK.spaces.restore({id:t}))},chatTranscript:function(e){var t=e.id,n=e.params,a=s(e,["id","params"]);return(0,r.Ez)(o.iK.chatSpaces.transcript({id:t,params:n}),i({method:"GET"},a))}};n.d(t,{R:()=>l})},111582(e,t,n){"use strict";var r=n(51730),o=n(915779),i={index:function(){return(0,r.Ez)(o.iK.spaceGroups.index(),{method:"GET"})},addMembers:function(e){var t=e.spaceGroupId,n=e.body;return(0,r.oK)(o.iK.spaceGroups.addMemberToSpaceGroup({spaceGroupId:t}),n)},create:function(e){return(0,r.oK)(o.iK.spaceGroups.create(),e)},update:function(e,t){return(0,r.$H)(o.iK.spaceGroups.update({id:e}),t)},destroy:function(e,t){return(0,r.Dc)(o.iK.spaceGroups.destroy({id:e}),t)},restore:function(e){var t=e.id;return(0,r.oK)(o.iK.spaceGroups.restore({id:t}))}};n.d(t,{K:()=>i})},58661(e,t,n){"use strict";var r=n(51730),o=n(915779);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function a(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function s(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}var l={create:function(e){var t=e.userLikeableId,n=e.userLikableType,l=e.reactionType,c=s(e,["userLikeableId","userLikableType","reactionType"]);return(0,r.Ez)(o.Q.create(),a(i({method:"POST"},c),{body:JSON.stringify({user_likeable_type:n,user_likeable_id:t,reaction_type:l})}))},destroy:function(e){var t=e.userLikeableId,n=e.userLikableType,l=s(e,["userLikeableId","userLikableType"]);return(0,r.Ez)(o.Q.destroy(),a(i({method:"DELETE"},l),{body:JSON.stringify({user_likeable_type:n,user_likeable_id:t})}))}};n.d(t,{p:()=>l})},360163(e,t,n){"use strict";var r=n(51730),o=n(250313),i={list:function(e){var t=e.params;return(0,r.i_)(o.L.list({params:void 0===t?{}:t}))},listHistory:function(e){var t=e.params;return(0,r.i_)(o.L.tasks({params:void 0===t?{}:t}))},taskDetail:function(e){var t=e.taskId,n=e.params;return(0,r.i_)(o.L.taskDetail({params:void 0===n?{}:n,taskId:t}))},create:function(e){var t=e.params,n=e.body;return(0,r.oK)(o.L.create({params:void 0===t?{}:t}),void 0===n?{}:n)},update:function(e){var t=e.id,n=e.params,i=e.body;return(0,r.$H)(o.L.update({id:t,params:void 0===n?{}:n}),void 0===i?{}:i)},fetch:function(e){var t=e.id,n=e.params;return(0,r.i_)(o.L.fetch({id:t,params:void 0===n?{}:n}))},activate:function(e){var t=e.id,n=e.params;return(0,r.$H)(o.L.activate({id:t,params:void 0===n?{}:n}))},inactivate:function(e){var t=e.id,n=e.params;return(0,r.$H)(o.L.inactivate({id:t,params:void 0===n?{}:n}))},createTrigger:function(e){var t=e.workflowId,n=e.params,i=e.body;return(0,r.oK)(o.L.createTrigger({workflowId:t,params:void 0===n?{}:n}),void 0===i?{}:i)},updateTrigger:function(e){var t=e.workflowId,n=e.id,i=e.params,a=e.body;return(0,r.$H)(o.L.updateTrigger({workflowId:t,id:n,params:void 0===i?{}:i}),void 0===a?{}:a)},deleteTrigger:function(e){var t=e.workflowId,n=e.id,i=e.params;return(0,r.Dc)(o.L.deleteTrigger({workflowId:t,id:n,params:void 0===i?{}:i}))}
1,createRun:function(e){var t=e.workflowId,n=e.params;return(0,r.oK)(o.L.createRun({workflowId:t,params:void 0===n?{}:n}))},fetchRuns:function(e){var t=e.workflowId,n=e.params;return(0,r.i_)(o.L.fetchRuns({workflowId:t,params:void 0===n?{}:n}))},fetchRun:function(e){var t=e.workflowId,n=e.runId,i=e.params;return(0,r.i_)(o.L.fetchRun({workflowId:t,runId:n,params:void 0===i?{}:i}))},fetchTasksInRun:function(e){var t=e.workflowId,n=e.runId,i=e.params;return(0,r.i_)(o.L.fetchTasksInRun({workflowId:t,runId:n,params:void 0===i?{}:i}))},createAudience:function(e){var t=e.workflowId,n=e.params,i=e.body;return(0,r.oK)(o.L.createAudience({workflowId:t,params:void 0===n?{}:n}),void 0===i?{}:i)},updateAudience:function(e){var t=e.workflowId,n=e.id,i=e.params,a=e.body;return(0,r.$H)(o.L.updateAudience({workflowId:t,id:n,params:void 0===i?{}:i}),void 0===a?{}:a)},createAction:function(e){var t=e.workflowId,n=e.params,i=e.body;return(0,r.oK)(o.L.createAction({workflowId:t,params:void 0===n?{}:n}),void 0===i?{}:i)},updateAction:function(e){var t=e.workflowId,n=e.id,i=e.params,a=e.body;return(0,r.$H)(o.L.updateAction({workflowId:t,id:n,params:void 0===i?{}:i}),void 0===a?{}:a)},deleteAction:function(e){var t=e.workflowId,n=e.id,i=e.params;return(0,r.Dc)(o.L.deleteAction({workflowId:t,id:n,params:void 0===i?{}:i}))},upsertActions:function(e){var t=e.workflowId,n=e.params,i=e.body;return(0,r.oK)(o.L.upsertActions({workflowId:t,params:void 0===n?{}:n}),void 0===i?{}:i)},updateGraph:function(e){var t=e.workflowId,n=e.params,i=e.body;return(0,r.$H)(o.L.updateGraph({workflowId:t,params:void 0===n?{}:n}),i)},createOneTimeSchedule:function(e){var t=e.workflowId,n=e.params,i=e.body;return(0,r.oK)(o.L.createOneTimeSchedule({workflowId:t,params:void 0===n?{}:n}),void 0===i?{}:i)},updateOneTimeSchedule:function(e){var t=e.workflowId,n=e.id,i=e.params,a=e.body;return(0,r.$H)(o.L.updateOneTimeSchedule({workflowId:t,id:n,params:void 0===i?{}:i}),void 0===a?{}:a)},createRecurringSchedule:function(e){var t=e.workflowId,n=e.params,i=e.body;return(0,r.oK)(o.L.createRecurringSchedule({workflowId:t,params:void 0===n?{}:n}),void 0===i?{}:i)},updateRecurringSchedule:function(e){var t=e.workflowId,n=e.id,i=e.params,a=e.body;return(0,r.$H)(o.L.updateRecurringSchedule({workflowId:t,id:n,params:void 0===i?{}:i}),void 0===a?{}:a)},reschedule:function(e){var t=e.workflowId,n=e.id,i=e.params,a=e.body;return(0,r.$H)(o.L.reschedule({workflowId:t,id:n,params:void 0===i?{}:i}),void 0===a?{}:a)},templates:function(e){var t=e.params;return(0,r.i_)(o.L.templates({params:void 0===t?{}:t}))},fetchTemplate:function(e){var t=e.templateId,n=e.params;return(0,r.i_)(o.L.fetchTemplate({templateId:t,params:void 0===n?{}:n}))},createFromTemplate:function(e){var t=e.templateId,n=e.params,i=e.overrides;return(0,r.oK)(o.L.createFromTemplate({templateId:t,params:void 0===n?{}:n}),void 0===i?{}:i)},createFromTemplateKey:function(e){var t=e.templateKey;return(0,r.oK)(o.L.createFromTemplateKey({templateKey:t}))},archiveWorkflow:function(e){var t=e.id,n=e.params;return(0,r.$H)(o.L.archive({id:t,params:void 0===n?{}:n}))},deleteWorkflow:function(e){var t=e.id,n=e.params;return(0,r.Dc)(o.L.delete({id:t,params:void 0===n?{}:n}))},fetchCommunityCurrentUsageStats:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.params;return(0,r.i_)(o.L.fetchCommunityCurrentUsageStats({params:void 0===t?{}:t}))},duplicateWorkflow:function(e){var t=e.id,n=e.params;return(0,r.$H)(o.L.duplicate({id:t,params:void 0===n?{}:n}))},fetchPreviewAttributes:function(e){var t=e.params;return(0,r.i_)(o.L.previewMessages.previewAttributes({params:void 0===t?{}:t}))},fetchInterpolatedPreviewMessage:function(e){var t=e.body;return(0,r.oK)(o.L.fetchInterpolatedMessage({}),void 0===t?{}:t)},testWebhook:function(e){var t=e.body;return(0,r.oK)(o.L.testWebhook({}),void 0===t?{}:t)},cancelRun:function(e){var t=e.workflowId,n=e.runId,i=e.params;return(0,r.$H)(o.L.cancelRun({workflowId:t,runId:n,params:void 0===i?{}:i}))},fetchContacts:function(e){var t=e.params;return(0,r.i_)(o.L.contacts.index({params:void 0===t?{}:t}))},fetchDynamicVariables:function(e){var t=e.params;return(0,r.i_)(o.L.fetchDynamicVariables({params:void 0===t?{}:t}))}};n.d(t,{l:()=>i})},310944(e,t,n){"use strict";n.d(t,{q:()=>gT,Q:()=>gD});var r,o,i,a=n(391426),s=n(257957),l=n(244765),c=n(933578),u=n(230763),d=function(){var e=(0,u.Od)(),t=e.currentUser,n=e.currentCommunity;(0,c.useEffect)(function(){(null==t?void 0:t.id)?(0,l.A1)(t.id,null==n?void 0:n.id):(0,l.nE)()},[null==t?void 0:t.id,null==n?void 0:n.id])},p=n(303758),f=n(75132),m=n(622559),b=n(969990),y=n(686883),h=n(804939),g=n(310860),v=n(96595),x=n(29297),j=n(853514),_=n(169353),w=function(){var e=(0,_.J)(),t=e.isSitePageRoute,n=e.sitePageId,r=e.sitePageSlug;return(0,c.useMemo)(function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t?{site_page_id:n,site_page_slug:r}:{})},[t,n,r])},O=function(e){(0,c.useEffect)(function(){var t=function(){e()};return window.addEventListener("pagehide",t),function(){window.removeEventListener("pagehide",t)}},[e])},S=n(395430),P=n(894831);function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var I=function(){var e=k((0,c.useState)(0),2),t=e[0],n=e[1],r=k((0,c.useState)(!1),2),o=r[0],i=r[1],a=(0,S.A)(3e4),s=k((0,c.useState)("visible"===document.visibilityState),2),l=s[0],u=s[1];return(0,c.useEffect)(function(){var e=function(){u("visible"===document.visibilityState)};return document.addEventListener("visibilitychange",e),function(){document.removeEventListener("visibilitychange",e)}},[]),(0,P.A)(function(){o&&l&&!a&&n(function(e){return e+1})},1e3),{screenTimeInSeconds:t,isTrackingScreenTime:o,startTrackingScreenTime:(0,c.useCallback)(function(){i(!0)},[]),stopTrackingScreenTime:(0,c.useCallback)(function(){i(!1)},[]),resetTrackingScreenTime:(0,c.useCallback)(function(){n(0)},[])}},N=function(){var e=(0,c.useRef)(null),t=(0,c.useCallback)(function(){e.current=Date.now()},[]),n=(0,c.useCallback)(function(){t()},[t]);return{startTrackingTotalTime:t,resetTrackingTotalTime:n,getTotalTimeInSeconds:(0,c.useCallback)(function(){return e.current?(Date.now()-e.current)/1e3:0},[])}};function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var E=new URL(window.location.href).origin,R=function(e){var t=e.children,n=(0,g.z)(),r=n.pathname,o=n.hash,i=n.searchStr,s=w(),l=(0,c.useRef)(document.referrer),d=(0,c.useRef)(document.referrer),p=(0,u.Od)(),f=p.masqueradingEntity,m=p.currentCommunity,b=p.currentCommunityMember,y=p.isLoading,h=(0,c.useRef)(0),_=(0,c.useRef)((0,v.A)()),S=I(),P=S.screenTimeInSeconds,C=S.startTrackingScreenTime,k=S.resetTrackingScreenTime,R=N(),L=R.getTotalTimeInSeconds,D=R.startTrackingTotalTime,T=R.resetTrackingTotalTime;(0,c.useEffect)(function(){h.current=P},[P]);var M=null==m?void 0:m.id,F=null==b?void 0:b.id,K=!!(f||y);(0,c.useEffect)(function(){C()},[C]),(0,c.useEffect)(function(){D()},[D]);var B=(0,c.useCallback)(function(){if(!K){var e=E+r+i+o,t={community_id:M,community_member_id:F,url:e,referer:l.current,page_view_id:_.current};l.current=e,x.l.trackPageView(A({},t,s))}},[o,r,i,M,s,F,K]),q=(0,c.useCallback)(function(){if(!K){var e=E+r+i+o,t={community_id:M,community_member_id:F,url:e,referer:d.current,time_spent_seconds:L(),screen_time_seconds:h.current,page_view_id:_.current};d.current=e,k(),T(),x.l.trackPageExit(A({},t,s))}},[o,r,i,M,s,F,K,k,T,L]);O(function(){q()}),(0,c.useEffect)(function(){return _.current=(0,v.A)(),B(),function(){q()}},[B,q]);var U=(0,c.useMemo)(function(){return{pageViewId:_.current,pathname:r,hash:o,search:i}},[r,o,i]);return(0,a.jsx)(j.t.Provider,{value:U,children:t})},L=n(401027),D=n(530794),T=n(739745),M=n(748612),F=n(124188),K=n(36913),B=n(803224),q=n(508479),U=n(750640),z=n(519104),W=n(417980),$=n(955453),V=n(771922),H=n(932624),G=function(){var e,t=(0,B.KR)(),n=(0,B.w8)(),r=(0,B.wM)(),o=(0,z.Z)(),i=(0,B.DN)(),s=i.canGoBack,l=i.goBack,u=(0,c.useCallback)(function(){s?l():!r()&&(null==n?void 0:n.href)&&o({to:n.href})},[s,l,r,o,null==n?void 0:n.href]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(H.z,{back:{onClick:u,label:(0,W.t)("circle_ai_shell.canvas_header.go_back")},title:null!=(e=null==t?void 0:t.label)?e:"",primaryAction:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{id:$.L2,className:"flex shrink-0 items-center gap-2 empty:hidden"}),(0,a.jsx)("div",{id:$.O0,className:"flex shrink-0 items-center gap-2 empty:hidden"})]})}),(0,a.jsx)("div",{style:V.w,id:$.mI,className:"flex items-center gap-2 overflow-x-auto px-4 pb-2 empty:hidden"})]})},Z=function(){return(0,U.b)((0,a.jsx)(G,{}),null,[]),null},Q=function(){var e;return e=!!(0,B.KR)(),(0,q.T)(Z,e?{}:null)};Q.displayName="CanvasMobilePageHeader";var Y=n(239188),J=n(182255),X=n(911550),ee=n(962506),et=n(915779),en=n(24814),er=n(665118),eo=n(402284),ei=function(){var e=(0,u.fv)(),t=(0,eo.N)(),n=(0,er.M)(),r=(0,en.V)(function(e){return e.mode}),o=(0,en.V)(function(e){return e.isAdminDockForced});return t&&e&&("admin"===r||n||o)},ea=n(529883),es=n(932252),el=n(620708),ec=n(92406),eu=n(693546),ed=n(570310),ep=n(355104),ef=n(34819),em=n(617593),eb=n(97742),ey=function(e){var t=e.onClose,n=(0,ep.c)().isCircleV4;return(0,a.jsx)("div",{className:(0,ed.x)("absolute inset-0 z-30 flex min-h-0 flex-col overflow-hidden",{"bg-primary dark:bg-secondary":n,"bg-primary":!n}),children:(0,a.jsxs)(m.i.Layout.Inset,{children:[(0,a.jsx)(m.i.Layout.Inset.Header,{children:(0,a.jsxs)("div",{className:"bg-secondary border-primary flex items-center gap-2 rounded-t-lg border-b px-3 py-2",children:[(0,a.jsx)("span",{className:"size-8 shrink-0","aria-hidden":!0}),(0,a.jsx)("div",{className:"flex flex-1 justify-center",children:(0,a.jsx)(em.E,{className:"h-5 w-full max-w-md"})}),(0,a.jsx)(ef.K,{icon:"cross",variant:"outline",size:"sm",onClick:t,"aria-label":(0,W.t)("analytics_chart_preview.close")})]})}),(0,a.jsx)(m.i.Layout.Inset.Body,{children:(0,a.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,a.jsx)("div",{className:"mx-auto max-w-3xl p-8",children:(0,a.jsx)(eb.M,{})})})})]})})}
1,eh=n(511888),eg=n(679975),ev=n(296638),ex=n(55383),ej=n(890974),e_=n(177631),ew=n(109257),eO=n(501323),eS=n(294985),eP=n(553648);function eC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ek(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){eC(e,t,n[t])})}return e}function eI(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var eN=(0,el.Z)(function(){return Promise.all([n.e(24014),n.e(53078),n.e(24678),n.e(77368),n.e(62375),n.e(62501),n.e(98806),n.e(34980),n.e(41432),n.e(1989),n.e(79749),n.e(74915),n.e(47217),n.e(43246),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(99217),n.e(36918),n.e(72942),n.e(37209),n.e(84189),n.e(93584),n.e(2081),n.e(25837),n.e(72673),n.e(31230),n.e(83498),n.e(71932),n.e(88993),n.e(14954),n.e(24844),n.e(81080),n.e(76996),n.e(38656),n.e(28196),n.e(9787),n.e(63610)]).then(n.bind(n,19425))}),eA=(0,el.Z)(function(){return n.e(31879).then(n.bind(n,948052)).then(function(e){return{default:e.RecentChatsDrawer}})}),eE=(0,el.Z)(function(){return Promise.all([n.e(24014),n.e(62375),n.e(88993),n.e(81080),n.e(10125)]).then(n.bind(n,493042)).then(function(e){return{default:e.DesignPanel}})}),eR=function(){var e=(0,ew.k)({select:function(e){return e.location.pathname}}),t=(0,ee.B)(function(e){return e.isRecentChatsOpen}),n=(0,ee.B)(function(e){return e.setIsRecentChatsOpen}),r=(0,en.V)(function(e){return e.conversationPanelState}),o=(0,ep.c)().isCircleV4,i=(0,ej.N)(),s=(0,ex.Z)(function(e){return e.isDesignPanelOpen}),l=o&&i&&s,u=(0,eO.S)({strict:!1}),d=u.ai,p=u[eP.J],f=(0,ea.U)().isFullPageAiRoute,b=(0,z.Z)(),y=(0,c.useRef)(p);(0,c.useEffect)(function(){y.current&&b({to:".",search:function(e){return eI(ek({},e),eC({},eP.J,void 0))},replace:!0,resetScroll:!1})},[b]),(0,c.useEffect)(function(){d&&(f||ee.B.getState().openConversation(d),b({to:".",search:function(e){return eI(ek({},e),{ai:void 0})},replace:!0,resetScroll:!1}))},[d,f,b]),(0,c.useEffect)(function(){"closed"===r&&n(!1)},[r,n]),(0,c.useEffect)(function(){n(!1)},[e,n]);var h=(0,c.useRef)(!1);return(0,c.useEffect)(function(){if(l){h.current=!0;return}if(h.current){h.current=!1;var e,t=document.activeElement;t&&t!==document.body||null==(e=ex.Z.getState().triggerEl)||e.focus()}},[l]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.i.Layout.ConversationPanel.Header,{children:!l&&(0,a.jsx)(eS.h,{surface:"panel"})}),(0,a.jsx)(m.i.Layout.ConversationPanel.Body,{children:(0,a.jsxs)("div",{className:"relative size-full",children:[(0,a.jsxs)("div",{className:(0,ed.x)("size-full",{invisible:l}),inert:l||void 0,children:[(0,a.jsx)(c.Suspense,{fallback:(0,a.jsx)(e_.D,{}),children:(0,a.jsx)(eN,{className:"h-full",initialConversationId:y.current,surface:"panel"})}),t&&(0,a.jsx)(c.Suspense,{fallback:null,children:(0,a.jsx)(eA,{})})]}),l&&(0,a.jsx)("div",{className:(0,ed.x)("absolute inset-0 z-10 p-3",{"bg-primary dark:bg-secondary":o,"bg-primary":!o}),children:(0,a.jsx)(c.Suspense,{fallback:(0,a.jsx)(e_.D,{}),children:(0,a.jsx)(eE,{})})})]})})]})},eL=n(118393),eD=function(e){var t=e.children;return(0,a.jsx)(m.i.Layout.Inset,{children:(0,a.jsx)("div",{id:eL.eL.workspaceBody,"data-testid":"circle-ai-shell-canvas-only",className:"flex min-h-0 flex-1 flex-col overflow-auto [&_.h-screen]:!h-full",children:t})})},eT=n(91438),eM=n(765724),eF=n(849205),eK=n(288513),eB=n(835860),eq=n(141320),eU=function(e,t,n){var r=new Set(t.map(function(e){return e.id})),o=0;return e.map(function(e){if(r.has(e.id)){var t=n[o];return o+=1,null!=t?t:e}return e})};function ez(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eW=function(e,t){var n,r=t.isLoadingCommunities,o=t.isReorderingCommunities,i=t.onSortCommunities,a=function(e){if(Array.isArray(e))return e}(n=(0,c.useState)([]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(n)||function(e){if(e){if("string"==typeof e)return ez(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ez(e,2)}}
1(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=a[0],l=a[1];(0,c.useEffect)(function(){r||o||l(e)},[e,r,o]);var u=(0,c.useMemo)(function(){return s.slice(0,5)},[s]),d=(0,c.useMemo)(function(){var e,t=s.findIndex(function(e){return e.is_current_community});return t<0||t<5?null:null!=(e=s[t])?e:null},[s]),p=(0,c.useCallback)(function(t){var n=eU(s,u,t);l(n),i(n,{onError:function(){l(e)}})},[e,u,i,s]);return{draggableItems:u,onSort:p,pinnedCurrentCommunity:d,sortedCommunities:s}},e$=/^Digit([1-9])$/,eV=function(e){if(null!=(t=HTMLElement)&&"u">typeof Symbol&&t[Symbol.hasInstance]?!t[Symbol.hasInstance](e):!(e instanceof t))return!1;if(e.isContentEditable)return!0;var t,n=e.tagName;return"INPUT"===n||"TEXTAREA"===n||"SELECT"===n},eH=function(e){var t=e.entries,n=e.onActivate,r=e.onShowAll,o=(0,c.useRef)(t);o.current=t;var i=(0,c.useRef)(n);i.current=n;var a=(0,c.useRef)(r);a.current=r,(0,c.useEffect)(function(){if("u">typeof document){var e=new Set,t=function(t){if(t.repeat||(e.add(t.code),!t.altKey||!e.has("KeyG")||eV(t.target)))return;if("Digit0"===t.code){if(!a.current)return;t.preventDefault(),a.current();return}var n=e$.exec(t.code);if(n){var r=Number(n[1]);if(!(r>8)){var s=o.current.find(function(e){return e.position===r});s&&(t.preventDefault(),i.current(s.community))}}},n=function(t){e.delete(t.code)},r=function(){e.clear()};return document.addEventListener("keydown",t),document.addEventListener("keyup",n),globalThis.addEventListener("blur",r),function(){document.removeEventListener("keydown",t),document.removeEventListener("keyup",n),globalThis.removeEventListener("blur",r)}}},[])};function eG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eZ(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var eQ=function(e){try{return new URL(e,globalThis.location.origin).origin!==globalThis.location.origin}catch(e){return!1}},eY=function(e){var t,n=e.currentCommunityId,r=e.onCommunitySwitch,o=e.timeoutMs,i=function(e){if(Array.isArray(e))return e}(t=(0,c.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eG(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eG(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1],l=(0,c.useRef)(null),u=(0,c.useCallback)(function(e){if(!eZ(e.target,Element))return;var t=e.target.closest("[data-community-switcher-nav]");if(eZ(t,HTMLAnchorElement)){var i=t.getAttribute("href");if(i&&!e.defaultPrevented&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey){var a=t.getAttribute("data-community-id"),c=a?Number(a):NaN;Number.isNaN(c)||(s(c),c!==n&&(null==r||r())),eQ(i)||(null!==l.current&&globalThis.clearTimeout(l.current),l.current=globalThis.setTimeout(function(){s(null)},o))}}},[n,r,o]);return(0,c.useEffect)(function(){return function(){null!==l.current&&(s(null),globalThis.clearTimeout(l.current),l.current=null)}},[]),{handleNavClick:u,clickedCommunityId:a}},eJ=function(e,t,n,r,o){var i=(0,c.useMemo)(function(){var o=new Map(e.map(function(e){return[e.id,e]})),i=new Set;return t.forEach(function(e){return i.add(e.id)}),n&&i.add(n.id),r&&e.forEach(function(e){return i.add(e.id)}),Array.from(i).map(function(e){return o.get(e)}).filter(function(e){return null!=e})},[t,n,e,r]);(0,c.useEffect)(function(){null==o||o(i)},[i,o])},eX=n(791009),e0=function(e,t){var n=e.dark_icon_url||e.light_icon_url,r=e.light_icon_url||"";return t?n||"":r||""},e1=function(e,t,n){return"list"===n?t(e):e.is_current_community?0:t(e)},e2=n(817751),e3=n(409858),e4=n(314054),e5=n(715634),e6=n(39990),e8=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,e6.QP)((0,e5.$)(t))},e9=n(892907),e7=n(922896),te=n(224955);(0,e7.X$)([te.A]);var tt=function(e){var t=e.iconUrl,n=e.name,r=e.brandColor,o=e.lightBrandColor,i=e.darkBrandColor,s=tK().theme.isDarkAppearance?i:o||r,l=s&&(0,e7.Mj)(s).luminance()>.65?"#000":"#fff";
1return(0,a.jsx)("span",{"aria-hidden":!0,className:"flex size-9 shrink-0 select-none items-center justify-center overflow-hidden rounded-md",children:t?(0,a.jsx)("img",{alt:"".concat(n," icon"),className:"size-6 object-cover rounded-md",src:t,width:24,height:24}):(0,a.jsx)("span",{className:"flex size-6 items-center justify-center rounded-md text-md font-bold leading-none",style:s?{backgroundColor:s,color:l}:void 0,children:(0,eq.s)(n)})})},tn=function(e){var t=e.notificationCount,n=tK().backgroundColor;return t<=0?null:(0,a.jsx)("span",{"aria-hidden":!0,className:e8("absolute right-0 top-0 flex size-3 items-center rounded-full border-2 bg-red-500"),style:{borderColor:n||"var(--color-community-switcher-background, #FFFFFF)"}})},tr="size-9 hover:bg-secondary-hover focus:bg-secondary-hover !m-0 flex items-center justify-center rounded-lg border border-transparent transition-colors duration-150",to=function(e){var t=e.community,n=e.iconUrl,r=e.notificationCount;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:e8(tr,{"active border-primary switcher__active_community":t.is_current_community}),children:(0,a.jsxs)("span",{className:"relative inline-flex",children:[(0,a.jsx)(tt,{iconUrl:n,name:t.name}),(0,a.jsx)(tn,{notificationCount:r})]})}),(0,a.jsx)(e9.o5,{color:"primary",variant:"label-md",children:t.name})]})},ti=function(e){var t=e.isDragDisabled,n=tK().t;return(0,a.jsx)("span",{className:"inline-flex shrink-0",children:(0,a.jsx)(e4.m,{content:n("community_switcher_drag_handle"),delay:200,side:"top",children:(0,a.jsx)(ef.K,{"aria-label":n("community_switcher_drag_handle"),className:e8({"cursor-grab":!t,"cursor-not-allowed":t}),disabled:t,icon:"drag",size:"sm",variant:"ghost"})})})},ta="hover:bg-tertiary flex items-center justify-between gap-x-1 rounded-lg p-1 transition-colors duration-75",ts=function(e){var t=e.community,n=e.dragHandle,r=e.href,o=e.isDragDisabled,i=void 0!==o&&o,s=e.notificationCount,l=e.splitRowLayout,c=tK(),u=c.featureFlags,d=c.theme,p=c.t,f=e0(t,d.isDarkAppearance),m=s>0?"".concat(t.name,", ").concat(p("community_sidebar.unread_notifications",{count:s})):void 0,b=(0,a.jsx)(to,{community:t,iconUrl:f,notificationCount:s}),y=function(e){var n;t.is_current_community||e.defaultPrevented||0!==e.button||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||null==u||null==(n=u.onCommunitySwitch)||n.call(u)};return n||void 0!==l&&l?(0,a.jsxs)("div",{className:e8(ta,"focus-within:bg-tertiary"),children:[null!=n?n:(0,a.jsx)(ti,{isDragDisabled:i}),(0,a.jsx)("a",{"aria-label":m,className:"flex min-w-0 flex-1 items-center gap-3","data-community-switcher-nav":"",href:r,onClick:y,children:b})]}):(0,a.jsxs)("div",{className:e8(ta,"focus-within:bg-tertiary"),children:[(0,a.jsx)("span",{className:"inline-flex shrink-0","aria-hidden":!0,children:(0,a.jsx)(e4.m,{content:p("community_switcher_drag_handle"),delay:200,side:"top",children:(0,a.jsx)("span",{className:e8("text-secondary inline-flex p-1",{"cursor-grab":!i,"cursor-not-allowed":i}),children:(0,a.jsx)(e2.t,{name:"drag",size:"sm"})})})}),(0,a.jsx)(e3.N,{"aria-label":m,className:"flex min-w-0 flex-1 items-center gap-3","data-community-switcher-nav":"",href:r,onClick:y,children:b})]})},tl=function(e){var t=e.isDragDisabled,n=(0,tK().t)("community_switcher_drag_handle"),r=(0,a.jsx)(ef.K,{"aria-label":n,className:e8({"cursor-grab":!t,"cursor-not-allowed":t}),disabled:t,icon:"drag",size:"sm",variant:"ghost"});return t?r:(0,a.jsx)(eB.t,{"aria-label":n,className:"inline-flex shrink-0 cursor-grab",children:r})};function tc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tu=function(e){var t,n=e.onOpenChange,r=e.open,o=tK(),i=o.api,s=o.getNotificationCount,l=o.t,u=i.communities,d=i.isLoadingCommunities,p=i.isReorderingCommunities,f=i.onSortCommunities,m=i.token,b=function(e){if(Array.isArray(e))return e}(t=(0,c.useState)([]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return tc(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tc(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=b[0],h=b[1];(0,c.useEffect)(function(){d||p||h(u)},[u,d,p]);var g=(0,c.useMemo)(function(){return y.map(function(e){return{id:String(e.id),community:e}})},[y]),v=p||y.length<=1,x=(0,c.useCallback)(function(e){var t=e.map(function(e){return e.community});h(t),f(t,{onError:function(){h(u)}})},[u,f]);return(0,a.jsx)(eX.a.Root,{onOpenChange:n,open:r,size:"md",children:(0,a.jsxs)(eX.a.Content,{children:[(0,a.jsx)(eX.a.Header,{showCloseButton:!0,title:l("my_communities")}),(0,a.jsx)(eX.a.Body,{children:(0,a.jsx)(eB.b,{mode:"flat",axis:"vertical",className:"flex max-h-96 flex-col gap-2 overflow-y-auto",draggingClassName:"opacity-40",items:g,onItemsChange:x,renderItem:function(e){var t=e.community;return(0,a.jsx)("div",{children:(0,a.jsx)(ts,{community:t,dragHandle:(0,a.jsx)(tl,{isDragDisabled:v}),href:(0,eq.U)(t.root_url,m),isDragDisabled:v,notificationCount:e1(t,s,"list")})})}})})]})})},td=function(e,t){var n=tK(),r=n.api,o=n.theme,i=n.getNotificationCount,a=n.featureFlags,s=!!(null==a?void 0:a.isDiscoverRouteActive),l=null!=t?e.id===t:e.is_current_community,u=e0(e,o.isDarkAppearance),d=e1(e,i,"sidebar"),p=(0,eq.U)(e.root_url,r.token),f=!!(null==a?void 0:a.isElectron),m=(0,c.useMemo)(function(){if(f)return function(){var t;return null==a||null==(t=a.onElectronChangeCommunity)?void 0:t.call(a,{href:p,name:e.name})}},[e.name,a,p,f]);return{href:p,iconUrl:u,isActive:l&&!s,isDarkAppearance:o.isDarkAppearance,isElectron:f,notificationCount:d,onElectronActivate:m}},tp=function(e){var t=e.communityId,n=e.isElectron,r=e.tooltipLabel,o=e.isActive,i=e.onElectronActivate,s=e.children,l=e.href,c=e.name,u=e.notificationCount,d=e.dragHandleRef,p=e.dragHandleStyle,f=tK().t,m=n?r:null!=c?c:"",b=u>0?"".concat(m,", ").concat(f("community_sidebar.unread_notifications",{count:u})):m;return n?(0,a.jsx)("button",{ref:d,type:"button","aria-label":b,className:e8(tr,{"active border-primary switcher__active_community":o,"cursor-grab select-none":!!d}),style:p,"data-testid":"community-switcher-link",onClick:i,"aria-current":o?"page":void 0,children:s}):(0,a.jsx)("a",{ref:d,"aria-label":b,className:e8(tr,{"active border-primary switcher__active_community":o,"cursor-grab select-none":!!d}),style:p,"data-community-switcher-nav":"","data-community-id":t,"data-testid":"community-switcher-link",href:l,children:s})},tf=n(467363);function tm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tb(e,t){if(e){if("string"==typeof e)return tm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tm(e,t)}}var ty=["alt","g"],th=function(e,t){var n=e.toLowerCase();if("alt"===n||"option"===n)return t?{source:e,display:"⌥",label:"Option"}:{source:e,display:"Alt",label:"Alt"};var r=e.toUpperCase();return{source:e,display:r,label:r}},tg=function(e){var t,n=e.name,r=e.hotkeyPosition,o=function(e){if(Array.isArray(e))return e}(t=(0,c.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||tb(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],s=o[1];if((0,c.useEffect)(function(){s(tf.Ue)},[]),!("number"==typeof r&&r>=0&&r<=8))return(0,a.jsx)(a.Fragment,{children:n});var l=((function(e){if(Array.isArray(e))return tm(e)})(ty)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(ty)||tb(ty)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}
1()).concat([String(r)]).map(function(e){return th(e,i)}),u=l.map(function(e){return e.label}).join("+");return(0,a.jsxs)("span",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("span",{children:n}),(0,a.jsx)("span",{"aria-label":u,className:"flex items-center gap-1",role:"img",children:l.map(function(e){var t=e.source,n=e.display;return(0,a.jsx)("kbd",{"aria-hidden":"true",className:"inline-flex min-h-[16px] min-w-[16px] items-center justify-center rounded bg-white/20 px-1 text-[11px] font-medium leading-none",children:n},t)})})]})},tv=function(e){var t=e.communityId,n=e.href,r=e.hotkeyPosition,o=e.iconUrl,i=e.isActive,s=e.isElectron,l=e.name,c=e.notificationCount,u=e.onElectronActivate,d=e.tooltipLabel,p=e.brandColor,f=e.lightBrandColor,m=e.darkBrandColor,b=e.dragHandleRef,y=e.dragHandleStyle;return(0,a.jsx)(e4.m,{content:(0,a.jsx)(tg,{name:d,hotkeyPosition:r}),delay:200,side:"right",sideOffset:12,children:(0,a.jsx)("span",{"data-testid":"community-switcher-item",className:"inline-flex",children:(0,a.jsx)(tp,{communityId:t,isElectron:s,tooltipLabel:d,isActive:i,onElectronActivate:u,href:n,name:l,notificationCount:c,dragHandleRef:b,dragHandleStyle:y,children:(0,a.jsxs)("span",{className:"relative inline-flex",children:[(0,a.jsx)(tt,{iconUrl:o,name:l,brandColor:p,lightBrandColor:f,darkBrandColor:m}),(0,a.jsx)(tn,{notificationCount:c})]})})})})},tx=function(e){var t=e.community,n=e.hotkeyPosition,r=e.clickedCommunityId,o=e.dragHandleRef,i=e.dragHandleStyle,s=td(t,r),l=s.href,c=s.iconUrl,u=s.isActive,d=s.isElectron,p=s.notificationCount,f=s.onElectronActivate;return(0,a.jsx)(tv,{communityId:t.id,href:l,hotkeyPosition:n,iconUrl:c,isActive:u,isElectron:d,name:t.name,notificationCount:p,onElectronActivate:f,tooltipLabel:t.name,brandColor:t.brand_color,lightBrandColor:t.light_brand_color,darkBrandColor:t.dark_brand_color,dragHandleRef:o,dragHandleStyle:i})},tj=function(){var e=tK(),t=e.featureFlags,n=e.t;if(!(null==t?void 0:t.showCircleAiButton))return null;var r=null==t?void 0:t.onCircleAiClick;return(0,a.jsx)(e4.m,{content:n("community_switcher_circle_ai"),delay:200,side:"right",sideOffset:12,children:(0,a.jsx)(ef.K,{type:"button",variant:"ghost",icon:"sparkles","data-testid":"circle-ai-shell-community-switcher-ai-toggle","data-circle-ai-toggle":"community-switcher","aria-label":n("community_switcher_circle_ai"),onClick:r})})},t_=function(e){var t=e.children,n=e.onClickSeeMyCommunities,r=e.shouldShowShowMoreButton,o=tK().t;return(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[t,r?(0,a.jsx)(e4.m,{content:(0,a.jsx)(tg,{name:o("community_switcher_see_my_communities"),hotkeyPosition:0}),delay:200,side:"right",sideOffset:12,children:(0,a.jsx)(ef.K,{"aria-label":o("community_switcher_see_my_communities"),icon:"dot-menu",onClick:void 0===n?function(){}:n,size:"sm",variant:"ghost"})}):null]})},tw=function(){var e,t,n=tK().api,r=n.currentCommunity;if(!r)return null;var o=null!=(e=null!=(t=r.light_icon_url)?t:r.dark_icon_url)?e:"",i=(0,eq.U)(r.root_url,n.token);return(0,a.jsx)(e4.m,{content:(0,a.jsx)(tg,{name:r.name}),delay:200,side:"right",sideOffset:12,children:(0,a.jsx)("span",{"data-testid":"community-switcher-item",className:"inline-flex",children:(0,a.jsx)("a",{"aria-label":r.name,className:tr,"data-community-switcher-nav":"","data-testid":"community-switcher-link",href:i,children:(0,a.jsx)(tt,{iconUrl:o,name:r.name,brandColor:r.brand_color,lightBrandColor:r.light_brand_color,darkBrandColor:r.dark_brand_color})})})})},tO=function(){var e=tK(),t=e.featureFlags,n=e.t,r=null==t?void 0:t.discoverLinkTo;if(!r||!(null==t?void 0:t.showDiscoverButton))return null;var o=!!t.isDiscoverRouteActive,i=t.onDiscoverClick;return(0,a.jsx)(e4.m,{content:n("discover.tooltip"),delay:200,side:"right",sideOffset:12,children:(0,a.jsx)("a",{className:e8("size-9 hover:bg-secondary-hover focus:bg-secondary-hover !m-0 flex items-center justify-center rounded-lg border border-transparent transition-colors duration-150",{"active border-primary switcher__active_community":o}),"data-testid":"community-switcher-link",href:r,onClick:i?function(e){e.preventDefault(),i(e)}:void 0,children:(0,a.jsx)("div",{className:"brand-icon brand-icon__initial size-[30px] flex !items-center !justify-center !rounded-md !outline-none",style:{color:"#FFF"},children:(0,a.jsx)("img",{src:"https://assets-v2.circle.so/11oepcqxo8q008li605zp2ol7a8a",alt:n("discover.logo_alt"),width:30,height:30})})})})},tS=function(e){var t=e.backgroundColor;return(0,a.jsx)("div",{className:"bg-overlay-dark h-px w-9 rounded-full",style:t?{backgroundColor:t}:void 0})},tP=function(e){var t=e.length;return(0,a.jsx)("div",{"aria-busy":!0,role:"status",className:"flex w-18 flex-col items-center gap-3.5 pt-5","data-testid":"community-switcher-loading",children:Array.from({length:void 0===t?5:t}
1).map(function(e,t){return(0,a.jsx)("div",{"aria-hidden":!0,className:"bg-tertiary size-9 animate-pulse rounded-md"},"community-switcher-skeleton-".concat(t))})})},tC=n(914829);function tk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tk(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tN=function(e){var t=e.open,n=e.onOpenChange,r=e.onSubmit,o=e.defaultName,i=void 0===o?"":o,s=tK().t,l=tI((0,c.useState)(i),2),u=l[0],d=l[1],p=tI((0,c.useState)(!1),2),f=p[0],m=p[1],b=(0,c.useId)();return(0,c.useEffect)(function(){t&&d(i)},[t,i]),(0,a.jsx)(eX.a.Root,{open:t,onOpenChange:function(e){(e||!f)&&n(e)},size:"md",children:(0,a.jsxs)(eX.a.Content,{children:[(0,a.jsx)(eX.a.Header,{showCloseButton:!0,title:s("create_community_modal.title")}),(0,a.jsx)(eX.a.Body,{children:(0,a.jsx)("form",{id:b,onSubmit:function(e){e.preventDefault();var t=u.trim();t&&(m(!0),r(t))},children:(0,a.jsx)(tC.k,{autoFocus:!0,label:s("create_community_modal.name_label"),value:u,onChange:function(e){return d(e.target.value)}})})}),(0,a.jsx)(eX.a.Footer,{secondaryAction:{label:s("create_community_modal.cancel")},primaryAction:{label:s("create_community_modal.continue"),type:"submit",form:b,disabled:!u.trim()||f,loading:f}})]})})};function tA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tA(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tR=function(){var e=tE((0,c.useState)(!1),2),t=e[0],n=e[1],r=tE((0,c.useState)(!1),2),o=r[0],i=r[1],s=tK(),l=s.featureFlags,u=s.t;if((0,c.useEffect)(function(){var e=function(e){e.persisted&&n(!1)};return window.addEventListener("pageshow",e),function(){return window.removeEventListener("pageshow",e)}},[]),!(null==l?void 0:l.showNewCommunityButton)||!l.newCommunityHref||l.isElectron)return null;var d=l.onCreateCommunity;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e4.m,{content:u("create_new_community"),delay:200,side:"right",sideOffset:12,children:d?(0,a.jsx)(ef.K,{"aria-label":u("create_new_community"),icon:"plus",size:"sm",variant:"ghost",onClick:function(){var e;null==(e=l.onCreateCommunityButtonClick)||e.call(l),i(!0)}}):(0,a.jsx)(ef.K,{"aria-label":u("create_new_community"),icon:"plus",size:"sm",variant:"ghost",loading:t,onClick:function(){return n(!0)},renderLink:(0,a.jsx)("a",{href:l.newCommunityHref})})}),d&&(0,a.jsx)(tN,{open:o,onOpenChange:i,onSubmit:d,defaultName:l.newCommunityDefaultName})]})},tL=function(e){var t,n,r=e.children,o=e.className,i=e.isLoading,s=e.onClickSeeMyCommunities,l=e.shouldShowShowMoreButton,c=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","className","isLoading","onClickSeeMyCommunities","shouldShowShowMoreButton"]),u=tK().featureFlags;if(void 0!==i&&i)return(0,a.jsx)(tP,{});if((null==u?void 0:u.showSidebar)===!1)return null;var d=!!(null==u?void 0:u.showCommunities),p=!!(null==u?void 0:u.showNewCommunityButton),f=!!(null==u?void 0:u.showDiscoverButton);return(0,a.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:e8("w-18",o),"data-testid":"community-switcher-presentation"},c),n=n={children:(0,a.jsxs)("div",{className:"flex min-h-screen flex-col items-center gap-4 overflow-hidden border-r border-primary bg-secondary p-4 dark:border-secondary","data-testid":"community-switcher-presentation-body",children:[f?(0,a.jsx)(tO,{}):(0,a.jsx)(tw,{}),(0,a.jsx)(tj,{}),d&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(tS,{}),(0,a.jsx)(t_,{onClickSeeMyCommunities:void 0===s?function(){}:s,shouldShowShowMoreButton:l,children:r})]}),d&&p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(tS,{}),(0,a.jsx)(tR,{})]})]})}
1,Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};function tD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tT=function(){var e,t,n,r=tK(),o=r.api,i=r.featureFlags,s=r.theme,l=r.setCommunitiesNeedingCounts,u=r.isLoadingAppData,d=o.communities,p=o.isLoadingCommunities,f=o.isReorderingCommunities,m=eW(d,{isLoadingCommunities:p,isReorderingCommunities:f,onSortCommunities:o.onSortCommunities}),b=m.draggableItems,y=m.onSort,h=m.pinnedCurrentCommunity,g=m.sortedCommunities,v=eY({currentCommunityId:null==(n=o.currentCommunity)?void 0:n.id,onCommunitySwitch:null==i?void 0:i.onCommunitySwitch,timeoutMs:1e3}),x=v.handleNavClick,j=v.clickedCommunityId,_=function(e){if(Array.isArray(e))return e}(e=(0,c.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return tD(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tD(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),w=_[0],O=_[1];eJ(g,b,h,w,l);var S=(u||p)&&(null==(t=s.isLargeScreen)||t),P=g.length>5,C=(0,c.useCallback)(function(){O(!0)},[]),k=(0,c.useMemo)(function(){return h?g.indexOf(h)+1:void 0},[h,g]);eH({entries:(0,c.useMemo)(function(){var e=b.map(function(e,t){return{community:e,position:t+1}});return h&&void 0!==k&&e.push({community:h,position:k}),e},[b,h,k]),onActivate:(0,c.useCallback)(function(e){if(!e.is_current_community){var t;null==i||null==(t=i.onCommunitySwitch)||t.call(i)}globalThis.location.href=(0,eq.U)(e.root_url,o.token)},[o.token,null==i?void 0:i.onCommunitySwitch]),onShowAll:P?C:void 0});var I=f||g.length<=1,N=(0,c.useMemo)(function(){return b.map(function(e,t){return{id:String(e.id),community:e,hotkeyPosition:t+1}})},[b]),A=(0,c.useCallback)(function(e){y(e.map(function(e){return e.community}))},[y]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(tL,{id:"community-switcher",className:"hidden lg:block",isLoading:S,shouldShowShowMoreButton:P,onClick:x,onClickSeeMyCommunities:C,children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(eB.b,{activationConstraints:{distance:8,delay:{duration:150}},mode:"flat",axis:"vertical",className:"flex flex-col gap-2",draggingClassName:"opacity-40",items:N,onItemsChange:A,renderItem:function(e){var t=e.community,n=e.hotkeyPosition;return(0,a.jsx)("div",{children:I?(0,a.jsx)(tx,{community:t,hotkeyPosition:n,clickedCommunityId:j}):(0,a.jsx)(eB.t,{render:function(e){var r=e.ref,o=e.style;return(0,a.jsx)(tx,{community:t,hotkeyPosition:n,clickedCommunityId:j,dragHandleRef:r,dragHandleStyle:o})}})})}}),h?(0,a.jsx)(tx,{community:h,hotkeyPosition:k,clickedCommunityId:j}):null]})}),(0,a.jsx)(tu,{open:w,onOpenChange:O})]})},tM=(0,c.createContext)(null);function tF(e){var t=e.value,n=e.children,r=(0,c.useMemo)(function(){return t},[t]);return(0,a.jsx)(tM.Provider,{value:r,children:null!=n?n:(0,a.jsx)(tT,{})})}function tK(){var e=(0,c.useContext)(tM);if(!e)throw Error("useCommunitySwitcherContext must be used within CommunitySwitcherProvider");return e}var tB=n(68981),tq=n(161810),tU=n(852362),tz=n(465274),tW=n(618817),t$=n(605274),tV=n(661116),tH=n(202090),tG=n(906532),tZ=n(437785),tQ=n(135679);function tY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tJ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tY(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tX=function(){var e=tJ((0,c.useState)({}),2),t=e[0],n=e[1],r=tJ((0,c.useState)([]),2),o=r[0],i=r[1];return(0,c.useEffect)(function(){var e=!0,t=!1,r=void 0;try{for(var i,a=o[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var s=i.value;(0,tQ.So)(s,n)}}catch(e){t=!0,r=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw r}}},[o]),{notificationCounts:t,setCommunitiesNeedingCounts:i}},t0=function(e){var t=(0,g.z)({select:function(e){return{pathname:e.pathname,searchStr:e.searchStr,hash:e.hash}}}),n=t.pathname,r=t.searchStr,o=t.hash,i=(0,tz.e)(),a=i.communities,s=i.token,l=i.isLoadingCommunities,d=i.isReorderingCommunities,p=i.onSortCommunities,f=(0,tH.wR)(),m=(0,tZ.I)(),b=(0,u.Od)().currentCommunity,y=(0,u.Il)(),h=(0,u.iZ)(),v=(0,u.LA)(),x=(0,tV.W)(),j=x.electronAPI,_=x.isElectron,w=(0,tB.R)(),O=(0,tG.aT)(),S=(0,tG.m)(),P=(0,t$.J6)(),C=tX(),k=C.notificationCounts,I=C.setCommunitiesNeedingCounts,N=(0,tU.X)().trackEvent,A=(0,tQ.RL)(null==y?void 0:y.is_admin,n,null==b?void 0:b.plan_status),E=function(e){if(e)return{is_current_community:!0,light_logo_url:e.logo_url,light_icon_url:e.icon_url,root_url:e.full_url,
1id:e.id,name:e.name,dark_icon_url:e.dark_icon_url,dark_logo_url:e.dark_logo_url}},R=(0,c.useMemo)(function(){var e=new URL(A?(0,tQ.Ht)(n,r,o):(0,et.n1)(),globalThis.location.origin);return e.searchParams.set("onboarding_entry_point","community_switcher"),e.toString()},[A,n,r,o]),L=(0,c.useMemo)(function(){return{communities:a,currentCommunity:E(b),token:s,isLoadingCommunities:l,isReorderingCommunities:d,onSortCommunities:p}},[a,b,s,l,d,p]),D=(0,c.useMemo)(function(){return{isDarkAppearance:!!f.isDarkAppearance,isLargeScreen:P,presentationClasses:m.presentationClasses,bodyClasses:m.bodyClasses,bodyStyles:m.bodyStyles,dividerColor:w?O:void 0}},[f.isDarkAppearance,P,m.presentationClasses,m.bodyClasses,m.bodyStyles,w,O]),T=w?S:void 0,M=!!(null==b?void 0:b.community_switcher_enabled),F=ei(),K=(0,tW.R)(),B=(0,X.DU)(),q=K&&B,U=!!(null==y?void 0:y.is_admin),z=U&&q&&!F,$=(0,tq.yj)({onSuccess:function(e){e.login_url&&(globalThis.location.href=(0,tQ.gS)(e.login_url,null==b?void 0:b.id))}}).mutate,V=function(e){null==e||e.stopPropagation(),$()},H=(0,c.useCallback)(function(){N("community_switcher.create_community.clicked",{is_pendo_url:A},{batch:!0})},[N,A]),G=(0,c.useCallback)(function(e){N("community_switcher.create_community.submitted",{is_pendo_url:A},{batch:!0});var t=R.includes("?")?"&":"?";globalThis.location.href="".concat(R).concat(t,"name=").concat(encodeURIComponent(e))},[R,N,A]),Z=(null==h?void 0:h.first_name)?"".concat(h.first_name,"'s ").concat((0,W.t)("create_community_modal.default_name_suffix")):void 0,Q=(0,c.useCallback)(function(){var e=en.V.getState(),t="closed"===e.conversationPanelState;e.setConversationPanelState(t?"default":"closed"),e.setAdminDockForced(!!U&&t)},[U]),Y=!!h&&!!(null==a?void 0:a.length);return{providerValue:(0,c.useMemo)(function(){return{api:L,featureFlags:{discoverLinkTo:tQ.cT,onDiscoverClick:V,isElectron:_,newCommunityHref:R,onElectronChangeCommunity:function(e){return null==j?void 0:j.changeCommunity(e)},showDiscoverButton:M,showNewCommunityButton:M,onCreateCommunity:v?G:void 0,onCreateCommunityButtonClick:H,newCommunityDefaultName:Z,showCommunities:M,showSidebar:Y&&(M||q),showCircleAiButton:z,onCircleAiClick:Q,onCommunitySwitch:tQ.nZ},backgroundColor:T,setCommunitiesNeedingCounts:I,isLoadingAppData:e,getNotificationCount:function(e){var t;return null!=(t=k[e.id])?t:0},t:W.t,theme:D}},[L,T,j,_,e,R,G,H,v,Z,k,I,M,Y,q,z,F,Q,V,D])}},t1=function(e){var t=e.isLoadingAppData,n=t0(void 0!==t&&t).providerValue;return(0,a.jsx)(tF,{value:n})},t2=function(){var e=(0,g.z)({select:function(e){return e.pathname}}),t=(0,eu.a)(),n=t.isSettingsPage,r=t.isLivePage,o=t.isDiscoverPage,i=e.startsWith("/two_fa"),s=e.startsWith(et.ty.plans.general),l=e.startsWith(eF.aA),d=(0,ec.i)().display_community_switcher,p=(0,u.Od)().currentCommunity,f=(null==p?void 0:p.subscription_cancelled)&&s,m=n&&!f,b=m||i||r||o||l;return((0,c.useEffect)(function(){var e=(0,eK.W2)("has-community-switcher");e&&(m?document.body.classList.remove(e):d&&document.body.classList.add(e))},[e,m,d,f]),b)?null:(0,a.jsx)(t1,{})},t3=function(){return(0,a.jsx)(t2,{})},t4=n(443151),t5=n(452825),t6=function(e){var t=e.onRowClick,n=e.rows;return(0,a.jsx)("div",{className:"flex min-w-56 flex-col py-1",children:n.map(function(e,n){var r;return"divider"===e?(0,a.jsx)(t5.c,{className:"my-1"},"divider-".concat(n)):(0,a.jsxs)("button",{type:"button",onClick:function(){e.onClick(),null==t||t(e)},className:"hover:bg-secondary flex w-full items-center gap-4 px-4 py-2 text-left transition-colors duration-150 ease-linear",children:[null!=(r=e.prefix)?r:e.icon?(0,a.jsx)(e2.t,{name:e.icon,size:"sm",className:"shrink-0",color:"secondary"}):null,(0,a.jsx)("span",{className:"text-dark flex-1 truncate text-sm",children:e.label}),e.suffix]},e.label)})})},t8="flex h-9 w-full items-center gap-3 rounded-md px-3 py-2 transition-colors duration-150 ease-linear hover:bg-active hover:text-selector-active",t9="bg-active text-selector-active",t7="flex size-9 shrink-0 items-center justify-center rounded-md text-default transition-colors duration-150 ease-linear hover:bg-active hover:text-selector-active",ne=function(e){var t=e.canGoBack,n=e.children,r=e.communityName,o=e.onGoBack,i=e.rows,s=(0,a.jsx)(e4.m,{content:(0,W.t)("admin_nav_v4.back_to_community"),side:"bottom",delay:500,children:(0,a.jsx)("button",{type:"button","aria-label":t?(0,W.t)("admin_nav_v4.back_to_community"):r,onClick:t?o:void 0,className:t7,children:(0,a.jsxs)("span",{className:"relative size-6",children:[(0,a.jsx)("span",{className:(0,ed.x)("ease-[cubic-bezier(0.23,1,0.32,1)] absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-150 motion-reduce:transform-none motion-reduce:transition-opacity",{"group-hover/dock:-translate-x-0.5 group-hover/dock:opacity-0":t}),children:n}),t&&(0,a.jsx)("span",{className:"ease-[cubic-bezier(0.23,1,0.32,1)] absolute inset-0 flex translate-x-0.5 items-center justify-center opacity-0 transition-[opacity,transform] duration-150 group-hover/dock:translate-x-0 group-hover/dock:opacity-100 motion-reduce:transform-none motion-reduce:transition-opacity",children:(0,a.jsx)(e2.t,{name:"arrow-left",size:"md",color:"primary"})})]})})});return(0,a.jsx)(t4.Ns,{trigger:s,side:"right",align:"start",className:"max-h-[calc(100vh-2rem)] !p-0",children:(0,a.jsx)("div",{className:"max-h-[calc(100vh-2rem)] overflow-y-auto",children:(0,a.jsx)(t6,{rows:i})})})},nt=n(443111);(0,e7.X$)([te.A]);var nn=function(e){var t=e.iconUrl,n=e.name,r=e.isDarkAppearance,o=e.lightBrandColor,i=e.darkBrandColor,s=(0,nt.X)(o,i,void 0!==r&&r),l=s&&(0,e7.Mj)(s).luminance()>.65?"#000":"#fff";
1return(0,a.jsx)("span",{"aria-hidden":!0,className:"flex size-6 shrink-0 select-none items-center justify-center overflow-hidden rounded-md",children:t?(0,a.jsx)("img",{loading:"lazy",alt:"".concat(n," icon"),className:"size-6 rounded-md object-cover",src:t}):(0,a.jsx)("span",{className:"flex size-6 items-center justify-center rounded-md text-sm font-bold leading-none",style:s?{backgroundColor:s,color:l}:void 0,children:(0,eq.s)(n)})})},nr=n(722495);function no(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ni(e){return function(e){if(Array.isArray(e))return no(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return no(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return no(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var na=function(){var e,t,n,r,o,i=(0,en.V)(function(e){return e.setUserMode}),s=(0,en.V)(function(e){return e.setAdminDockForced}),l=(0,en.V)(function(e){return e.setConversationPanelState}),c=(0,u.Od)().currentCommunity,d=(0,u.KU)(),p=(0,u.fv)(),f=(0,tH.wR)().isDarkAppearance,m=(0,tz.e)(),b=m.communities,y=m.token,h=(0,z.Z)(),v=(0,g.z)({select:function(e){return e.pathname}}),x=(0,eM.a$)(c),j=null!=(e=null==c?void 0:c.name)?e:"",_=function(){(null==c?void 0:c.home_page_enabled)?h({to:"/feed"}):window.location.href="/"},w=function(){i("community"),s(!1),l("closed"),_()},O=function(e){var t,n;return(0,a.jsx)(nn,{iconUrl:null!=(t=f?e.darkIconUrl:e.lightIconUrl)?t:"",name:null!=(n=e.name)?n:"",isDarkAppearance:f,lightBrandColor:e.lightBrandColor,darkBrandColor:e.darkBrandColor})},S=O({darkIconUrl:null==c?void 0:c.dark_icon_url,lightIconUrl:null==c?void 0:c.icon_url,name:j,lightBrandColor:null==c||null==(n=c.prefs)||null==(t=n.brand_color)?void 0:t.light,darkBrandColor:null==c||null==(o=c.prefs)||null==(r=o.brand_color)?void 0:r.dark}),P={icon:"arrow-left",label:(0,W.t)("admin_nav_v4.back_to_community"),onClick:w},C={icon:"people-add",label:(0,W.t)("circle_ai_dock.community_menu.invite_members"),onClick:function(){h({to:et.ty.members.invite,search:(0,nr.FC)({from:v})})}},k={icon:"settings-gear",label:(0,W.t)("circle_ai_dock.community_menu.settings"),onClick:function(){i("admin"),h({to:"/settings"})}},I=b.filter(function(e){return!e.is_current_community}).map(function(e){return{label:e.name,prefix:(0,a.jsx)("span",{className:"-mx-1 flex shrink-0",children:O({darkIconUrl:e.dark_icon_url,lightIconUrl:e.light_icon_url,name:e.name,lightBrandColor:e.light_brand_color,darkBrandColor:e.dark_brand_color})}),onClick:function(){(0,tQ.nZ)(),globalThis.location.href=(0,tQ.UP)(e.root_url,y)}}}),N=[{label:j,prefix:(0,a.jsx)("span",{className:"-mx-1 flex shrink-0",children:S}),suffix:(0,a.jsx)(e2.t,{name:"checkmark",size:"sm",className:"shrink-0",color:"secondary"}),onClick:function(){},closeOnClick:!1}].concat(ni(x?[]:d?[P,C,k]:p?[P]:[C]),ni(I.length>0?["divider"]:[]),ni(I));return{canGoBack:!x&&p,communityName:j,currentAvatar:S,goBackToCommunity:w,rows:N}},ns=function(){var e=na(),t=e.canGoBack,n=e.communityName,r=e.currentAvatar,o=e.goBackToCommunity,i=e.rows;return(0,a.jsx)("div",{className:"flex justify-center px-2 pt-4",children:(0,a.jsx)(ne,{communityName:n,rows:i,canGoBack:t,onGoBack:o,children:r})})},nl=n(790389);function nc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nu=function(){var e,t=na(),n=t.canGoBack,r=t.communityName,o=t.currentAvatar,i=t.goBackToCommunity,s=t.rows,l=function(e){if(Array.isArray(e))return e}(e=(0,c.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return nc(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nc(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=l[0],d=l[1],p=(0,a.jsxs)("button",{type:"button","aria-label":r,className:"flex min-h-9 w-full items-center gap-3 rounded-md border border-primary bg-primary px-2 py-1.5 text-left transition-colors duration-150 ease-linear hover:bg-secondary",children:[(0,a.jsx)("span",{"aria-hidden":!0,className:"size-6 shrink-0"}),(0,a.jsx)("span",{className:"flex-1 truncate text-sm font-medium text-dark",children:r}),(0,a.jsx)(e2.t,{name:"chevron-down",size:"sm",className:"shrink-0",color:"secondary"})]});return(0,a.jsxs)("div",{className:"relative px-3 pt-4",children:[(0,a.jsx)(nl.A,{trigger:p,open:u,onOpenChange:d,side:"bottom",align:"start",className:"max-h-[calc(100vh-2rem)] !p-0",children:(0,a.jsx)("div",{className:"max-h-[calc(100vh-2rem)] overflow-y-auto",children:(0,a.jsx)(t6,{rows:s,onRowClick:function(e){!1!==e.closeOnClick&&d(!1)}})})}),n?(0,a.jsx)(e4.m,{content:(0,W.t)("admin_nav_v4.back_to_community"),side:"bottom",children:(0,a.jsxs)("button",{type:"button","aria-label":(0,W.t)("admin_nav_v4.back_to_community"),onClick:i,className:"group/back absolute left-[22px] top-[22px] flex size-6 shrink-0 items-center justify-center rounded-md transition-colors duration-150 ease-linear hover:bg-tertiary",children:[(0,a.jsx)("span",{className:"ease-[cubic-bezier(0.23,1,0.32,1)] absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-150 group-hover/back:-translate-x-0.5 group-hover/back:opacity-0 group-focus-visible/back:-translate-x-0.5 group-focus-visible/back:opacity-0 motion-reduce:transform-none motion-reduce:transition-opacity",children:o}),(0,a.jsx)("span",{className:"ease-[cubic-bezier(0.23,1,0.32,1)] absolute inset-0 flex translate-x-0.5 items-center justify-center opacity-0 transition-[opacity,transform] duration-150 group-hover/back:translate-x-0 group-hover/back:opacity-100 group-focus-visible/back:translate-x-0 group-focus-visible/back:opacity-100 motion-reduce:transform-none motion-reduce:transition-opacity",children:(0,a.jsx)(e2.t,{name:"arrow-left",size:"sm",color:"primary"})})]})}):(0,a.jsx)("span",{className:"absolute left-[22px] top-[22px] flex size-6 shrink-0 items-center justify-center",children:o})]})},nd=function(){return(0,en.V)(function(e){return"collapsed"===e.dockMode})?(0,a.jsx)(ns,{}):(0,a.jsx)(nu,{})},np=n(215089),nf=n(881220),nm=n(534529),nb=n(70719),ny=n(860179),nh=function(e,t){var n;return(null!=(n=e.children)?n:[]).some(function(e){return(0,ny.q)({exact:e.exact,pathname:t,to:e.to})})},ng=function(e,t){var n,r;return(null!=(n=e.children)?n:[]).length>0?nh(e,t):(0,ny.q)({exact:e.exact,pathname:t,to:e.path})||(null!=(r=e.activePaths)?r:[]).some(function(e){return(0,ny.q)({pathname:t,to:e})})};function nv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nx=function(e){var t,n=e.items,r=(0,ew.k)({select:function(e){return e.location.pathname}}),o=function(e){if(Array.isArray(e))return e}(t=(0,c.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return nv(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nv(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],s=o[1],l=n.some(function(e){return ng(e,r)}),u=[{label:(0,W.t)("circle_ai_dock.sections.build"),items:n.map(function(e){var t;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:e.label},e.compassIcon?{icon:e.compassIcon}:{},(null==(t=e.children)?void 0:t.length)?{submenu:e.children.map(function(e){return{label:e.label,renderLink:(0,a.jsx)(nm.N_,{to:e.to})}})}:{renderLink:(0,a.jsx)(nm.N_,{to:e.path})})})}];return(0,a.jsx)(nb.t,{side:"right",align:"start",options:u,onOpenChange:s,trigger:(0,a.jsx)(e4.m,{content:(0,W.t)("circle_ai_dock.sections.build"),side:"right",children:(0,a.jsx)("button",{type:"button","aria-label":(0,W.t)("circle_ai_dock.sections.build"),className:(0,ed.x)(t7,(i||l)&&t9),children:(0,a.jsx)(e2.t,{name:"dot-menu",size:"md",color:"primary"})})})})},nj=function(){return(0,a.jsx)("span",{className:"bg-icon-danger absolute -right-1 -top-1 size-3 rounded-full border-2 border-tertiary"})},n_=n(333504),nw=n(762864),nO="flex flex-col items-center gap-2",nS="border-primary w-6 border-t",nP={"--scroll-area-fade-color":"var(--color-background-secondary)"},nC=function(){var e=(0,u.KU)(),t=(0,X.DU)(),n=(0,u.fv)(),r=(0,nw.$)(),o=(0,n_.x)(),i=(0,ew.k)({select:function(e){return e.location.pathname}}),s=(0,ee.B)(function(e){return e.setDockRecentChatsOpen});return(0,a.jsxs)(nf.t.Root,{scrollFades:!0,style:nP,className:"relative h-full min-h-0",children:[(0,a.jsx)(nf.t.Viewport,{className:"size-full",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 p-4",children:[r.items.length>0&&(0,a.jsx)("div",{className:nO,children:r.items.map(function(e){var t,n,r,o=e.to?(0,ny.q)({exact:e.exact,pathname:i,to:e.to}):!!e.isActive,s=o&&e.activeIcon?e.activeIcon:e.icon,l=(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(e2.t,{name:s,size:"md",color:"primary"}),e.badge&&(0,a.jsx)(nj,{})]});return(0,a.jsx)(e4.m,{content:e.label,side:"right",children:e.to?(0,a.jsx)(nm.N_,{to:e.to,"aria-label":e.label,"data-testid":e["data-testid"],"data-circle-ai-toggle":"circle-ai"===e.id?"dock":void 0,activeOptions:{exact:null!=(r=e.exact)&&r,includeSearch:!1},className:(0,ed.x)(t7,"relative",o&&t9),children:l}):(0,a.jsx)("button",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({type:"button",onClick:e.onClick,disabled:e.disabled,"aria-label":e.label,"data-testid":e["data-testid"],"data-circle-ai-toggle":"circle-ai"===e.id?"dock":void 0,className:(0,ed.x)(t7,"relative",e.disabled&&"pointer-events-none opacity-50",o&&t9)},void 0!==e.isActive&&{"aria-pressed":e.isActive}),n=n={children:l},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},e.id)})}),e&&t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:nS}),(0,a.jsx)("div",{className:nO,children:(0,a.jsx)(e4.m,{content:(0,W.t)("circle_ai_home.recent_chats_drawer.open"),side:"right",children:(0,a.jsx)("button",{type:"button",onClick:function(){return s(!0)},"aria-label":(0,W.t)("circle_ai_home.recent_chats_drawer.open"),className:t7,children:(0,a.jsx)(e2.t,{name:"clock-dash",size:"md",color:"primary"})})})})]}),n&&o.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:nS}),(0,a.jsx)("div",{className:nO,children:(0,a.jsx)(nx,{items:o})})]})]})}),(0,a.jsx)(nf.t.Scrollbar,{orientation:"vertical"})]})},nk=n(973646),nI=n(16876),nN=function(e){var t=!!(0,nI._f)()({to:"/settings/analytics",fuzzy:!0});return"analytics_v2"===e&&t},nA=function(e){var t,n=e.item,r=e.isOpen,o=e.onToggle,i=(0,ew.k)({select:function(e){return e.location.pathname}}),s=null!=(t=n.children)?t:[],l=nN(n.id),c=nh(n,i)&&!r,u=c&&n.activeIcon?n.activeIcon:n.icon,d=c&&n.compassActiveIcon?n.compassActiveIcon:n.compassIcon;return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{type:"button",onClick:o,"aria-expanded":r,className:(0,ed.x)(t8,c&&t9),children:[d?(0,a.jsx)(e2.t,{name:d,size:"md",color:"primary",className:"shrink-0"}):(0,a.jsx)(nk.In,{type:u,size:20,className:"shrink-0"}),(0,a.jsx)(e9.o5,{variant:"body-sm",className:"flex-1 truncate text-left",children:n.label}),(0,a.jsx)(e2.t,{name:r?"chevron-down":"chevron-right",size:"md",color:"tertiary",className:"shrink-0"})]}),r&&(0,a.jsx)("div",{className:"mt-0.5 flex flex-col gap-0.5",children:s.map(function(e){var t,n,r;return(0,a.jsx)(nm.N_,(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({to:e.to},l?{state:!0,search:!0,hash:!0}:{}),r=r={"data-dock-active":(0,ny.q)({exact:e.exact,pathname:i,to:e.to})||void 0,activeOptions:{exact:null!=(t=e.exact)&&t,includeSearch:!1},className:"hover:bg-active hover:text-selector-active text-default flex items-center gap-3 rounded-md px-3 py-2 transition-colors duration-150 ease-linear",activeProps:{className:t9},children:function(t){var n=t.isActive;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{"aria-hidden":"true",className:"text-light flex w-5 shrink-0 items-center justify-center",children:(0,a.jsx)("span",{className:"size-0.5 rounded-full bg-current"})}),(0,a.jsx)(e9.o5,{variant:"body-sm",color:n?"primary":"secondary",truncate:!0,children:e.label})]})}},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n),e.id)})})]})},nE=function(e){var t,n=e.forceActive,r=e.item,o=(0,ew.k)({select:function(e){return e.location.pathname}}),i=null!=(t=r.exact)&&t,s=void 0!==n&&n||(0,ny.q)({exact:i,pathname:o,to:r.path}),l=s&&r.activeIcon?r.activeIcon:r.icon,c=s&&r.compassActiveIcon?r.compassActiveIcon:r.compassIcon;return(0,a.jsxs)(nm.N_,{to:r.path,"data-dock-active":s||void 0,className:(0,ed.x)(t8,s&&t9),activeOptions:{exact:i,includeSearch:!1},children:[c?(0,a.jsx)(e2.t,{name:c,color:"primary",size:"md",className:"shrink-0"}):(0,a.jsx)(nk.In,{type:l,size:20,className:"shrink-0"}),(0,a.jsx)(e9.o5,{variant:"body-sm",color:"primary",truncate:!0,children:r.label})]})};function nR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nL=function(e){var t,n,r=e.items,o=e.title,i=(0,ew.k)({select:function(e){return e.location.pathname}}),s=null==(n=r.find(function(e){return nh(e,i)}))?void 0:n.id,l=function(e){if(Array.isArray(e))return e}(t=(0,c.useState)(s))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return nR(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nR(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=l[0],d=l[1],p=(0,c.useRef)(s);return((0,c.useLayoutEffect)(function(){s&&p.current!==s&&d(s),p.current=s},[s]),0===r.length)?null:(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 px-3 py-2",children:[o&&(0,a.jsx)(e9.o5,{variant:"heading-xs",color:"tertiary",component:"h2",className:"px-3 pb-1 pt-2",children:o}),r.map(function(e){var t;return(null==(t=e.children)?void 0:t.length)?(0,a.jsx)(nA,{item:e,isOpen:u===e.id,onToggle:function(){return d(function(t){return t===e.id?void 0:e.id})}},e.id):(0,a.jsx)(nE,{item:e},e.id)})]})},nD=function(e){var t=e.items;return(0,u.fv)()&&0!==t.length?(0,a.jsx)(nL,{title:(0,W.t)("circle_ai_dock.sections.build"),items:t}):null},nT=function(e){var t,n,r,o=e.item,i=(0,ew.k)({select:function(e){return e.location.pathname}}),s=o.to?(0,ny.q)({exact:o.exact,pathname:i,to:o.to}):!!o.isActive,l=s&&o.activeIcon?o.activeIcon:o.icon,c=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(e2.t,{name:l,size:"md",className:"shrink-0",color:"primary"}),o.badge&&(0,a.jsx)(nj,{})]}),(0,a.jsx)(e9.o5,{variant:"body-sm",color:"primary",truncate:!0,children:o.label})]});return o.to?(0,a.jsx)(nm.N_,{to:o.to,"data-testid":o["data-testid"],"data-circle-ai-toggle":"circle-ai"===o.id?"dock":void 0,"data-dock-active":s||void 0,activeOptions:{exact:null!=(r=o.exact)&&r,includeSearch:!1},className:(0,ed.x)(t8,s&&t9),children:c}):(0,a.jsx)("button",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({type:"button",onClick:o.onClick,disabled:o.disabled,"data-testid":o["data-testid"],"data-circle-ai-toggle":"circle-ai"===o.id?"dock":void 0,"data-dock-active":s||void 0,className:(0,ed.x)(t8,o.disabled&&"pointer-events-none opacity-50",s&&t9)},void 0!==o.isActive&&{"aria-pressed":o.isActive}),n=n={children:c},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},nM=function(e){var t=e.section;return 0===t.items.length?null:(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 px-3 py-2",children:[t.title&&(0,a.jsx)(e9.o5,{variant:"label-sm",color:"tertiary",component:"h2",className:"px-3 pb-1 pt-2",children:t.title}),t.items.map(function(e){return(0,a.jsx)(nT,{item:e},e.id)})]})},nF=n(653529),nK=n(134937),nB=n(84201),nq=n(127140),nU=function(){var e,t=(0,nq.N)(),n=(0,ee.B)(function(e){return e.setDockRecentChatsOpen}),r=(0,np.U)({query:"",perPage:4}).data,o=null!=(e=null==r?void 0:r.pages.flatMap(function(e){return e.records}))?e:[],i=o.slice(0,3);if(0===i.length)return null;var s=o.length>3;return(0,a.jsx)(nF.o,{children:(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 px-3 py-2",children:[(0,a.jsx)(e9.o5,{variant:"heading-xs",color:"tertiary",component:"h2",className:"px-3 pb-1 pt-2",children:(0,W.t)("circle_ai_dock.sections.recent_chats")}),i.map(function(e){var n;return(0,a.jsxs)("div",{className:"group flex items-center rounded-md transition-colors duration-150 ease-linear hover:bg-active hover:text-selector-active",children:[(0,a.jsxs)("button",{type:"button",onClick:function(){return t(e.uuid,e.title,e.project_id)},className:"flex h-9 min-w-0 flex-1 items-center gap-3 rounded-md px-3 py-2 text-left",children:[(0,a.jsx)(e2.t,{name:"clock-dash",color:"primary",size:"md",className:"shrink-0"}),(0,a.jsx)(e9.o5,{variant:"body-sm",className:"truncate",children:null!=(n=e.title)?n:(0,W.t)("circle_ai_home.new_conversation")})]}),(0,a.jsx)("div",{className:"shrink-0 pr-1.5 ".concat(nB.oy),children:(0,a.jsx)(nK.r,{conversation:{uuid:e.uuid,title:e.title,projectUuid:e.project_id,isDailyBriefConversation:e.daily_brief_conversation}})})]},e.uuid)}),s&&(0,a.jsxs)("button",{type:"button",onClick:function(){return n(!0)},className:t8,children:[(0,a.jsx)(e2.t,{name:"dot-menu",color:"primary",size:"md",className:"shrink-0"}),(0,a.jsx)(e9.o5,{variant:"body-sm",truncate:!0,children:(0,W.t)("circle_ai_dock.recent_chats.more")})]})]})})},nz=function(){var e=(0,u.KU)(),t=(0,X.DU)();return e&&t?(0,a.jsx)(nU,{}):null},nW={"--scroll-area-fade-color":"var(--color-background-secondary)"},n$=function(){var e=(0,nw.$)(),t=(0,n_.x)(),n=(0,c.useRef)(null);return(0,c.useLayoutEffect)(function(){var e,t;null==(t=n.current)||null==(e=t.querySelector("[data-dock-active]"))||e.scrollIntoView({block:"nearest"})},[]),(0,a.jsxs)(nf.t.Root,{scrollFades:!0,style:nW,className:"relative h-full min-h-0",children:[(0,a.jsx)(nf.t.Viewport,{ref:n,className:"size-full",children:(0,a.jsxs)("div",{className:"pt-1.5",children:[(0,a.jsx)(nM,{section:e}),(0,a.jsx)(nz,{}),(0,a.jsx)(nD,{items:t})]})}),(0,a.jsx)(nf.t.Scrollbar,{orientation:"vertical"})]})},nV=n(224444),nH=n(645765),nG=n(872518),nZ=n(204993),nQ=n(698532),nY=n(574795),nJ=n(325335),nX=n(38509);function n0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n1(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return n0(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var n2="circle-ai-recent-chats-flyover-scroll",n3=function(){var e,t=(0,g.z)({select:function(e){return e.pathname}}),n=n1((0,c.useState)(""),2),r=n[0],o=n[1],i=n1((0,c.useState)(null),2),s=i[0],l=i[1],u=n1((0,c.useState)(null),2),d=u[0],p=u[1],f=(0,nG.o)(r,250),m=(0,ee.B)(function(e){return e.isDockRecentChatsOpen}),b=(0,ee.B)(function(e){return e.setDockRecentChatsOpen}),y=(0,nq.N)(),h=(0,np.U)({query:f,enabled:m}),v=h.data,x=h.fetchNextPage,j=h.hasNextPage,_=h.isLoading,w=h.isError,O=null!=(e=null==v?void 0:v.pages.flatMap(function(e){return e.records}))?e:[],S=O.length>0;return(0,c.useEffect)(function(){b(!1)},[t,b]),(0,c.useLayoutEffect)(function(){p(document.getElementById(eL.eL.shellBody))},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(nF.o,{children:(0,a.jsx)(nQ.$.Root,{open:m,onOpenChange:b,position:"left",container:s,children:(0,a.jsx)(nQ.$.Content,{"aria-label":(0,W.t)("circle_ai_home.recent_chats_drawer.title"),children:(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,a.jsxs)("div",{className:"flex h-16 shrink-0 items-center gap-2 border-b border-primary px-5 py-3",children:[(0,a.jsx)(e9.o5,{variant:"heading-sm",color:"primary",component:"h2",className:"flex-1 truncate",children:(0,W.t)("circle_ai_home.recent_chats_drawer.title")}),(0,a.jsx)(ef.K,{variant:"ghost",size:"sm",icon:"cross","aria-label":(0,W.t)("close"),onClick:function(){return b(!1)}})]}),(0,a.jsx)("div",{className:"shrink-0 p-4",children:(0,a.jsx)(nZ.D,{placeholder:(0,W.t)("circle_ai_home.recent_chats_drawer.search_placeholder"),value:r,onChange:function(e){return o(e.target.value)},onClear:function(){return o("")}})}),(0,a.jsxs)("div",{id:n2,className:"flex-1 overflow-y-auto px-4 pb-4",children:[_&&!S&&(0,a.jsx)(nV.y,{}),w&&(0,a.jsx)(e9.o5,{variant:"body-sm",color:"tertiary",component:"p",children:(0,W.t)("circle_ai_home.recent_chats_drawer.load_error")}),!_&&!w&&!S&&(0,a.jsx)(e9.o5,{variant:"body-sm",color:"tertiary",component:"p",children:(0,W.t)(f.length>0?"circle_ai_home.recent_chats_drawer.empty_search":"circle_ai_home.recent_chats_drawer.empty")}),S&&(0,a.jsx)(nJ.A,{style:{overflow:"initial"},scrollThreshold:.8,next:x,hasMore:!!j,loader:(0,a.jsx)(nV.y,{}),scrollableTarget:n2,dataLength:O.length,children:(0,a.jsx)("div",{className:"flex flex-col gap-4",children:O.map(function(e){var t;return(0,a.jsx)(nX.s,{title:null!=(t=e.title)?t:(0,W.t)("circle_ai_home.new_conversation"),preview:e.last_message_preview,dateLabel:(0,nH.B)(e.updated_at).day,onClick:function(){return y(e.uuid,e.title,e.project_id)},actions:(0,a.jsx)(nK.r,{conversation:{uuid:e.uuid,title:e.title,projectUuid:e.project_id,isDailyBriefConversation:e.daily_brief_conversation}})},e.uuid)})})})]})]})})})}),d&&(0,nY.createPortal)((0,a.jsx)("div",{ref:l,style:{left:"var(".concat(eL.EA.dock.cssVar,", 0px)")},className:"".concat(m?"pointer-events-auto":"pointer-events-none"," absolute inset-y-0 right-0 z-30 overflow-hidden [--color-background-overlay:transparent]")}),d)]})},n4=function(){var e=(0,u.KU)(),t=(0,X.DU)(),n=(0,en.V)(function(e){return e.dockMode}),r=e&&t;return(0,np.U)({query:"",perPage:4,enabled:r}),(0,a.jsxs)(a.Fragment,{children:["collapsed"===n?(0,a.jsx)(nC,{}):(0,a.jsx)(n$,{}),r&&(0,a.jsx)(n3,{})]})},n5=function(){var e=(0,ee.B)(function(e){return e.startNewChat}),t=(0,ea.U)().isFullPageAiRoute,n=(0,W.t)("circle_ai_home.new_chat");return(0,a.jsx)(ef.K,{icon:"circle-plus-filled",variant:"ghost",onClick:function(){return e({openPanel:!t})},title:n,"aria-label":n})},n6=function(){var e=(0,ee.B)(function(e){return e.isRecentChatsOpen}),t=(0,ee.B)(function(e){return e.toggleRecentChats}),n=e?(0,W.t)("circle_ai_home.recent_chats_drawer.close"):(0,W.t)("circle_ai_home.recent_chats_drawer.open");return(0,a.jsx)(ef.K,{icon:"clock-dash",variant:"ghost",onClick:t,title:n,"aria-label":n,"aria-pressed":e,"data-popup-open":e||void 0})},n8=n(739042),n9=function(e){var t,n,r=e.icon,o=e.isActive,i=e.label,s=e.onClick;return(0,a.jsx)(n8.$,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({variant:o?"secondary":"ghost",startIcon:r,fullWidth:!0,onClick:s},void 0!==o&&{"aria-pressed":o}),n=n={children:(0,a.jsx)("span",{className:"truncate",children:i})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},n7="/ai/skills",re=function(){var e=(0,u.KU)(),t=(0,X.DU)(),n=(0,en.V)(function(e){return e.dockMode}),r=(0,ee.B)(function(e){return e.isRecentChatsOpen}),o=(0,ee.B)(function(e){return e.toggleRecentChats}),i=(0,ee.B)(function(e){return e.startNewChat}),s=(0,ea.U)().isFullPageAiRoute,l=(0,z.Z)(),c=!!(0,nI._f)()({to:n7}),d=function(){l({to:n7})};return e&&t?"collapsed"===n?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 p-3",children:[(0,a.jsx)(n5,{}),(0,a.jsx)(n6,{}),(0,a.jsx)(ef.K,{icon:"ai-box-filled",variant:c?"secondary":"ghost","aria-label":(0,W.t)("circle_ai_skills.nav.skills"),onClick:d})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 px-3 py-2",children:[(0,a.jsx)(n9,{icon:"circle-plus-filled",label:(0,W.t)("circle_ai_home.new_chat"),onClick:function(){return i({openPanel:!s})}}),(0,a.jsx)(n9,{icon:"clock-dash",label:(0,W.t)("circle_ai_home.recent_chats_drawer.open"),isActive:r,onClick:o}),(0,a.jsx)(n9,{icon:"ai-box-filled",label:(0,W.t)("circle_ai_skills.nav.skills"),isActive:c,onClick:d})]}):null},rt=n(538749),rn=n(19577);function rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ro=function(){var e,t=(0,rn.x)(),n=t.shouldShow,r=t.isUrgent,o=t.title,i=t.trialEndsInDescription,s=t.onCtaClick,l=function(e){if(Array.isArray(e))return e}(e=(0,c.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return rr(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rr(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=l[0],d=l[1];if(!n)return null;var p=(0,a.jsxs)("button",{type:"button",onClick:s,onMouseEnter:function(){return d(!0)},onMouseLeave:function(){return d(!1)},className:(0,ed.x)("flex w-full items-start gap-3 rounded-xl p-3 text-left shadow-sm transition-colors",r?"border-warning border bg-warning-light hover:brightness-95":"bg-primary"),children:[(0,a.jsx)(e2.t,{name:"arrow-up-circle",size:"md",color:r?"warning":"primary"}),(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)(e9.o5,{variant:"label-sm",color:"primary",component:"p",children:o}),(0,a.jsx)(e9.o5,{variant:"caption",color:"tertiary",component:"p",children:i})]})]});return r?(0,a.jsx)("div",{className:"p-3",children:p}):(0,a.jsx)("div",{className:"p-3",children:(0,a.jsx)(rt.b,{active:u,children:p})})},ri=n(555763),ra=function(){return(0,a.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,a.jsx)("div",{className:"shrink-0 px-2 py-3",children:(0,a.jsx)(t3,{})}),(0,a.jsxs)("nav",{className:"flex min-h-0 flex-1 flex-row overflow-hidden","aria-label":(0,W.t)("circle_v4.dock.settings_nav_aria_label"),children:[(0,a.jsx)("div",{className:"w-16 shrink-0 overflow-hidden border-r border-primary",children:(0,a.jsx)(eT.m,{})}),(0,a.jsx)("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:(0,a.jsx)(ri.S,{})})})]})]})},rs=function(){var e=(0,er.M)(),t=(0,en.V)(function(e){return e.dockMode}),n=(0,en.V)(function(e){return e.isAdminDockForced}),r=(0,u.KU)(),o=(0,u.fv)(),i=(0,u.Od)().currentCommunity,s=ei(),l=(0,eo.N)();return(0,eM.a$)(i)?(0,a.jsx)("div",{className:"h-full min-h-0 overflow-hidden",children:(0,a.jsx)(nd,{})}):s?(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:[(0,a.jsx)("div",{className:"shrink-0",children:(0,a.jsx)(nd,{})}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:(0,a.jsx)(n4,{})}),"expanded"===t&&(0,a.jsx)("div",{className:"shrink-0",children:(0,a.jsx)(ro,{})})]}):!l&&(o&&e||r&&n)?(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:[(0,a.jsx)(re,{}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:"expanded"===t?(0,a.jsx)(ra,{}):(0,a.jsx)(eT.m,{})})]}):(0,a.jsx)("div",{className:"h-full min-h-0 overflow-hidden",children:(0,a.jsx)(t3,{})})},rl=n(507586),rc=n(972181),ru=n(849832);function rd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var rp=function(){var e,t=(0,rn.x)(),n=t.shouldShow,r=t.isUrgent,o=t.title,i=t.trialEndsInDescription,s=t.onCtaClick,l=function(e){if(Array.isArray(e))return e}(e=(0,c.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return rd(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rd(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=l[0],d=l[1];if(!n)return null;var p=(0,a.jsx)(e4.m,{content:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{children:o}),(0,a.jsx)("span",{children:i})]}),side:"right",children:(0,a.jsx)("button",{type:"button",onClick:s,onMouseEnter:function(){return d(!0)},onMouseLeave:function(){return d(!1)},"aria-label":o,className:(0,ed.x)(r?"flex size-9 shrink-0 items-center justify-center rounded-lg border border-warning bg-warning-light transition-colors hover:brightness-95":t7),children:(0,a.jsx)(e2.t,{name:"arrow-up-circle",size:"md",color:r?"warning":"primary"})})});return r?p:(0,a.jsx)(rt.b,{active:u,className:"rounded-lg",children:p})},rf=n(844842);function rm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rb(e){if(Array.isArray(e))return e}function ry(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rh(e,t){if(e){if("string"==typeof e)return rm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rm(e,t)}}var rg=(0,c.forwardRef)(function(e,t){var n,r,o,i=rb(n=[e,t])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||rh(n)||ry(),s=i[0],l=i.slice(1),c=s.avatarUrl,u=s.name,d=s.showName,p=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(s,["avatarUrl","name","showName"]),f=(rb(l)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(l)||rh(l,1)||ry())[0];return(0,a.jsxs)("button",(r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:f,type:"button","aria-label":(0,W.t)("user_menu_options"),className:"hover:bg-tertiary focus-visible:outline-secondary flex min-w-0 items-center gap-2 rounded-md px-2 py-1 transition-colors focus-visible:outline focus-visible:outline-2 h-9"},p),o=o={children:[(0,a.jsx)(rf.t,{name:u,src:c,size:"xs"}),(void 0===d||d)&&(0,a.jsx)(e9.o5,{variant:"body-sm",color:"primary",truncate:!0,children:u})]},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r))});rg.displayName="ProfileMenuTrigger";var rv="/settings",rx=function(e){var t=e.isActive;return(0,a.jsx)(e4.m,{content:(0,W.t)("admin_nav_v4.settings"),side:"right",children:(0,a.jsx)(nm.N_,{to:rv,"aria-label":(0,W.t)("admin_nav_v4.settings"),className:(0,ed.x)(t7,t&&t9),children:(0,a.jsx)(e2.t,{name:t?"settings-gear-filled":"settings-gear",size:"md",color:"primary"})})})},rj=function(){var e,t,n=(0,er.M)(),r=ei(),o=(0,u.KU)(),i=(0,u.Od)().currentCommunityMember,s=(0,en.V)(function(e){return e.dockMode}),l=(0,rl.y)(),c=l.menuOptions,d=l.isDisabled,p=(0,ew.k)({select:function(e){return e.location.pathname}}),f=(0,ru.$)(),b=(0,rc.F)(f).flatMap(function(e){var t;return(null!=(t=e.children)?t:[]).map(function(e){return e.to})});if(!n&&!r)return null;var y=p===rv||b.some(function(e){return p.startsWith(e)}),h=null!=(e=null==i?void 0:i.name)?e:"",g=null!=(t=null==i?void 0:i.avatar_url)?t:void 0,v=function(e){return(0,a.jsx)(nb.t,{align:"end",side:"right",options:c,disabled:d,trigger:(0,a.jsx)(rg,{avatarUrl:g,name:h,showName:e}),"data-testid":"dock-user-profile-menu"})};return"collapsed"===s?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3 p-3",children:[(0,a.jsx)(rp,{}),o&&(0,a.jsx)(rx,{isActive:y}),(0,a.jsx)(m.i.DockToggleButton,{}),v(!1)]}):(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 p-3",children:[v(!0),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[o&&(0,a.jsx)(rx,{isActive:y}),(0,a.jsx)(m.i.DockToggleButton,{})]})]})},r_=function(e){var t=e.hidden,n=e.isAdmin,r=e.isCircleAiEnabled,o=e.isDockNavEnabled,i=e.isPromoLockedToPlansPage;return(0,a.jsxs)(m.i.Layout.Dock,{"aria-label":(0,W.t)("circle_ai_shell.dock"),hidden:t,children:[(0,a.jsx)(m.i.Layout.Dock.Header,{children:!o&&n&&r&&(0,a.jsx)("div",{className:"flex flex-col items-center gap-2 p-3",children:(0,a.jsx)(m.i.ConversationPanelToggleButton,{})})}),(0,a.jsx)(m.i.Layout.Dock.Body,{children:(0,a.jsx)(rs,{})}),!i&&(0,a.jsx)(m.i.Layout.Dock.Footer,{children:(0,a.jsx)(rj,{})})]})},rw=n(430192),rO=function(){return(0,a.jsxs)("header",{className:"flex shrink-0 items-center gap-2.5 px-6 py-4",children:[(0,a.jsx)("img",{src:rw,alt:(0,W.t)("circle_ai.onboarding.logo_alt"),className:"size-7 rounded-md"}),(0,a.jsx)(e9.o5,{variant:"label-md",color:"primary",component:"span",children:(0,W.t)("circle_ai.onboarding.header_title")})]})},rS=n(44041),rP=n(289693),rC=n(958498),rk=n(451430),rI=n(320759),rN=n(776577),rA=function(){var e,t,n,r,o=(0,u.Od)(),i=o.currentCommunityMember,s=o.isViewOnl
1yMasquerading,l=o.masqueradingEntity,c=(0,ec.i)().masquerade_referrer_url,d=(0,rN.z)(),p=(0,rI.p0)(),f=p.isBannerVisible,m=p.isCircleAiAllowed,b=p.shouldShowCircleAiToggle,y=p.setIsCircleAiAllowed,h=p.openViewMasqueradingSearch,g=p.openEditMasqueradingSearch,v=p.hideBanner;return c&&!d||f?(f?(e=(0,W.t)("view_only_masquerading.banner.title_not_selected"),t=(0,W.t)("view_only_masquerading.banner.title_selected"),n=(0,W.t)("view_only_masquerading.banner.placeholder"),r=h):s?(e=(0,W.t)("view_only_masquerading.banner.title_selected"),t=(0,W.t)("view_only_masquerading.banner.title_selected"),n=(0,rk.truncate)((null==l?void 0:l.name)||"",{length:50}),r=h):(e=(0,W.t)("masquerade.banner.title"),t=(0,W.t)("masquerade.banner.title"),n=(0,rk.truncate)((null==i?void 0:i.name)||"",{length:50}),r=g),(0,a.jsxs)("div",{className:"flex h-12 items-center justify-between bg-gray-900 px-6 dark:bg-gray-700",children:[(0,a.jsx)("div",{className:"shrink-0 [&_[role=switch]]:!border-light [&_[role=switch][data-checked]]:!border-transparent [&_[role=switch][data-checked]]:!bg-toggle-checked [&_[role=switch][data-checked]:hover]:!bg-toggle-checked",children:b&&(0,a.jsx)(rC.d,{label:(0,W.t)("masquerade.banner.allow_circle_ai"),labelProps:{className:"text-feature-dark whitespace-nowrap"},checked:m,onCheckedChange:y,"data-testid":"masquerade-allow-circle-ai"})}),(0,a.jsxs)("div",{className:"flex","data-testid":"masquerade-banner",children:[(0,a.jsx)("div",{className:"mr-2",children:(0,a.jsx)(rP.aw,{weight:"semibold",color:"text-feature-dark",children:e})}),(0,a.jsxs)("button",{type:"button",onClick:r,className:"flex","aria-label":t,children:[(0,a.jsx)("div",{className:"border-dark dark:border-secondary border-b border-dashed",children:(0,a.jsx)(rP.aw,{color:"text-feature-dark",children:n})}),(0,a.jsx)("div",{children:(0,a.jsx)(nk.In,{type:"20-chevron-down-sm",className:"text-feature-dark ml-[3px]","aria-hidden":!0})})]})]}),(0,a.jsx)("div",{children:(0,a.jsx)("button",{type:"button",onClick:function(){v(),c&&(window.location.href=c)},children:(0,a.jsx)(rP.aw,{color:"text-feature-dark",weight:"semibold",children:(0,W.t)("view_only_masquerading.banner.exit")})})})]})):null},rE=n(865494),rR=n(529293);let rL=n.p+"static/images/opt-in/opt-in-banner-bg-lq-a0e818e6a877aebe.webp",rD=n.p+"static/images/opt-in/opt-in-banner-bg-d0face4cb3aa2994.webp";var rT=n(926284),rM=n(125665),rF=n(568316),rK=n(387099),rB=function(e){var t=e.ctaExternalUrl,n=e.isCTAEnabled,r=e.onCTAClick,o=e.onDismiss,i=e.optInCTAContent,s=e.optInText,l=(0,z.Z)();return(0,a.jsxs)(rT.w,{className:"relative bg-cover",style:{backgroundImage:"url(".concat(rD,"), url(").concat(rL,"), linear-gradient(to right, #1B2563 0%, #0A0B14 35%, #0A0B14 50%, #7B3030 72%, #BF6040 100%)")},children:[(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,a.jsx)(rF.o.LabelSm,{as:"span",color:"text-grey-50",children:(0,a.jsx)(rM.E,{as:"span",content:s,className:"[&_strong]:font-bold"})}),(0,a.jsx)(rK.$,{variant:"circle",onClick:function(){t?window.open(t,"_blank","noopener noreferrer"):r?r():l({to:eF.aA})},disabled:!(void 0===n||n),className:"!bg-white !border-white !text-black hover:!bg-white/90 !font-medium",children:i})]}),o&&(0,a.jsx)(rK.$,{type:"button",variant:"circle-text",onClick:o,className:"absolute right-5 top-1/2 -translate-y-1/2 !p-2 text-grey-50 hover:text-grey-300","aria-label":(0,W.t)("circle_v4.opt_in_banner.dismiss"),children:(0,a.jsx)(nk.In,{type:"16-close",size:16})})]})},rq=n(836795),rU=n(288800);function rz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function rW(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var r$=function(e){return(0,W.t)("circle_v4.opt_in_banner.".concat(e))},rV=function(){return{optInText:r$("opt_in_text"),optInCTAContent:r$("opt_in_button_text")}},rH=function(){var e,t=(0,rq.U)(),n=t.dismissOptInBar,r=t.shouldShowOptInBar,o=t.shouldShowWaitlistBar,i=(0,rU.K)({showPreviewModal:!0,showActivationLoadingScreen:!0,redirectTo:"/ai",minimumLoadingDurationMs:eF.t1}),a=i.mutate,s=i.isActivating,l=(0,u.Od)().currentCommunity,c=!!(null==l?void 0:l.joined_v4_waitlist_at),d=(0,eF.AE)()?n:void 0;return r||o?r?rW(rz({},rV()),{isCTAEnabled:!s,onCTAClick:a}):(0,eF.eF)()?{optInText:r$("opt_in_text"),optInCTAContent:r$("watch_now_button_text"),ctaExternalUrl:eF.CT}:o?rW(rz({},(e=c,(0,eF.qT)()?e?{optInText:r$("post_keynote_waitlist_text"),optInCTAContent:r$("waitlist_button_text")}:{optInText:r$("opt_in_text"),optInCTAContent:r$("waitlist_button_text")}:e?{optInText:(0,eF.A6)()?r$("keynote_on_waitlist_text"):r$("post_waitlist_text"),optInCTAContent:r$("waitlist_button_text"),ctaExternalUrl:"".concat(eF.fM,"?confirmation=1")}:{optInText:r$("rsvp_text"),optInCTAContent:r$("waitlist_button_text")})),{onDismiss:d}):rV():null},rG=function(){var e=rH();return e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(rR.D,{}),(0,a.jsx)(rB,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))]}):null},rZ=n(812143),rQ=n(638317),rY=n(595023),rJ=function(e){var t=e.previewBarCtaContent,n=e.previewBarText,r=e.showActivationButton,o=(0,rQ.q)(),i=o.mutate,s=o.isPending,l=(0,rY.K)(),c=(0,en.V)(function(e){return"expanded"===e.dockMode});return(0,a.jsxs)(rT.w,{className:"relative bg-cover",style:{backgroundImage:"url(".concat(rD,"), url(").concat(rL,"), linear-gradient(to right, #1B2563 0%, #0A0B14 35%, #0A0B14 50%, #7B3030 72%, #BF6040 100%)")},children:[(0,a.jsx)("div",{className:(0,ed.x)("absolute",c?"left-[12px]":"left-5"),children:(0,a.jsxs)(rZ.$,{variant:"link",className:"!text-grey-50 !font-medium flex items-center gap-1 !px-0",disabled:s,onClick:function(){return i()},children:[(0,a.jsx)(e2.t,{name:"arrow-left",size:"sm"}),(0,W.t)("new_version_preview_bar.preview_bar_go_back")]})}),(0,a.jsxs)("div",{className:"flex items-center gap-6",children:[(0,a.jsx)(rM.E,{content:n,className:"text-grey-50 text-sm font-medium [&_a]:underline [&_a]:text-grey-50 [&_strong]:font-bold"}),r&&(0,a.jsx)(rZ.$,{variant:"primary",small:!0,className:"!bg-grey-0 !border-grey-0 !text-grey-900 hover:!bg-grey-0/90 !font-medium !rounded-[10px]",onClick:function(){return l.show()},children:t})]})]})},rX=function(){var e,t,n=(0,u.Od)().currentCommunity;return!!((null==n||null==(e=n.v4_head_js_code)?void 0:e.trim())||(null==n||null==(t=n.v4_head_snippet_code)?void 0:t.trim()))},r0=function(){var e=rX();return{hasCodeSnippets:e,previewBarCtaContent:(0,W.t)("new_version_preview_bar.preview_bar_cta_content"),previewBarText:e?(0,W.t)("new_version_preview_bar.preview_bar_text_with_code_snippets"):(0,W.t)("new_version_preview_bar.preview_bar_text")}},r1=function(){var e=(0,rq.U)().shouldShowPreviewEnabledBar,t=r0(),n=t.hasCodeSnippets,r=t.previewBarText,o=t.previewBarCtaContent;return e?(0,a.jsx)(rJ,{previewBarText:r,previewBarCtaContent:o,showActivationButton:!n}):null},r2=n(306266),r3=function(){var e=(0,r2.b)(),t=e.notice,n=e.alert;return(0,a.jsxs)(es.t,{children:[(0,a.jsx)(rE.c,{notice:t,alert:n}),(0,a.jsx)(r1,{}),(0,a.jsx)(rG,{}),(0,a.jsx)(rA,{})]})},r4=n(803405),r5=n(850178),r6=function(e){var t,n,r=e.children,o=(0,r5.r)()?"bg-primary":"bg-secondary";return(0,a.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,ed.x)("flex flex-1 flex-col",o)},(0,eK.Bs)({anchor:"app-content"})),n=n={children:r},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},r8=n(281810),r9=n(233480),r7=n(235745),oe=n(99654),ot=n(339551),on=n(488872),or={"/feed":function(){return(0,W.t)("feed")},"/members":function(){return(0,W.t)("members_directory.menu.title")},"/events":function(){return(0,W.t)("events.title")},"/courses":function(){return(0,W.t)("courses.directory.title")},"/leaderboard":function(){return(0,W.t)("leaderboard.title")}},oo=function(){var e,t,n=(0,u.Od)().currentCommunity,r=(0,g.z)({select:function(e){return e.pathname}}),o=(0,on.E)(),i=(0,ot.E)().helpers,a=o?null==(e=i.findBy({slug:o}))?void 0:e.name:null==(t=or[r])?void 0:t.call(or),s=null!=a?a:null==n?void 0:n.name;return s?[{label:s}]:[]},oi=n(888243),oa=function(){var e=(0,er.M)(),t=(0,oi.k)(),n=oo(),r=(0,B.KR)(),o=(0,B.w8)(),i=(0,B.kY)();return r?i&&o?[i,o,r]:o?[o,r]:[r]:e?t:n},os=function(){var e=oa(),t=(0,z.Z)(),n=(0,B.wM)(),r=(0,c.useCallback)(function(e,r){e.preventDefault(),n()||t({to:r})},[n,t]);if(0===e.length)return null;var o=e.map(function(t,n){var o=n===e.length-1;if(t.href&&!o){var i=t.href;return t.guardNavigation?{label:t.label,renderLink:(0,a.jsx)(nm.N_,{to:i,onClick:function(e){return r(e,i)}})}:{label:t.label,renderLink:(0,a.jsx)(nm.N_,{to:t.href})}}return{label:t.label}});return(0,a.jsx)("div",{className:"min-w-0 overflow-hidden",children:(0,a.jsx)(oe.BI,{items:o,size:"sm"})})};os.displayName="CanvasBreadcrumb";var ol="flex size-8 items-center justify-center text-primary outline-none transition-colors hover:bg-hover dark:hover:bg-primary hover:text-primary active:bg-active focus-visible:shadow-focus disabled:pointer-events-none disabled:bg-hover dark:disabled:bg-primary disabled:text-hover",oc=function(e){return e?"primary":"disabled"},ou=function(){var e=(0,B.DN)(),t=e.canGoBack,n=e.canGoForward,r=e.goBack,o=e.goForward;return(0,a.jsxs)("div",{className:"border-primary flex items-center self-stretch overflow-hidden rounded-md border bg-primary dark:bg-secondary",children:[(0,a.jsx)(e4.m,{content:(0,W.t)("circle_ai_shell.canvas_header.go_back"),side:"bottom",children:(0,a.jsx)("button",{type:"button",onClick:r,disabled:!t,"aria-label":(0,W.t)("circle_ai_shell.canvas_header.go_back"),className:ol,children:(0,a.jsx)(e2.t,{name:"chevron-left",color:oc(t)})})}),(0,a.jsx)(e4.m,{content:(0,W.t)("circle_ai_shell.canvas_header.go_forward"),side:"bottom",children:(0,a.jsx)("button",{type:"button",onClick:o,disabled:!n,"aria-label":(0,W.t)("circle_ai_shell.canvas_header.go_forward"),className:ol,children:(0,a.jsx)(e2.t,{name:"chevron-right",color:oc(n)})})})]})};ou.displayName="CanvasHistoryNav";var od=function(e){var t=e.breadcrumb,n=e.rightActions,r=(0,u.KU)(),o=(0,r7.$)(),i=o.isOpen,s=o.toggle,l=(0,ex.Z)(function(e){return e.isDesignPanelOpen}),c=i&&!l,d=c?(0,W.t)("circle_ai_shell.close_ai_canvas"):(0,W.t)("circle_ai_shell.open_ai_canvas");return(0,a.jsxs)("div",{"data-testid":"circle-ai-shell-canvas-header",className:"grid h-[52px] shrink-0 grid-cols-[1fr_auto_1fr] items-center gap-2 px-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 justify-self-start",children:[r&&(0,a.jsx)(e4.m,{content:d,side:"bottom",children:(0,a.jsx)(ef.K,{icon:c?"sparkles-filled":"sparkles",variant:"outline",size:"sm",onClick:function(){l?ex.Z.getState().closeDesignPanel():s()},"data-testid":"circle-ai-shell-canvas-header-ai-toggle","data-circle-ai-toggle":"canvas-header","data-popup-open":c||void 0,"aria-label":d,"aria-expanded":c,"aria-pressed":c,"aria-controls":eL.eL.conversationPanelBody})}),(0,a.jsx)(ou,{}),(0,a.jsx)("div",{id:$.tb,className:"flex items-center gap-2"})]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[null!=t?t:(0,a.jsx)(os,{}),(0,a.jsx)("div",{id:$.uR,className:"flex shrink-0 items-center gap-2"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 justify-self-end",children:[n,(0,a.jsx)("div",{id:$.RQ,className:"flex items-center gap-2"})]})]})};od.displayName="CanvasHeaderRow";var op=function(e){var t=e.alwaysVisible,n=void 0!==t&&t,r=e.breadcrumb,o=e.rightActions,i=(0,ep.c)().isCircleV4,s="closed"!==(0,en.V)(function(e){return e.conversationPanelState}),l=s||n;return(0,a.jsx)("div",{"aria-hidden":!l||void 0,inert:!l||void 0,className:(0,ed.x)("shrink-0 overflow-hidden [transition:height_280ms_cubic-bezier(0.77,0,0.175,1),opacity_160ms_cubic-bezier(0.23,1,0.32,1)] motion-reduce:[transition:opacity_120ms_cubic-bezier(0.23,1,0.32,1)]",{"rounded-t-lg bg-secondary":s,"border-secondary bg-primary":n&&!s&&!i,"border-secondary bg-primary dark:border-secondary dark:bg-secondary":n&&!s&&i,"border-b":l&&!s&&!i,"border-b bg-primary dark:bg-secondary":l&&!s&&i,"h-[52px] opacity-100":l,"h-0 opacity-0":!l}),children:(0,a.jsx)(od,{breadcrumb:r,rightActions:o})})};
1op.displayName="CanvasHeader";var of=n(581763),om=function(e){var t=e.children,n=(0,of.N)(),r=(0,ep.c)().isCircleV4;return(0,a.jsx)("div",{className:(0,ed.x)("flex min-h-0 flex-1 flex-col overflow-hidden",n&&"border-primary -mx-px rounded-t-lg border border-b-0",n&&{"bg-primary dark:bg-secondary":r,"bg-primary":!r}),children:t})};om.displayName="CanvasInsetBody";var ob=function(e){var t=e.alwaysShowHeader,n=e.children;return(0,a.jsxs)(m.i.Layout.Inset,{hasTintedBackground:!0,children:[(0,a.jsx)(op,{alwaysVisible:void 0!==t&&t}),(0,a.jsx)(om,{children:n})]})};ob.displayName="CanvasInset";var oy=n(470187),oh=function(e){var t=e.children,n=e.shouldHideSidebarNestedNavBar,r=void 0!==n&&n,o=(0,ep.c)().isCircleV4,i=(0,r8.L)().setConfig,s=(0,rS.hW)(),l=(0,rS.lZ)(),u=(0,g.z)({select:function(e){return e.pathname}}),d=s||"/settings"===u||"/settings/"===u;return(0,c.useEffect)(function(){i(function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={shouldHideSidebarNestedNavBar:r},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t})},[r,i]),(0,a.jsx)(ob,{alwaysShowHeader:!l,children:(0,a.jsxs)(m.i.Layout.Workspace,{children:[(0,a.jsxs)(m.i.Layout.Workspace.Header,{className:(0,ed.x)({"bg-primary dark:bg-secondary":o}),children:[!d&&(0,a.jsx)(r9.u,{}),(0,a.jsx)("div",{id:oy.y,className:d?"hidden":void 0})]}),(0,a.jsx)(m.i.Layout.Workspace.Body,{className:(0,ed.x)({"bg-primary dark:bg-secondary":o}),children:(0,a.jsx)("div",{className:"relative flex min-h-0 w-full flex-1 flex-col",children:t})})]})})},og=function(e){var t=e.children,n=e.shouldHideSidebarNestedNavBar;return(0,a.jsx)(r8.z,{children:(0,a.jsx)(oh,{shouldHideSidebarNestedNavBar:n,children:t})})},ov=n(825697),ox=n(253344),oj=n(228823),o_=n(392573),ow=n(355101),oO=n(12810),oS=n(650809),oP=(0,ed.x)("min-h-0 flex-1 overflow-auto","[&_#rail-bar-header]:!h-full","[&_#rail-bar-header>div]:!w-full","[&_#rail-bar-header>div]:!h-full","[&_#rail-content]:!relative","[&_#rail-content]:!inset-auto","[&_#rail-content]:!w-full","[&_#rail-content]:!h-full","[&_#rail-content]:!z-auto","[&_#rail-content]:!border-l-0",(0,eK.W2)("standard-layout-v2__railbar")),oC=function(e){var t=e.children;return(0,a.jsx)("div",{className:oP,children:t})},ok=function(e){var t=e.children,n=(0,en.V)(function(e){return e.isRightSidebarVisible}),r=(0,en.V)(function(e){return e.rightSidebarWidth}),o=n?r:0;return(0,a.jsx)("div",{style:{width:o,minWidth:o},className:"shrink-0 overflow-hidden transition-[width,min-width]",children:(0,a.jsx)("aside",{"data-testid":"circle-ai-shell-rail-panel","aria-hidden":!n||void 0,className:"border-primary flex size-full min-h-0 flex-col overflow-hidden border-l",children:t})})},oI=function(e){var t=e.children,n=(0,ep.c)().isCircleV4,r=(0,er.M)(),o=(0,oO.B)(),i=(0,rS.hW)(),s=(0,ec.i)().display_header,l=(0,en.V)(function(e){return e.setLeftSidebarVisible}),u=!!(0,nI._f)()({to:"/settings/inbox",fuzzy:!0});return((0,c.useEffect)(function(){l(u||!o)},[o,l,u]),r)?(0,a.jsx)(og,{children:t}):(0,a.jsxs)(ob,{alwaysShowHeader:i,children:[(void 0===s||s)&&!i&&(0,a.jsx)(m.i.Layout.Inset.Header,{children:n?(0,a.jsx)(r4.M,{}):(0,a.jsx)(Y.T,{})}),(0,a.jsxs)(m.i.Layout.Inset.Body,{children:[!o&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(m.i.Layout.Sidebar,{"aria-label":(0,W.t)("circle_ai_shell.sidebar"),children:[(0,a.jsx)(m.i.Layout.Sidebar.Body,{children:(0,a.jsx)(ov.z,{})}),(0,a.jsx)(m.i.Layout.Sidebar.Footer,{children:n?(0,a.jsx)(o_.V,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(oj.m,{}),(0,a.jsx)(ox.u,{})]})})]}),(0,a.jsx)(m.i.SidebarResizeHandle,{})]}),(0,a.jsxs)(m.i.Layout.Workspace,{children:[!i&&(0,a.jsxs)(m.i.Layout.Workspace.Header,{children:[(0,a.jsx)(ow.h,{}),(0,a.jsx)(oS.ud,{})]}),(0,a.jsx)(m.i.Layout.Workspace.Body,{children:(0,a.jsx)(r6,{children:t})})]}),(0,a.jsx)(m.i.PanelResizeHandle,{}),(0,a.jsx)(ok,{children:(0,a.jsx)(oC,{children:(0,a.jsx)(oS.CL,{})})})]})]})},oN=n(277800),oA=function(e){var t,n,r=e.children,o=(0,oN.P)();return(0,a.jsx)(m.i.Layout,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},o),n=n={children:r},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},oE=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rail-bar-header",t=(0,g.z)({select:function(e){return e.pathname}}),n=(0,en.V)(function(e){return e.setRightSidebarVisible});(0,c.useEffect)(function(){var t=!1,r=null;return queueMicrotask(function(){if(!t){var o=document.getElementById(e);if(!o)return void n(!1);var i=function(){return n(o.childElementCount>0)};i(),(r=new MutationObserver(i)).observe(o,{childList:!0})}}),function(){t=!0,null==r||r.disconnect()}},[t,e,n])},oR=n(152307),oL=function(e){var t=e.isAdminArea,n=e.isAdminDockNavVisible,r=e.isDockEligible,o=e.shouldCollapseForPromoLockedCommunitySwitcher,i=(0,en.V)(function(e){return e.isDockManualOverride}),a=(0,en.V)(function(e){return e.setDockMode}),s=(0,T.B)();(0,oR.n)({enabled:o||r&&!t&&!n,mode:"collapsed"}),(0,c.useEffect)(function(){s&&!i&&a("expanded")},[s,i,a])},oD=n(581318),oT=function(e){var t=e.isAdmin,n=e.isAdminArea,r=e.isAdminOrModerator,o=e.isFullPageAiRoute,i=e.isAiRoute,a=e.isShellBypassed,s=e.pathname,l=(0,en.V)(function(e){return e.setMode}),u=(0,en.V)(function(e){return e.userMode}),d=(0,ee.B)(function(e){return e.clearAnalyticsReport}),p=t&&i||r&&n,f=(0,c.useRef)(!1),m=(0,c.useRef)(null),b=(0,c.useRef)(null);(0,c.useLayoutEffect)(function(){if(!a||i){var e=en.V.getState().mode,t=m.current;if(m.current=p,p){f.current=!0,"admin"!==e&&l("admin");return}var n=null!=u?u:"community",r=!f.current||!0===t;f.current=!0,r&&e!==n&&l(n)}},[a,i,p,u,l]),(0,c.useLayoutEffect)(function(){var e=en.V.getState(),t=s===oD.t.onboarding(),n=b.current===oD.t.onboarding();if(b.current=s,i&&e.setAdminDockForced(!1),o){"closed"!==e.conversationPanelState&&e.setConversationPanelState("closed");return}t||n||"fullscreen"!==e.conversationPanelState||e.setConversationPanelState("default")},[s,o,i]),(0,c.useEffect)(function(){d()},[s])},oM=(0,el.Z)(function(){return Promise.all([n.e(24014),n.e(53078),n.e(77368),n.e(62501),n.e(98806),n.e(34980),n.e(41432),n.e(1989),n.e(79749),n.e(74915),n.e(48675),n.e(31040),n.e(70888),n.e(84189),n.e(93584),n.e(2081),n.e(25837),n.e(72673),n.e(31230),n.e(83498),n.e(71932),n.e(14954),n.e(24844),n.e(76996),n.e(38656),n.e(45120
1)]).then(n.bind(n,419211)).then(function(e){return{default:e.AnalyticsReportCanvas}})}),oF=function(e){var t=e.hasCurrentUser,n=e.isCommunitySwitcherEnabled,r=e.isDiscoverPage,o=e.isPromoLockedToPlansPage,i=e.canAccessAdminDock,a=e.shouldShowPromoLockedCommunitySwitcher;return!r&&!!t&&(!!a||!o&&(n||i))},oK=function(e){var t=e.children,n=e.hasMinimalLayout,r=e.shouldDisplayHeader,o=(0,g.z)({select:function(e){return e.pathname}}),i=(0,er.M)(),s=(0,u.KU)(),l=(0,u.fv)(),d=(0,u.Od)(),p=d.currentCommunity,f=d.currentUser,b=(0,ec.i)(),y=b.community_switcher_data,h=b.display_community_switcher,v=(0,rS.pt)(),x=(0,rS.hW)(),j=(0,rS.lZ)(),_=(0,ee.B)(function(e){return e.analyticsReportArtefactUuid}),w=(0,ee.B)(function(e){return e.closeAnalyticsReport}),O=ei(),S=(0,eo.N)(),P=(0,ea.U)(),C=P.isFullPageAiRoute,k=P.isAiRoute,I=(0,eu.a)().isDiscoverPage;oT({isAdmin:s,isAdminArea:i,isAdminOrModerator:l,isFullPageAiRoute:C,isAiRoute:k,isShellBypassed:v,pathname:o});var N=(void 0===r||r)&&!(void 0!==n&&n)&&!x&&o!==(0,et.b8)();oE();var A=!!(null==p?void 0:p.community_switcher_enabled),E=(0,X.DU)(),R="hidden"===(0,K.L)(),L=(void 0===y?[]:y).some(function(e){return!e.is_current_community}),D=j&&void 0!==h&&h&&L,T=oF({canAccessAdminDock:s&&E||l&&(O||i),hasCurrentUser:!!f,isCommunitySwitcherEnabled:A,isDiscoverPage:I,isPromoLockedToPlansPage:j,shouldShowPromoLockedCommunitySwitcher:D});return oL({isAdminArea:i,isAdminDockNavVisible:O,isDockEligible:T,shouldCollapseForPromoLockedCommunitySwitcher:D}),(0,a.jsx)(eh.R,{renderLeftSidebar:void 0,children:(0,a.jsx)(oA,{children:(0,a.jsxs)(B.rl,{children:[(0,a.jsx)(r3,{}),(0,a.jsx)(eg.v,{}),!R&&(0,a.jsx)(ev.l,{}),(0,a.jsx)(J.k,{}),(0,a.jsxs)(m.i.Layout.ShellBody,{children:[T&&(0,a.jsx)(r_,{hidden:R,isAdmin:s,isCircleAiEnabled:E,isDockNavEnabled:S,isPromoLockedToPlansPage:j}),(0,a.jsx)(m.i.Layout.ConversationPanel,{"aria-label":(0,W.t)("circle_ai_shell.conversation_panel"),resizeAriaLabel:(0,W.t)("circle_ai_shell.resize_conversation"),children:(0,a.jsx)(eR,{})}),(0,a.jsx)(m.i.Layout.Canvas,{"aria-label":(0,W.t)("circle_ai_shell.canvas"),children:(0,a.jsx)(es.t,{children:(0,a.jsxs)("div",{className:"relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",children:[R&&(0,a.jsx)(rO,{}),v?(0,a.jsxs)(a.Fragment,{children:[N&&(0,a.jsx)(Y.T,{}),(0,a.jsx)(eD,{children:t})]}):(0,a.jsx)(oI,{children:t}),_&&(0,a.jsx)(c.Suspense,{fallback:(0,a.jsx)(ey,{onClose:w}),children:(0,a.jsx)(oM,{artefactUuid:_})})]})})})]})]})})})},oB=function(e){var t,n,r=e.children,o=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children"]),i=(0,h.P)();return((0,K.U)(),i)?(0,a.jsx)(B.rl,{children:(0,a.jsxs)(F.H,{children:[(0,a.jsx)(Q,{}),r]})}):(0,a.jsx)(oK,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},o),n=n={children:r},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},oq=n(998597),oU=n(173630),oz=n(970480),oW=n(190552),o$=n(709953),oV=n(674453),oH=n(58007),oG=n(714638),oZ=function(){var e=(0,t$.d_)(),t=(0,t$.J6)(),n=(0,oV.Z9)();return(0,a.jsx)(eX.a.Root,{open:!0,size:(0,oG.Z)({isLgScreen:t,isXlScreen:e}),onOpenChange:function(e){e||n()},children:(0,a.jsx)(eX.a.Content,{children:(0,a.jsx)(eX.a.Body,{customLayout:t,children:(0,a.jsx)(oH.n,{isLgScreen:t,onClose:n})})})})},oQ=function(){var e=(0,h.P)(),t=(0,oV.Z9)();return(0,o$.V)()?(0,a.jsx)(oZ,{}):(0,a.jsx)(eX.a.Root,{open:!0,size:e?"full-screen":"lg",position:"top",onOpenChange:function(e){e||t()},children:(0,a.jsxs)(eX.a.Content,{children:[(0,a.jsx)(oz.s,{}),(0,a.jsx)(eX.a.Body,{scrollFades:!1,viewportProps:{style:{scrollbarGutter:"stable"}},children:(0,a.jsx)(oW.K,{})})]})})},oY=(0,el.Z)(function(){return Promise.all([n.e(24014),n.e(69947),n.e(53167),n.e(68369),n.e(10204),n.e(60616),n.e(79862),n.e(71451),n.e(47755),n.e(8956),n.e(44140),n.e(22105),n.e(74543),n.e(30473)]).then(n.bind(n,195874)).then(function(e){return{default:e.PostModalComponent}})}),oJ=function(){var e=(0,oU.r)(),t=(0,g.z)({select:function(e){var t;return null==(t=e.maskedLocation)?void 0:t.pathname}});return t&&e.matchRoutes(t).some(function(e){return"/c/$spaceSlug/$postSlug"===e.fullPath})?(0,a.jsx)(oq.nN,{value:{isPostModalOverlay:!0},children:(0,a.jsx)(c.Suspense,{fallback:(0,a.jsx)(oQ,{}),children:(0,a.jsx)(oY,{})})}):null},oX=n(30864),o0=n(179594),o1=function(){var e=(0,rY.K)(),t=(0,o0.Fo)(o0.VM),n=t.get,r=t.remove;(0,c.useEffect)(function(){n({onErrorValue:!0})&&(r(),e.show())},[e,n,r])},o2=n(974618),o3=n(41907),o4=["new_opt_in_admin_preview_modal.body.point_1","new_opt_in_admin_preview_modal.body.point_2","new_opt_in_admin_preview_modal.body.point_3","new_opt_in_admin_preview_modal.body.point_4"],o5={ADD_ATTR:["target","rel"]},o6=function(){var e,t=(0,o2.hS)(),n=(0,u.Od)().currentCommunity,r=rX(),o=null!=(e=null==n?void 0:n.monthly_ai_credit_allotment)?e:2500,i=function(){t.hide(),t.remove()};return(0,a.jsx)(eX.a.Root,{open:t.visible,onOpenChange:function(e){e||i()},size:"md",children:(0,a.jsxs)(eX.a.Content,{children:[(0,a.jsx)(eX.a.Header,{title:(0,W.t)("new_opt_in_admin_preview_modal.title")}),(0,a.jsx)(eX.a.Body,{children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(e9.o5,{variant:"body-md",color:"primary",children:(0,a.jsx)(rM.E,{className:"[&_a]:underline [&_a]:underline-offset-2",content:(0,W.t)(r?"new_opt_in_admin_preview_modal.body.description_with_code_snippets":"new_opt_in_admin_preview_modal.body.description_without_code_snippets"),sanitizeProps:o5})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(e9.o5,{variant:"body-md",color:"primary",children:(0,W.t)("new_opt_in_admin_preview_modal.body.test_heading")}),(0,a.jsx)("ul",{className:"ml-4 list-disc pl-1",children:o4.map(function(e){return(0,a.jsx)("li",{children:(0,a.jsx)(e9.o5,{variant:"body-md",color:"primary",component:"span",children:(0,W.t)(e)})},e)})})]}),(0,a.jsx)(e9.o5,{variant:"body-md",color:"primary",children:(0,a.jsx)(rM.E,{content:(0,W.t)("new_opt_in_admin_preview_modal.body.free_features")})}),(0,a.jsx)(e9.o5,{variant:"body-md",color:"primary",children:(0,a.jsx)(rM.E,{className:"[&_a]:underline [&_a]:underline-offset-2",content:(0,W.t)("new_opt_in_admin_preview_modal.body.ai_credits",{credits_count:(0,o3.Rt)(o)}),sanitizeProps:o5})})]})}),(0,a.jsx)(eX.a.Footer,{primaryAction:{label:(0,W.t)("new_opt_in_admin_preview_modal.got_it"),onClick:i}})]})})},o8=o2.PT.create(function(){return(0,a.jsx)(o6,{})}),o9=function(){var e=(0,ep.c)().isCircleV4PreviewEnabled,t=(0,o0.Fo)(o0.pw),n=t.get,r=t.remove,o=(0,o2.hS)(o8);(0,c.useEffect)(function(){e&&n({onErrorValue:!0})&&(r(),o.show())},[o,n,e,r])},o7=n(697652),ie=n(419584),it=n(972867),ir=n(508853),io=n(897817),ii=n(737225),ia=function(){var e=(0,o2.hS)(),t=(0,z.Z)();return(0,a.jsxs)(ii.aF,{isOpen:e.visible,onClose:e.hide,children:[(0,a.jsx)(ii.aF.Overlay,{}),(0,a.jsxs)(ii.aF.Content,{size:"lg",className:"!rounded-xl gap-6 bg-cover shadow-2xl sm:!w-[652px]",style:{backgroundImage:"url(".concat(ir,"), url(").concat(it,"), linear-gradient(225deg, #BF4015 0%, #4A1060 45%, #08091A 65%, #112068 100%)")},children:[(0,a.jsx)(ii.aF.Header,{children:(0,a.jsx)(ii.aF.HeaderActions,{className:"ml-auto",children:(0,a.jsx)(ii.aF.CloseButton,{iconClassName:"!text-grey-50",className:"hover:!bg-grey-50/10 focus-visible:!outline-none",onClick:e.hide})})}),(0,a.jsxs)(ii.aF.Body,{className:"flex flex-col items-center gap-6 px-6 pb-10 text-center",children:[(0,a.jsx)("div",{className:"flex items-center rounded-full border border-white/35 bg-white/10 px-3 py-1.5 backdrop-blur-[2px]",children:(0,a.jsx)(e9.o5,{variant:"label-sm",className:"text-grey-0",children:(0,W.t)("circle_ai_intro_modal.badge")})}),(0,a.jsxs)("div",{className:"flex max-w-[416px] flex-col items-center gap-4",children:[(0,a.jsx)("p",{className:"text-xl font-medium leading-[44px] tracking-[-0.5px] text-grey-0",children:(0,W.t)("circle_ai_intro_modal.introducing")}),(0,a.jsxs)("div",{className:"flex items-start justify-center gap-3",children:[(0,a.jsx)("img",{src:ie,alt:(0,W.t)("circle_ai_intro_modal.logo_alt"),width:157,height:45,loading:"eager"}),(0,a.jsx)("img",{src:io,alt:(0,W.t)("circle_ai_intro_modal.logo_alt"),width:176,height:57,loading:"eager"})]}),(0,a.jsxs)("div",{className:"flex flex-col text-grey-50",children:[(0,a.jsx)(e9.o5,{variant:"label-md",className:"text-grey-50",children:(0,W.t)("circle_ai_intro_modal.tagline")}),(0,a.jsx)(e9.o5,{variant:"body-md",className:"text-grey-50",children:(0,W.t)("circle_ai_intro.subtitle")})]})]}),(0,a.jsx)(rK.$,{type:"button",variant:"circle",large:!0,className:"!rounded-3xl !border-grey-900 !bg-grey-0 hover:!bg-grey-100",onClick:function(){e.hide(),t({to:eF.aA})},children:(0,a.jsx)(e9.o5,{variant:"label-md",className:"text-grey-900",children:(0,W.t)("circle_ai_intro.learn_more")})})]})]})]})},is=o2.PT.create(function(){return(0,a.jsx)(ia,{})}),il=function(){var e,t=(0,u.Od)().currentCommunityMember,n=(0,o7.M)((e=null==t?void 0:t.id,"".concat("circle-ai-intro-modal-seen","_").concat(e))),r=n.getValue,o=n.setValue,i=(0,o2.hS)(is);(0,c.useEffect)(function(){},[i,!1,r,o])},ic=n(697890),iu=n(616465),id=n(66832),ip=n(244405),im=function(e){return"".concat("circle-v4-eclipse-ready-modal-dismissed-at","-").concat(e)},ib=function(e){ip.H.setItem(im(e),String(Date.now()))},iy=function(e){ip.H.removeItem(im(e))},ih=function(e){var t=ip.H.getItem(im(e));return!!t&&(0,iu.d)(new Date(Number(t)),(0,id.k)(new Date,1))};function ig(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var iv="eclipse_ready_modal",ix=function(){var e,t=(0,o2.hS)(),n=(0,u.Od)().currentCommunity,r=function(e){if(Array.isArray(e))return e}(e=(0,c.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return ig(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ig(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1],s=(0,rU.K)({showPreviewModal:!0,showActivationLoadingScreen:!0,redirectTo:"/ai",minimumLoadingDurationMs:eF.t1,onError:function(){return i(!1)}}).mutate,l=function(){(null==n?void 0:n.id)&&ib(n.id),t.hide(),t.remove()},d=function(){o||l()};return(0,a.jsxs)(ii.aF,{isOpen:t.visible,onClose:d,children:[(0,a.jsx)(ii.aF.Overlay,{}),(0,a.jsxs)(ii.aF.Content,{size:"lg",children:[(0,a.jsxs)(ii.aF.Header,{children:[(0,a.jsx)(ii.aF.Title,{children:(0,W.t)([iv,"title"])}),(0,a.jsx)(ii.aF.HeaderActions,{children:(0,a.jsx)(ii.aF.CloseButton,{onClick:d})})]}),(0,a.jsx)(ii.aF.Body,{children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(rF.o.BodyMd,{color:"text-default",children:(0,a.jsx)("strong",{children:(0,W.t)([iv,"description_lead"])})}),(0,a.jsx)(rF.o.BodyMd,{color:"text-default",children:(0,W.t)([iv,"description_details"])}),(0,a.jsx)("hr",{className:"border-primary"}),(0,a.jsxs)(rF.o.BodyMd,{color:"text-default",children:[(0,a.jsxs)("strong",{children:["→ ",(0,W.t)([iv,"included_with_plan"])]})," ",(0,W.t)([iv,"preview_explanation"])]}),(0,a.jsxs)(rF.o.BodyMd,{color:"text-default",children:[(0,a.jsxs)("strong",{children:["→ ",(0,W.t)([iv,"recommendation"])]})," ",(0,W.t)([iv,"automatic_activation"])]})]})}),(0,a.jsx)(ii.aF.Footer,{children:(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)(rZ.$,{type:"button",variant:"circle",onClick:function(){i(!0),s()},disabled:o,children:(0,W.t)([iv,"preview_as_admin"])})})})]})]})},ij=o2.PT.create(function(){return(0,a.jsx)(ix,{})}),i_=function(){var e=(0,u.Od)().currentCommunity,t=(0,ep.c)(),n=t.isCircleV4,r=t.isCircleV4PreviewEnabled,o=(0,rq.U)().shouldShowOptInBar,i=(0,o2.hS)(ij),a=(0,c.useRef)(void 0);(0,c.useEffect)(function(){var t=null==e?void 0:e.id;r&&t?iy(t):!(0,ic.R6)()&&!(0,ic.VS)()||n||!o||!t||ih(t)||a.current===t||(a.current=t,i.show())},[null==e?void 0:e.id,n,r,i,o])},iw=n(713033),iO=n(742249),iS=function(e){var t=e.shouldCelebrate,n=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["shouldCelebrate"]),r=(0,iO.A)(),o=r.width,i=r.height;return void 0!==t&&t?(0,a.jsx)(iw.A,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({width:o,height:i,style:{zIndex:999999},recycle:!1,tweenDuration:5e3,numberOfPieces:300},n)):null},iP=function(){var e=(0,o2.hS)(),t=function(){e.hide(),e.remove()};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(iS,{shouldCelebrate:e.visible}),(0,a.jsx)(eX.a.Root,{open:e.visible,onOpenChange:function(e){e||t()},size:"sm",children:(0,a.jsxs)(eX.a.Content,{children:[(0,a.jsx)(eX.a.Header,{title:(0,W.t)("version_activation_modal.title")}),(0,a.jsx)(eX.a.Body,{children:(0,a.jsx)("p",{className:"text-primary text-md leading-6 tracking-tighter",children:(0,W.t)("version_activation_modal.description")})}),(0,a.jsx)(eX.a.Footer,{primaryAction:{label:(0,W.t)("version_activation_modal.cta"),onClick:t}})]})})]})},iC=o2.PT.create(function(){return(0,a.jsx)(iP,{})}),ik=function(){var e=(0,ep.c)().isCircleV4Enabled,t=(0,o2.hS)(iC),n=(0,o0.Fo)(o0.JR),r=n.get,o=n.remove;(0,c.useEffect)(function(){e&&r({onErrorValue:!0})&&(o(),t.show())},[t,r,o,e])};function iI(e){void 0!==window.pendo&&window.pendo&&setTimeout(function(){try{var t,n,r,o;window.pendo.setGuidesDisabled(e),e?null==(t=(n=window.pendo).stopGuides
1)||t.call(n):null==(r=(o=window.pendo).loadGuides)||r.call(o)}catch(t){console.error("[Pendo] Error ".concat(e?"disabling":"enabling"," guides:"),t)}},1e3)}var iN=(0,el.Z)(function(){return Promise.all([n.e(24014),n.e(56216)]).then(n.bind(n,623494)).then(function(e){return{default:e.HelpWidget}})}),iA=function(e){var t=e.notice,n=e.alert,r=e.shouldDisplayHeader,o=e.shouldDisplayCommunitySwitcher,i=e.hasMinimalLayout,s=e.showWidgetBot,l=globalThis.location.pathname!==(0,et.b8)(),u=(0,ep.c)().isCircleV4;return(0,a.jsxs)("div",{className:"flex w-full",children:[o&&(0,a.jsx)(es.t,{children:(0,a.jsx)(t3,{})}),(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsx)(rE.c,{notice:t,alert:n}),(0,a.jsx)(r1,{}),(0,a.jsx)(rG,{}),(0,a.jsx)(rA,{}),r&&!i&&l&&(u?(0,a.jsx)(r4.M,{}):(0,a.jsx)(Y.T,{})),(0,a.jsx)(oX.s,{}),!u&&(0,a.jsx)(c.Suspense,{fallback:null,children:(0,a.jsx)(iN,{showWidgetBot:s})}),(0,a.jsx)(oJ,{}),(0,a.jsx)(M.q,{}),(0,a.jsx)(L.n,{})]})]})},iE=new Set(["/_minimal","/_protected/_embed"]),iR=(0,el.Z)(function(){return Promise.all([n.e(53167),n.e(41391)]).then(n.bind(n,538866)).then(function(e){return{default:e.ReplitOnboardingModal}})}),iL=function(e){var t,n,r,o=(0,tW.R)(),i=(0,ew.k)({select:function(e){return e.matches.some(function(e){return iE.has(e.routeId)})}}),s=(0,T.B)();(0,tH.qh)(),o9(),o1(),ik(),il(),i_(),t=(0,g.z)(),n=(0,_.J)().isSitePageRoute,r=(0,eu.a)().isLivePage,(0,c.useEffect)(function(){n||r?iI(!0):iI(!1)},[n,r,t.pathname]);var l=(0,a.jsx)(D.A,{});if(!o)return(0,a.jsxs)(a.Fragment,{children:[l,(0,a.jsx)(iA,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))]});if(i)return(0,a.jsxs)(a.Fragment,{children:[l,(0,a.jsx)(oX.s,{})]});var u=e.hasMinimalLayout,d=e.shouldDisplayHeader;return(0,a.jsxs)(rS.cL,{children:[l,(0,a.jsx)(oB,{hasMinimalLayout:u,shouldDisplayHeader:d,children:(0,a.jsx)(oX.s,{})}),(0,a.jsx)(oJ,{}),(0,a.jsx)(M.q,{}),(0,a.jsx)(L.n,{}),s&&(0,a.jsx)(c.Suspense,{fallback:null,children:(0,a.jsx)(iR,{})})]})},iD=n(876094),iT=function(e){return(0,a.jsxs)("div",{className:"flex h-screen w-full flex-col",children:[(0,a.jsx)(iD.w,{}),(0,a.jsx)("div",{className:"flex flex-1 overflow-hidden",children:(0,a.jsx)(iL,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))})]})},iM=n(760788),iF=n(52381),iK=function(){var e=(0,g.z)({select:function(e){return e.pathname}}),t=(0,c.useCallback)(function(){var t=new CustomEvent("circle:route-change",{bubbles:!0,cancelable:!0,composed:!1,detail:{path:e}});document.dispatchEvent(t)},[e]);(0,c.useEffect)(function(){t()},[t])},iB=n(102608),iq=function(){(0,c.useEffect)(function(){var e=function(e){var t=e.detail,n=t.url,r=t.shouldReload,o=n.startsWith("http://")||n.startsWith("https://");r||o?window.location.href=n:(window.history.pushState({},"",n),window.dispatchEvent(new PopStateEvent("popstate")))};return document.addEventListener(iB.y,e),function(){document.removeEventListener(iB.y,e)}},[])},iU=function(e){var t=e.children;return iK(),iq(),(0,a.jsx)(a.Fragment,{children:t})},iz=n(492776),iW=n(710762),i$=n(367090),iV=n(859792),iH=n(424668),iG=[iW.F,iH.SD,i$.W,o2.AZ,rI.TA,iz.ph,iV.E],iZ=function(e){var t=e.children;return iG.reduceRight(function(e,t){return(0,a.jsx)(t,{children:e})},t)},iQ=(0,b.hy)()({component:function(){var e=(0,tV.W)(),t=e.isElectron,n=e.electronVersion,r=t&&(0,tV.J)(String(n),"0.1.2"),o=(0,r2.b)(),i=(0,h.P)();return(0,a.jsx)(iU,{children:(0,a.jsxs)(R,{children:[(0,a.jsx)(iM.w,{}),(0,a.jsxs)("div",{id:iF.WQ,className:"bg-secondary","data-testid":"main-app-provider",children:[(0,a.jsx)(iZ,{children:(0,a.jsx)(m.i.Provider,{defaultState:{mode:"community",dockMode:"collapsed",conversationPanelState:"closed",isLeftSidebarVisible:!0,isRightSidebarVisible:!1},children:(0,a.jsx)(r?iT:iL,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},o))})}),!i&&(0,a.jsx)(y.dd,{position:"bottom-right"})]})]})})}}
1),iY=n(819436),iJ=n(778771),iX=n(938209),i0=(0,iJ.WK)("/home")({beforeLoad:function(){(0,iX.V2)({to:"/feed",replace:!0,search:!0,throw:!0})},component:(0,iY.Z)(function(){return n.e(38870).then(n.bind(n,537365))},"component")}),i1=(0,iJ.WK)("/feed")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(83729),n.e(16453)]).then(n.bind(n,861525))},"component")}),i2=(0,iJ.WK)("/$")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(83729),n.e(16974)]).then(n.bind(n,590356))},"component")}),i3=n(627653),i4=(0,iJ.WK)("/_protected")({beforeLoad:function(e){var t,n=e.context,r=e.location,o=null==(t=n.punditUserContext)?void 0:t.currentCommunity;(0,i3.H)(r.pathname,o)||(0,iX.V2)({to:(0,et.kP)(),throw:!0})},component:(0,iY.Z)(function(){return n.e(63238).then(n.bind(n,799941))},"component")}),i5=(0,iJ.WK)("/_minimal")({component:(0,iY.Z)(function(){return n.e(95811).then(n.bind(n,828110))},"component")}),i6=(0,iJ.WK)("/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(83729),n.e(58806)]).then(n.bind(n,476148))},"component")}),i8=n(961355),i9=n(960122),i7=i8.Ik({skip_unsubscribe:i9.zM().optional().catch(void 0),unsubscribe_brief:i9.zM().optional().catch(void 0),token:i8.Yj().optional().catch(void 0)}),ae=(0,iJ.WK)("/public/unsubscribe")({component:(0,iY.Z)(function(){return Promise.all([n.e(45249),n.e(96239)]).then(n.bind(n,517778))},"component"),validateSearch:i7}),at=i8.Ik({token:i8.Yj().optional().catch(void 0)}),an=(0,iJ.WK)("/marketing_emails/unsubscribe")({validateSearch:at,component:(0,iY.Z)(function(){return n.e(24772).then(n.bind(n,438127))},"component")}),ar=i8.Ik({email:i8.Yj().optional().catch(void 0),token:i8.Yj().optional().catch(void 0)}),ao=(0,iJ.WK)("/marketing_emails/marketing_email_preference")({validateSearch:ar,component:(0,iY.Z)(function(){return n.e(45295).then(n.bind(n,896050))},"component")}),ai=(0,iJ.WK)("/_protected/threads")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(10443),n.e(14982),n.e(84338),n.e(9299),n.e(69831),n.e(89207)]).then(n.bind(n,869130))},"component")}),aa=(0,iJ.WK)("/_protected/notifications")({component:(0,iY.Z)(function(){return Promise.all([n.e(78911),n.e(51090),n.e(66239),n.e(58956)]).then(n.bind(n,163805))},"component")}),as=n(640270),al=Object.keys(as.$M),ac=i8.Ik({period:i8.k5(al).catch(as.kn)}),au=(0,iJ.WK)("/_protected/leaderboard")({validateSearch:ac,component:(0,iY.Z)(function(){return Promise.all([n.e(78911),n.e(51090),n.e(66239),n.e(54248)]).then(n.bind(n,822507))},"component")}),ad=(0,iJ.WK)("/_protected/discover")({component:(0,iY.Z)(function(){return n.e(74778).then(n.bind(n,181377))},"component")}),ap=(0,iJ.WK)("/_protected/connections")({component:(0,iY.Z)(function(){return Promise.all([n.e(78911),n.e(51090),n.e(66239),n.e(414)]).then(n.bind(n,38323))},"component")}),af=(0,iJ.WK)("/_protected/bookmarks")({component:(0,iY.Z)(function(){return n.e(44269).then(n.bind(n,640604))},"component")}),am=(0,iJ.WK)("/_minimal/two_fa")({component:(0,iY.Z)(function(){return n.e(22940).then(n.bind(n,241527))},"component")}),ab=(0,iJ.WK)("/_minimal/eclipse")({beforeLoad:function(e){var t,n=e.context,r=e.location,o=null==(t=n.punditUserContext)?void 0:t.currentCommunity;(0,i3.H)(r.pathname,o)||(0,iX.V2)({to:(0,et.kP)(),throw:!0})},component:(0,iY.Z)(function(){return Promise.all([n.e(51735),n.e(13861)]).then(n.bind(n,78614))},"component")}),ay=(0,iJ.WK)("/_minimal/download_app")({component:(0,iY.Z)(function(){return n.e(96031).then(n.bind(n,340570))},"component")}),ah=(0,iJ.WK)("/_protected/messages")({component:(0,iY.Z)(function(){return Promise.all([n.e(61514),n.e(5992)]).then(n.bind(n,9104))},"component")}),ag=(0,iJ.WK)("/_protected/members")({component:(0,iY.Z)(function(){return Promise.all([n.e(24678),n.e(47931),n.e(78911),n.e(81867),n.e(36918),n.e(72942),n.e(51090),n.e(66239),n.e(94237),n.e(88443),n.e(51364)]).then(n.bind(n,230196))},"component")}),av=(0,iJ.WK)("/_protected/ai")({component:(0,iY.Z)(function(){return n.e(8967).then(n.bind(n,588666))},"component")}),ax=(0,iJ.WK)("/_protected/account")({component:(0,iY.Z)(function(){return n.e(96555).then(n.bind(n,7526))},"component")}),aj=(0,iJ.WK)("/_protected/_settingsLayout")({component:(0,iY.Z)(function(){return Promise.all([n.e(3823),n.e(92493)]).then(n.bind(n,178810))},"component")}),a_=(0,iJ.WK)("/_protected/_embed")({params:{parse:function(e){return!!window.V4_UI&&"true"===new URLSearchParams(window.location.search).get("iframe")&&e}},beforeLoad:function(){return{isEmbed:!0}},component:(0,iY.Z)(function(){return n.e(59679).then(n.bind(n,755746))},"component")}),aw=(0,iJ.WK)("/_protected/_dynamicLayout")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(83729),n.e(29418)]).then(n.bind(n,283096))},"component")}),aO=(0,iJ.WK)("/_protected/messages/")({component:(0,iY.Z)(function(){return n.e(95249).then(n.bind(n,205288))},"component")}),aS=(0,iJ.WK)("/_protected/members/")({component:(0,iY.Z)(function(){return Promise.all([n.e(31040),n.e(25266),n.e(94764),n.e(68577),n.e(71886),n.e(77214),n.e(46870)]).then(n.bind(n,508529))},"component")}),aP=i8.Ik({show_confetti:i8.zM().optional().catch(void 0)}),aC=(0,iJ.WK)("/_protected/getting-started/")({validateSearch:aP,component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(53078),n.e(24678),n.e(62375),n.e(79749),n.e(74915),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(90106),n.e(36918),n.e(72942),n.e(37209),n.e(44942),n.e(3823),n.e(89787),n.e(88993),n.e(81080),n.e(75149),n.e(50684)]).then(n.bind(n,988503))},"component")}),ak=i8.Ik({mode:i8.Yj().optional().catch(void 0)}),aI=(0,iJ.WK)("/_protected/ai/")({validateSearch:ak,component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(83729),n.e(88849),n.e(6318)]).then(n.bind(n,395421))},"component"),staticData:{shellMode:"canvas-only"}}),aN=(0,iJ.WK)("/_minimal/questions-ai/")({component:(0,iY.Z)(function(){return n.e(78780).then(n.bind(n,244759))},"component")}),aA=i8.Ik({message_id:i9.ai().optional().catch(void 0)}),aE=(0,iJ.WK)("/_protected/messages/$uuid")({validateSearch:aA,component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(10443),n.e(86773),n.e(14982),n.e(84338),n.e(11753),n.e(4746),n.e(88502),n.e(16285),n.e(91761)]).then(n.bind(n,122088))},"component")}),aR=(0,iJ.WK)("/_protected/members/map")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(59728),n.e(75755)]).then(n.bind(n,465894))},"component")}),aL=(0,iJ.WK)("/_protected/members/manage")({beforeLoad:function(){(0,iX.V2)({to:"/settings/audience/manage",replace:!0,search:!0,state:!0,throw:!0})},component:(0,iY.Z)(function(){return n.e(71716).then(n.bind(n,904367))},"component")}),aD=(0,iJ.WK)("/_protected/members/connections")({component:(0,iY.Z)(function(){return n.e(87510).then(n.bind(n,37621))},"component")}),aT=(0,iJ.WK)("/_protected/members/$")({beforeLoad:function(){(0,iX.V2)({to:"/members",replace:!0,throw:!0})},component:(0,iY.Z)(function(){return n.e(33879).then(n.bind(n,785130)
1)},"component")}),aM=n(958116),aF=(0,iJ.WK)("/_protected/ai/skills")({validateSearch:function(e){var t=Number(e.skill);return Number.isFinite(t)&&t>0?{skill:t}:{}},component:(0,iY.Z)(function(){return n.e(95882).then(n.bind(n,502873))},"component")}),aK=n(366592),aB=(0,iJ.WK)("/_protected/account/billing")({beforeLoad:function(e){var t,n,r;(null==(r=e.context.punditUserContext)||null==(n=r.currentCommunityMember)||null==(t=n.policies)?void 0:t.can_access_billing)||(0,iX.V2)({to:"/account",throw:!0})},component:(0,iY.Z)(function(){return Promise.all([n.e(62375),n.e(29785),n.e(41156),n.e(50446),n.e(67243),n.e(86625),n.e(22505),n.e(80328),n.e(13675),n.e(20782),n.e(69877),n.e(43011),n.e(92113)]).then(n.bind(n,930568))},"component")}),aq=(0,iJ.WK)("/_protected/account/affiliate")({beforeLoad:function(e){var t,n,r=(null!=(t=e.context.punditUserContext)?t:{}).currentCommunityMember;r&&(null==(n=r.policies)?void 0:n.can_show_paywalls_affiliate)||(0,iX.V2)({to:"/account",throw:!0})},component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(86625),n.e(49055),n.e(61648)]).then(n.bind(n,724051))},"component")}),aU=(0,iJ.WK)("/_protected/_dynamicLayout/spaces")({component:(0,iY.Z)(function(){return n.e(97999).then(n.bind(n,166770))},"component")}),az=(0,iJ.WK)("/_protected/_dynamicLayout/search")({component:(0,iY.Z)(function(){return n.e(24891).then(n.bind(n,184438))},"component")}),aW=(0,iJ.WK)("/_protected/_dynamicLayout/events")({component:(0,iY.Z)(function(){return n.e(76735).then(n.bind(n,265922))},"component")}),a$=(0,iJ.WK)("/_protected/_dynamicLayout/courses")({component:(0,iY.Z)(function(){return Promise.all([n.e(31040),n.e(25266),n.e(78911),n.e(51090),n.e(66239),n.e(20989),n.e(16382),n.e(29355),n.e(74578)]).then(n.bind(n,384346))},"component")}),aV=(0,iJ.WK)("/_protected/_dynamicLayout/admin-settings")({component:(0,iY.Z)(function(){return n.e(60450).then(n.bind(n,364025))},"component")}),aH=n(689492),aG=(0,iJ.WK)("/_minimal/settings/cancel-plan")({beforeLoad:function(e){var t,n=e.context,r=e.location,o=null==(t=n.punditUserContext)?void 0:t.currentCommunity,i=(0,i3.H)(r.pathname,o),a=!!((null==o?void 0:o.subscription)&&!o.subscription.ends_at&&!(0,aH.KL)(o.current_plan_tier));i&&a||(0,iX.V2)({to:"/settings/plans",throw:!0})},component:(0,iY.Z)(function(){return n.e(69986).then(n.bind(n,582394))},"component")}),aZ=(0,iJ.WK)("/_protected/settings/inbox")({component:(0,iY.Z)(function(){return n.e(11764).then(n.bind(n,254975))},"component")}),aQ=(0,iJ.WK)("/_protected/ai/projects")({component:(0,iY.Z)(function(){return Promise.all([n.e(19921),n.e(51588)]).then(n.bind(n,527119))},"component")}),aY=(0,iJ.WK)("/_protected/ai/daily-briefs")({component:(0,iY.Z)(function(){return n.e(69871).then(n.bind(n,86194))},"component")}),aJ=(0,iJ.WK)("/_protected/ai/briefs")({component:(0,iY.Z)(function(){return n.e(54563).then(n.bind(n,160814))},"component")}),aX=(0,iJ.WK)("/_protected/account/_tabBody")({component:(0,iY.Z)(function(){return n.e(86253).then(n.bind(n,764796))},"component")}),a0=(0,iJ.WK)("/_minimal/live/$roomSlug")({component:(0,iY.Z)(function(){return n.e(60345).then(n.bind(n,800480))},"component")}),a1=n(808877),a2=(0,iJ.WK)("/_protected/settings/inbox/")({beforeLoad:function(){(0,iX.V2)({to:a1.on,replace:!0,state:!0,throw:!0})},component:(0,iY.Z)(function(){return n.e(38406).then(n.bind(n,254245))},"component")}),a3=n(682610),a4=(0,iJ.WK)("/_protected/ai/projects/")({validateSearch:function(e){return{tab:e.tab===a3.yz?a3.yz:a3.m9}},component:(0,iY.Z)(function(){return Promise.all([n.e(19921),n.e(20407)]).then(n.bind(n,104586))},"component")}),a5=(0,iJ.WK)("/_protected/ai/briefs/")({component:(0,iY.Z)(function(){return n.e(21261).then(n.bind(n,350556))},"component")}),a6=(0,iJ.WK)("/_protected/account/_tabBody/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24678),n.e(47931),n.e(25140),n.e(70543),n.e(98374),n.e(36918),n.e(60542),n.e(26382)]).then(n.bind(n,315191))},"component")}),a8=(0,iJ.WK)("/_protected/_settingsLayout/settings/")({component:(0,iY.Z)(function(){return n.e(67320).then(n.bind(n,397067))},"component")}),a9=(0,iJ.WK)("/_protected/messages/bot/$id")({component:(0,iY.Z)(function(){return Promise.all([n.e(4746),n.e(13095)]).then(n.bind(n,135170))},"component")}),a7=n(770543),se=n(391516),st=(0,iJ.WK)("/_protected/account/_tabBody/privacy")({component:(0,iY.Z)(function(){return n.e(17535).then(n.bind(n,771842))},"component")}),sn=(0,iJ.WK)("/_protected/account/_tabBody/notifications")({component:(0,iY.Z)(function(){return Promise.all([n.e(45249),n.e(50170)]).then(n.bind(n,763393))},"component")}),sr=(0,iJ.WK)("/_protected/account/_tabBody/authentication")({beforeLoad:function(e){var t,n,r;(null==(r=e.context.punditUserContext)||null==(n=r.currentCommunityMember)||null==(t=n.policies)?void 0:t.can_access_authentication_page)||(0,iX.V2)({to:"/account",throw:!0})},component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(29259)]).then(n.bind(n,812998))},"component")}),so=(0,iJ.WK)("/_protected/_settingsLayout/settings/weekly_digest")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(44920)]).then(n.bind(n,782411))},"component")}),si=(0,iJ.WK)("/_protected/_settingsLayout/settings/seo")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(81099)]).then(n.bind(n,853382))},"component")}),sa=(0,iJ.WK)("/_protected/_settingsLayout/settings/redirects")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(82359),n.e(51816),n.e(39286),n.e(1770)]).then(n.bind(n,285071))},"component")}),ss=(0,iJ.WK)("/_protected/_settingsLayout/settings/recap-2025")({component:(0,iY.Z)(function(){return Promise.all([n.e(2740),n.e(88548)]).then(n.bind(n,755939))},"component")}),sl=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywall_tax_settings")({beforeLoad:function(e){var t,n,r=null==(t=e.context.punditUserContext)?void 0:t.currentCommunity;(null==r||null==(n=r.policies)?void 0:n.is_paywall_tax_available)||!(null==r?void 0:r.payment_processor)||(0,iX.V2)({to:"/settings/paywalls",throw:!0})},component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(62967)]).then(n.bind(n,193155))},"component")}),sc=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywall_subscriptions")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(62375),n.e(29442),n.e(48675),n.e(31040),n.e(25266),n.e(7652),n.e(50446),n.e(27054),n.e(72922),n.e(61509),n.e(82359),n.e(86625),n.e(22505),n.e(80328),n.e(20782),n.e(69877),n.e(48607),n.e(72241)]).then(n.bind(n,234904))},"component")}),su=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywall_payment_settings")({beforeLoad:function(e){var t,n,r=null==(t=e.context.punditUserContext)?void 0:t.currentCommunity;(null==r||null==(n=r.policies)?void 0:n.is_paywall_payment_settings_available)||(0,iX.V2)({to:"/settings/paywalls",throw:!0})},component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(26570)]).then(n.bind(n,305316))},"component")}),sd=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywall_groups")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(89098)]).then(n.bind(n,161580))},"component")}),sp=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywall_charges")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(29442),n.e(48675),n.e(31040),n.e(25266),n.e(41156),n.e(7652),n.e(27054),n.e(46752),n.e(61509),n.e(82359),n.e(48607),n.e(25808)]).then(n.bind(n,604829))},"component")}),sf=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywall_bulk_logs")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(94155),n.e(82359),n.e(41372),n.e(88854),n.e(27779),n.e(92769),n.e(48528)]).then(n.bind(n,94163))},"component")}),sm=(0,iJ.WK)("/_protected/_settingsLayout/settings/navigation")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(63129),n.e(5648),n.e(22971)]).then(n.bind(n,820497))},"component"),validateSearch:function(e){return{selectedLinkId:e.selectedLinkId?Number(e.selectedLinkId):void 0,isCircleDirectoryLink:!0===e.isCircleDirectoryLink||void 0}}}),sb=(0,iJ.WK)("/_protected/_settingsLayout/settings/mobile_app")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(82359),n.e(27296),n.e(76944)]).then(n.bind(n,376859))},"component")}),sy=(0,iJ.WK)("/_protected/_settingsLayout/settings/legal")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(35311)]).then(n.bind(n,667346))},"component")}),sh=(0,iJ.WK)("/_protected/_settingsLayout/settings/home")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(13164),n.e(15524)]).then(n.bind(n,230835))},"component")}),sg=(0,iJ.WK)("/_protected/_settingsLayout/settings/general")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(82359),n.e(54114)]).then(n.bind(n,25465))},"component")}),sv=(0,iJ.WK)("/_protected/_settingsLayout/settings/gamification")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(7042)]).then(n.bind(n,174841)
1)},"component")}),sx=(0,iJ.WK)("/_protected/_settingsLayout/settings/embed")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(13916)]).then(n.bind(n,768924))},"component")}),sj=(0,iJ.WK)("/_protected/_settingsLayout/settings/discover")({component:(0,iY.Z)(function(){return n.e(70018).then(n.bind(n,245382))},"component")}),s_=(0,iJ.WK)("/_protected/_settingsLayout/settings/dashboard")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(77368),n.e(62501),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(90106),n.e(36918),n.e(72942),n.e(37209),n.e(44942),n.e(84189),n.e(93584),n.e(3823),n.e(89787),n.e(2081),n.e(25837),n.e(12506),n.e(98005),n.e(31230),n.e(76996),n.e(75149),n.e(8251)]).then(n.bind(n,266658))},"component")}),sw=(0,iJ.WK)("/_protected/_settingsLayout/settings/custom_domain")({component:(0,iY.Z)(function(){return Promise.all([n.e(87777),n.e(82359),n.e(33793)]).then(n.bind(n,780344))},"component")}),sO=(0,iJ.WK)("/_protected/_settingsLayout/settings/connect")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(82359),n.e(72567),n.e(45916)]).then(n.bind(n,466584))},"component")}),sS=(0,iJ.WK)("/_protected/_settingsLayout/settings/community_ai")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(88854),n.e(97556),n.e(19590)]).then(n.bind(n,893836))},"component")}),sP=(0,iJ.WK)("/_protected/_settingsLayout/settings/code_snippets")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(82359),n.e(69981),n.e(74590)]).then(n.bind(n,369261))},"component")}),sC=n(218839),sk=n(574653),sI=(0,iJ.WK)("/_protected/_settingsLayout/settings/branded_apps_builder_ui")({beforeLoad:function(e){var t,n=null==(t=e.context.punditUserContext)?void 0:t.currentCommunity;(0,sk.B)(n)||(0,iX.V2)({to:sC.L.index(),throw:!0})},component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(63352),n.e(56345),n.e(22018),n.e(45888),n.e(60501)]).then(n.bind(n,244e3))},"component")}),sN=n(941397),sA=(0,iJ.WK)("/_protected/_settingsLayout/settings/branded_apps_builder_landing_page")({beforeLoad:function(e){var t,n=e.context;(0,sk.B)(null==(t=n.punditUserContext)?void 0:t.currentCommunity)&&(0,iX.V2)({to:sN.t.plus.index,replace:!0,throw:!0})},component:(0,iY.Z)(function(){return n.e(6346).then(n.bind(n,206686))},"component")}),sE=(0,iJ.WK)("/_protected/_settingsLayout/settings/branded_apps")({component:(0,iY.Z)(function(){return Promise.all([n.e(88854),n.e(21455)]).then(n.bind(n,592148))},"component")}),sR=(0,iJ.WK)("/_protected/_settingsLayout/contacts/import")({beforeLoad:function(e){var t=e.location;(0,iX.V2)({to:"/settings/contacts/import",replace:!0,search:!0,hash:!0,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(56357).then(n.bind(n,167172))},"component")}),sL=(0,iJ.WK)("/_protected/_settingsLayout/audience/manage")({beforeLoad:function(e){var t=e.location;(0,iX.V2)({to:"/settings/audience/manage",replace:!0,search:!0,hash:!0,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(50882).then(n.bind(n,47705))},"component")}),sD=(0,iJ.WK)("/_protected/_dynamicLayout/u/$publicUid")({component:(0,iY.Z)(function(){return n.e(34392).then(n.bind(n,444779))},"component")}),sT=(0,iJ.WK)("/_minimal/settings/paywalls/onboarding")({beforeLoad:function(e){var t,n=e.context,r=e.location,o=null==(t=n.punditUserContext)?void 0:t.currentCommunity;(0,i3.H)(r.pathname,o)||(0,iX.V2)({to:(0,et.kP)(),throw:!0})},component:(0,iY.Z)(function(){return Promise.all([n.e(39025),n.e(43554)]).then(n.bind(n,8345))},"component")}),sM=(0,iJ.WK)("/_minimal/newsletter/posts/$id")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(56688),n.e(31789),n.e(53167),n.e(68369),n.e(85288),n.e(89304),n.e(77416),n.e(29796)]).then(n.bind(n,524123))},"component")}),sF=i8.Ik({recording_key:i8.Yj().optional().catch(void 0)}),sK=(0,iJ.WK)("/_minimal/live/$roomSlug/record")({validateSearch:sF,component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(59921),n.e(70892),n.e(73739),n.e(34372),n.e(21643),n.e(12090),n.e(14982),n.e(70011),n.e(6251),n.e(34869),n.e(32945)]).then(n.bind(n,57080))},"component")}),sB=(0,iJ.WK)("/_minimal/live/$roomSlug/public")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(59921),n.e(70892),n.e(73739),n.e(34372),n.e(21643),n.e(14982),n.e(70011),n.e(57372),n.e(50472),n.e(51618)]).then(n.bind(n,884028))},"component")}),sq=n(529506),sU=(0,iJ.WK)("/_protected/settings/inbox/notifications")({component:(0,iY.Z)(function(){return n.e(78449).then(n.bind(n,722568))},"component")}),sz=n(801392),sW=i8.Ik((r={}
1,o=sz.Lg,i=i8.k5(sz.Sp).optional().catch(sz.xZ.INBOX),o in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r)),s$=(0,iJ.WK)("/_protected/settings/inbox/moderation")({validateSearch:sW,component:(0,iY.Z)(function(){return n.e(77560).then(n.bind(n,552363))},"component")}),sV=(0,iJ.WK)("/_protected/settings/inbox/messages")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(10443),n.e(86773),n.e(14982),n.e(84338),n.e(11753),n.e(4746),n.e(88502),n.e(16285),n.e(61514),n.e(66474)]).then(n.bind(n,713137))},"component")}),sH=(0,iJ.WK)("/_protected/settings/inbox/human-support")({component:(0,iY.Z)(function(){return n.e(3645).then(n.bind(n,254124))},"component")}),sG=i8.Ik({course_id:i9.ai().int().positive().optional().catch(void 0)}),sZ=(0,iJ.WK)("/_protected/settings/inbox/course-comments")({validateSearch:sG,component:(0,iY.Z)(function(){return n.e(59487).then(n.bind(n,331906))},"component")}),sQ=(0,iJ.WK)("/_protected/settings/inbox/connection-requests")({component:(0,iY.Z)(function(){return n.e(98580).then(n.bind(n,27647))},"component")}),sY=(0,iJ.WK)("/_protected/settings/inbox/chat-threads")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(10443),n.e(14982),n.e(84338),n.e(11753),n.e(9299),n.e(46704)]).then(n.bind(n,310877))},"component")}),sJ=n(639770),sX=(0,iJ.WK)("/_protected/settings/inbox/ai")({component:(0,iY.Z)(function(){return n.e(5726).then(n.bind(n,57229))},"component"),validateSearch:sJ.K}),s0=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows")({beforeLoad:function(e){var t,n=null==(t=e.context.punditUserContext)?void 0:t.currentCommunity;(null==n?void 0:n.workflows_enabled)||(0,iX.V2)({to:"/settings",throw:!0})},component:(0,iY.Z)(function(){return n.e(6130).then(n.bind(n,938441))},"component")}),s1=(0,iJ.WK)("/_protected/_settingsLayout/settings/topics")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(61778),n.e(12060),n.e(82359),n.e(44942),n.e(11341),n.e(74150)]).then(n.bind(n,515488))},"component")}),s2=(0,iJ.WK)("/_protected/_settingsLayout/settings/spaces")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(1467),n.e(82359),n.e(36918),n.e(72942),n.e(37209),n.e(62258),n.e(91315),n.e(18534),n.e(25445)]).then(n.bind(n,986692))},"component")}),s3=(0,iJ.WK)("/_protected/_settingsLayout/settings/segments")({component:(0,iY.Z)(function(){return n.e(4171).then(n.bind(n,690854))},"component")}),s4=(0,iJ.WK)("/_protected/_settingsLayout/settings/profile_fields")({component:(0,iY.Z)(function(){return Promise.all([n.e(88854),n.e(97556),n.e(14137)]).then(n.bind(n,839641))},"component")}),s5=(0,iJ.WK)("/_protected/_settingsLayout/settings/plans")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(51144),n.e(11102)]).then(n.bind(n,389869))},"component")}),s6=(0,iJ.WK)("/_protected/_settingsLayout/settings/newsletter")({beforeLoad:function(e){var t,n,r=e.context.punditUserContext,o=!!(null==r||null==(t=r.currentCommunityMember)?void 0:t.is_admin),i=!!(null==r||null==(n=r.currentCommunitySettings)?void 0:n.email_hub_newsletter_enabled);o&&i||(0,iX.V2)({to:sC.L.index.path,throw:!0})},component:(0,iY.Z)(function(){return n.e(65565).then(n.bind(n,820940))},"component")}),s8=n(161434),s9=(0,iJ.WK)("/_protected/_settingsLayout/settings/live_streams")({validateSearch:s8.u,component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(53078),n.e(48675),n.e(2932),n.e(31040),n.e(25266),n.e(61778),n.e(7652),n.e(17705),n.e(82359),n.e(15306),n.e(9401)]).then(n.bind(n,841282))},"component")}),s7=(0,iJ.WK)("/_protected/_settingsLayout/settings/files")({component:(0,iY.Z)(function(){return n.e(84555).then(n.bind(n,13862))},"component")}),le=(0,iJ.WK)("/_protected/_settingsLayout/settings/developers")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(82359),n.e(63721)]).then(n.bind(n,297181))},"component")}),lt=(0,iJ.WK)("/_protected/_settingsLayout/settings/courses")({beforeLoad:function(){window.V4_UI||(0,iX.V2)({to:sC.L.index.path,throw:!0})},component:(0,iY.Z)(function(){return n.e(66674).then(n.bind(n,312649))},"component")}),ln=(0,iJ.WK)("/_protected/_settingsLayout/settings/api")({validateSearch:function(e){return{type:(null==e?void 0:e.type)||void 0}},component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(31040),n.e(25266),n.e(82359),n.e(69981),n.e(17224),n.e(85382)]).then(n.bind(n,323646))},"component")}),lr=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(24678),n.e(92344),n.e(48059),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(36918),n.e(72942),n.e(37209),n.e(25837),n.e(12506),n.e(90737),n.e(63375),n.e(40512)]).then(n.bind(n,507328))},"component")}),lo=(0,iJ.WK)("/_protected/_settingsLayout/settings/_billingLayout")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(51144),n.e(47138)]).then(n.bind(n,123353))},"component")}),li=(0,iJ.WK)("/_protected/_settingsLayout/settings/_affiliatesLayout")({beforeLoad:function(e){var t,n=null==(t=e.context.punditUserContext)?void 0:t.currentCommunity;(null==n?void 0:n.affiliates_feature_flag_enabled)||(0,iX.V2)({to:"/settings",throw:!0})},component:(0,iY.Z)(function(){return n.e(8371).then(n.bind(n,121822))},"component")}),la=n(673132),ls=(0,iJ.WK)("/_protected/_dynamicLayout/s/$spaceGroupSlug")({component:(0,iY.Z)(function(){return Promise.all([n.e(31040),n.e(25266),n.e(94764),n.e(78911),n.e(51090),n.e(66239),n.e(49297),n.e(93101)]).then(n.bind(n,866234))},"component")}),ll=n(815849),lc=(0,iJ.WK)("/_minimal/live/$roomSlug/_protected")({beforeLoad:function(e){var t,n=e.context,r=e.location,o=null==(t=n.punditUserContext)?void 0:t.currentCommunity;(0,i3.H)(r.pathname,o)||(0,iX.V2)({to:(0,et.kP)(),throw:!0})},component:(0,iY.Z)(function(){return n.e(13863).then(n.bind(n,228474))},"component")}),lu=(0,iJ.WK)("/_protected/settings/inbox/moderation/")({component:(0,iY.Z)(function(){return n.e(56499).then(n.bind(n,133950))},"component")}),ld=(0,iJ.WK)("/_protected/settings/inbox/messages/")({component:(0,iY.Z)(function(){return n.e(80051).then(n.bind(n,426814))},"component")}),lp=(0,iJ.WK)("/_protected/settings/inbox/human-support/")({component:(0,iY.Z)(function(){return n.e(34714).then(n.bind(n,860769))},"component")}),lf=(0,iJ.WK)("/_protected/settings/inbox/course-comments/")({component:(0,iY.Z)(function(){return n.e(80655).then(n.bind(n,414386))},"component")}),lm=(0,iJ.WK)("/_protected/settings/inbox/connection-requests/")({component:(0,iY.Z)(function(){return n.e(95068).then(n.bind(n,981975))},"component")}),lb=(0,iJ.WK)("/_protected/settings/inbox/ai/")({component:(0,iY.Z)(function(){return n.e(2970).then(n.bind(n,644001))},"component")}),ly=(0,iJ.WK)("/_protected/admin/audience/$sqid/")({beforeLoad:function(e){var t=e.location,n=e.params;(0,iX.V2)({to:"/settings/admin/audience/$sqid/info",params:{sqid:n.sqid},replace:!0,search:!0,hash:!0,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(67152).then(n.bind(n,522003))},"component")}),lh=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(48433),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(62445),n.e(82359),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(41372),n.e(88854),n.e(18706),n.e(1983),n.e(32702),n.e(36035),n.e(7271),n.e(31139),n.e(21939),n.e(25349),n.e(38963)]).then(n.bind(n,641226))},"component")}),lg=(0,iJ.WK)("/_protected/_settingsLayout/settings/topics/")({component:(0,iY.Z)(function(){return n.e(93871).then(n.bind(n,907698))},"component")}),lv=(0,iJ.WK)("/_protected/_settingsLayout/settings/theme/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31232),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(78911),n.e(76810),n.e(25140),n.e(85271),n.e(61959),n.e(86625),n.e(56345),n.e(22018),n.e(51090),n.e(66239),n.e(2923),n.e(86193),n.e(15755)]).then(n.bind(n,491270))},"component")}),lx=(0,iJ.WK)("/_protected/_settingsLayout/settings/sso/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(82359),n.e(12254)]).then(n.bind(n,178349))},"component")}),lj=(0,iJ.WK)("/_protected/_settingsLayout/settings/segments/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(82359),n.e(10520),n.e(63927)]).then(n.bind(n,585031))},"component")}),l_=(0,iJ.WK)("/_protected/_settingsLayout/settings/profile_fields/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(82359),n.e(6028),n.e(32314),n.e(9e3)]).then(n.bind(n,570363))},"component")}),lw=(0,iJ.WK)("/_protected/_settingsLayout/settings/posts/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(67243),n.e(67931),n.e(82359),n.e(78456),n.e(26512)]).then(n.bind(n,698867))},"component")}),lO=(0,iJ.WK)("/_protected/_settingsLayout/settings/plus/")({beforeLoad:function(e){var t,n=null==(t=e.context.punditUserContext)?void 0:t.currentCommunity;(null==n?void 0:n.branded_app_feature_flag_enabled)||(0,iX.V2)({to:et.ty.plans.brandedApps,throw:!0})},component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(18608),n.e(25626),n.e(82359),n.e(45888),n.e(27296),n.e(99127),n.e(60379)]).then(n.bind(n,460536))},"component")}),lS=n(75571),lP=i8.Ik({billing_cycle:i8.k5([lS.k$.month,lS.k$.year]).optional().catch(void 0),billing_currency:i8.Yj().optional().catch(void 0),sales_utm_campaign:i8.Yj().optional().catch(void 0)}),lC=(0,iJ.WK)("/_protected/_settingsLayout/settings/plans/")({validateSearch:lP,component:(0,iY.Z)(function(){return n.e(11153).then(n.bind(n,578920))},"component")}),lk=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywalls/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(62375),n.e(31761),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(48433),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(66170),n.e(83316),n.e(13655),n.e(7652),n.e(83053),n.e(82359),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(22505),n.e(41372),n.e(97448),n.e(18706),n.e(1983),n.e(32702),n.e(80328),n.e(36035),n.e(13849),n.e(97347),n.e(13675),n.e(37395),n.e(83134),n.e(91698),n.e(7271),n.e(31139),n.e(21939),n.e(17507),n.e(25349),n.e(53673),n.e(60579),n.e(32885),n.e(60801)]).then(n.bind(n,927031))},"component")}),lI=i8.Ik({page:i9.ai().int().positive().optional().catch(1),status:i8.k5(["published","draft"]).optional().catch(void 0),query:i8.Yj().optional().catch(void 0),order:i8.g1(i8.Yj(),i8.k5(["asc","desc"])).optional().catch(void 0)}),lN=(0,iJ.WK)("/_protected/_settingsLayout/settings/pages/")({validateSearch:lI,component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(48675),n.e(14899),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(61778),n.e(30213),n.e(91665),n.e(56915),n.e(82359),n.e(56345),n.e(22018),n.e(88854),n.e(4230),n.e(60710),n.e(92233)]).then(n.bind(n,392091))},"component")}),lA=(0,iJ.WK)("/_protected/_settingsLayout/settings/onboarding/")({beforeLoad:function(){(0,iX.V2)({to:et.ty.members.onboarding,replace:!0,throw:!0})},component:(0,iY.Z)(function(){return n.e(98530).then(n.bind(n,104025))},"component")}),lE=(0,iJ.WK)("/_protected/_settingsLayout/settings/newsletter/")({component:(0,iY.Z)(function(){return Promise.all([n.e(77368),n.e(62501),n.e(94155),n.e(82359),n.e(84189),n.e(93584),n.e(2081),n.e(41372),n.e(88854),n.e(27779),n.e(43547),n.e(14898)]
1).then(n.bind(n,205481))},"component")}),lR=(0,iJ.WK)("/_protected/_settingsLayout/settings/moderation/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(61778),n.e(20807),n.e(82359),n.e(26833)]).then(n.bind(n,291579))},"component")}),lL=(0,iJ.WK)("/_protected/_settingsLayout/settings/member_tags/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(82359),n.e(31237)]).then(n.bind(n,246042))},"component")}),lD=(0,iJ.WK)("/_protected/_settingsLayout/settings/live_streams/")({component:(0,iY.Z)(function(){return n.e(81627).then(n.bind(n,174102))},"component")}),lT=(0,iJ.WK)("/_protected/_settingsLayout/settings/invitation_links/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(82359),n.e(61601)]).then(n.bind(n,410957))},"component")}),lM=n(471e3),lF=(0,iJ.WK)("/_protected/_settingsLayout/settings/events/")({component:(0,iY.Z)(function(){return Promise.all([n.e(31040),n.e(25266),n.e(82359),n.e(78456),n.e(20987)]).then(n.bind(n,93287))},"component")}),lK=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/")({component:(0,iY.Z)(function(){return Promise.all([n.e(94155),n.e(72189),n.e(82359),n.e(41372),n.e(88854),n.e(27779),n.e(43547),n.e(20170)]).then(n.bind(n,863525))},"component")}),lB=i8.Ik({page:i9.ai().int().positive().optional().catch(1),status:i8.Yj().optional().catch(void 0),query:i8.Yj().optional().catch(void 0),course_type:i8.Yj().optional().catch(void 0),order:i8.g1(i8.Yj(),i8.k5(["asc","desc"])).optional().catch(void 0)}),lq=(0,iJ.WK)("/_protected/_settingsLayout/settings/courses/")({validateSearch:lB,component:(0,iY.Z)(function(){return Promise.all([n.e(31040),n.e(25266),n.e(61778),n.e(32248),n.e(82359),n.e(91315),n.e(65596)]).then(n.bind(n,373230))},"component")}),lU=(0,iJ.WK)("/_protected/_settingsLayout/settings/coupons/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(82359),n.e(86625),n.e(23227),n.e(59954)]).then(n.bind(n,380809))},"component")}),lz=(0,iJ.WK)("/_protected/_settingsLayout/settings/api/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(87148),n.e(17224),n.e(2199)]).then(n.bind(n,490826))},"component")}),lW=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(77368),n.e(62501),n.e(98806),n.e(34980),n.e(1989),n.e(48675),n.e(31040),n.e(48507),n.e(84189),n.e(93584),n.e(2081),n.e(25837),n.e(72673),n.e(12506),n.e(98005),n.e(31230),n.e(83498),n.e(71932),n.e(14954),n.e(9444),n.e(50631)]).then(n.bind(n,148231))},"component")}),l$=(0,iJ.WK)("/_protected/_settingsLayout/settings/ai-inbox/")({component:(0,iY.Z)(function(){return Promise.all([n.e(79227),n.e(38417)]).then(n.bind(n,61451))},"component")}),lV=(0,iJ.WK)("/_protected/_settingsLayout/settings/access_groups/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(82359),n.e(1888)]).then(n.bind(n,6911))},"component")}),lH=(0,iJ.WK)("/_protected/_settingsLayout/members/profile_fields/")({beforeLoad:function(e){var t=e.location;(0,iX.V2)({to:"/settings/profile_fields",replace:!0,search:!0,hash:!0,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(19872).then(n.bind(n,197411))},"component")}),lG=(0,iJ.WK)("/_protected/_settingsLayout/members/invitation_links/")({beforeLoad:function(e){var t=e.location;(0,iX.V2)({to:"/settings/invitation_links",replace:!0,search:!0,hash:!0,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(84742).then(n.bind(n,68901))},"component")}),lZ=n(242759),lQ=(0,iJ.WK)("/_protected/_dynamicLayout/s/$spaceGroupSlug/")({component:(0,iY.Z)(function(){return Promise.all([n.e(31040),n.e(25266),n.e(94764),n.e(78911),n.e(51090),n.e(66239),n.e(49297),n.e(59080),n.e(9971)]).then(n.bind(n,706494))},"component")}),lY=n(783838),lJ=(0,iJ.WK)("/_protected/settings/inbox/moderation/$id")({component:(0,iY.Z)(function(){return n.e(25328).then(n.bind(n,725715))},"component")}),lX=(0,iJ.WK)("/_protected/settings/inbox/messages/$uuid")({component:(0,iY.Z)(function(){return n.e(59688).then(n.bind(n,557435))},"component")}),l0=(0,iJ.WK)("/_protected/settings/inbox/course-comments/$chatRoomUuid")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(10443),n.e(14982),n.e(84338),n.e(11753),n.e(88502),n.e(72123)]).then(n.bind(n,197565))},"component")}),l1=(0,iJ.WK)("/_protected/settings/inbox/connection-requests/$id")({component:(0,iY.Z)(function(){return Promise.all([n.e(10204),n.e(79862),n.e(37954),n.e(73501),n.e(87126),n.e(61765)]).then(n.bind(n,188996))},"component")}),l2=(0,iJ.WK)("/_protected/settings/inbox/chat-threads/$id")({component:(0,iY.Z)(function(){return n.e(65136).then(n.bind(n,855379))},"component")}),l3=(0,iJ.WK)("/_protected/admin/audience/$sqid/$")({beforeLoad:function(e){var t=e.location;(0,iX.V2)({href:t.href.replace("/admin/audience","/settings/admin/audience"),replace:!0,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(66484).then(n.bind(n,556191))},"component")}),l4=n(552120),l5=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/history")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(41303),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(92796),n.e(82359),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(18706),n.e(7271),n.e(66227),n.e(21793),n.e(71553)]).then(n.bind(n,344439))},"component"),validateSearch:l4.j}),l6=(0,iJ.WK)("/_protected/_settingsLayout/settings/topics/new")({component:(0,iY.Z)(function(){return Promise.all([n.e(44942),n.e(11341),n.e(78121)]).then(n.bind(n,460112))},"component")}
1),l8=(0,iJ.WK)("/_protected/_settingsLayout/settings/spaces/$")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(1467),n.e(82359),n.e(36918),n.e(72942),n.e(37209),n.e(62258),n.e(91315),n.e(18534),n.e(68004)]).then(n.bind(n,122095))},"component")}),l9=(0,iJ.WK)("/_protected/_settingsLayout/settings/segments/$id")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(94155),n.e(3116),n.e(82359),n.e(36918),n.e(72942),n.e(37209),n.e(25150),n.e(41372),n.e(88854),n.e(27779),n.e(10948),n.e(97919),n.e(60858)]).then(n.bind(n,3169))},"component")}),l7=n(973638),ce=(0,iJ.WK)("/_protected/_settingsLayout/settings/profile_fields/manage")({component:(0,iY.Z)(function(){return Promise.all([n.e(24678),n.e(47931),n.e(76810),n.e(25140),n.e(70543),n.e(38497),n.e(36918),n.e(6028),n.e(60542),n.e(67185)]).then(n.bind(n,412424))},"component")}),ct=(0,iJ.WK)("/_protected/_settingsLayout/settings/plus/lite")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(18608),n.e(25626),n.e(45888),n.e(27296),n.e(99127),n.e(13170)]).then(n.bind(n,969162))},"component")}),cn=(0,iJ.WK)("/_protected/_settingsLayout/settings/moderation/edit")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(82359),n.e(69981),n.e(52247)]).then(n.bind(n,857621))},"component")}),cr=(0,iJ.WK)("/_protected/_settingsLayout/settings/members/bulk_import_tasks")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(94155),n.e(82359),n.e(41372),n.e(88854),n.e(27779),n.e(92769),n.e(78555)]).then(n.bind(n,500662))},"component")}),co=(0,iJ.WK)("/_protected/_settingsLayout/settings/members/activity_logs")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(18522),n.e(82359),n.e(88854),n.e(89139),n.e(82091)]).then(n.bind(n,282886))},"component")}),ci=(0,iJ.WK)("/_protected/_settingsLayout/settings/member_tags/new")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(36369),n.e(72067)]).then(n.bind(n,885006))},"component")}),ca=(0,iJ.WK)("/_protected/_settingsLayout/settings/live_streams/$id")({component:(0,iY.Z)(function(){return n.e(46110).then(n.bind(n,260141))},"component")}),cs=(0,iJ.WK)("/_protected/_settingsLayout/settings/courses/overview")({component:(0,iY.Z)(function(){return Promise.all([n.e(31040),n.e(63525),n.e(82359),n.e(84189),n.e(25837),n.e(12506),n.e(98005),n.e(74266)]).then(n.bind(n,424017))},"component")}),cl=(0,iJ.WK)("/_protected/_settingsLayout/settings/contacts/import")({component:(0,iY.Z)(function(){return Promise.all([n.e(47217),n.e(62042),n.e(34911),n.e(95833),n.e(89676)]).then(n.bind(n,322183))},"component")}),cc=(0,iJ.WK)("/_protected/_settingsLayout/settings/audience/manage")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(94155),n.e(3116),n.e(82359),n.e(36918),n.e(72942),n.e(37209),n.e(25150),n.e(41372),n.e(88854),n.e(10520),n.e(27779),n.e(10948),n.e(97919),n.e(53054)]).then(n.bind(n,206797))},"component")}),cu=(0,iJ.WK)("/_protected/_settingsLayout/settings/audience/connect")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(77368),n.e(62501),n.e(92344),n.e(18121),n.e(2613),n.e(78620),n.e(82359),n.e(84189),n.e(93584),n.e(2081),n.e(88854),n.e(90737),n.e(20988),n.e(72567),n.e(98190)]).then(n.bind(n,505438))},"component")}),cd=(0,iJ.WK)("/_protected/_settingsLayout/settings/_billingLayout/payment_details")({component:(0,iY.Z)(function(){return Promise.all([n.e(62375),n.e(22505),n.e(86325)]).then(n.bind(n,396692))},"component")}),cp=(0,iJ.WK)("/_protected/_settingsLayout/settings/_billingLayout/invoices")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(14174)]).then(n.bind(n,395240))},"component")}),cf=(0,iJ.WK)("/_protected/_settingsLayout/settings/_billingLayout/billing")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(77368),n.e(62375),n.e(98806),n.e(48675),n.e(31040),n.e(25266),n.e(94155),n.e(72189),n.e(88097),n.e(84189),n.e(93584),n.e(41372),n.e(88854),n.e(72673),n.e(83498),n.e(88993),n.e(15306),n.e(57996
1)]).then(n.bind(n,577214))},"component")}),cm=(0,iJ.WK)("/_protected/_settingsLayout/settings/_affiliatesLayout/affiliates_settings")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(38313),n.e(48675),n.e(82359),n.e(90582)]).then(n.bind(n,918485))},"component")}),cb=(0,iJ.WK)("/_protected/_settingsLayout/settings/_affiliatesLayout/affiliates_directory")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(82359),n.e(74391)]).then(n.bind(n,905761))},"component")}),cy=(0,iJ.WK)("/_protected/_settingsLayout/settings/_affiliatesLayout/affiliates_commissions")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(82359),n.e(86625),n.e(49055),n.e(75349)]).then(n.bind(n,922397))},"component")}),ch=(0,iJ.WK)("/_protected/_settingsLayout/members/profile_fields/$")({beforeLoad:function(e){var t=e.location;(0,iX.V2)({href:t.href.replace("/members/profile_fields","/settings/profile_fields"),replace:!0,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(27460).then(n.bind(n,979855))},"component")}),cg=(0,iJ.WK)("/_protected/_settingsLayout/members/onboarding/$")({beforeLoad:function(e){var t=e.location;(0,iX.V2)({href:t.href.replace("/members/onboarding","/settings/members/onboarding"),replace:!0,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(2386).then(n.bind(n,743657))},"component")}),cv=(0,iJ.WK)("/_protected/_settingsLayout/members/invite/$")({beforeLoad:function(e){var t=e.location;(0,iX.V2)({href:t.href.replace("/members/invite","/settings/members/invite"),replace:!0,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(89178).then(n.bind(n,527137))},"component")}),cx=(0,iJ.WK)("/_protected/_settingsLayout/members/invitation_links/$")({beforeLoad:function(e){var t=e.location;(0,iX.V2)({href:t.href.replace("/members/invitation_links","/settings/invitation_links"),replace:!0,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(14494).then(n.bind(n,307117))},"component")}),cj=n(733911),c_=(0,iJ.WK)("/_protected/_dynamicLayout/s/$spaceGroupSlug/edit")({component:(0,iY.Z)(function(){return Promise.all([n.e(31040),n.e(25266),n.e(94764),n.e(78911),n.e(51090),n.e(66239),n.e(49297),n.e(59080),n.e(69176)]).then(n.bind(n,403339))},"component")}),cw=i8.Ik({payment_success:i8.zM().optional().catch(void 0)}),cO=(0,iJ.WK)("/_protected/_dynamicLayout/c/$spaceSlug/$postSlug")({validateSearch:cw,component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(69947),n.e(25767),n.e(5414),n.e(78911),n.e(51090),n.e(66239),n.e(53167),n.e(68369),n.e(10204),n.e(83729),n.e(60616),n.e(79862),n.e(71451),n.e(47755),n.e(37954),n.e(8956),n.e(22105),n.e(54858),n.e(74543),n.e(41429)]).then(n.bind(n,127227))},"component")}),cS=(0,iJ.WK)("/_minimal/settings/members/onboarding/preview")({beforeLoad:function(e){var t,n=e.context,r=e.location,o=null==(t=n.punditUserContext)?void 0:t.currentCommunity;(0,i3.H)(r.pathname,o)||(0,iX.V2)({to:(0,et.kP)(),throw:!0})},component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(24678),n.e(47931),n.e(48895),n.e(78911),n.e(25140),n.e(85271),n.e(70543),n.e(38497),n.e(67887),n.e(86625),n.e(36918),n.e(51090),n.e(66239),n.e(22505),n.e(97448),n.e(2923),n.e(86193),n.e(60542),n.e(95149)]).then(n.bind(n,759092))},"component")}),cP=(0,iJ.WK)("/_minimal/live/$roomSlug/_protected/not_supported")({component:(0,iY.Z)(function(){return n.e(73140).then(n.bind(n,955071))},"component")}),cC=n(195346),ck=n(16633),cI=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new")({component:(0,iY.Z)(function(){return n.e(10671).then(n.bind(n,145170))},"component")}),cN=(0,iJ.WK)("/_protected/_settingsLayout/settings/posts/bulk_actions")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(82359),n.e(11574)]).then(n.bind(n,42152))},"component")}),cA=(0,iJ.WK)("/_protected/_settingsLayout/settings/plus/push-notifications")({component:(0,iY.Z)(function(){return n.e(1564).then(n.bind(n,941572))},"component")}),cE=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywalls/new")({component:(0,iY.Z)(function(){return Promise.all([n.e(86625),n.e(13849),n.e(97347),n.e(91698),n.e(60579),n.e(83871),n.e(46348)]).then(n.bind(n,886759))},"component")}),cR=(0,iJ.WK)("/_protected/_settingsLayout/settings/members/onboarding")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(48433),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(66170),n.e(42574),n.e(82359),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(41372),n.e(18706),n.e(1983),n.e(32702),n.e(36035),n.e(7271),n.e(31139),n.e(21939),n.e(57020),n.e(93902)]).then(n.bind(n,374930))},"component")}),cL=(0,iJ.WK)("/_protected/_settingsLayout/settings/members/invite")({validateSearch:nr._x,component:(0,iY.Z)(function(){return Promise.all([n.e(90366),n.e(34911),n.e(39085),n.e(40705)]).then(n.bind(n,935015))},"component")}),cD=(0,iJ.WK)("/_protected/_settingsLayout/settings/invitation_links/new")({component:(0,iY.Z)(function(){return Promise.all([n.e(85674),n.e(86625),n.e(69208),n.e(76772),n.e(77094)]).then(n.bind(n,564069))},"component")}),cT=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/templates")({component:(0,iY.Z)(function(){return n.e(91759).then(n.bind(n,134482))},"component")}),cM=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/forms")({component:(0,iY.Z)(function(){return n.e(3547).then(n.bind(n,266518))},"component")}),cF=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/broadcast")({component:(0,iY.Z)(function(){return n.e(95603).then(n.bind(n,950878))},"component")}),cK=(0,iJ.WK)("/_protected/_settingsLayout/settings/coupons/new")({component:(0,iY.Z)(function(){return Promise.all([n.e(86625),n.e(23227),n.e(16063),n.e(41714)]).then(n.bind(n,805865))},"component")}),cB=(0,iJ.WK)("/_protected/_settingsLayout/settings/api/new")({component:(0,iY.Z)(function(){return n.e(21321).then(n.bind(n,945328))},"component")}),cq=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/website")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(77368),n.e(62501),n.e(48675),n.e(31040),n.e(26126),n.e(84189),n.e(93584),n.e(2081),n.e(25837),n.e(72673),n.e(12506),n.e(98005),n.e(31230),n.e(67429)]).then(n.bind(n,910107))},"component")}),cU=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/videos")({component:(0,iY.Z)(function(){return n.e(69431).then(n.bind(n,98410))},"component")}),cz=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/spaces")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(77368),n.e(62501),n.e(48675),n.e(31040),n.e(3745),n.e(84189),n.e(93584),n.e(2081),n.e(25837),n.e(72673),n.e(12506),n.e(98005),n.e(31230),n.e(787)]).then(n.bind(n,249833))},"component")}),cW=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/post_comments")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(77368),n.e(62501),n.e(48675),n.e(31040),n.e(81364),n.e(84189),n.e(93584),n.e(2081),n.e(25837),n.e(72673),n.e(12506),n.e(98005),n.e(31230),n.e(86302)]).then(n.bind(n,136900))},"component")}),c$=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/payments")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(77368),n.e(62501),n.e(98806),n.e(92344),n.e(34980),n.e(41432),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(36918),n.e(72942),n.e(37209),n.e(84189),n.e(93584),n.e(2081),n.e(25837),n.e(72673),n.e(12506),n.e(98005),n.e(31230),n.e(83498),n.e(90737),n.e(71932),n.e(24844),n.e(9444),n.e(63375),n.e(47658)]).then(n.bind(n,989380))},"component")}),cV=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/messages")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(77368),n.e(62501),n.e(48675),n.e(31040),n.e(58983),n.e(84189),n.e(93584),n.e(2081),n.e(25837),n.e(72673),n.e(12506),n.e(98005),n.e(31230),n.e(19088)]).then(n.bind(n,384174))},"component")}),cH=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/members")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(77368),n.e(62501),n.e(98806),n.e(34980),n.e(1989),n.e(48675),n.e(31040),n.e(48507),n.e(84189),n.e(93584),n.e(2081),n.e(25837),n.e(72673),n.e(12506),n.e(98005),n.e(31230),n.e(83498),n.e(71932),n.e(14954),n.e(9444),n.e(92945)]).then(n.bind(n,630077))},"component")}),cG=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/events")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(77368),n.e(98806),n.e(1989),n.e(48675),n.e(31040),n.e(48507),n.e(84189),n.e(93584),n.e(25837),n.e(72673),n.e(12506),n.e(98005),n.e(83498),n.e(14954),n.e(9444),n.e(11324)]).then(n.bind(n,170597))},"component")}),cZ=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/devices")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(77368),n.e(62501),n.e(98806),n.e(34980),n.e(41432),n.e(48675),n.e(31040),n.e(36602),n.e(84189),n.e(93584),n.e(2081),n.e(25837),n.e(72673),n.e(12506),n.e(98005),n.e(31230),n.e(83498),n.e(71932),n.e(24844),n.e(9444),n.e(12903)]).then(n.bind(n,77503))},"component")}),cQ=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/courses")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(77368),n.e(98806),n.e(41432),n.e(48675),n.e(31040),n.e(14221),n.e(84189),n.e(93584),n.e(25837),n.e(72673),n.e(12506),n.e(98005),n.e(83498),n.e(24844),n.e(9444),n.e(4848)]).then(n.bind(n,39862))},"component")}),cY=(0,iJ.WK)("/_protected/_settingsLayout/settings/analytics/ai_agents")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(77368),n.e(62501),n.e(34980),n.e(41432),n.e(1989),n.e(48675),n.e(31040),n.e(48507),n.e(84189),n.e(93584),n.e(2081),n.e(25837),n.e(72673),n.e(12506),n.e(98005),n.e(31230),n.e(71932),n.e(14954),n.e(24844),n.e(79227),n.e(84776)]).then(n.bind(n,371004))},"component")}),cJ=(0,iJ.WK)("/_protected/_dynamicLayout/c/$spaceSlug/_spaceLockGuard")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(31789),n.e(18608),n.e(26466),n.e(86625),n.e(56345),n.e(2923),n.e(4230),n.e(86891),n.e(92343)]).then(n.bind(n,220074))},"component")}),cX=(0,iJ.WK)("/_protected/_dynamicLayout/c/$spaceSlug/_spaceLayout")({component:(0,iY.Z)(function(){return n.e(50307).then(n.bind(n,94990))},"component")}),c0=(0,iJ.WK)("/_protected/settings/admin/audience/$sqid/")({beforeLoad:function(e){var t=e.params,n=e.location;(0,iX.V2)({to:"/settings/admin/audience/$sqid/info",params:{sqid:t.sqid},replace:!0,search:!0,hash:!0,state:n.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(95370).then(n.bind(n,592561))},"component")}),c1=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/")({component:(0,iY.Z)(function(){return Promise.all([n.e(41372),n.e(83337)]).then(n.bind(n,46966))},"component")}),c2=(0,iJ.WK)("/_protected/_settingsLayout/settings/plus/push-notifications/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(61778),n.e(68560),n.e(82359),n.e(977),n.e(60833)]).then(n.bind(n,549304))},"component")}),c3=(0,iJ.WK)("/_protected/_settingsLayout/settings/newsletter/settings/")({component:(0,iY.Z)(function(){return n.e(81024).then(n.bind(n,595811))},"component")}),c4=(0,iJ.WK)("/_protected/_settingsLayout/settings/newsletter/posts/")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(19476)]).then(n.bind(n,681838))},"component")}),c5=(0,iJ.WK)("/_protected/_settingsLayout/settings/members/onboarding/")({component:(0,iY.Z)(function(){return n.e(65482).then(n.bind(n,614481))},"component")}),c6=n(397935),c8=(0,iJ.WK)("/_protected/_settingsLayout/settings/members/invite/")({beforeLoad:function(e){var t=e.location;
1(0,iX.V2)({to:c6.J1[c6.KS.DETAILS],replace:!0,search:nr.FC,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(80834).then(n.bind(n,827033))},"component")}),c9=n(456806),c7=(0,iJ.WK)("/_protected/_settingsLayout/settings/invitation_links/new/")({beforeLoad:function(e){var t=e.location;(0,iX.V2)({to:c9.h[c9.vG.DETAILS],replace:!0,search:!0,state:t.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(80463).then(n.bind(n,622578))},"component")}),ue=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/templates/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(94994),n.e(82359),n.e(56345),n.e(22018),n.e(91669),n.e(79276)]).then(n.bind(n,434535))},"component")}),ut=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/settings/")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(92972),n.e(87882)]).then(n.bind(n,408626))},"component")}),un=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/forms/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(61778),n.e(94155),n.e(80100),n.e(82359),n.e(41372),n.e(88854),n.e(11179),n.e(12590),n.e(58810)]).then(n.bind(n,334273))},"component")}),ur=n(458339);function uo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ui=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/broadcast/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(94155),n.e(72189),n.e(52402),n.e(82359),n.e(92972),n.e(41372),n.e(88854),n.e(977),n.e(9063)]).then(n.bind(n,246299))},"component"),validateSearch:function(e){var t,n=e[ur.Lg],r=ur.dW.includes(n)?n:ur.dW["0"];return uo(t={},ur.Lg,r),uo(t,"page",Number(e.page)||1),t}}),ua=(0,iJ.WK)("/_protected/_settingsLayout/settings/coupons/new/")({component:(0,iY.Z)(function(){return n.e(92211).then(n.bind(n,927966))},"component")}),us=(0,iJ.WK)("/_protected/_settingsLayout/settings/ai-agents/knowledge/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(61778),n.e(94360),n.e(82359),n.e(79227),n.e(15091),n.e(79345)]).then(n.bind(n,802313))},"component")}),ul=(0,iJ.WK)("/_protected/_settingsLayout/settings/ai-agents/agents/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(90479),n.e(82359),n.e(79227),n.e(4885)]).then(n.bind(n,180299))},"component")}),uc=(0,iJ.WK)("/_protected/_settingsLayout/settings/access_groups/$id/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(10192),n.e(36918),n.e(72942),n.e(37209),n.e(44942),n.e(3823),n.e(89787),n.e(23413)]).then(n.bind(n,891967))},"component")}),uu=(0,iJ.WK)("/_protected/_dynamicLayout/c/$spaceSlug/_spaceLayout/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(69947),n.e(50937),n.e(52325),n.e(44553),n.e(31789),n.e(18608),n.e(26466),n.e(86625),n.e(56345),n.e(53167),n.e(68369),n.e(2923),n.e(60616),n.e(4230),n.e(71451),n.e(47755),n.e(20989),n.e(8956),n.e(44140),n.e(16382),n.e(86891),n.e(22105),n.e(34696),n.e(51810),n.e(43128),n.e(6291)]).then(n.bind(n,474004))},"component")}),ud=(0,iJ.WK)("/_protected/settings/inbox/messages/bot/$id")({component:(0,iY.Z)(function(){return n.e(16064).then(n.bind(n,402179))},"component")}),up=n(253400),uf=n(219017),um=(0,iJ.WK)("/_protected/settings/admin/audience/$sqid/notes")({component:(0,iY.Z)(function(){return Promise.all([n.e(40226),n.e(65028)]).then(n.bind(n,736894))},"component")}),ub=(0,iJ.WK)("/_protected/settings/admin/audience/$sqid/info")({component:(0,iY.Z)(function(){return Promise.all([n.e(24678),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(70543),n.e(76183),n.e(36918),n.e(10948),n.e(64615),n.e(40226),n.e(42132)]).then(n.bind(n,357058))},"component")}),uy=n(571831),uh=(0,iJ.WK)("/_protected/settings/admin/audience/$sqid/activity_logs")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(89139),n.e(42943)]).then(n.bind(n,944347))},"component")}),ug=(0,iJ.WK)("/_protected/settings/admin/audience/$sqid/access")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(46006),n.e(76183),n.e(69710),n.e(36918),n.e(72942),n.e(37209),n.e(44942),n.e(3823),n.e(89787),n.e(64615),n.e(48174)]).then(n.bind(n,622936))},"component")}),uv=(0,iJ.WK)("/_protected/settings/admin/audience/$sqid/$")({beforeLoad:function(e){var t=e.params,n=e.location;(0,iX.V2)({to:"/settings/admin/audience/$sqid/info",params:{sqid:t.sqid},replace:!0,search:!0,hash:!0,state:n.state,throw:!0})}}),ux=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/select_type")({component:(0,iY.Z)(function(){return n.e(1591).then(n.bind(n,886314))},"component")}),uj=n(376624),u_=n(84792),uw=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywalls/new/{-$tab}")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(62375),n.e(31761),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(48433),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(66170),n.e(83316),n.e(13655),n.e(82359),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(22505),n.e(41372),n.e(97448),n.e(18706),n.e(1983),n.e(32702),n.e(80328),n.e(36035),n.e(13849),n.e(97347),n.e(13675),n.e(37395),n.e(83134),n.e(91698),n.e(7271),n.e(31139),n.e(21939),n.e(17507),n.e(25349),n.e(53673),n.e(90358),n.e(96119)]).then(n.bind(n,817098))},"component")}),uO=(0,iJ.WK)("/_protected/_settingsLayout/settings/members/onboarding/$tab")({component:(0,iY.Z)(function(){return n.e(70895).then(n.bind(n,905618))},"component")}),uS=(0,iJ.WK)("/_protected/_settingsLayout/settings/members/invite/paywalls")({component:(0,iY.Z)(function(){return Promise.all([n.e(13121),n.e(86625),n.e(99008)]).then(n.bind(n,364649))},"component")}),uP=(0,iJ.WK)("/_protected/_settingsLayout/settings/members/invite/emails")({component:(0,iY.Z)(function(){return Promise.all([n.e(57020),n.e(72668)]).then(n.bind(n,984143))},"component")}),uC=(0,iJ.WK)("/_protected/_settingsLayout/settings/members/invite/details")({component:(0,iY.Z)(function(){return Promise.all([n.e(47217),n.e(62042),n.e(34911),n.e(39085),n.e(95833),n.e(86378)]).then(n.bind(n,885526))},"component")}),uk=(0,iJ.WK)("/_protected/_settingsLayout/settings/members/invite/access")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(46006),n.e(66170),n.e(81292),n.e(36918),n.e(72942),n.e(37209),n.e(44942),n.e(3823),n.e(89787),n.e(34911),n.e(39085),n.e(38440)]).then(n.bind(n,693488))},"component")}),uI=(0,iJ.WK)("/_protected/_settingsLayout/settings/member_tags/$id/edit")({component:(0,iY.Z)(function(){return Promise.all([n.e(82359),n.e(36369),n.e(75563)]).then(n.bind(n,795046))},"component")}),uN=(0,iJ.WK)("/_protected/_settingsLayout/settings/invitation_links/new/paywalls")({component:(0,iY.Z)(function(){return Promise.all([n.e(85674),n.e(86625),n.e(69208),n.e(70997),n.e(67760)]).then(n.bind(n,327347))},"component")}),uA=(0,iJ.WK)("/_protected/_settingsLayout/settings/invitation_links/new/details")({component:(0,iY.Z)(function(){return Promise.all([n.e(85674),n.e(86625),n.e(69208),n.e(25319),n.e(99309)]).then(n.bind(n,148924))},"component")}),uE=(0,iJ.WK)("/_protected/_settingsLayout/settings/invitation_links/new/access")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(46006),n.e(66170),n.e(85674),n.e(86625),n.e(36918),n.e(72942),n.e(37209),n.e(44942),n.e(3823),n.e(89787),n.e(69208),n.e(92592),n.e(24793)]).then(n.bind(n,808640))},"component")}),uR=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/forms/new")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(31040),n.e(25266),n.e(61778),n.e(94155),n.e(80100),n.e(82359),n.e(41372),n.e(88854),n.e(11179),n.e(12590),n.e(91988)]).then(n.bind(n,44671))},"component"),validateSearch:function(e){return{prefill_token:e.prefill_token}}}),uL=n(306215),uD=i8.Ik({tab:i8.k5(uL.s).optional().catch(void 0),page:i9.ai().optional().catch(void 0),status:i8.Yj().optional().catch(void 0),workflow_type:i8.Yj().optional().catch(void 0),scrollToId:i8.Yj().optional().catch(void 0)}),uT=(0,iJ.WK)("/_protected/_settingsLayout/settings/courses/$id/edit")({validateSearch:uD,component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(62375),n.e(31761),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(48433),n.e(16856),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(78911),n.e(90583),n.e(46006),n.e(66170),n.e(83316),n.e(25140),n.e(13655),n.e(85271),n.e(93299),n.e(82359),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(51090),n.e(93169),n.e(66239),n.e(22505),n.e(41372),n.e(97448),n.e(18706),n.e(1983),n.e(32702),n.e(80328),n.e(36035),n.e(13849),n.e(97347),n.e(71886),n.e(13675),n.e(37395),n.e(2923),n.e(83134),n.e(91698),n.e(7271),n.e(31139),n.e(21939),n.e(17507),n.e(25349),n.e(53673),n.e(60579),n.e(86193),n.e(32885),n.e(29355),n.e(17563),n.e(34725),n.e(10894)]).then(n.bind(n,290816))},"component")}),uM=(0,iJ.WK)("/_protected/_settingsLayout/settings/coupons/new/$tab")({component:(0,iY.Z)(function(){return n.e(46132).then(n.bind(n,588191))},"component")}),uF=n(227066),uK=(0,iJ.WK)("/_protected/_settingsLayout/settings/access_groups/$id/edit")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(81728),n.e(36918),n.e(72942),n.e(37209),n.e(44942),n.e(3823),n.e(89787),n.e(57469)]).then(n.bind(n,606071))},"component")}),uB=(0,iJ.WK)("/_protected/_dynamicLayout/c/$spaceSlug/_spaceLayout/invite")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(31789),n.e(18608),n.e(26466),n.e(86625),n.e(56345),n.e(71886),n.e(2923),n.e(4230),n.e(86891),n.e(28782)]).then(n.bind(n,685373))},"component")}),uq=n(389198),uU=n(239057),uz=(0,iJ.WK)("/_protected/_settingsLayout/settings/plus/push-notifications/$id")({component:(0,iY.Z)(function(){return n.e(30998).then(n.bind(n,330453))},"component")}),uW=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywalls/$id/edit")({component:(0,iY.Z)(function(){return Promise.all([n.e(86625),n.e(13849),n.e(97347),n.e(91698),n.e(60579),n.e(83871),n.e(78914)]
1).then(n.bind(n,589465))},"component")}),u$=(0,iJ.WK)("/_protected/_settingsLayout/settings/pages/edit/$id")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(75269),n.e(91665),n.e(56345),n.e(22018),n.e(4230),n.e(5648),n.e(39286),n.e(40149),n.e(60710),n.e(69741)]).then(n.bind(n,131324))},"component")}),uV=n(875602),uH=(0,iJ.WK)("/_protected/_settingsLayout/settings/newsletter/posts/$id")({beforeLoad:function(e){var t=e.params,n=e.location,r="".concat(uV.q.posts(),"/").concat(t.id);(n.pathname===r||n.pathname==="".concat(r,"/"))&&(0,iX.V2)({href:uV.q.postContent({path:{id:t.id}}),throw:!0})},component:(0,iY.Z)(function(){return n.e(19349).then(n.bind(n,489876))},"component")}),uG=(0,iJ.WK)("/_protected/_settingsLayout/settings/invitation_links/$id/edit")({component:(0,iY.Z)(function(){return Promise.all([n.e(85674),n.e(86625),n.e(69208),n.e(76772),n.e(86212)]).then(n.bind(n,395855))},"component")}),uZ=n(57443),uQ=n(815391),uY=n(694135),uJ=(0,iJ.WK)("/_protected/_settingsLayout/settings/coupons/$id/edit")({component:(0,iY.Z)(function(){return Promise.all([n.e(86625),n.e(23227),n.e(16063),n.e(76720)]).then(n.bind(n,828787))},"component")}),uX=n(124308),u0=(0,iJ.WK)("/_protected/settings/admin/audience/$sqid/billing/")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(62375),n.e(48675),n.e(41156),n.e(50446),n.e(27054),n.e(72922),n.e(46752),n.e(85483),n.e(86625),n.e(22505),n.e(80328),n.e(20782),n.e(69877),n.e(19758),n.e(43011),n.e(11438)]).then(n.bind(n,110667))},"component")}),u1=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/view/$id/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(67511),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(91710),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(71811),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(18706),n.e(1983),n.e(32702),n.e(10520),n.e(66227),n.e(88245),n.e(35966)]).then(n.bind(n,264973))},"component")}),u2=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/edit/$id/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(67511),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(48433),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(71811),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(18706),n.e(1983),n.e(32702),n.e(36035),n.e(10520),n.e(66227),n.e(88245),n.e(74178),n.e(57359),n.e(1026)]).then(n.bind(n,620825))},"component")}),u3=(0,iJ.WK)("/_protected/_settingsLayout/settings/pages/edit/$id/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(56345),n.e(22018),n.e(40149),n.e(11578)]).then(n.bind(n,59233))},"component")}),u4=(0,iJ.WK)("/_protected/_settingsLayout/settings/invitation_links/$id/edit/")({beforeLoad:function(e){var t=e.params,n=e.location;(0,iX.V2)({to:c9.lQ[c9.vG.DETAILS],params:{id:t.id},replace:!0,search:!0,state:n.state,throw:!0})},component:(0,iY.Z)(function(){return n.e(72737).then(n.bind(n,443608))},"component")}),u5=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/forms/$id/")({beforeLoad:function(e){var t=e.params;(0,iX.V2)({to:"/settings/emails/forms/$id/$tab",params:{id:t.id,tab:"edit"},replace:!0,throw:!0,search:!0,state:!0})},component:(0,iY.Z)(function(){return n.e(35932).then(n.bind(n,835767))},"component")}),u6=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/broadcast/$id/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(27386),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(25150),n.e(15292),n.e(93169),n.e(10520),n.e(98219),n.e(77221),n.e(44628),n.e(68761),n.e(80436)]).then(n.bind(n,757471))},"component")}),u8=(0,iJ.WK)("/_protected/_settingsLayout/settings/coupons/$id/edit/")({component:(0,iY.Z)(function(){return n.e(27365).then(n.bind(n,820580))},"component")}),u9=(0,iJ.WK)("/_protected/settings/courses/$id/lessons/$lessonId/edit")({component:(0,iY.Z)(function(){return Promise.all([n.e(34655),n.e(93960)]).then(n.bind(n,552091))},"component")}),u7=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/view/$id/runs")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(8159),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(18706),n.e(66227),n.e(21793),n.e(15260)]).then(n.bind(n,762263))},"component")}),de=n(537987),dt=(0,iJ.WK)("/_protected/_settingsLayout/settings/plus/push-notifications/$id/edit")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(39552),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(25150),n.e(15292),n.e(93169),n.e(98219),n.e(93919),n.e(20787),n.e(38795)]).then(n.bind(n,92527))},"component")}),dn=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywalls/new/upsell/customization")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(62375),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(83316),n.e(43087),n.e(86625),n.e(56345),n.e(22018),n.e(22505),n.e(97448),n.e(80328),n.e(13849),n.e(97347),n.e(13675),n.e(37395),n.e(83134),n.e(91698),n.e(17507),n.e(23721),n.e(80849),n.e(48718)]).then(n.bind(n,753821))},"component")}),dr=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywalls/new/checkout/cu
1stomization")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(62375),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(83316),n.e(86625),n.e(56345),n.e(22018),n.e(22505),n.e(97448),n.e(80328),n.e(13849),n.e(97347),n.e(13675),n.e(37395),n.e(83134),n.e(23721),n.e(298),n.e(81435)]).then(n.bind(n,668438))},"component")}),di=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywalls/$id/edit/{-$tab}")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(62375),n.e(31761),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(48433),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(66170),n.e(83316),n.e(13655),n.e(82359),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(22505),n.e(41372),n.e(97448),n.e(18706),n.e(1983),n.e(32702),n.e(80328),n.e(36035),n.e(13849),n.e(97347),n.e(13675),n.e(37395),n.e(83134),n.e(91698),n.e(7271),n.e(31139),n.e(21939),n.e(17507),n.e(25349),n.e(53673),n.e(90358),n.e(73557)]).then(n.bind(n,659988))},"component")}),da=(0,iJ.WK)("/_protected/_settingsLayout/settings/newsletter/posts/$id/settings")({component:(0,iY.Z)(function(){return n.e(77731).then(n.bind(n,352366))},"component")}),ds=(0,iJ.WK)("/_protected/_settingsLayout/settings/newsletter/posts/$id/preview")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(92012),n.e(31789),n.e(87568),n.e(20956),n.e(53167),n.e(68369),n.e(85288),n.e(89304),n.e(77416),n.e(29668)]).then(n.bind(n,662415))},"component")}),dl=(0,iJ.WK)("/_protected/_settingsLayout/settings/newsletter/posts/$id/content")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(92012),n.e(31789),n.e(87568),n.e(20956),n.e(53167),n.e(68369),n.e(85288),n.e(89304),n.e(77416),n.e(60282)]).then(n.bind(n,339265))},"component")}),dc=(0,iJ.WK)("/_protected/_settingsLayout/settings/invitation_links/$id/edit/paywalls")({component:(0,iY.Z)(function(){return Promise.all([n.e(85674),n.e(86625),n.e(69208),n.e(70997),n.e(18570)]).then(n.bind(n,477873))},"component")}),du=(0,iJ.WK)("/_protected/_settingsLayout/settings/invitation_links/$id/edit/details")({component:(0,iY.Z)(function(){return Promise.all([n.e(85674),n.e(86625),n.e(69208),n.e(25319),n.e(55343)]).then(n.bind(n,723122))},"component")}),dd=(0,iJ.WK)("/_protected/_settingsLayout/settings/invitation_links/$id/edit/access")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(46006),n.e(66170),n.e(85674),n.e(86625),n.e(36918),n.e(72942),n.e(37209),n.e(44942),n.e(3823),n.e(89787),n.e(69208),n.e(92592),n.e(50067)]).then(n.bind(n,334238))},"component")}),dp=n(144011),df=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/broadcast/$id/visual-builder")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(35036),n.e(14899),n.e(18138),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(75269),n.e(24874),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(24479)]).then(n.bind(n,695311))},"component")}),dm=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/broadcast/$id/edit")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(27386),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(25150),n.e(15292),n.e(93169),n.e(10520),n.e(98219),n.e(77221),n.e(44628),n.e(68761),n.e(798)]).then(n.bind(n,327245))},"component")}),db=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/broadcast/$id/content")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(35036),n.e(14899),n.e(92012),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(87568),n.e(16692),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(13829)]).then(n.bind(n,128588))},"component")}),dy=(0,iJ.WK)("/_protected/_settingsLayout/settings/coupons/$id/edit/$tab")({component:(0,iY.Z)(function(){return n.e(85890).then(n.bind(n,866009))},"component")}),dh=(0,iJ.WK)("/_protected/_settingsLayout/settings/ai-agents/edit/$botPublicId/knowledge")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(36918),n.e(72942),n.e(37209),n.e(4746),n.e(98790),n.e(12207),n.e(15091),n.e(47112)]).then(n.bind(n,986491))},"component")}),dg=(0,iJ.WK)("/_protected/_settingsLayout/settings/ai-agents/edit/$botPublicId/customize")({component:(0,iY.Z)(function(){return Promise.all([n.e(24678),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(36918),n.e(72942),n.e(37209),n.e(4746),n.e(98790),n.e(12207),n.e(17839),n.e(36116)]).then(n.bind(n,686423))},"component"),validateSearch:function(e){return{prefill_token:e.prefill_token}}}),dv=(0,iJ.WK)("/_protected/_settingsLayout/settings/ai-agents/edit/$botPublicId/behavior")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(24678),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(92836),n.e(36918),n.e(72942),n.e(37209),n.e(4746),n.e(98790),n.e(12207),n.e(17839),n.e(78747)]).then(n.bind(n,361590))},"component")}),dx=(0,iJ.WK)("/_protected/_settingsLayout/settings/ai-agents/edit/$botPublicId/automations")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(14581),n.e(36918),n.e(72942),n.e(37209),n.e(98790),n.e(12207),n.e(58485)]).then(n.bind(n,471588))},"component")}),dj=(0,iJ.WK)("/_protected/_settingsLayout/settings/ai-agents/edit/$botPublicId/audience")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(24678),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(8161),n.e(36918),n.e(72942),n.e(37209),n.e(4746),n.e(98790),n.e(12207),n.e(6887)]).then(n.bind(n,722586))},"component")}),d_=n(914747),dw=n(8516),dO=n(535237),dS=(0,iJ.WK)("/_protected/_settingsLayout/settings/plus/push-notifications/$id/view")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(24678),n.e(48675),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(48895),n.e(61778),n.e(80334),n.e(48384),n.e(28534),n.e(36918),n.e(72942),n.e(37209),n.e(98219),n.e(93919),n.e(20787),n.e(848),n.e(61789)]).then(n.bind(n,824533))},"component")}),dP=(0,iJ.WK)("/_protected/_settingsLayout/settings/pages/edit/$id/settings")({component:(0,iY.Z)(function(){return n.e(19727).then(n.bind(n,639730))},"component")}),dC=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/broadcast/$id/view")({component:(0,iY.Z)(function(){return Promise.all([n.e(44628),n.e(20649)]).then(n.bind(n,574397))},"component")}),dk=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/scheduled/$id/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(67511),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(48433),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(71811),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(18706),n.e(1983),n.e(32702),n.e(36035),n.e(10520),n.e(66227),n.e(88245),n.e(74178),n.e(57359),n.e(93080)]).then(n.bind(n,156459))},"component")}),dI=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/one_time/$id/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(67511),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(48433),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(71811),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(18706),n.e(1983),n.e(32702),n.e(36035),n.e(10520),n.e(66227),n.e(88245),n.e(74178),n.e(57359),n.e(43161)]).then(n.bind(n,503168))},"component")}),dN=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/dynamic/$id/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(67511),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(48433),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(71811),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(18706),n.e(1983),n.e(32702),n.e(36035),n.e(10520),n.e(66227),n.e(88245),n.e(74178),n.e(57359),n.e(33062)]).then(n.bind(n,379845))},"component")}),dA=(0,iJ.WK)("/_protected/_settingsLayout/settings/plus/push-notifications/$id/view/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24678),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(48895),n.e(61778),n.e(80334),n.e(48384),n.e(33176),n.e(36918),n.e(72942),n.e(37209),n.e(98219),n.e(93919),n.e(73163)]).then(n.bind(n,26242))},"component")}),dE=(0,iJ.WK)("/_protected/_settingsLayout/settings/pages/edit/$id/settings/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(56345),n.e(22018),n.e(50981),n.e(53590)]).then(n.bind(n,870443))},"component")}),dR=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/broadcast/$id/view/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(71208),n.e(82683),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(15292),n.e(10520),n.e(98219),n.e(77221),n.e(86736)]).then(n.bind(n,635540))},"component")}),dL=n(53499),dD=(0,iJ.WK)("/_protected/_settingsLayout/settings/plus/push-notifications/$id/view/analytics")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(848),n.e(48005)]).then(n.bind(n,127631))},"component")}),dT=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywalls/$id/edit/upsell/customization")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(62375),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(83316),n.e(43087),n.e(86625),n.e(56345),n.e(22018),n.e(22505),n.e(97448),n.e(80328),n.e(13849),n.e(97347),n.e(13675),n.e(37395),n.e(83134),n.e(91698),n.e(17507),n.e(23721),n.e(80849),n.e(43984)]).then(n.bind(n,615955))},"component")}),dM=(0,iJ.WK)("/_protected/_settingsLayout/settings/paywalls/$id/edit/checkout/cu
1stomization")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(62375),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(83316),n.e(86625),n.e(56345),n.e(22018),n.e(22505),n.e(97448),n.e(80328),n.e(13849),n.e(97347),n.e(13675),n.e(37395),n.e(83134),n.e(23721),n.e(298),n.e(52281)]).then(n.bind(n,137280))},"component")}),dF=(0,iJ.WK)("/_protected/_settingsLayout/settings/pages/edit/$id/settings/seo")({component:(0,iY.Z)(function(){return n.e(37933).then(n.bind(n,139932))},"component")}),dK=(0,iJ.WK)("/_protected/_settingsLayout/settings/pages/edit/$id/settings/redirects")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(51816),n.e(39286),n.e(99080)]).then(n.bind(n,298534))},"component")}),dB=(0,iJ.WK)("/_protected/_settingsLayout/settings/pages/edit/$id/settings/navigation")({component:(0,iY.Z)(function(){return Promise.all([n.e(63129),n.e(5648),n.e(59934)]).then(n.bind(n,239725))},"component")}),dq=(0,iJ.WK)("/_protected/_settingsLayout/settings/pages/edit/$id/settings/defaults")({component:(0,iY.Z)(function(){return Promise.all([n.e(13164),n.e(93168)]).then(n.bind(n,67463))},"component")}),dU=(0,iJ.WK)("/_protected/_settingsLayout/settings/pages/edit/$id/settings/code_snippets")({component:(0,iY.Z)(function(){return Promise.all([n.e(79766),n.e(63357)]).then(n.bind(n,696951))},"component")}),dz=(0,iJ.WK)("/_protected/_settingsLayout/settings/emails/broadcast/$id/view/analytics")({component:(0,iY.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(64040),n.e(92208)]).then(n.bind(n,348914))},"component")}),dW=n(261558),d$=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/edit/$id/send-email/$broadcastId/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(35036),n.e(14899),n.e(92012),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(87568),n.e(16692),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(42871)]).then(n.bind(n,148018))},"component")}),dV=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/edit/$id/send-email/$broadcastId/visual-builder")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(35036),n.e(14899),n.e(18138),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(75269),n.e(24874),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(18438)]).then(n.bind(n,318240))},"component")}),dH=i8.Ik({message_id:i9.ai().optional().catch(void 0)}),dG=(0,iJ.WK)("/_protected/_dynamicLayout/c/$spaceSlug/_spaceLockGuard/sections/$sectionId/lessons/$lessonId")({validateSearch:dH,component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(10443),n.e(76810),n.e(14982),n.e(84338),n.e(11753),n.e(88502),n.e(20477),n.e(98930),n.e(74012)]).then(n.bind(n,533009))},"component")}),dZ=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/scheduled/$id/send-email/$broadcastId")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(56345),n.e(22018),n.e(49785),n.e(18326),n.e(69364)]).then(n.bind(n,845375))},"component")}),dQ=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/one_time/$id/send-email/$broadcastId")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(56345),n.e(22018),n.e(49785),n.e(18326),n.e(74909)]).then(n.bind(n,185932))},"component")}),dY=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/dynamic/$id/send-email/$broadcastId")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(56345),n.e(22018),n.e(49785),n.e(18326),n.e(76162)]).then(n.bind(n,119225))},"component")}),dJ=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/scheduled/$id/sen
1d-email/$broadcastId/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(35036),n.e(14899),n.e(92012),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(87568),n.e(16692),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(46777)]).then(n.bind(n,584712))},"component")}),dX=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/one_time/$id/send-email/$broadcastId/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(35036),n.e(14899),n.e(92012),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(87568),n.e(16692),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(8416)]).then(n.bind(n,792715))},"component")}),d0=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/dynamic/$id/send-email/$broadcastId/")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(35036),n.e(14899),n.e(92012),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(87568),n.e(16692),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(48331)]).then(n.bind(n,973166))},"component")}),d1=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/scheduled/$id/send-email/$broadcastId/visual-builder")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(35036),n.e(14899),n.e(18138),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(75269),n.e(24874),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(25006)]).then(n.bind(n,464758))},"component")}),d2=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/one_time/$id/send-email/$broadcastId/visual-builder")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(35036),n.e(14899),n.e(18138),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(75269),n.e(24874),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(55659)]).then(n.bind(n,724283))},"component")}),d3=(0,iJ.WK)("/_protected/_settingsLayout/settings/workflows/new/dynamic/$id/send-email/$broadcastId/visual-builder")({component:(0,iY.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(35036),n.e(14899),n.e(18138),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(75269),n.e(24874),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(56600)]).then(n.bind(n,533884))},"component")}),d4=(0,iJ.WK)("/_protected/_dynamicLayout/c/$spaceSlug/_spaceLockGuard/edit-lesson/sections/$sectionId/lessons/$lessonId")({component:(0,iY.Z)(function(){return Promise.all([n.e(76810),n.e(34655),n.e(98930),n.e(27045)]).then(n.bind(n,647908))},"component")}),d5=i0.update({id:"/home",path:"/home",getParentRoute:function(){return iQ}}),d6=i1.update({id:"/feed",path:"/feed",getParentRoute:function(){return iQ}}),d8=i2.update({id:"/$",path:"/$",getParentRoute:function(){return iQ}}),d9=i4.update({id:"/_protected",getParentRoute:function(){return iQ}}),d7=i5.update({id:"/_minimal",getParentRoute:function(){return iQ}}),pe=i6.update({id:"/",path:"/",getParentRoute:function(){return iQ}}),pt=ae.update({id:"/public/unsubscribe",path:"/public/unsubscribe",getParentRoute:function(){return iQ}}),pn=an.update({id:"/marketing_emails/unsubscribe",path:"/marketing_emails/unsubscribe",getParentRoute:function(){return iQ}}),pr=ao.update({id:"/marketing_emails/marketing_email_preference",path:"/marketing_emails/marketing_email_preference",getParentRoute:function(){return iQ}}),po=ai.update({id:"/threads",path:"/threads",getParentRoute:function(){return d9}}),pi=aa.update({id:"/notifications",path:"/notifications",getParentRoute:function(){return d9}}),pa=au.update({id:"/leaderboard",path:"/leaderboard",getParentRoute:function(){return d9}}),ps=ad.update({id:"/discover",path:"/discover",getParentRoute:function(){return d9}}),pl=ap.update({id:"/connections",path:"/connections",getParentRoute:function(){return d9}}),pc=af.update({id:"/bookmarks",path:"/bookmarks",getParentRoute:function(){return d9}}),pu=am.update({id:"/two_fa",path:"/two_fa",getParentRoute:function(){return d7}}),pd=ab.update({id:"/eclipse",path:"/eclipse",getParentRoute:function(){return d7}}),pp=ay.update({id:"/download_app",path:"/download_app",getParentRoute:function(){return d7}}),pf=ah.update({id:"/messages",path:"/messages",getParentRoute:function(){return d9}}),pm=ag.update({id:"/members",path:"/members",getParentRoute:function(){return d9}}),pb=av.update({id:"/ai",path:"/ai",getParentRoute:function(){return d9}}),py=ax.update({id:"/account",path:"/account",getParentRoute:function(){return d9}}),ph=aj.update({id:"/_settingsLayout",getParentRoute:function(){return d9}}),pg=a_.update({id:"/_embed",getParentRoute:function(){return d9}}
1),pv=aw.update({id:"/_dynamicLayout",getParentRoute:function(){return d9}}),px=aO.update({id:"/",path:"/",getParentRoute:function(){return pf}}),pj=aS.update({id:"/",path:"/",getParentRoute:function(){return pm}}),p_=aC.update({id:"/getting-started/",path:"/getting-started/",getParentRoute:function(){return d9}}),pw=aI.update({id:"/",path:"/",getParentRoute:function(){return pb}}),pO=aN.update({id:"/questions-ai/",path:"/questions-ai/",getParentRoute:function(){return d7}}),pS=aE.update({id:"/$uuid",path:"/$uuid",getParentRoute:function(){return pf}}),pP=aR.update({id:"/map",path:"/map",getParentRoute:function(){return pm}}),pC=aL.update({id:"/manage",path:"/manage",getParentRoute:function(){return pm}}),pk=aD.update({id:"/connections",path:"/connections",getParentRoute:function(){return pm}}),pI=aT.update({id:"/$",path:"/$",getParentRoute:function(){return pm}}),pN=aM.q.update({id:"/getting-started/ai",path:"/getting-started/ai",getParentRoute:function(){return d9}}),pA=aF.update({id:"/skills",path:"/skills",getParentRoute:function(){return pb}}),pE=aK.q.update({id:"/$conversationId",path:"/$conversationId",getParentRoute:function(){return pb}}),pR=aB.update({id:"/billing",path:"/billing",getParentRoute:function(){return py}}),pL=aq.update({id:"/affiliate",path:"/affiliate",getParentRoute:function(){return py}}),pD=aU.update({id:"/spaces",path:"/spaces",getParentRoute:function(){return pv}}),pT=az.update({id:"/search",path:"/search",getParentRoute:function(){return pv}}),pM=aW.update({id:"/events",path:"/events",getParentRoute:function(){return pv}}),pF=a$.update({id:"/courses",path:"/courses",getParentRoute:function(){return pv}}),pK=aV.update({id:"/admin-settings",path:"/admin-settings",getParentRoute:function(){return pv}}),pB=aG.update({id:"/settings/cancel-plan",path:"/settings/cancel-plan",getParentRoute:function(){return d7}}),pq=aZ.update({id:"/settings/inbox",path:"/settings/inbox",getParentRoute:function(){return d9}}),pU=aQ.update({id:"/projects",path:"/projects",getParentRoute:function(){return pb}}),pz=aY.update({id:"/daily-briefs",path:"/daily-briefs",getParentRoute:function(){return pb}}),pW=aJ.update({id:"/briefs",path:"/briefs",getParentRoute:function(){return pb}}),p$=aX.update({id:"/_tabBody",getParentRoute:function(){return py}}),pV=a0.update({id:"/live/$roomSlug",path:"/live/$roomSlug",getParentRoute:function(){return d7}}),pH=a2.update({id:"/",path:"/",getParentRoute:function(){return pq}}),pG=a4.update({id:"/",path:"/",getParentRoute:function(){return pU}}),pZ=a5.update({id:"/",path:"/",getParentRoute:function(){return pW}}),pQ=a6.update({id:"/",path:"/",getParentRoute:function(){return p$}}),pY=a8.update({id:"/settings/",path:"/settings/",getParentRoute:function(){return ph}}),pJ=a9.update({id:"/bot/$id",path:"/bot/$id",getParentRoute:function(){return pf}}),pX=a7.q.update({id:"/$projectId",path:"/$projectId",getParentRoute:function(){return pU}}),p0=se.q.update({id:"/$dailyBriefId",path:"/$dailyBriefId",getParentRoute:function(){return pz}}),p1=st.update({id:"/privacy",path:"/privacy",getParentRoute:function(){return p$}}),p2=sn.update({id:"/notifications",path:"/notifications",getParentRoute:function(){return p$}}),p3=sr.update({id:"/authentication",path:"/authentication",getParentRoute:function(){return p$}}),p4=so.update({id:"/settings/weekly_digest",path:"/settings/weekly_digest",getParentRoute:function(){return ph}}),p5=si.update({id:"/settings/seo",path:"/settings/seo",getParentRoute:function(){return ph}}),p6=sa.update({id:"/settings/redirects",path:"/settings/redirects",getParentRoute:function(){return ph}}),p8=ss.update({id:"/settings/recap-2025",path:"/settings/recap-2025",getParentRoute:function(){return ph}}),p9=sl.update({id:"/settings/paywall_tax_settings",path:"/settings/paywall_tax_settings",getParentRoute:function(){return ph}}),p7=sc.update({id:"/settings/paywall_subscriptions",path:"/settings/paywall_subscriptions",getParentRoute:function(){return ph}}),fe=su.update({id:"/settings/paywall_payment_settings",path:"/settings/paywall_payment_settings",getParentRoute:function(){return ph}}),ft=sd.update({id:"/settings/paywall_groups",path:"/settings/paywall_groups",getParentRoute:function(){return ph}}),fn=sp.update({id:"/settings/paywall_charges",path:"/settings/paywall_charges",getParentRoute:function(){return ph}}),fr=sf.update({id:"/settings/paywall_bulk_logs",path:"/settings/paywall_bulk_logs",getParentRoute:function(){return ph}}),fo=sm.update({id:"/settings/navigation",path:"/settings/navigation",getParentRoute:function(){return ph}}),fi=sb.update({id:"/settings/mobile_app",path:"/settings/mobile_app",getParentRoute:function(){return ph}}),fa=sy.update({id:"/settings/legal",path:"/settings/legal",getParentRoute:function(){return ph}}),fs=sh.update({id:"/settings/home",path:"/settings/home",getParentRoute:function(){return ph}}),fl=sg.update({id:"/settings/general",path:"/settings/general",getParentRoute:function(){return ph}}),fc=sv.update({id:"/settings/gamification",path:"/settings/gamification",getParentRoute:function(){return ph}}),fu=sx.update({id:"/settings/embed",path:"/settings/embed",getParentRoute:function(){return ph}}),fd=sj.update({id:"/settings/discover",path:"/settings/discover",getParentRoute:function(){return ph}}),fp=s_.update({id:"/settings/dashboard",path:"/settings/dashboard",getParentRoute:function(){return ph}}),ff=sw.update({id:"/settings/custom_domain",path:"/settings/custom_domain",getParentRoute:function(){return ph}}),fm=sO.update({id:"/settings/connect",path:"/settings/connect",getParentRoute:function(){return ph}}),fb=sS.update({id:"/settings/community_ai",path:"/settings/community_ai",getParentRoute:function(){return ph}}),fy=sP.update({id:"/settings/code_snippets",path:"/settings/code_snippets",getParentRoute:function(){return ph}}),fh=sI.update({id:"/settings/branded_apps_builder_ui",path:"/settings/branded_apps_builder_ui",getParentRoute:function(){return ph}}),fg=sA.update({id:"/settings/branded_apps_builder_landing_page",path:"/settings/branded_apps_builder_landing_page",getParentRoute:function(){return ph}}),fv=sE.update({id:"/settings/branded_apps",path:"/settings/branded_apps",getParentRoute:function(){return ph}}),fx=sR.update({id:"/contacts/import",path:"/contacts/import",getParentRoute:function(){return ph}}),fj=sL.update({id:"/audience/manage",path:"/audience/manage",getParentRoute:function(){return ph}}),f_=sD.update({id:"/u/$publicUid",path:"/u/$publicUid",getParentRoute:function(){return pv}}),fw=sT.update({id:"/settings/paywalls/onboarding",path:"/settings/paywalls/onboarding",getParentRoute:function(){return d7}}),fO=sM.update({id:"/newsletter/posts/$id",path:"/newsletter/posts/$id",getParentRoute:function(){return d7}}),fS=sK.update({id:"/record",path:"/record",getParentRoute:function(){return pV}}),fP=sB.update({id:"/public",path:"/public",getParentRoute:function(){return pV}}),fC=sq.q.update({id:"/custom_logins/debug_sessions/$uuid",path:"/custom_logins/debug_sessions/$uuid",getParentRoute:function(){return d7}}),fk=sU.update({id:"/notifications",path:"/notifications",getParentRoute:function(){return pq}}),fI=s$.update({id:"/moderation",path:"/moderation",getParentRoute:function(){return pq}}),fN=sV.update({id:"/messages",path:"/messages",getParentRoute:function(){return pq}}),fA=sH.update({id:"/human-support",path:"/human-support",getParentRoute:function(){return pq}}),fE=sZ.update({id:"/course-comments",path:"/course-comments",getParentRoute:function(){return pq}}),fR=sQ.update({id:"/connection-requests",path:"/connection-requests",getParentRoute:function(){return pq}}),fL=sY.update({id:"/chat-threads",path:"/chat-threads",getParentRoute:function(){return pq}}),fD=sX.update({id:"/ai",path:"/ai",getParentRoute:function(){return pq}}),fT=s0.update({id:"/settings/workflows",path:"/settings/workflows",getParentRoute:function(){return ph}}),fM=s1.update({id:"/settings/topics",path:"/settings/topics",getParentRoute:function(){return ph}}),fF=s2.update({id:"/settings/spaces",path:"/settings/spaces",getParentRoute:function(){return ph}}),fK=s3.update({id:"/settings/segments",path:"/settings/segments",getParentRoute:function(){return ph}}),fB=s4.update({id:"/settings/profile_fields",path:"/settings/profile_fields",getParentRoute:function(){return ph}}),fq=s5.update({id:"/settings/plans",path:"/settings/plans",getParentRoute:function(){return ph}}),fU=s6.update({id:"/settings/newsletter",path:"/settings/newsletter",getParentRoute:function(){return ph}}),fz=s9.update({id:"/settings/live_streams",path:"/settings/live_streams",getParentRoute:function(){return ph}}),fW=s7.update({id:"/settings/files",path:"/settings/files",getParentRoute:function(){return ph}}),f$=le.update({id:"/settings/developers",path:"/settings/developers",getParentRoute:function(){return ph}}),fV=lt.update({id:"/settings/courses",path:"/settings/courses",getParentRoute:function(){return ph}}),fH=ln.update({id:"/settings/api",path:"/settings/api",getParentRoute:function(){return ph}}),fG=lr.update({id:"/settings/analytics",path:"/settings/analytics",getParentRoute:function(){return ph}}),fZ=lo.update({id:"/settings/_billingLayout",path:"/settings",getParentRoute:function(){return ph}}),fQ=li.update({id:"/settings/_affiliatesLayout",path:"/settings",getParentRoute:function(){return ph}}),fY=la.q.update({id:"/c/$embedSpaceSlug",path:"/c/$embedSpaceSlug",getParentRoute:function(){return pg}}),fJ=ls.update({id:"/s/$spaceGroupSlug",path:"/s/$spaceGroupSlug",getParentRoute:function(){return pv}}),fX=ll.q.update({id:"/c/$spaceSlug",path:"/c/$spaceSlug",getParentRoute:function(){return pv}}),f0=lc.update({id:"/_protected",getParentRoute:function(){return pV}}),f1=lu.update({id:"/",path:"/",getParentRoute:function(){return fI}}),f2=ld.update({id:"/",path:"/",getParentRoute:function(){return fN}}),f3=lp.update({id:"/",path:"/",getParentRoute:function(){return fA}}),f4=lf.update({id:"/",path:"/",getParentRoute:function(){return fE}}),f5=lm.update({id:"/",path:"/",getParentRoute:function(){return fR}}),f6=lb.update({id:"/",path:"/",getParentRoute:function(){return fD}}),f8=ly.update({id:"/admin/audience/$sqid/",path:"/admin/audience/$sqid/",getParentRoute:function(){return d9}}),f9=lh.update({id:"/",path:"/",getParentRoute:function(){return fT}}),f7=lg.update({id:"/",path:"/",getParentRoute:function(){return fM}}),me=lv.update({id:"/settings/theme/",path:"/settings/theme/",getParentRoute:function(){return ph}}),mt=lx.update({id:"/settings/sso/",path:"/settings/sso/",getParentRoute:function(){return ph}}),mn=lj.update({id:"/",path:"/",getParentRoute:function(){return fK}}),mr=l_.update({id:"/",path:"/",getParentRoute:function(){return fB}}),mo=lw.update({id:"/settings/posts/",path:"/settings/posts/",getParentRoute:function(){return ph}}),mi=lO.update({id:"/settings/plus/",path:"/settings/plus/",getParentRoute:function(){return ph}}),ma=lC.update({id:"/",path:"/",getParentRoute:function(){return fq}}),ms=lk.update({id:"/settings/paywalls/",path:"/settings/paywalls/",getParentRoute:function(){return ph}}),ml=lN.update({id:"/settings/pages/",path:"/settings/pages/",getParentRoute:function(){return ph}}),mc=lA.update({id:"/settings/onboarding/",path:"/settings/onboarding/",getParentRoute:function(){return ph}}),mu=lE.update({id:"/",path:"/",getParentRoute:function(){return fU}}),md=lR.update({id:"/settings/moderation/",path:"/settings/moderation/",getParentRoute:function(){return ph}}),mp=lL.update({id:"/settings/member_tags/",path:"/settings/member_tags/",getParentRoute:function(){return ph}}),mf=lD.update({id:"/",path:"/",getParentRoute:function(){return fz}}),mm=lT.update({id:"/settings/invitation_links/",path:"/settings/invitation_links/",getParentRoute:function(){return ph}}),mb=lM.q.update({id:"/settings/integrations/",path:"/settings/integrations/",getParentRoute:function(){return ph}}),my=lF.update({id:"/settings/events/",path:"/settings/events/",getParentRoute:function(){return ph}}),mh=lK.update({id:"/settings/emails/",path:"/settings/emails/",getParentRoute:function(){return ph}}),mg=lq.update({id:"/",path:"/",getParentRoute:function(){return fV}}),mv=lU.update({id:"/settings/coupons/",path:"/settings/coupons/",getParentRoute:function(){return ph}}),mx=lz.update({id:"/",path:"/",getParentRoute:function(){return fH}}),mj=lW.update({id:"/",path:"/",getParentRoute:function(){return fG}}),m_=l$.update({id:"/settings/ai-inbox/",path:"/settings/ai-inbox/",getParentRoute:function(){return ph}}),mw=lV.update({id:"/settings/access_groups/",path:"/settings/access_groups/",getParentRoute:function(){return ph}}),mO=lH.update({id:"/members/profile_fields/",path:"/members/profile_fields/",getParentRoute:function(){return ph}}),mS=lG.update({id:"/members/invitation_links/",path:"/members/invitation_links/",getParentRoute:function(){return ph}}),mP=lZ.q.update({id:"/",path:"/",getParentRoute:function(){return fY}}),mC=lQ.update({id:"/",path:"/",getParentRoute:function(){return fJ}}),mk=lY.q.update({id:"/",path:"/",getParentRoute:function(){return f0}}),mI=lJ.update({id:"/$id",path:"/$id",getParentRoute:function(){return fI}}),mN=lX.update({id:"/$uuid",path:"/$uuid",getParentRoute:function(){return fN}}),mA=l0.update({id:"/$chatRoomUuid",path:"/$chatRoomUuid",getParentRoute:function(){return fE}}),mE=l1.update({id:"/$id",path:"/$id",getParentRoute:function(){return fR}}),mR=l2.update({id:"/$id",path:"/$id",getParentRoute:function(){return fL}}),mL=l3.update({id:"/admin/audience/$sqid/$",path:"/admin/audience/$sqid/$",getParentRoute:function(){return d9}}),mD=l5.update({id:"/history",path:"/history",getParentRoute:function(){return fT}}),mT=l6.update({id:"/new",path:"/new",getParentRoute:function(){return fM}}),mM=l8.update({id:"/$",path:"/$",getParentRoute:function(){return fF}}),mF=l9.update({id:"/$id",path:"/$id",getParentRoute:function(){return fK}}),mK=l7.q.update({id:"/new",path:"/new",getParentRoute:function(){return fB}}),mB=ce.update({id:"/manage",path:"/manage",getParentRoute:function(){return fB}}),mq=ct.update({id:"/settings/plus/lite",path:"/settings/plus/lite",getParentRoute:function(){return ph}}),mU=cn.update({id:"/settings/moderation/edit",path:"/settings/moderation/edit",getParentRoute:function(){return ph}}),mz=cr.update({id:"/settings/members/bulk_import_tasks",path:"/settings/members/bulk_import_tasks",getParentRoute:function(){return ph}}),mW=co.update({id:"/settings/members/activity_logs",path:"/settings/members/activity_logs",getParentRoute:function(){return ph}}),m$=ci.update({id:"/settings/member_tags/new",path:"/settings/member_tags/new",getParentRoute:function(){return ph}}),mV=ca.update({id:"/$id",path:"/$id",getParentRoute:function(){return fz}}),mH=cs.update({id:"/overview",path:"/overview",getParentRoute:function(){return fV}}),mG=cl.update({id:"/settings/contacts/import",path:"/settings/contacts/import",getParentRoute:function(){return ph}}),mZ=cc.update({id:"/settings/audience/manage",path:"/settings/audience/manage",getParentRoute:function(){return ph}}),mQ=cu.update({id:"/settings/audience/connect",path:"/settings/audience/connect",getParentRoute:function(){return ph}}),mY=cd.update({id:"/payment_details",path:"/payment_details",getParentRoute:function(){return fZ}}),mJ=cp.update({id:"/invoices",path:"/invoices",getParentRoute:function(){return fZ}}),mX=cf.update({id:"/billing",path:"/billing",getParentRoute:function(){return fZ}}),m0=cm.update({id:"/affiliates_settings",path:"/affiliates_settings",getParentRoute:function(){return fQ}}),m1=cb.update({id:"/affiliates_directory",path:"/affiliates_directory",getParentRoute:function(){return fQ}}),m2=cy.update({id:"/affiliates_commissions",path:"/affiliates_commissions",getParentRoute:function(){return fQ}}),m3=ch.update({id:"/members/profile_fields/$",path:"/members/profile_fields/$",getParentRoute:function(){return ph}}),m4=cg.update({id:"/members/onboarding/$",path:"/members/onboarding/$",getParentRoute:function(){return ph}}),m5=cv.update({id:"/members/invite/$",path:"/members/invite/$",getParentRoute:function(){return ph}}),m6=cx.update({id:"/members/invitation_links/$",path:"/members/invitation_links/$",getParentRoute:function(){return ph}}),m8=cj.q.update({id:"/$embedPostSlug",path:"/$embedPostSlug",getParentRoute:function(){return fY}}),m9=c_.update({id:"/edit",path:"/edit",getParentRoute:function(){return fJ}}),m7=cO.update({id:"/$postSlug",path
1:"/$postSlug",getParentRoute:function(){return fX}}),be=cS.update({id:"/settings/members/onboarding/preview",path:"/settings/members/onboarding/preview",getParentRoute:function(){return d7}}),bt=cP.update({id:"/not_supported",path:"/not_supported",getParentRoute:function(){return f0}}),bn=cC.q.update({id:"/mobile",path:"/mobile",getParentRoute:function(){return f0}}),br=ck.q.update({id:"/settings/admin/audience/$sqid",path:"/settings/admin/audience/$sqid",getParentRoute:function(){return d9}}),bo=cI.update({id:"/new",path:"/new",getParentRoute:function(){return fT}}),bi=cN.update({id:"/settings/posts/bulk_actions",path:"/settings/posts/bulk_actions",getParentRoute:function(){return ph}}),ba=cA.update({id:"/settings/plus/push-notifications",path:"/settings/plus/push-notifications",getParentRoute:function(){return ph}}),bs=cE.update({id:"/settings/paywalls/new",path:"/settings/paywalls/new",getParentRoute:function(){return ph}}),bl=cR.update({id:"/settings/members/onboarding",path:"/settings/members/onboarding",getParentRoute:function(){return ph}}),bc=cL.update({id:"/settings/members/invite",path:"/settings/members/invite",getParentRoute:function(){return ph}}),bu=cD.update({id:"/settings/invitation_links/new",path:"/settings/invitation_links/new",getParentRoute:function(){return ph}}),bd=cT.update({id:"/settings/emails/templates",path:"/settings/emails/templates",getParentRoute:function(){return ph}}),bp=cM.update({id:"/settings/emails/forms",path:"/settings/emails/forms",getParentRoute:function(){return ph}}),bf=cF.update({id:"/settings/emails/broadcast",path:"/settings/emails/broadcast",getParentRoute:function(){return ph}}),bm=cK.update({id:"/settings/coupons/new",path:"/settings/coupons/new",getParentRoute:function(){return ph}}),bb=cB.update({id:"/new",path:"/new",getParentRoute:function(){return fH}}),by=cq.update({id:"/website",path:"/website",getParentRoute:function(){return fG}}),bh=cU.update({id:"/videos",path:"/videos",getParentRoute:function(){return fG}}),bg=cz.update({id:"/spaces",path:"/spaces",getParentRoute:function(){return fG}}),bv=cW.update({id:"/post_comments",path:"/post_comments",getParentRoute:function(){return fG}}),bx=c$.update({id:"/payments",path:"/payments",getParentRoute:function(){return fG}}),bj=cV.update({id:"/messages",path:"/messages",getParentRoute:function(){return fG}}),b_=cH.update({id:"/members",path:"/members",getParentRoute:function(){return fG}}),bw=cG.update({id:"/events",path:"/events",getParentRoute:function(){return fG}}),bO=cZ.update({id:"/devices",path:"/devices",getParentRoute:function(){return fG}}),bS=cQ.update({id:"/courses",path:"/courses",getParentRoute:function(){return fG}}),bP=cY.update({id:"/ai_agents",path:"/ai_agents",getParentRoute:function(){return fG}}),bC=cJ.update({id:"/_spaceLockGuard",getParentRoute:function(){return fX}}),bk=cX.update({id:"/_spaceLayout",getParentRoute:function(){return fX}}),bI=c0.update({id:"/",path:"/",getParentRoute:function(){return br}}),bN=c1.update({id:"/",path:"/",getParentRoute:function(){return bo}}),bA=c2.update({id:"/",path:"/",getParentRoute:function(){return ba}}),bE=c3.update({id:"/settings/",path:"/settings/",getParentRoute:function(){return fU}}),bR=c4.update({id:"/posts/",path:"/posts/",getParentRoute:function(){return fU}}),bL=c5.update({id:"/",path:"/",getParentRoute:function(){return bl}}),bD=c8.update({id:"/",path:"/",getParentRoute:function(){return bc}}),bT=c7.update({id:"/",path:"/",getParentRoute:function(){return bu}}),bM=ue.update({id:"/",path:"/",getParentRoute:function(){return bd}}),bF=ut.update({id:"/settings/emails/settings/",path:"/settings/emails/settings/",getParentRoute:function(){return ph}}),bK=un.update({id:"/",path:"/",getParentRoute:function(){return bp}}),bB=ui.update({id:"/",path:"/",getParentRoute:function(){return bf}}),bq=ua.update({id:"/",path:"/",getParentRoute:function(){return bm}}),bU=us.update({id:"/settings/ai-agents/knowledge/",path:"/settings/ai-agents/knowledge/",getParentRoute:function(){return ph}}),bz=ul.update({id:"/settings/ai-agents/agents/",path:"/settings/ai-agents/agents/",getParentRoute:function(){return ph}}),bW=uc.update({id:"/settings/access_groups/$id/",path:"/settings/access_groups/$id/",getParentRoute:function(){return ph}}),b$=uu.update({id:"/",path:"/",getParentRoute:function(){return bk}}),bV=ud.update({id:"/bot/$id",path:"/bot/$id",getParentRoute:function(){return fN}}),bH=up.q.update({id:"/conversations/$id",path:"/conversations/$id",getParentRoute:function(){return fA}}),bG=uf.q.update({id:"/conversations/$id",path:"/conversations/$id",getParentRoute:function(){return fD}}),bZ=um.update({id:"/notes",path:"/notes",getParentRoute:function(){return br}}),bQ=ub.update({id:"/info",path:"/info",getParentRoute:function(){return br}}),bY=uy.q.update({id:"/gamification",path:"/gamification",getParentRoute:function(){return br}}),bJ=uh.update({id:"/activity_logs",path:"/activity_logs",getParentRoute:function(){return br}}),bX=ug.update({id:"/access",path:"/access",getParentRoute:function(){return br}}),b0=uv.update({id:"/$",path:"/$",getParentRoute:function(){return br}}),b1=ux.update({id:"/select_type",path:"/select_type",getParentRoute:function(){return bo}}),b2=uj.q.update({id:"/$topicId/edit",path:"/$topicId/edit",getParentRoute:function(){return fM}}),b3=u_.q.update({id:"/$id/edit",path:"/$id/edit",getParentRoute:function(){return fB}}),b4=uw.update({id:"/{-$tab}",path:"/{-$tab}",getParentRoute:function(){return bs}}),b5=uO.update({id:"/$tab",path:"/$tab",getParentRoute:function(){return bl}}),b6=uS.update({id:"/paywalls",path:"/paywalls",getParentRoute:function(){return bc}}),b8=uP.update({id:"/emails",path:"/emails",getParentRoute:function(){return bc}}),b9=uC.update({id:"/details",path:"/details",getParentRoute:function(){return bc}}),b7=uk.update({id:"/access",path:"/access",getParentRoute:function(){return bc}}),ye=uI.update({id:"/settings/member_tags/$id/edit",path:"/settings/member_tags/$id/edit",getParentRoute:function(){return ph}}),yt=uN.update({id:"/paywalls",path:"/paywalls",getParentRoute:function(){return bu}}),yn=uA.update({id:"/details",path:"/details",getParentRoute:function(){return bu}}),yr=uE.update({id:"/access",path:"/access",getParentRoute:function(){return bu}}),yo=uR.update({id:"/new",path:"/new",getParentRoute:function(){return bp}}),yi=uT.update({id:"/$id/edit",path:"/$id/edit",getParentRoute:function(){return fV}}),ya=uM.update({id:"/$tab",path:"/$tab",getParentRoute:function(){return bm}}),ys=uF.q.update({id:"/settings/ai-inbox/conversations/$id",path:"/settings/ai-inbox/conversations/$id",getParentRoute:function(){return ph}}),yl=uK.update({id:"/settings/access_groups/$id/edit",path:"/settings/access_groups/$id/edit",getParentRoute:function(){return ph}}),yc=uB.update({id:"/invite",path:"/invite",getParentRoute:function(){return bk}}
1),yu=uq.q.update({id:"/view/$id",path:"/view/$id",getParentRoute:function(){return fT}}),yd=uU.q.update({id:"/edit/$id",path:"/edit/$id",getParentRoute:function(){return fT}}),yp=uz.update({id:"/$id",path:"/$id",getParentRoute:function(){return ba}}),yf=uW.update({id:"/settings/paywalls/$id/edit",path:"/settings/paywalls/$id/edit",getParentRoute:function(){return ph}}),ym=u$.update({id:"/settings/pages/edit/$id",path:"/settings/pages/edit/$id",getParentRoute:function(){return ph}}),yb=uH.update({id:"/posts/$id",path:"/posts/$id",getParentRoute:function(){return fU}}),yy=uG.update({id:"/settings/invitation_links/$id/edit",path:"/settings/invitation_links/$id/edit",getParentRoute:function(){return ph}}),yh=uZ.q.update({id:"/$id",path:"/$id",getParentRoute:function(){return bd}}),yg=uQ.q.update({id:"/$id",path:"/$id",getParentRoute:function(){return bp}}),yv=uY.q.update({id:"/$id",path:"/$id",getParentRoute:function(){return bf}}),yx=uJ.update({id:"/settings/coupons/$id/edit",path:"/settings/coupons/$id/edit",getParentRoute:function(){return ph}}),yj=uX.q.update({id:"/settings/ai-agents/edit/$botPublicId",path:"/settings/ai-agents/edit/$botPublicId",getParentRoute:function(){return ph}}),y_=u0.update({id:"/billing/",path:"/billing/",getParentRoute:function(){return br}}),yw=u1.update({id:"/",path:"/",getParentRoute:function(){return yu}}),yO=u2.update({id:"/",path:"/",getParentRoute:function(){return yd}}),yS=u3.update({id:"/",path:"/",getParentRoute:function(){return ym}}),yP=u4.update({id:"/",path:"/",getParentRoute:function(){return yy}}),yC=u5.update({id:"/",path:"/",getParentRoute:function(){return yg}}),yk=u6.update({id:"/",path:"/",getParentRoute:function(){return yv}}),yI=u8.update({id:"/",path:"/",getParentRoute:function(){return yx}}),yN=u9.update({id:"/settings/courses/$id/lessons/$lessonId/edit",path:"/settings/courses/$id/lessons/$lessonId/edit",getParentRoute:function(){return d9}}),yA=u7.update({id:"/runs",path:"/runs",getParentRoute:function(){return yu}}),yE=de.q.update({id:"/preview/$id",path:"/preview/$id",getParentRoute:function(){return bo}}),yR=dt.update({id:"/edit",path:"/edit",getParentRoute:function(){return yp}}),yL=dn.update({id:"/upsell/customization",path:"/upsell/customization",getParentRoute:function(){return bs}}),yD=dr.update({id:"/checkout/customization",path:"/checkout/customization",getParentRoute:function(){return bs}}),yT=di.update({id:"/{-$tab}",path:"/{-$tab}",getParentRoute:function(){return yf}}),yM=da.update({id:"/settings",path:"/settings",getParentRoute:function(){return yb}}),yF=ds.update({id:"/preview",path:"/preview",getParentRoute:function(){return yb}}),yK=dl.update({id:"/content",path:"/content",getParentRoute:function(){return yb}}),yB=dc.update({id:"/paywalls",path:"/paywalls",getParentRoute:function(){return yy}}),yq=du.update({id:"/details",path:"/details",getParentRoute:function(){return yy}}),yU=dd.update({id:"/access",path:"/access",getParentRoute:function(){return yy}}),yz=dp.q.update({id:"/$tab",path:"/$tab",getParentRoute:function(){return yg}}),yW=df.update({id:"/visual-builder",path:"/visual-builder",getParentRoute:function(){return yv}}),y$=dm.update({id:"/edit",path:"/edit",getParentRoute:function(){return yv}}),yV=db.update({id:"/content",path:"/content",getParentRoute:function(){return yv}}),yH=dy.update({id:"/$tab",path:"/$tab",getParentRoute:function(){return yx}}),yG=dh.update({id:"/knowledge",path:"/knowledge",getParentRoute:function(){return yj}}),yZ=dg.update({id:"/customize",path:"/customize",getParentRoute:function(){return yj}}),yQ=dv.update({id:"/behavior",path:"/behavior",getParentRoute:function(){return yj}}),yY=dx.update({id:"/automations",path:"/automations",getParentRoute:function(){return yj}}),yJ=dj.update({id:"/audience",path:"/audience",getParentRoute:function(){return yj}}),yX=d_.q.update({id:"/scheduled/$id",path:"/scheduled/$id",getParentRoute:function(){return bo}}),y0=dw.q.update({id:"/one_time/$id",path:"/one_time/$id",getParentRoute:function(){return bo}}),y1=dO.q.update({id:"/dynamic/$id",path:"/dynamic/$id",getParentRoute:function(){return bo}}
1),y2=dS.update({id:"/view",path:"/view",getParentRoute:function(){return yp}}),y3=dP.update({id:"/settings",path:"/settings",getParentRoute:function(){return ym}}),y4=dC.update({id:"/view",path:"/view",getParentRoute:function(){return yv}}),y5=dk.update({id:"/",path:"/",getParentRoute:function(){return yX}}),y6=dI.update({id:"/",path:"/",getParentRoute:function(){return y0}}),y8=dN.update({id:"/",path:"/",getParentRoute:function(){return y1}}),y9=dA.update({id:"/",path:"/",getParentRoute:function(){return y2}}),y7=dE.update({id:"/",path:"/",getParentRoute:function(){return y3}}),he=dR.update({id:"/",path:"/",getParentRoute:function(){return y4}}),ht=dL.q.update({id:"/billing/subscriptions/new",path:"/billing/subscriptions/new",getParentRoute:function(){return br}}),hn=dD.update({id:"/analytics",path:"/analytics",getParentRoute:function(){return y2}}),hr=dT.update({id:"/upsell/customization",path:"/upsell/customization",getParentRoute:function(){return yf}}),ho=dM.update({id:"/checkout/customization",path:"/checkout/customization",getParentRoute:function(){return yf}}),hi=dF.update({id:"/seo",path:"/seo",getParentRoute:function(){return y3}}),ha=dK.update({id:"/redirects",path:"/redirects",getParentRoute:function(){return y3}}),hs=dB.update({id:"/navigation",path:"/navigation",getParentRoute:function(){return y3}}),hl=dq.update({id:"/defaults",path:"/defaults",getParentRoute:function(){return y3}}),hc=dU.update({id:"/code_snippets",path:"/code_snippets",getParentRoute:function(){return y3}}),hu=dz.update({id:"/analytics",path:"/analytics",getParentRoute:function(){return y4}}),hd=dW.q.update({id:"/send-email/$broadcastId",path:"/send-email/$broadcastId",getParentRoute:function(){return yd}}),hp=d$.update({id:"/",path:"/",getParentRoute:function(){return hd}}),hf=dV.update({id:"/visual-builder",path:"/visual-builder",getParentRoute:function(){return hd}}),hm=dG.update({id:"/sections/$sectionId/lessons/$lessonId",path:"/sections/$sectionId/lessons/$lessonId",getParentRoute:function(){return bC}}),hb=dZ.update({id:"/send-email/$broadcastId",path:"/send-email/$broadcastId",getParentRoute:function(){return yX}}),hy=dQ.update({id:"/send-email/$broadcastId",path:"/send-email/$broadcastId",getParentRoute:function(){return y0}}),hh=dY.update({id:"/send-email/$broadcastId",path:"/send-email/$broadcastId",getParentRoute:function(){return y1}}),hg=dJ.update({id:"/",path:"/",getParentRoute:function(){return hb}}),hv=dX.update({id:"/",path:"/",getParentRoute:function(){return hy}}),hx=d0.update({id:"/",path:"/",getParentRoute:function(){return hh}}),hj=d1.update({id:"/visual-builder",path:"/visual-builder",getParentRoute:function(){return hb}}),h_=d2.update({id:"/visual-builder",path:"/visual-builder",getParentRoute:function(){return hy}}),hw=d3.update({id:"/visual-builder",path:"/visual-builder",getParentRoute:function(){return hh}}),hO=d4.update({id:"/edit-lesson/sections/$sectionId/lessons/$lessonId",path:"/edit-lesson/sections/$sectionId/lessons/$lessonId",getParentRoute:function(){return bC}}),hS=f0._addFileChildren({MinimalLiveRoomSlugProtectedMobileRoute:bn,MinimalLiveRoomSlugProtectedNot_supportedRoute:bt,MinimalLiveRoomSlugProtectedIndexRoute:mk}),hP=pV._addFileChildren({MinimalLiveRoomSlugProtectedRouteRoute:hS,MinimalLiveRoomSlugPublicRoute:fP,MinimalLiveRoomSlugRecordRoute:fS}),hC=d7._addFileChildren({MinimalDownload_appRoute:pp,MinimalEclipseRoute:pd,MinimalTwo_faRoute:pu,MinimalLiveRoomSlugRouteRoute:hP,MinimalSettingsCancelPlanRoute:pB,MinimalQuestionsAiIndexRoute:pO,MinimalCustom_loginsDebug_sessionsUuidRoute:fC,MinimalNewsletterPostsIdRoute:fO,MinimalSettingsPaywallsOnboardingRoute:fw,MinimalSettingsMembersOnboardingPreviewRoute:be}),hk=bk._addFileChildren({ProtectedDynamicLayoutCSpaceSlugSpaceLayoutInviteRoute:yc,ProtectedDynamicLayoutCSpaceSlugSpaceLayoutIndexRoute:b$}),hI=bC._addFileChildren({ProtectedDynamicLayoutCSpaceSlugSpaceLockGuardSectionsSectionIdLessonsLessonIdRoute:hm,ProtectedDynamicLayoutCSpaceSlugSpaceLockGuardEditLessonSectionsSectionIdLessonsLessonIdRoute:hO}),hN=fX._addFileChildren({ProtectedDynamicLayoutCSpaceSlugSpaceLayoutRouteRoute:hk,ProtectedDynamicLayoutCSpaceSlugSpaceLockGuardRouteRoute:hI,ProtectedDynamicLayoutCSpaceSlugPostSlugRoute:m7}),hA=fJ._addFileChildren({ProtectedDynamicLayoutSSpaceGroupSlugEditRoute:m9,ProtectedDynamicLayoutSSpaceGroupSlugIndexRoute:mC}),hE=pv._addFileChildren({ProtectedDynamicLayoutAdminSettingsRoute:pK,ProtectedDynamicLayoutCoursesRoute:pF,ProtectedDynamicLayoutEventsRoute:pM,ProtectedDynamicLayoutSearchRoute:pT,ProtectedDynamicLayoutSpacesRoute:pD,ProtectedDynamicLayoutCSpaceSlugRouteRoute:hN,ProtectedDynamicLayoutSSpaceGroupSlugRouteRoute:hA,ProtectedDynamicLayoutUPublicUidRoute:f_}),hR=fY._addFileChildren({ProtectedEmbedCEmbedSpaceSlugEmbedPostSlugRoute:m8,ProtectedEmbedCEmbedSpaceSlugIndexRoute:mP}),hL=pg._addFileChildren({ProtectedEmbedCEmbedSpaceSlugRouteRoute:hR}),hD=fQ._addFileChildren({ProtectedSettingsLayoutSettingsAffiliatesLayoutAffiliates_commissionsRoute:m2,ProtectedSettingsLayoutSettingsAffiliatesLayoutAffiliates_directoryRoute:m1,ProtectedSettingsLayoutSettingsAffiliatesLayoutAffiliates_settingsRoute:m0}),hT=fZ._addFileChildren({ProtectedSettingsLayoutSettingsBillingLayoutBillingRoute:mX,ProtectedSettingsLayoutSettingsBillingLayoutInvoicesRoute:mJ,ProtectedSettingsLayoutSettingsBillingLayoutPayment_detailsRoute:mY}),hM=fG._addFileChildren({ProtectedSettingsLayoutSettingsAnalyticsAi_agentsRouteRoute:bP,ProtectedSettingsLayoutSettingsAnalyticsCoursesRouteRoute:bS,ProtectedSettingsLayoutSettingsAnalyticsDevicesRouteRoute:bO,ProtectedSettingsLayoutSettingsAnalyticsEventsRouteRoute:bw,ProtectedSettingsLayoutSettingsAnalyticsMembersRouteRoute:b_,ProtectedSettingsLayoutSettingsAnalyticsMessagesR
1outeRoute:bj,ProtectedSettingsLayoutSettingsAnalyticsPaymentsRouteRoute:bx,ProtectedSettingsLayoutSettingsAnalyticsPost_commentsRouteRoute:bv,ProtectedSettingsLayoutSettingsAnalyticsSpacesRouteRoute:bg,ProtectedSettingsLayoutSettingsAnalyticsVideosRouteRoute:bh,ProtectedSettingsLayoutSettingsAnalyticsWebsiteRouteRoute:by,ProtectedSettingsLayoutSettingsAnalyticsIndexRoute:mj}),hF=fH._addFileChildren({ProtectedSettingsLayoutSettingsApiNewRouteRoute:bb,ProtectedSettingsLayoutSettingsApiIndexRoute:mx}),hK=fV._addFileChildren({ProtectedSettingsLayoutSettingsCoursesOverviewRoute:mH,ProtectedSettingsLayoutSettingsCoursesIndexRoute:mg,ProtectedSettingsLayoutSettingsCoursesIdEditRoute:yi}),hB=fz._addFileChildren({ProtectedSettingsLayoutSettingsLive_streamsIdRoute:mV,ProtectedSettingsLayoutSettingsLive_streamsIndexRoute:mf}),hq=yb._addFileChildren({ProtectedSettingsLayoutSettingsNewsletterPostsIdContentRoute:yK,ProtectedSettingsLayoutSettingsNewsletterPostsIdPreviewRoute:yF,ProtectedSettingsLayoutSettingsNewsletterPostsIdSettingsRoute:yM}),hU=fU._addFileChildren({ProtectedSettingsLayoutSettingsNewsletterIndexRoute:mu,ProtectedSettingsLayoutSettingsNewsletterPostsIdRouteRoute:hq,ProtectedSettingsLayoutSettingsNewsletterPostsIndexRoute:bR,ProtectedSettingsLayoutSettingsNewsletterSettingsIndexRoute:bE}),hz=fq._addFileChildren({ProtectedSettingsLayoutSettingsPlansIndexRoute:ma}),hW=fB._addFileChildren({ProtectedSettingsLayoutSettingsProfile_fieldsManageRoute:mB,ProtectedSettingsLayoutSettingsProfile_fieldsNewRoute:mK,ProtectedSettingsLayoutSettingsProfile_fieldsIndexRoute:mr,ProtectedSettingsLayoutSettingsProfile_fieldsIdEditRoute:b3}),h$=fK._addFileChildren({ProtectedSettingsLayoutSettingsSegmentsIdRoute:mF,ProtectedSettingsLayoutSettingsSegmentsIndexRoute:mn}),hV=fF._addFileChildren({ProtectedSettingsLayoutSettingsSpacesSplatRoute:mM}),hH=fM._addFileChildren({ProtectedSettingsLayoutSettingsTopicsNewRoute:mT,ProtectedSettingsLayoutSettingsTopicsIndexRoute:f7,ProtectedSettingsLayoutSettingsTopicsTopicIdEditRoute:b2}),hG=hh._addFileChildren({ProtectedSettingsLayoutSettingsWorkflowsNewDynamicIdSendEmailBroadcastIdVisualBuilderRoute:hw,ProtectedSettingsLayoutSettingsWorkflowsNewDynamicIdSendEmailBroadcastIdIndexRoute:hx}),hZ=y1._addFileChildren({ProtectedSettingsLayoutSettingsWorkflowsNewDynamicIdIndexRoute:y8,ProtectedSettingsLayoutSettingsWorkflowsNewDynamicIdSendEmailBroadcastIdRouteRoute:hG}),hQ=hy._addFileChildren({ProtectedSettingsLayoutSettingsWorkflowsNewOne_timeIdSendEmailBroadcastIdVisualBuilderRoute:h_,ProtectedSettingsLayoutSettingsWorkflowsNewOne_timeIdSendEmailBroadcastIdIndexRoute:hv}),hY=y0._addFileChildren({ProtectedSettingsLayoutSettingsWorkflowsNewOne_timeIdIndexRoute:y6,ProtectedSettingsLayoutSettingsWorkflowsNewOne_timeIdSendEmailBroadcastIdRouteRoute:hQ}),hJ=hb._addFileChildren({ProtectedSettingsLayoutSettingsWorkflowsNewScheduledIdSendEmailBroadcastIdVisualBuilderRoute:hj,ProtectedSettingsLayoutSettingsWorkflowsNewScheduledIdSendEmailBroadcastIdIndexRoute:hg}),hX=yX._addFileChildren({ProtectedSettingsLayoutSettingsWorkflowsNewScheduledIdIndexRoute:y5,ProtectedSettingsLayoutSettingsWorkflowsNewScheduledIdSendEmailBroadcastIdRouteRoute:hJ}),h0=bo._addFileChildren({ProtectedSettingsLayoutSettingsWorkflowsNewSelect_typeRoute:b1,ProtectedSettingsLayoutSettingsWorkflowsNewIndexRoute:bN,ProtectedSettingsLayoutSettingsWorkflowsNewDynamicIdRouteRoute:hZ,ProtectedSettingsLayoutSettingsWorkflowsNewOne_timeIdRouteRoute:hY,ProtectedSettingsLayoutSettingsWorkflowsNewScheduledIdRouteRoute:hX,ProtectedSettingsLayoutSettingsWorkflowsNewPreviewIdRoute:yE}),h1=hd._addFileChildren({ProtectedSettingsLayoutSettingsWorkflowsEditIdSendEmailBroadcastIdVisualBuilderRoute:hf,ProtectedSettingsLayoutSettingsWorkflowsEditIdSendEmailBroadcastIdIndexRoute:hp}),h2=yd._addFileChildren({ProtectedSettingsLayoutSettingsWorkflowsEditIdIndexRoute:yO,ProtectedSettingsLayoutSettingsWorkflowsEditIdSendEmailBroadcastIdRouteRoute:h1}),h3=yu._addFileChildren({ProtectedSettingsLayoutSettingsWorkflowsViewIdRunsRoute:yA,ProtectedSettingsLayoutSettingsWorkflowsViewIdIndexRoute:yw}),h4=fT._addFileChildren({ProtectedSettingsLayoutSettingsWorkflowsNewRouteRoute:h0,ProtectedSettingsLayoutSettingsWorkflowsHistoryRoute:mD,ProtectedSettingsLayoutSettingsWorkflowsIndexRoute:f9,ProtectedSettingsLayoutSettingsWorkflowsEditIdRouteRoute:h2,ProtectedSettingsLayoutSettingsWorkflowsViewIdRouteRoute:h3}),h5=bm._addFileChildren({ProtectedSettingsLayoutSettingsCouponsNewTabRoute:ya,ProtectedSettingsLayoutSettingsCouponsNewIndexRoute:bq}),h6=y4._addFileChildren({ProtectedSettingsLayoutSettingsEmailsBroadcastIdViewAnalyticsRoute:hu,ProtectedSettingsLayoutSettingsEmailsBroadcastIdViewIndexRoute:he}),h8=yv._addFileChildren({ProtectedSettingsLayoutSettingsEmailsBroadcastIdViewRouteRoute:h6,ProtectedSettingsLayoutSettingsEmailsBroadcastIdContentRoute:yV,ProtectedSettingsLayoutSettingsEmailsBroadcastIdEditRoute:y$,ProtectedSettingsLayoutSettingsEmailsBroadcastIdVisualBuilderRoute:yW,ProtectedSettingsLayoutSettingsEmailsBroadcastIdIndexRoute:yk}),h9=bf._addFileChildren({ProtectedSettingsLayoutSettingsEmailsBroadcastIdRouteRoute:h8,ProtectedSettingsLayoutSettingsEmailsBroadcastIndexRoute:bB}),h7=yg._addFileChildren({ProtectedSettingsLayoutSettingsEmailsFormsIdTabRoute:yz,ProtectedSettingsLayoutSettingsEmailsFormsIdIndexRoute:yC}),ge=bp._addFileChildren({ProtectedSettingsLayoutSettingsEmailsFormsIdRouteRoute:h7,ProtectedSettingsLayoutSettingsEmailsFormsNewRoute:yo,ProtectedSettingsLayoutSettingsEmailsFormsIndexRoute:bK}),gt=bd._addFileChildren({ProtectedSettingsLayoutSettingsEmailsTemplatesIdRouteRoute:yh,ProtectedSettingsLayoutSettingsEmailsTemplatesIndexRoute:bM}),gn=bu._addFileChildren({ProtectedSettingsLayoutSettingsInvitation_linksNewAccessRoute:yr,ProtectedSettingsLayoutSettingsInvitation_linksNewDetailsRoute:yn,ProtectedSettingsLayoutSettingsInvitation_linksNewPaywallsRoute:yt,ProtectedSettingsLayoutSettingsInvitation_linksNewIndexRoute:bT}),gr=bc._addFileChildren({ProtectedSettingsLayoutSettingsMembersInviteAccessRoute:b7,ProtectedSettingsLayoutSettingsMembersInviteDetailsRoute:b9,ProtectedSettingsLayoutSettingsMembersInviteEmailsRoute:b8,ProtectedSettingsLayoutSettingsMembersInvitePaywallsRoute:b6,ProtectedSettingsLayoutSettingsMembersInviteIndexRoute:bD}),go=bl._addFileChildren({ProtectedSettingsLayoutSettingsMembersOnboardingTabRoute:b5,ProtectedSettingsLayoutSettingsMembersOnboardingIndexRoute:bL}),gi=bs._addFileChildren({ProtectedSettingsLayoutSettingsPaywallsNewChar123TabChar125Route:b4,ProtectedSettingsLayoutSettingsPaywallsNewCheckoutCustomizationRoute:yD,ProtectedSettingsLayoutSettingsPaywallsNewUpsellCustomizationRoute:yL}),ga=y2._addFileChildren({ProtectedSettingsLayoutSettingsPlusPushNotificationsIdViewAnalyticsRoute:hn,ProtectedSettingsLayoutSettingsPlusPushNotificationsIdViewIndexRoute:y9}),gs=yp._addFileChildren({ProtectedSettingsLayoutSettingsPlusPushNotificationsIdViewRouteRoute:ga,ProtectedSettingsLayoutSettingsPlusPushNotificationsIdEditRoute:yR}),gl=ba._addFileChildren({ProtectedSettingsLayoutSettingsPlusPushNotificationsIdRouteRoute:gs,ProtectedSettingsLayoutSettingsPlusPushNotificationsIndexRoute:bA}),gc=yj._addFileChildren({ProtectedSettingsLayoutSettingsAiAgentsEditBotPublicIdAudienceRoute:yJ,ProtectedSettingsLayoutSettingsAiAgentsEditBotPublicIdAutomationsRoute:yY,ProtectedSettingsLayoutSettingsAiAgentsEditBotPublicIdBehaviorRoute:yQ,ProtectedSettingsLayoutSettingsAiAgentsEditBotPublicIdCustomizeRoute:yZ,ProtectedSettingsLayoutSettingsAiAgentsEditBotPublicIdKnowledgeRoute:yG}),gu=yx._addFileChildren({ProtectedSettingsLayoutSettingsCouponsIdEditTabRoute:yH,ProtectedSettingsLayoutSettingsCouponsIdEditIndexRoute:yI}),gd=yy._addFileChildren({ProtectedSettingsLayoutSettingsInvitation_linksIdEditAccessRoute:yU,ProtectedSettingsLayoutSettingsInvitation_linksIdEditDetailsRoute:yq,ProtectedSettingsLayoutSettingsInvitation_linksIdEditPaywallsRoute:yB,ProtectedSettingsLayoutSettingsInvitation_linksIdEditIndexRoute:yP}),gp=y3._addFileChildren({ProtectedSettingsLayoutSettingsPagesEditIdSettingsCode_snippetsRoute:hc,ProtectedSettingsLayoutSettingsPagesEditIdSettingsDefaultsRoute:hl,ProtectedSettingsLayoutSettingsPagesEditIdSettingsNavigationRoute:hs,ProtectedSettingsLayoutSettingsPagesEditIdSettingsRedirectsRoute:ha,ProtectedSettingsLayoutSettingsPagesEditIdSettingsSeoRoute:hi,ProtectedSettingsLayoutSettingsPagesEditIdSettingsIndexRoute:y7}),gf=ym._addFileChildren({ProtectedSettingsLayoutSettingsPagesEditIdSettingsRouteRoute:gp,ProtectedSettingsLayoutSettingsPagesEditIdIndexRoute:yS}),gm=yf._addFileChildren({ProtectedSettingsLayoutSettingsPaywallsIdEditChar123TabChar125Route:yT,ProtectedSettingsLayoutSettingsPaywallsIdEditCheckoutCustomizationRoute:ho,ProtectedSettingsLayoutSettingsPaywallsIdEditUpsellCustomizationRoute:hr}),gb=ph._addFileChildren({ProtectedSettingsLayoutSettingsAffiliatesLayoutRouteRoute:hD,ProtectedSettingsLayoutSettingsBillingLayoutRouteRoute:hT,ProtectedSettingsLayoutSettingsAnalyticsRouteRoute:hM,ProtectedSettingsLayoutSettingsApiRouteRoute:hF,ProtectedSettingsLayoutSettingsCoursesRouteRoute:hK,ProtectedSettingsLayoutSettingsDevelopersRouteRoute:f$,ProtectedSettingsLayoutSettingsFilesRouteRoute:fW,ProtectedSettingsLayoutSettingsLive_streamsRouteRoute:hB,ProtectedSettingsLayoutSettingsNewsletterRouteRoute:hU,ProtectedSettingsLayoutSettingsPlansRouteRoute:hz,ProtectedSettingsLayoutSettingsProfile_fieldsRouteRoute:hW,ProtectedSettingsLayoutSettingsSegmentsRouteRoute:h$,ProtectedSettingsLayoutSettingsSpacesRouteRoute:hV,ProtectedSettingsLayoutSettingsTopicsRouteRoute:hH,ProtectedSettingsLayoutSettingsWorkflowsRouteRoute:h4,ProtectedSettingsLayoutAudienceManageRoute:fj,ProtectedSettingsLayoutContactsImportRoute:fx,ProtectedSettingsLayoutSettingsBranded_appsRoute:fv,ProtectedSettingsLayoutSettingsBranded_apps_builder_landing_pageRoute:fg,ProtectedSettingsLayoutSettingsBranded_apps_builder_uiRoute:fh,ProtectedSettingsLayoutSettingsCode_snippetsRoute:fy,ProtectedSettingsLayoutSettingsCommunity_aiRoute:fb,ProtectedSettingsLayoutSettingsConnectRoute:fm,ProtectedSettingsLayoutSettingsCustom_domainRoute:ff,ProtectedSettingsLayoutSettingsDashboardRoute:fp,ProtectedSettingsLayoutSettingsDiscoverRoute:fd,ProtectedSettingsLayoutSettingsEmbedRoute:fu,ProtectedSettingsLayoutSettingsGamificationRoute:fc,ProtectedSettingsLayoutSettingsGeneralRoute:fl,ProtectedSettingsLayoutSettingsHomeRoute:fs,ProtectedSettingsLayoutSettingsLegalRoute:fa,ProtectedSettingsLayoutSettingsMobile_appRoute:fi,ProtectedSettingsLayoutSettingsNavigationRoute:fo,ProtectedSettingsLayoutSettingsPaywall_bulk_logsRoute:fr,ProtectedSettingsLayoutSettingsPaywall_chargesRoute:fn,ProtectedSettingsLayoutSettingsPaywall_groupsRoute:ft,ProtectedSettingsLayoutSettingsPaywall_payment_settingsRoute:fe,ProtectedSettingsLayoutSettingsPaywall_subscriptionsRoute:p7,ProtectedSettingsLayoutSettingsPaywall_tax_settingsRoute:p9,ProtectedSettingsLayoutSettingsRecap2025Route:p8,ProtectedSettingsLayoutSettingsRedirectsRoute:p6,ProtectedSettingsLayoutSettingsSeoRoute:p5,ProtectedSettingsLayoutSettingsWeekly_digestRoute:p4,ProtectedSettingsLayoutSettingsIndexRoute:pY,ProtectedSettingsLayoutSettingsCouponsNewRouteRoute:h5,ProtectedSettingsLayoutSettingsEmailsBroadcastRouteRoute:h9,ProtectedSettingsLayoutSettingsEmailsFormsRouteRoute:ge,ProtectedSettingsLayoutSettingsEmailsTemplatesRouteRoute:gt,ProtectedSettingsLayoutSettingsInvitation_linksNewRouteRoute:gn,ProtectedSettingsLayoutSettingsMembersInviteRouteRoute:gr,ProtectedSettingsLayoutSettingsMembersOnboardingRouteRoute:go,ProtectedSettingsLayoutSettingsPaywallsNewRouteRoute:gi,ProtectedSettingsLayoutSettingsPlusPushNotificationsRouteRoute:gl,ProtectedSettingsLayoutSettingsPostsBulk_actionsRouteRoute:bi,ProtectedSettingsLayoutMembersInvitation_linksSplatRoute:m6,ProtectedSettingsLayoutMembersInviteSplatRoute:m5,ProtectedSettingsLayoutMembersOnboardingSplatRoute:m4,ProtectedSettingsLayoutMembersProfile_fieldsSplatRoute:m3,ProtectedSettingsLayoutSettingsAudienceConnectRoute:mQ,ProtectedSettingsLayoutSettingsAudienceManageRoute:mZ,ProtectedSettingsLayoutSettingsContactsImportRoute:mG,ProtectedSettingsLayoutSettingsMember_tagsNewRoute:m$,ProtectedSettingsLayoutSettingsMembersActivity_logsRoute:mW,ProtectedSettingsLayoutSettingsMembersBulk_import_tasksRoute:mz,ProtectedSettingsLayoutSettingsModerationEditRoute:mU,ProtectedSettingsLayoutSettingsPlusLiteRoute:mq,ProtectedSettingsLayoutMembersInvitation_linksIndexRoute:mS,ProtectedSettingsLayoutMembersProfile_fieldsIndexRoute:mO,ProtectedSettingsLayoutSettingsAccess_groupsIndexRoute:mw,ProtectedSettingsLayoutSettingsAiInboxIndexRoute:m_,ProtectedSettingsLayoutSettingsCouponsIndexRoute:mv,ProtectedSettingsLayoutSettingsEmailsIndexRoute:mh,ProtectedSettingsLayoutSettingsEventsIndexRoute:my,ProtectedSettingsLayoutSettingsIntegrationsIndexRoute:mb,ProtectedSettingsLayoutSettingsInvitation_linksIndexRoute:mm,ProtectedSettingsLayoutSettingsMember_tagsIndexRoute:mp,ProtectedSettingsLayoutSettingsModerationIndexRoute:md,ProtectedSettingsLayoutSettingsOnboardingIndexRoute:mc,ProtectedSettingsLayoutSettingsPagesIndexRoute:ml,ProtectedSettingsLayoutSettingsPaywallsIndexRoute:ms,ProtectedSettingsLayoutSettingsPlusIndexRoute:mi,ProtectedSettingsLayoutSettingsPostsIndexRoute:mo,ProtectedSettingsLayoutSettingsSsoIndexRoute:mt,ProtectedSettingsLayoutSettingsThemeIndexRoute:me,ProtectedSettingsLayoutSettingsAiAgentsEditBotPublicIdRouteRoute:gc,ProtectedSettingsLayoutSettingsCouponsIdEditRouteRoute:gu,ProtectedSettingsLayoutSettingsInvitation_linksIdEditRouteRoute:gd,ProtectedSettingsLayoutSettingsPagesEditIdRouteRoute:gf,ProtectedSettingsLayoutSettingsPaywallsIdEditRouteRoute:gm,ProtectedSettingsLayoutSettingsAccess_groupsIdEditRoute:yl,ProtectedSettingsLayoutSettingsAiInboxConversationsIdRoute:ys,ProtectedSettingsLayoutSettingsMember_tagsIdEditRoute:ye,ProtectedSettingsLayoutSettingsAccess_groupsIdIndexRoute:bW,ProtectedSettingsLayoutSettingsAiAgentsAgentsIndexRoute:bz,ProtectedSettingsLayoutSettingsAiAgentsKnowledgeIndexRoute:bU,ProtectedSettingsLayoutSettingsEmailsSettingsIndexRoute:bF}),gy=p$._addFileChildren({ProtectedAccountTabBodyAuthenticationRoute:p3,ProtectedAccountTabBodyNotificationsRoute:p2,ProtectedAccountTabBodyPrivacyRoute:p1,ProtectedAccountTabBodyIndexRoute:pQ}),gh=py._addFileChildren({ProtectedAccountTabBodyRouteRoute:gy,ProtectedAccountAffiliateRoute:pL,ProtectedAccountBillingRoute:pR}),gg=pW._addFileChildren({ProtectedAiBriefsIndexRoute:pZ}),gv=pz._addFileChildren({ProtectedAiDailyBriefsDailyBriefIdRoute:p0}
1),gx=pU._addFileChildren({ProtectedAiProjectsProjectIdRoute:pX,ProtectedAiProjectsIndexRoute:pG}),gj=pb._addFileChildren({ProtectedAiBriefsRouteRoute:gg,ProtectedAiDailyBriefsRouteRoute:gv,ProtectedAiProjectsRouteRoute:gx,ProtectedAiConversationIdRoute:pE,ProtectedAiSkillsRoute:pA,ProtectedAiIndexRoute:pw}),g_=pm._addFileChildren({ProtectedMembersSplatRoute:pI,ProtectedMembersConnectionsRoute:pk,ProtectedMembersManageRoute:pC,ProtectedMembersMapRoute:pP,ProtectedMembersIndexRoute:pj}),gw=pf._addFileChildren({ProtectedMessagesUuidRoute:pS,ProtectedMessagesIndexRoute:px,ProtectedMessagesBotIdRoute:pJ}),gO=fD._addFileChildren({ProtectedSettingsInboxAiIndexRoute:f6,ProtectedSettingsInboxAiConversationsIdRoute:bG}),gS=fL._addFileChildren({ProtectedSettingsInboxChatThreadsIdRoute:mR}),gP=fR._addFileChildren({ProtectedSettingsInboxConnectionRequestsIdRoute:mE,ProtectedSettingsInboxConnectionRequestsIndexRoute:f5}),gC=fE._addFileChildren({ProtectedSettingsInboxCourseCommentsChatRoomUuidRoute:mA,ProtectedSettingsInboxCourseCommentsIndexRoute:f4}),gk=fA._addFileChildren({ProtectedSettingsInboxHumanSupportIndexRoute:f3,ProtectedSettingsInboxHumanSupportConversationsIdRoute:bH}),gI=fN._addFileChildren({ProtectedSettingsInboxMessagesUuidRoute:mN,ProtectedSettingsInboxMessagesIndexRoute:f2,ProtectedSettingsInboxMessagesBotIdRoute:bV}),gN=fI._addFileChildren({ProtectedSettingsInboxModerationIdRoute:mI,ProtectedSettingsInboxModerationIndexRoute:f1}),gA=pq._addFileChildren({ProtectedSettingsInboxAiRouteRoute:gO,ProtectedSettingsInboxChatThreadsRouteRoute:gS,ProtectedSettingsInboxConnectionRequestsRouteRoute:gP,ProtectedSettingsInboxCourseCommentsRouteRoute:gC,ProtectedSettingsInboxHumanSupportRouteRoute:gk,ProtectedSettingsInboxMessagesRouteRoute:gI,ProtectedSettingsInboxModerationRouteRoute:gN,ProtectedSettingsInboxNotificationsRouteRoute:fk,ProtectedSettingsInboxIndexRoute:pH}),gE=br._addFileChildren({ProtectedSettingsAdminAudienceSqidSplatRoute:b0,ProtectedSettingsAdminAudienceSqidAccessRoute:bX,ProtectedSettingsAdminAudienceSqidActivity_logsRoute:bJ,ProtectedSettingsAdminAudienceSqidGamificationRoute:bY,ProtectedSettingsAdminAudienceSqidInfoRoute:bQ,ProtectedSettingsAdminAudienceSqidNotesRoute:bZ,ProtectedSettingsAdminAudienceSqidIndexRoute:bI,ProtectedSettingsAdminAudienceSqidBillingIndexRoute:y_,ProtectedSettingsAdminAudienceSqidBillingSubscriptionsNewRoute:ht}),gR=d9._addFileChildren({ProtectedDynamicLayoutRouteRoute:hE,ProtectedEmbedRouteRoute:hL,ProtectedSettingsLayoutRouteRoute:gb,ProtectedAccountRouteRoute:gh,ProtectedAiRouteRoute:gj,ProtectedMembersRouteRoute:g_,ProtectedMessagesRouteRoute:gw,ProtectedBookmarksRoute:pc,ProtectedConnectionsRoute:pl,ProtectedDiscoverRoute:ps,ProtectedLeaderboardRoute:pa,ProtectedNotificationsRoute:pi,ProtectedThreadsRoute:po,ProtectedSettingsInboxRouteRoute:gA,ProtectedGettingStartedAiRoute:pN,ProtectedGettingStartedIndexRoute:p_,ProtectedSettingsAdminAudienceSqidRouteRoute:gE,ProtectedAdminAudienceSqidSplatRoute:mL,ProtectedAdminAudienceSqidIndexRoute:f8,ProtectedSettingsCoursesIdLessonsLessonIdEditRoute:yN}),gL=iQ._addFileChildren({IndexRoute:pe,MinimalRouteRoute:hC,ProtectedRouteRoute:gR,SplatRoute:d8,FeedRoute:d6,HomeRoute:d5,Marketing_emailsM
1arketing_email_preferenceRoute:pr,Marketing_emailsUnsubscribeRoute:pn,PublicUnsubscribeRoute:pt})._addFileTypes(),gD=(0,n(47422).H)({routeTree:gL,context:{queryClient:f.qQ,punditUserContext:void 0}}),gT=function(){var e=(0,u.Od)();return(d(),e.isLoading)?(0,a.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,a.jsx)(s.a,{})}):(0,a.jsx)(p.p,{router:gD,context:{queryClient:f.qQ,punditUserContext:e}})}},853514(e,t,n){"use strict";var r=n(933578),o=(0,r.createContext)({pageViewId:null});o.displayName="AnalyticsPageViewPropertiesContext";var i=function(){return(0,r.useContext)(o)};n.d(t,{Q:()=>i,t:()=>o})},860340(e,t,n){"use strict";n.d(t,{C:()=>"https://play.google.com/store/apps/details?id=",F:()=>"https://circle.so/android"})},182255(e,t,n){"use strict";n.d(t,{k:()=>S});var r=n(391426),o=n(430192),i=n(652392),a=n(568316),s=n(230763),l="circle-app-banner",c=/Android|webOS|Nokia|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,u=/Android/i,d=n(933578),p=n(693546),f=n(382273),m=n(697652);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function h(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v={isMobile:!1,isMobileOsAndroid:!1},x=function(){var e=(0,m.M)(l).getValue,t=g((0,d.useState)(v),2),n=t[0],r=t[1],o=g((0,d.useState)(!1),2),i=o[0],a=o[1],s=g((0,d.useState)(!1),2),b=s[0],x=s[1],j=(0,p.a)().isGettingStartedRoute,_=(0,f.Z)(),w=n.isMobile&&n.isMobileOsAndroid,O=(0,d.useCallback)(function(){document.querySelector('meta[name="google-play-app"]')?a(!0):a(!1)},[]),S=(0,d.useCallback)(function(e){var t=u.test(e);r(function(e){return h(y({},e),{isMobileOsAndroid:t})})},[]),P=(0,d.useCallback)(function(e){var t=c.test(e);r(function(e){return h(y({},e),{isMobile:t})})},[]),C=(0,d.useCallback)(function(){var t=e();if(t){var n=new Date(t.dismissedAt);Math.ceil(Math.abs(new Date().getTime()-n.getTime())/864e5)>15&&x(!0)}else x(!0)},[e]);return(0,d.useEffect)(function(){var e=navigator.userAgent;O(),P(e),S(e),C()},[C,O,P,S]),{shouldRenderAppBanner:i&&b&&w&&!j&&!_}},j=n(417980),_=n(387099),w=n(860340);function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var S=function(){var e,t=(0,j.t)("circle"),n=function(e){if(Array.isArray(e))return e}(e=(0,d.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return O(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return O(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=n[0],u=n[1],p=(0,s.Od)().currentCommunity,f=x().shouldRenderAppBanner,b=(0,m.M)(l).setValue;if((0,d.useEffect)(function(){u(!0)},[]),!p||!f)return null;var y=p.name,h=p.has_branded_app,g=p.android_store_id,v=p.icon_url,S=h&&v,P=function(){u(!1),b({dismissedAt:new Date})},C=S?(0,j.t)("app_banner.logo_alt",{community_name:y}):(0,j.t)("app_banner.logo_alt",{community_name:t}),k=h?(0,j.t)("app_banner.title",{community_name:y}):(0,j.t)("app_banner.title",{community_name:t}),I=h?(0,j.t)("app_banner.description",{community_name:y}):(0,j.t)("app_banner.description",{community_name:t});return(0,r.jsx)(i.V,{shouldCloseOnOutsideClick:!0,shouldShowCloseButton:!1,isOpen:c,contentPortalId:"app-banner-portal",size:"auto",position:"bottom",onClose:P,className:"!h-auto",children:(0,r.jsx)(i.V.Body,{className:"px-8 py-10",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,r.jsx)("div",{className:"border-primary mb-6 flex size-20 items-center rounded-lg border",children:(0,r.jsx)("img",{loading:"lazy",src:S?v:o,alt:C,className:"mx-auto size-14 rounded-lg object-cover"})}),(0,r.jsxs)("div",{className:"mb-8 flex flex-col space-y-2 text-center",children:[(0,r.jsx)(a.o.TitleSm,{weight:"semibold",color:"text-dark",children:k}),(0,r.jsx)(a.o.LabelSm,{color:"text-default",children:I})]}),(0,r.jsx)(_.$,{full:!0,extraLarge:!0,className:"mb-4",onClick:function(){h&&g?window.open(w.C+g,"_blank"):window.open(w.F,"_blank")},children:(0,j.t)("app_banner.download_app_cta")}),(0,r.jsx)(_.$,{variant:"plain",onClick:P,children:(0,j.t)("app_banner.continue_in_browser_cta")})]})})})}},708987(e,t,n){"use strict";n.d(t,{O:()=>U});var r=n(391426),o=n(46346),i=n(257957),a=n(570310),s=n(605274),l=n(325335),c=n(52381),u=n(340479),d=n(817751),p=n(892907),f=n(534529),m=n(451430),b=n(417980),y=n(804939),h=function(e){var t,n=e.children,o=e.bookmark,i=e.bookmarkType,s=(0,y.P)(),l=(null!=(t=(0,c.AG)())?t:{}).onClose,h=void 0===l?m.noop:l;return o.bookmark_record?(0,r.jsx)(f.N_,{to:o.bookmark_record.show_url,className:"w-full",onClick:function(e){(0,u.s6)(e)||h()},children:n}):(0,r.jsxs)("div",{className:(0,a.x)("flex w-full items-center gap-3 rounded-md bg-secondary px-4 py-3",s&&"px-0"),children:[(0,r.jsx)(d.t,{name:"trash-can",size:"sm"}),(0,r.jsx)(p.o5,{variant:"label-sm",children:(0,b.t)("bookmarks.errors.content_removed",{type:(0,b.t)(["bookmarks.singular",i])})})]})},g="user-bookmarks-panel-header",v=n(870969),x=n(748342),j=n(824847),_=n(146917),w=n(34819),O=n(70719),S=n(274685),P=n(545923),C=function(e){var t=e.bookmarkId,n=e.bookmarkType,i=e.bookmarkRecord,a=e.recordId,s=(0,S.jE)(),l=(0,o.T)({bookmarkId:t,bookmarkType:n,onSuccess:function(){("post"===n||"event"===n)&&a&&_.w.postDetails(a),"comment"===n&&i&&"post_id"in i&&(s.refetchQueries({queryKey:(0,P._)({postId:i.post_id,parentCommentId:i.parent_comment_id})}),s.refetchQueries({queryKey:(0,v.A)({postId:i.post_id,id:i.id})}),j.S0.setBookmark({postId:i.post_id,id:i.id,bookmarkId:null})),"message"===n&&a&&x.K.toggleMessageBookmark(a),c()}}),c=l.resetQuery,u=l.deleteBookmark;return(0,r.jsx)(O.t,{align:"end",side:"bottom",options:[{label:(0,b.t)("bookmarks.actions.remove"),icon:"trash-can",danger:!0,onClick:function(){return u()}}],trigger:(0,r.jsx)(w.K,{icon:"dot-menu",size:"sm",variant:"ghost","aria-label":(0,b.t)("options_dropdown")})})},k=n(889828),I=n(844842),N=function(e){var t,n=null!=(t=e.bookmark.bookmark_record)?t:{},o=n.created_at,i=n.title,a=n.author_image,s=n.author_name,l=n.plain_text_body,c=n.attachment_count,u=(0,k.w)({dateTime:o?new Date(o):new Date,format:"long_date"}),d=!!(c&&c>0);return(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2.5",children:[(0,r.jsx)(p.o5,{variant:"label-xs",truncate:!0,children:i}),(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)(I.t,{src:null!=a?a:"",name:null!=s?s:"",size:"lg"}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,r.jsx)(p.o5,{variant:"label-sm",truncate:!0,children:s}),(0,r.jsx)(p.o5,{variant:"caption",color:"tertiary",className:"shrink-0",children:u})]}),l&&""!==l.trim()?(0,r.jsx)(p.o5,{variant:"body-sm",color:"secondary",className:"overflow-anywhere line-clamp-2",children:l}):d&&(0,r.jsx)(p.o5,{variant:"body-sm",color:"secondary",children:(0,b.t)("bookmarks.attachments_count",{count:c}
1)})]})]})]})},A=n(837496),E=n(157576),R=function(e){var t=e.bookmark;if(!t.bookmark_record)return(0,r.jsx)(r.Fragment,{});var n=t.bookmark_record,o=n.title,i=n.start_date,a=n.starts_at,s=n.ends_at,l=n.time_zone,c=n.time_zone_abbreviations,u=(0,E.Wo)(a,l),d=(0,E.Wo)(s,l),f="".concat(u," - ").concat(d," ").concat(void 0===c?"":c);return(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(A.O,{dateString:null!=i?i:""}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,r.jsx)(p.o5,{variant:"label-sm",className:"overflow-anywhere line-clamp-2",children:o}),(0,r.jsx)(p.o5,{variant:"caption",color:"tertiary",children:f})]})]})},L=function(e){var t,n=null!=(t=e.bookmark.bookmark_record)?t:{},o=n.title,i=n.section,a=n.course;return(0,r.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,r.jsx)(p.o5,{variant:"label-xs",className:"overflow-anywhere line-clamp-2",children:a}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(p.o5,{variant:"label-sm",className:"overflow-anywhere line-clamp-2",children:o}),(0,r.jsx)(p.o5,{variant:"caption",color:"tertiary",className:"overflow-anywhere line-clamp-2",children:i})]})]})},D=function(e){var t,n=null!=(t=e.bookmark.bookmark_record)?t:{},o=n.title,i=n.author_image,a=n.author_name,s=n.body_text;return(0,r.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,r.jsx)(p.o5,{variant:"label-xs",truncate:!0,children:o}),(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[a&&(0,r.jsx)(I.t,{name:a,src:null!=i?i:"",size:"md"}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsx)(p.o5,{variant:"label-sm",truncate:!0,children:a}),(0,r.jsx)(p.o5,{variant:"body-sm",color:"secondary",className:"overflow-anywhere line-clamp-2",children:s})]})]})]})},T=n(734527),M=function(e){var t=e.gallery,n=e.attachmentCount,o=t.slice(0,6),i=n-6;return(0,r.jsx)("div",{className:"flex space-x-2",children:o.map(function(e,t){return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("img",{loading:"lazy",src:e.url,alt:e.alt_text||"",className:"aspect-square size-18 rounded-md object-cover"}),5===t&&i>0&&(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center rounded-md bg-black/40",children:(0,r.jsx)("span",{className:"font-bold text-white",children:"+".concat(i)})})]},e.id)})})},F=function(e){var t,n=null!=(t=e.bookmark.bookmark_record)?t:{},o=n.created_at,i=n.title,s=n.author_image,l=n.author_name,c=n.plain_text_body,u=n.attachment_count,d=n.gallery,f=n.hide_meta_info,m=(0,k.w)({dateTime:o?new Date(o):new Date,format:"long_date"}),y=!!(u&&u>0);return(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[!f&&(0,r.jsx)(T.J,{src:null!=s?s:"",name:null!=l?l:"",size:"10"}),(0,r.jsxs)("div",{className:(0,a.x)("flex min-w-0 flex-1 flex-col gap-1",{"pl-[52px]":f}),children:[i&&(0,r.jsx)(p.o5,{variant:"label-sm",className:"overflow-anywhere line-clamp-2",children:i}),!!d&&(0,r.jsx)(M,{gallery:d,attachmentCount:u}),c&&""!==c.trim()?(0,r.jsx)(p.o5,{variant:"body-sm",color:"secondary",className:"overflow-anywhere line-clamp-2",children:c}):y&&!d&&(0,r.jsx)(p.o5,{variant:"body-sm",color:"secondary",children:(0,b.t)("bookmarks.attachments_count",{count:u})}),!f&&(0,r.jsx)(p.o5,{variant:"caption",color:"tertiary",children:(0,r.jsxs)("span",{className:"flex gap-2",children:[(0,r.jsx)("span",{children:l}),(0,r.jsx)("span",{children:m})]})})]})]})},K=function(e){var t=e.bookmark;switch(t.bookmark_type){case"post":return(0,r.jsx)(F,{bookmark:t});case"comment":return(0,r.jsx)(N,{bookmark:t});case"event":return(0,r.jsx)(R,{bookmark:t});case"lesson":return(0,r.jsx)(L,{bookmark:t});case"message":return(0,r.jsx)(D,{bookmark:t});default:return(0,r.jsx)(r.Fragment,{})}},B=function(e){var t=e.children,n=(0,y.P)();return(0,r.jsx)("div",{className:"flex min-h-0 flex-1 flex-col pb-5",children:(0,r.jsx)("div",{className:(0,a.x)("min-h-0 flex-1 overflow-y-auto px-3 pt-2",n&&"px-0"),id:g,children:t})})},q=function(e){var t=e.activeTab,n=(0,y.P)();return(0,r.jsx)("div",{className:(0,a.x)("flex min-h-0 flex-1 flex-col items-center justify-center px-6",n&&"min-h-[50dvh]"),children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3 text-center",children:[(0,r.jsx)(p.o5,{variant:"heading-lg",children:(0,b.t)("header_v3.no_bookmarks_by_type.".concat(t))}),(0,r.jsx)(p.o5,{variant:"body-md",color:"secondary",children:(0,b.t)("header_v3.no_bookmarks_description_by_type.".concat(t))})]})})},U=function(e){var t=e.activeTab,n=void 0===t?"post":t,c=e.scrollableTarget,u=(0,o.T)({bookmarkType:n}),d=u.getBookmarks,p=u.hasNextPage,f=u.fetchNextPage,m=u.isLoading,b=(0,s.A5)();if(m)return(0,r.jsx)(B,{children:(0,r.jsx)(i.a,{center:!0})});var y=d();return y.length?(0,r.jsx)(B,{children:(0,r.jsx)(l.A,{next:f,hasMore:!!p,loader:(0,r.jsx)(i.a,{center:!0}),dataLength:y.length,style:{overflow:"initial"},scrollableTarget:void 0===c?g:c,children:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:y.map(function(e){return(0,r.jsxs)("div",{className:"hover:bg-secondary has-[[data-popup-open]]:bg-secondary has-[:focus-visible]:bg-secondary group flex w-full items-center justify-between rounded-xl px-4 py-3 transition-colors duration-200 ease-in-out",children:[(0,r.jsx)(h,{bookmark:e,bookmarkType:n,children:(0,r.jsx)("div",{className:"flex items-start",children:(0,r.jsx)("div",{className:"flex w-full flex-col space-y-1","data-testid":"bookmarks-detail
1s",children:(0,r.jsx)(K,{bookmark:e})})})}),(0,r.jsx)("div",{className:(0,a.x)("self-start transition-opacity duration-150",{"pointer-events-none opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 has-[:focus-visible]:pointer-events-auto has-[:focus-visible]:opacity-100 has-[[data-popup-open]]:pointer-events-auto has-[[data-popup-open]]:opacity-100":b}),children:(0,r.jsx)(C,{recordId:e.record_id,bookmarkId:e.id,bookmarkType:n,bookmarkRecord:e.bookmark_record})})]},e.id)})})})}):(0,r.jsx)(q,{activeTab:n})}},156532(e,t,n){"use strict";var r=["post","comment","event","lesson","message"];n.d(t,{W:()=>r})},440151(e,t,n){"use strict";var r=n(391426),o=n(133626),i=n(933578),a=n(417980),s=n(804939),l=n(570310),c=n(156532),u=n(708987);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var p=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,i.useState)("post"))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return d(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],p=t[1],f=(0,s.P)();return(0,r.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,r.jsx)("div",{className:(0,l.x)("border-primary flex flex-col items-start border-b px-6 pb-5",{"border-none pb-0":f}),children:(0,r.jsx)(o.t.Root,{tabs:c.W.map(function(e){return{value:e,label:(0,a.t)(["bookmarks.tabs",e])}}),selectedValue:n,onValueChange:function(e){return p(e)},size:"md"})}),(0,r.jsx)(u.O,{activeTab:n})]})};n.d(t,{Bookmarks:()=>p})},687857(e,t,n){"use strict";var r=n(391426),o=n(230763),i=n(519104),a=n(451430),s=n(417980),l=n(387099),c=n(898666),u=n(915779),d=n(429807),p=n(605274),f=n(810327),m=n(244174),b=n(973646);function y(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var h=function(e){var t=e.communityMemberId,n=e.shouldAutoNavigate,h=void 0===n||n,g=e.showIcon,v=e.styleVariant,x=e.onClick,j=void 0===x?a.noop:x,_=e.variant,w=void 0===_?"button":_,O=(0,i.Z)(),S=(0,f.B)(),P=(0,o.Od)().isViewOnlyMasquerading,C=(0,d.n)().findOrCreateChatRoom,k=(0,p.Ab)();return(0,r.jsx)(c.$,{placement:"bottom",content:(0,s.t)("post.share.message"),interactive:!1,disabled:"icon"!==w,children:(0,r.jsxs)(l.$,{variant:void 0===v?"secondary":v,onClick:P?a.noop:function(){var e;return(e=function(){var e;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:return[4,C({kind:m.Br,community_member_ids:[t]})];case 1:var r,o;return e=n.sent(),null==j||j(e),h&&O((r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},(0,u.mF)({uuid:e})),o=o={state:S},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r)),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)})})()},"aria-label":(0,s.t)("post.share.message"),"data-testid":"chat-button",children:[(void 0===g||g)&&(0,r.jsx)(b.In,{type:"16-message",size:16,useWithFillCurrentColor:!0,"aria-hidden":!0}),!k&&"icon"!==w&&(0,r.jsx)("span",{className:"ml-1",children:(0,s.t)("message")})]})})};n.d(t,{o:()=>h})},841957(e,t,n){"use strict";var r=n(391426),o=n(796065),i=n(32435),a=n(620708),s=n(933578),l=(0,a.Z)(function(){return Promise.all([n.e(24014),n.e(10443),n.e(14982),n.e(84338),n.e(9299),n.e(69831)]).then(n.bind(n,984794)).then(function(e){return{default:e.ChatThreadsList}})}),c=function(e){var t=e.isRenderedOnHeader,n=void 0!==t&&t,a=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["isRenderedOnHeader"]),c=n?o.t:i.n;return(0,r.jsx)(s.Suspense,{fallback:(0,r.jsx)(c,{}),children:(0,r.jsx)(l,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({isRenderedOnHeader:n},a))})};n.d(t,{I:()=>c})},862960(e,t,n){"use strict";n.d(t,{Y:()=>p});var r=n(391426),o=n(933578),i=n(570310),a=n(377443),s=n(288513),l=n(963960),c={rel:"noopener noreferrer",target:"_blank"},u=function(e){var t=e.body,n=e.isPinnedMessageAtTop;return(0,r.jsx)("div",{className:(0,i.x)((0,s.W2)(void 0!==n&&n&&"pinned-message-body","chat-message-word-wrap"),l.J),"data-testid":"message-text",children:(0,r.jsx)(a.A,{options:c,children:t})})},d=n(577887),p=(0,o.memo)(function(e){var t,n=e.message,o=e.shouldScrollIntoView,i=e.isPinnedMessageAtTop,a=void 0!==i&&i,s=e.shouldShowPreviewBlocks,l=e.shouldScrollToMessage;return(a?(t=n.rich_text_body)&&0!==t.body.content.length:n.rich_text_body)?(0,r.jsx)(d.u,{rich_text_body:n.rich_text_body,shouldScrollIntoView:void 0!==o&&o,isPinnedMessageAtTop:a,editedAt:n.edited_at,chatRoomAccessArr:n.embedded_chat_message_access,shouldShowPreviewBlocks:void 0===s||s,chatProps:{unfurlUrls:n.unfurl_urls,shouldScrollToMessage:void 0!==l&&l}}):(0,r.jsx)(u,{body:n.body,isPinnedMessageAtTop:a})});p.displayName="ContentBody"},954467(e,t,n){"use strict";var r=n(391426),o=n(417980),i=n(517338),a=n(898666),s=function(e){var t=e.shouldShowTooltip,n=(0,o.t)("messaging.in_review_tooltip");return(0,r.jsx)(a.$,{enabled:void 0===t||t,arrow:!1,className:"inline-flex shrink-0",interactive:!1,placement:"top-start",content:n,children:(0,r.jsx)("span",{className:"inline-flex shrink-0 whitespace-nowrap",children:(0,r.jsx)(i.E,{label:(0,o.t)("messaging.in_review"),variant:"warning",labelClassName:"text-warning font-medium text-xs",className:"!border-none bg-warning/10 px-2"})})})};n.d(t,{L:()=>s})},577887(e,t,n){"use strict";n.d(t,{u:()=>N});var r=n(391426),o=n(495152),i=n(570310),a=n(417980),s=n(674251),l=n(932252),c=n(288513),u=n(963960),d=n(933578),p=function(e){var t,n,o=null!=(t=e.text)?t:"";return(null!=(n=e.marks)?n:[]).reduceRight(function(e,t){switch(t.type){case"bold":return(0,r.jsx)("strong",{children:e});case"italic":return(0,r.jsx)("em",{children:e});case"strike":return(0,r.jsx)("s",{children:e});case"underline":return(0,r.jsx)("u",{children:e});case"highlight":return(0,r.jsx)("mark",{className:"highlight-class",children:e});case"link":var n,o,i,a,s=String(null!=(n=null==(i=t.attrs)?void 0:i.href)?n:""),l=/^(javascript|data):/i.test(s)?"#":s,c=String(null!=(o=null==(a=t.attrs)?void 0:a.target)?o:"_blank");return(0,r.jsx)("a",{href:l,target:c,rel:"noopener noreferrer",className:"text-link",children:e});default:return e}},o)},f=n(304994),m=n(454777),b=n(869954),y=n(661116),h=n(898666),g=function(e){var t=e.entity,n=(0,y.W)(),o=n.navigateToUrl,i=n.isElectron;if(!t)return(0,r.jsx)(h.$,{interactive:!1,content:(0,a.t)("unavailable_entity_message"),placement:"top",children:(0,r.jsx)("span",{className:"text-circle mx-0.5 cursor-pointer rounded-sm bg-indigo-100 px-0.5 font-medium",children:(0,a.t)("unavailable_entity")})});var s=function(e){e&&(i?o(e):window.open(e,"_blank","noreferrer"))}
1,l="space"===t.type||"Space"===t.type,c=(0,m.nl)(t),u=(0,b.t)(t);return(0,r.jsx)(h.$,{interactive:!1,content:c,placement:"top",disabled:!c,children:(0,r.jsx)(f.e,{onClick:function(){return s(u)},isSpace:l,name:t.name||(0,a.t)("tiptap.entity_untitled")})})},v=n(799467),x=function(e){var t=e.mention;return(0,r.jsx)(v.M,{mention:t,isChat:!0})},j=function(e,t){var n;return(null!=(n=e.content)?n:[]).map(function(e,n){return _(e,n,t)})},_=function(e,t,n,o){switch(e.type){case"paragraph":var i,a=j(e,n);return(0,r.jsxs)("p",{children:[a.length>0?a:(0,r.jsx)("br",{}),o]},t);case"text":return(0,r.jsx)(d.Fragment,{children:p(e)},t);case"hardBreak":return(0,r.jsx)("br",{},t);case"blockquote":return(0,r.jsx)("blockquote",{children:j(e,n)},t);case"bulletList":return(0,r.jsx)("ul",{children:j(e,n)},t);case"orderedList":return(0,r.jsx)("ol",{children:j(e,n)},t);case"listItem":return(0,r.jsx)("li",{children:j(e,n)},t);case"mention":var s,l=n[null==(s=e.attrs)?void 0:s.sgid];return l?(0,r.jsx)(x,{mention:l},t):null;case"entity":return(0,r.jsx)(g,{entity:n[null==(i=e.attrs)?void 0:i.sgid]},t);default:return null}},w=n(645765),O=function(e){var t=e.editedAt,n=(0,w.B)(t||new Date().toISOString()),o=n.day,i=n.time;return(0,r.jsx)(h.$,{content:"".concat(o," at ").concat(i),disabled:!t,children:(0,r.jsx)("span",{style:{color:"#717680"},className:"ml-0.5 cursor-default",children:(0,a.t)("edited")})})},S=function(e){var t,n,o=e.body,a=e.editedAt,s=e.sgidToObjectMap,l=void 0===s?{}:s,u=null!=(t=o.content)?t:[],d=u.length-1,p=(null==(n=u[d])?void 0:n.type)==="paragraph",f=a?(0,r.jsx)(O,{editedAt:a}):null;return(0,r.jsxs)("div",{className:(0,i.x)((0,c.W2)("tiptap-editor"),(0,c._h)("readonly"),"whitespace-pre-wrap [overflow-wrap:anywhere]"),children:[u.map(function(e,t){return _(e,t,l,t===d&&p?f:void 0)}),f&&!p?f:null]})},P=new Set(["paragraph","text","hardBreak","blockquote","bulletList","orderedList","listItem","mention","entity"]),C=new Set(["bold","italic","strike","underline","link","highlight"]),k=function(e){var t,n;return!(!e.type||!P.has(e.type)||(null==(t=e.marks)?void 0:t.some(function(e){return!C.has(e.type)})))&&(!(null==(n=e.content)?void 0:n.length)||e.content.every(k))},I=function(e){var t,n=e.attachments,r=e.body,o=e.unfurlUrls;return!!(null==r||null==(t=r.content)?void 0:t.length)&&(!n||!(n.length>0))&&(!o||!(Object.keys(o).length>0))&&r.content.every(k)},N=function(e){var t=e.editedAt,n=e.shouldScrollIntoView,d=e.isPinnedMessageAtTop,p=void 0!==d&&d,f=e.rich_text_body,m=e.chatRoomAccessArr,b=e.shouldShowPreviewBlocks,y=e.chatProps,h=void 0===y?{}:y;if(!f)return null;var g=I({attachments:f.attachments,body:f.body,unfurlUrls:h.unfurlUrls});return(0,r.jsx)(l.t,{renderFunc:function(){return(0,r.jsx)(s.o.LabelSm,{color:"text-v2-danger",children:(0,a.t)("messaging.message_error")})},children:(0,r.jsx)("div",{className:(0,i.x)((0,c.W2)(p&&"pinned-message-body","chat-message-word-wrap"),u.J),"data-testid":"message-text",children:g?(0,r.jsx)(S,{body:f.body,editedAt:t,sgidToObjectMap:f.sgids_to_object_map}):(0,r.jsx)(o.s,{editable:!1,rich_text_body:f,shouldScrollIntoView:void 0!==n&&n,shouldRefetch:!0,isUpdate:p,editedAt:t,chatRoomAccessArr:m,shouldShowPreviewBlocks:void 0===b||b,chatProps:h})})})}},906304(e,t,n){"use strict";var r=n(519104),o=n(597255),i=function(){var e=(0,r.Z)(),t=function(t){var n=t.id,r=t.parent_message_id;r?e({to:".",search:{message_id:n},hash:"message_".concat(r)}):e({to:".",hash:"message_".concat(n)})};return{redirectToMessage:t,handlePinnedMessage:function(e){document.getElementById(e.id)?(0,o.Uv)(e.id):t(e)}}};n.d(t,{O:()=>i})},963960(e,t,n){"use strict";n.d(t,{J:()=>"text-sm font-normal whitespace-pre-line text-darkest"})},625049(e,t,n){"use strict";var r=n(391426),o=n(451251),i=n(844842),a=n(417980),s=n(570310),l=n(199062),c=function(e){var t=e.sender,n=e.isLoading,c=e.onOpenProfile,u=(0,l.S)().isInFrame,d=!!(null==t?void 0:t.user_public_uid)&&!(null==t?void 0:t.is_guest),p=d&&!u;return(0,r.jsx)("button",{type:"button",className:(0,s.x)("mr-3 mt-1 self-start",{"cursor-default":!d}),"aria-label":(0,a.t)("messaging.open_member_profile_button_aria_label",{name:null==t?void 0:t.name}),disabled:!p,onClick:c,children:n||!t?(0,r.jsx)(i.t,{}):(0,r.jsx)(o.C,{communityMemberId:t.community_member_id,name:t.name,publicUid:t.user_public_uid,avatarURL:t.avatar_url,disabled:!p,children:(0,r.jsx)(i.t,{src:t.avatar_url,name:t.name})})})};n.d(t,{b:()=>c})},44773(e,t,n){"use strict";var r=n(534529),o=n(467363),i=n(915779),a=function(e){var t=e.id,n=e.parentMessageId,r=e.chatRoomUrl;return window.location.protocol+"//"+window.location.host+(r||window.location.pathname)+(n?"?message_id=".concat(t,"#message_").concat(n):"#message_".concat(t))},s=function(e){var t=e.activeMessageId,n=e.id,r=e.isMessageThread;return t===l(n,void 0!==r&&r)},l=function(e,t){return"".concat(t?"thread-":"message-").concat(String(e))},c=function(e,t){var n=e.slug,r=e.uuid,o=t.id,a=t.parent_message_id,s=t.embedded?(0,i.M3)({spaceSlug:n}):(0,i.je)({uuid:r}),l="#message_".concat(o);return a&&(l="?message_id=".concat(o,"#message_").concat(a)),"".concat(s).concat(l)},u=function(e,t){var n=e.slug,o=e.uuid,i=t.id,a=t.parent_message_id;return t.embedded?(0,r.dO)({to:"/c/$spaceSlug",params:{spaceSlug:n},hash:a?"message_".concat(a):"message_".concat(i),search:a?{message_id:i}:void 0}):(0,r.dO)({to:"/messages/$uuid",params:{uuid:o},hash:a?"message_".concat(a):"message_".concat(i),search:a?{message_id:i}:void 0})},d=0,p=function(e){var t,n,r,o,i=e.chatRoom,a=e.currentContact,s=e.richTextBody,l=e.localAttachments,c=e.localSgidToObjectMap,u=e.parentMessageId,p=e.creationUuid,f=e.sentAt,m=e.unfurlUrls,b=i.current_participant,y=null==b?void 0:b.id;if(!b||!y)return null;var h={id:--d,chat_room_id:i.id,rich_text_body:(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},s),n=n={attachments:l,sgids_to_object_map:c},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t),body:"",chat_room_uuid:i.uuid,chat_room_participant_id:y,creation_uuid:p,sender:{id:y,community_member_id:b.community_member_id,contact_id:b.contact_id,user_public_uid:b.user_public_uid,name:null!=(r=null==a?void 0:a.name)?r:b.name,avatar_url:null!=(o=null==a?void 0:a.avatar_url)?o:b.avatar_url,is_guest:b.is_guest,community_admin:b.community_admin,moderator:b.admin},reactions:[],parent_message_id:null!=u?u:null,updated_at:f,sent_at:f,created_at:f,chat_thread_id:null};return m&&(h.unfurl_urls=m),u&&(h.parent_message_id=u),h},f=function(e){var t,n=e.rich_text_body,r=e.replies_count;return(null==n||null==(t=n.attachments)?void 0:t.length)>0?"auto 281px":(void 0===r?0:r)>0?"auto 120px":"auto 65px"},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return o.nr||o.HQ||o.un||t?{}:{contentVisibility:"auto",containIntrinsicBlockSize:f(e)}};n.d(t,{B9:()=>c,Hj:()=>p,Nc:()=>s,T$:()=>l,a6:()=>m,lt:()=>a,yT:()=>u})},597255(e,t,n){"use strict";var r=n(374324),o=n(915779),i=n(534529),a=n(451430),s=n(417980),l=n(244174);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u=function(e){var t="";return e.forEach(function(n,r){t=r==e.length-1?t+n.name+".":r==e.length-2?t+n.name+" and ":t+n.name+", "}),t},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth",n=arguments.length>2?arguments[2]:void 0,r=document.getElementById(e),o=setTimeout(function(){null==r||r.scrollIntoView({behavior:t,block:"center"}),null==n||n()},100);return function(){return clearTimeout(o)}},p=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.entries(t||[])[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s,l=(s=i.value,function(e){if(Array.isArray(e))return e}(s)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(s)||function(e){if(e){if("string"==typeof e)return c(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,2)}}(s)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=l[0],d=l[1];if(Array.isArray(d)&&d.includes(e))return u}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},f=function(){return!!document.getElementById("mobile-bottom-toolbar")},m=function(){return!!document.getElementById("bookmarks-bar")},b=function(){return document.getElementById("lesson-hello-bar")?112:r.uF},y=function(e){return e<20?100:e},h=function(e,t){return e.sender.id===t.id},g=function(e,t){return e&&!!e.id&&e.id>0&&(null==e?void 0:e.creation_uuid)===(null==t?void 0:t.creation_uuid)},v=function(){return(window.location.hash||"").split("#message_")[1]},x=function(e,t){return e&&t},j=function(e){var t=e.id,n=e.isPinned,r=e.disableUnreadMessageLine,o=e.unreadMessageId;return!(0,a.isNull)(t)&&!n&&!r&&o===t},_=function(e){var t=e.id,n=e.messageHashId,r=e.messageHighlightId;return n&&t==n||r&&t==r},w=function(e){var t=e.id,n=e.messageHighlightId;return!e.isParentMessage&&n&&t==n},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e>0?"".concat((0,s.t)("messaging.delete_message.description")," ").concat((0,s.t)("messaging.delete_message.threads")):(0,s.t)("messaging.delete_message.description")},S=function(e,t){if((0,a.isEmpty)(e))return"";var n=e.embedded_space,r=e.uuid,i=(n||{}).slug;return t.embedded?(0,o.M3)({spaceSlug:i}):(0,o.je)({uuid:r})},P=function(e,t,n){var r,o,a=e.embedded_space,s=e.uuid,l=(a||{}).slug,c=t.embedded,u=n?C(t):k(t),d=n?void 0:{message_id:t.id};return r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},c?(0,i.dO)({to:"/c/$spaceSlug",params:{spaceSlug:l}}):(0,i.dO)({to:"/messages/$uuid",params:{uuid:s}})),o=o={hash:u,search:d},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r},C=function(e){return"message_".concat(e.id)},k=function(e){return"message_".concat(e.parent_message_id)},I=function(e,t){var n=S(e,t);return"".concat(n,"#message_").concat(t.id)},N=function(e,t){var n=[];return e.forEach(function(e){var r=e.chat_room_participant_id;!e.sender&&(t.find(function(e){return(null==e?void 0:e.id)===r})||n.includes(r)||n.push(r))}),n},A=function(e){return(null==e?void 0:e.chat_room_kind)===l.Br},E=function(e){var t=(e||{}).current_participant,n=void 0===t?{}:t;return!!((null==n?void 0:n.admin)||(null==n?void 0:n.moderator))},R=function(e,t){var n=null;return e?n="fullscreen-modal-body":t&&(n="chat-threads-header"),n};n.d(t,{FU:()=>E,L4:()=>N,Lw:()=>p,UG:()=>96,Uh:()=>u,Uv:()=>d,Uy:()=>h,XL:()=>_,Xf:()=>y,Yo:()=>I,bt:()=>b,c0:()=>64,d$:()=>v,hi:()=>R,lx:()=>O,pA:()=>f,q:()=>P,t9:()=>m,uU:()=>j,vr:()=>w,w_:()=>g,xo:()=>A,yb:()=>x})},665686(e,t,n){"use strict";var r=n(184982),o=n(451430),i=n(258752),a=n(51730),s=n(915779),l=function(e){var t,n=e.debouncedValue,l=e.isDmsPage,c=e.currentSpace,u=(0,r.M)().uuid,d=l?u:null==c?void 0:c.chat_room_uuid,p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return(0,a.i_)(s.iK.search.chatRoomMessages.index({params:{page:e,query:n},chat_room_uuid:null!=d?d:""}))},f=(0,i.qu)({queryKey:["chat-room-message-search",n,d],queryFn:function(e){var t=e.pageParam;return p(void 0===t?1:t)},initialPageParam:1,enabled:!!n,getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},select:function(e){var t=e.pages,n=void 0===t?[]:t;return{pages:(0,o.flatten)(n.map(function(e){return e.records})),pageParams:n.map(function(e){return e.page}),pagesList:n}}}),m=f.data,b=f.fetchNextPage,y=f.hasNextPage,h=f.isInitialLoading;return{messages:null!=(t=null==m?void 0:m.pages)?t:[],fetchNextPage:b,hasNextPage:y,isLoading:h}};n.d(t,{r:()=>l})},364562(e,t,n){"use strict";var r=n(391426),o=n(817751),i=n(892907),a=n(417980),s=function(e){var t=e.name;return(0,r.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[(0,r.jsx)(o.t,{name:"magnifying-glass",size:"md"}),(0,r.jsxs)("div",{className:"w-48 text-center",children:[(0,r.jsx)(i.o5,{variant:"body-sm",children:(0,a.t)("chat_space.search_messages.empty_state")}),(0,r.jsx)(i.o5,{variant:"body-sm",children:t||""})]})]})};n.d(t,{p:()=>s})},144410(e,t,n){"use strict";n.d(t,{s:()=>g});var r=n(391426),o=n(892907),i=n(933578),a=n(325335),s=n(417980),l=n(224444),c=n(645765),u=n(570310),d=n(844842),p=n(862960),f=n(906304),m=n(867494),b=n(605274),y=function(e){var t=e.message,n=e.activeMessageId,i=e.setActiveMessageId,a=e.onNavigate,s=t.sender,l=t.sent_at,y=(0,c.B)(l),h=y.day,g=y.time,v=(0,f.O)().redirectToMessage,x=(0,m.t)(),j=x.toggleShowEmbeddedRailBar,_=x.shouldShowEmbeddedRailBar,w=x.closeThreadsRailbar,O=(0,b.Km)(),S="Today"===h;return(0,r.jsxs)("button",{type:"button",className:(0,u.x)("bg-primary hover:border-hover hover:bg-hover w-full cursor-pointer rounded-lg border px-4 py-3 text-left",n===t.id?"border-hover bg-active":"border-primary"),onClick:function(){_&&j(),O&&w(),i(t.id),v(t),null==a||a()},children:[(0,r.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,r.jsx)("div",{className:"self-start",children:(0,r.jsx)(d.t,{src:s.avatar_url,name:s.name,size:"sm"})}),(0,r.jsx)(o.o5,{variant:"heading-sm",children:s.name}),(0,r.jsx)(o.o5,{variant:"caption",color:"tertiary",children:S?g:h})]}),(0,r.jsx)(p.Y,{message:t,shouldShowPreviewBlocks:!1})]},t.id)};function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var g=function(e){var t,n=e.messages,c=e.fetchNextPage,u=e.hasNextPage,d=e.onNavigate,p=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return h(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return h(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),f=p[0],m=p[1];return(0,r.jsxs)("div",{className:"px-4 pb-2",children:[(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsxs)(o.o5,{variant:"label-xs",color:"tertiary",children:[n.length," ",(0,s.t)("chat_space.search_messages.results")]})}),(0,r.jsx)(a.A,{style:{overflow:"initial",height:"100%"},scrollThreshold:.8,next:c,hasMore:u,loader:(0,r.jsx)(l.y,{}),scrollableTarget:"scrollableMessageSearch",dataLength:(null==n?void 0:n.length)||0,className:"pb-2",children:(0,r.jsx)("div",{className:"space-y-2",children:n.map(function(e){return(0,r.jsx)(y,{message:e,activeMessageId:f,setActiveMessageId:m,onNavigate:d},e.id)})})})]})}},900302(e,t,n){"use strict";n.d(t,{Y:()=>b});var r=n(391426),o=n(355104),i=n(34819),a=n(892907),s=n(451430),l=n(417980),c=function(e){var t=e.isDirect,n=e.onClose,o=void 0===n?s.noop:n;return(0,r.jsx)("div",{className:"flex w-full flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,r.jsx)(a.o5,{variant:"heading-md",children:t?(0,l.t)("profile"):(0,l.t)("chat_space.details")}),(0,r.jsx)(i.K,{icon:"cross",size:"md",variant:"ghost",onClick:o,"aria-label":(0,l.t)("close")})]})})},u=n(973646),d=n(605274),p=n(674251),f=function(e){var t=e.title,n=e.memberCount,o=e.isDirect,i=e.description,a=e.onClose,l=void 0===a?s.noop:a,c=(0,d.Km)();return(0,r.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,r.jsx)(p.o.LabelMd,{as:"h2",weight:"semibold",children:t}),c?(0,r.jsx)("button",{type:"button",onClick:l,children:(0,r.jsx)(u.In,{type:"close-v2",className:"text-dark mr-1 mt-2.5",useWithFillCurrentColor:!0})}):(0,r.jsx)(r.Fragment,{children:!o&&n&&(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"text-default mr-2 pb-0.5",children:(0,r.jsx)(p.o.LabelSm,{weight:"medium",children:n})}),(0,r.jsx)(u.In,{type:"space-chat-members",className:"text-dark",useWithFillCurrentColor:!0})]})})]}),!o&&!!i&&(0,r.jsx)("div",{className:"text-default whitespace-pre-line",children:(0,r.jsx)(p.o.BodySm,{children:i})})]})};function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var b=function(e){return(0,o.c)().isCircleV4?(0,r.jsx)(c,m({},e)):(0,r.jsx)(f,m({},e))}},327006(e,t,n){"use strict";var r=n(244174);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return o(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=[];return e.forEach(function(e){e.admin?t.push(e):n.push(e)}),i(t).concat(i(n))},s=function(e){var t=[],n=[],o=[];return e.filter(function(e){return!e.deleted_at}).forEach(function(e){e.status===r.dm.online?t.push(e):e.status===r.dm.idle?o.push(e):n.push(e)}),{onlineParticipants:i(t).concat(i(o)),offlineParticipants:n}};n.d(t,{WQ:()=>s,pJ:()=>a})},104938(e,t,n){"use strict";var r=n(391426),o=n(417980),i=n(66108),a=function(e){var t=e.showModal,n=e.onClose,a=e.onConfirm,s=e.memberName,l=e.isLoading;return(0,r.jsx)(i.R,{disabled:void 0!==l&&l,isOpen:t,onClose:n,confirmVariant:"danger",size:"lg",onConfirm:a,title:(0,o.t)("messaging.block_direct_messages_modal.title",{name:s}),confirmText:(0,o.t)("messaging.block_direct_messages_modal.confirm"),children:(0,o.t)("messaging.block_direct_messages_modal.description",{name:s})})};n.d(t,{B:()=>a})},979711(e,t,n){"use strict";var r=n(391426),o=n(417980),i=n(66108),a=function(e){var t=e.shouldShowConfirmationModal,n=e.toggleConfirmationModal,a=e.handleSubmit,s=e.chatParticipantsCount;return(0,r.jsx)(i.R,{isOpen:t,onClose:n,onConfirm:function(){a(!0),n()},confirmText:(0,o.t)("send"),title:(0,o.t)("messaging.send_group_message.title",{participants_count:s}),modalBodyClassName:"mb-6",children:(0,o.t)("messaging.send_group_message.description")})};n.d(t,{w:()=>a})},559355(e,t,n){"use strict";var r=n(391426),o=n(933578),i=n(417980),a=n(66108),s=function(e){var t=e.shouldShowPrivateMessageConfirmationModal,n=e.togglePrivateMessageConfirmationModal,s=e.handleSubmit,l=e.shouldShowPrivateMessageConfirmationOnSubmit,c=e.setShouldShowPrivateMessageConfirmationOnSubmit;return(0,o.useEffect)(function(){l||(s(!0),n())},[l,s,n]),(0,r.jsx)(a.R,{isOpen:t,onClose:n,onConfirm:function(){c(!1)},confirmText:(0,i.t)("send"),title:(0,i.t)("messaging.share_private_message.title"),cancelText:(0,i.t)("messaging.edit_message"),modalBodyClassName:"mb-6",children:(0,i.t)("messaging.share_private_message.description")})};n.d(t,{I:()=>s})},80851(e,t,n){"use strict";var r=n(157576),o=n(417980),i=function(e){var t=(0,r.RG)(e.brief_date);return null!=e.day_number?(0,o.t)("circle_ai_home.daily_brief.header_title",{day_number:e.day_number,date:t}):t};n.d(t,{P:()=>i})},139973(e,t,n){"use strict";n.d(t,{U:()=>"dashboard",Z:()=>"settings"})}
1,972181(e,t,n){"use strict";n.d(t,{F:()=>u});var r=n(915779),o=n(602103),i=n(39740),a=n(117034),s=n(417980);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return l(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var u=function(e){var t=new Map(c(e.members).concat(c(e.content),c(e.settings),c(e.paywalls),c(e.affiliates),c(e.site),c(e.email),c(e.plans),c(e.plus),c(e.developers)).map(function(e){return[e.path,e]})),n=function(e){var n=!0,r=!1,o=void 0;try{for(var i,a,s=[e.path].concat(c(null!=(i=e.alternatePaths)?i:[]))[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var l=a.value,u=t.get(l);if(u&&!u.isDisabled)return u}}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}};return[{id:"subscription",label:(0,s.t)("circle_ai_dock.settings.groups.subscription"),icon:"20-plans",compassIcon:"credit-card",items:[{path:r.ty.plans.general,icon:"checklist",labelOverride:(0,s.t)("circle_ai_dock.settings.items.plans"),description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.plans")},{path:r.ty.plans.billing,labelOverride:(0,s.t)("circle_ai_dock.settings.items.billing"),icon:"credit-card",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.billing")},{path:r.ty.plans.payment_details,icon:"credit-card",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.payment")},{path:r.ty.plans.invoices,icon:"checklist",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.invoices")},{path:r.ty.plans.brandedApps,labelOverride:(0,s.t)("settings_nav_v3.plans.plus_label"),icon:"phone",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.circle_plus")}]},{id:"audience",label:(0,s.t)("circle_ai_dock.settings.groups.audience"),icon:"20-members",compassIcon:"group",items:[{path:r.ty.members.onboarding,icon:"steps",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.onboarding")},{path:r.ty.members.gamification,icon:"trophy",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.gamification")},{path:r.ty.members.bulk_logs,icon:"notes",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.bulk_member_actions")},{path:r.ty.members.activity_logs,icon:"chart",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.activity_logs")},{path:o.L.communitySettings(),icon:"people-sparkle",labelOverride:(0,s.t)("circle_ai_dock.settings.items.connect_settings"),description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.connect")}]},{id:"community",label:(0,s.t)("circle_ai_dock.settings.groups.community"),icon:"20-nav-settings",compassIcon:"settings-gear",items:[{path:i.O.theme(),icon:"color-swatch",labelOverride:(0,s.t)("customize_theme.title"),description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.theme")},{path:r.ty.content.moderation,icon:"shield-check",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.moderation")},{path:r.ty.content.posts_bulk_actions,icon:"notes",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.bulk_logs")},{path:i.O.communityAi(),icon:"sparkle",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.community_ai")},{path:i.O.weeklyDigest(),icon:"email",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.weekly_digest")}
1,{path:i.O.mobileApp(),icon:"phone",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.mobile_app")},{path:i.O.embed(),icon:"code-brackets",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.embed")},{path:i.O.singleSignOn(),icon:"lock",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.sso")},{path:i.O.integrations(),icon:"settings-gear",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.integrations")}]},{id:"payments",label:(0,s.t)("circle_ai_dock.settings.groups.payments"),icon:"20-payments",compassIcon:"dollar",items:[{path:r.ty.paywalls.taxes,icon:"receipt-tax",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.taxes")},{path:r.ty.paywalls.bulk_logs,icon:"arrow-box-up",labelOverride:(0,s.t)("circle_ai_dock.build.payment_logs"),description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.export_logs")},{path:r.ty.paywalls.payment_settings,icon:"payment",labelOverride:(0,s.t)("circle_ai_dock.build.payment_settings"),description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.payment_settings")},{path:r.ty.affiliates.settings,icon:"affiliates",labelOverride:(0,s.t)("circle_ai_dock.settings.items.affiliate_settings"),description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.affiliate_settings")}]},{id:"site",label:(0,s.t)("website"),icon:"20-site",compassIcon:"earth",items:[{path:i.O.general(),icon:"settings-gear",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.general")},{path:i.O.customDomain(),icon:"earth",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.custom_domain")},{path:a.u.seo(),icon:"page-search",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.seo")},{path:a.u.redirects(),icon:"wrap-right",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.redirects")},{path:a.u.index(),icon:"page",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.defaults")},{path:i.O.legal(),icon:"file",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.legal")}]},{id:"marketing",label:(0,s.t)("circle_ai_dock.settings.groups.marketing"),icon:"20-send",compassIcon:"paper-plane",items:[{path:r.ty.email.settings,icon:"email",labelOverride:(0,s.t)("circle_ai_dock.settings.items.email_settings"),description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.email_settings")}]},{id:"developers",label:(0,s.t)("circle_ai_dock.settings.groups.developers"),icon:"20-code-tag",compassIcon:"code-syntax",items:[{path:r.ty.developers.overview,icon:"code-brackets",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.developers_overview")},{path:r.ty.developers.api,icon:"vibe-coder",description:(0,s.t)("circle_ai_dock.settings.landing.descriptions.tokens")}]}].map(function(e){var t=e.items.reduce(function(e,t){var r,o,i=n(t);return i&&e.push({id:i.path,label:null!=(r=t.labelOverride)?r:i.label,description:t.description,icon:null!=(o=t.icon)?o:"settings-gear",to:i.path,exact:i.exact}),e},[]);return{group:e,children:t}}).filter(function(e){return e.children.length>0}).map(function(e){var t=e.group,n=e.children;return{id:t.id,label:t.label,icon:t.icon,compassIcon:t.compassIcon,path:n[0].to,children:n}})}},860179(e,t,n){"use strict";var r=function(e){var t=e.exact,n=e.pathname,r=e.to;return void 0!==t&&t?n===r:n===r||n.startsWith("".concat(r,"/"))};n.d(t,{q:()=>r})},333504(e,t,n){"use strict";n.d(t,{x:()=>_});var r,o=n(170922),i=n(230763),a=n(915779),s=n(965216),l=n(788138),c=n(117034),u=n(586555),d=n(417980),p=n(139973),f=n(972181),m=n(849832),b=function(e){return e.filter(function(e){return!e.isDisabled}).map(function(e){return{id:e.path,label:e.label,to:e.path,exact:e.exact}})};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){h(e,t,n[t])})}return e}function v(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return y(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return y(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var x=[{key:"members",compassIcon:"group",compassActiveIcon:"group-filled",label:function(){return(0,d.t)("circle_ai_dock.build.audience")},childLabels:h({},a.ty.members.manage,function(){return(0,d.t)("circle_ai_dock.build.manage_audience")})},{key:"email",compassIcon:"paper-plane",compassActiveIcon:"paper-plane-filled"},{key:"newsletter",compassIcon:"email",compassActiveIcon:"email-filled"},{key:"content",compassIcon:"page",compassActiveIcon:"page-filled",label:function(){return(0,d.t)("circle_ai_dock.build.community")},childOrder:[a.ty.content.posts,a.ty.content.spaces,l.y.index(),a.ty.content.files,a.ty.content.topics,a.ty.content.moderation],childLabels:h({},l.y.index(),function(){return(0,d.t)("circle_ai_dock.build.live_streams")})},{key:"events",compassIcon:"ticket",compassActiveIcon:"ticket-filled"},{key:"courses",compassIcon:"graduate-cap",compassActiveIcon:"graduate-cap-filled"},{key:"workflows",compassIcon:"zap",compassActiveIcon:"zap-filled",childLabels:h({},u.L.list(),function(){return(0,d.t)("circle_ai_dock.build.workflows")})},{key:"community_bot",compassIcon:"sparkle-box",compassActiveIcon:"sparkle-box-filled",label:function(){return(0,d.t)("circle_ai_dock.build.agents")},path:a.ty.community_bot.agents,childOrder:[a.ty.community_bot.agents,a.ty.community_bot.knowledge]},{key:"site",compassIcon:"window",compassActiveIcon:"window-filled",label:function(){return(0,d.t)("website")},path:a.ty.content.pages,children:function(e){var t,n,r=e.subItemsByPathKey,o=new Map(v(null!=(t=r.content)?t:[]).concat(v(null!=(n=r.site)?n:[])).map(function(e){return[e.to,e]}));return[a.ty.content.pages,c.u.navigation(),c.u.codeSnippets()].map(function(e){return o.get(e)}).filter(function(e){return!!e})}},{key:"paywalls",compassIcon:"dollar",compassActiveIcon:"dollar-filled",label:function(){return(0,d.t)("circle_ai_dock.build.payments")},children:function(e){var t=e.fromSettingsNav;return e.isAffiliatesEnabled?t("paywalls","affiliates"):t("paywalls")}},{key:"analytics_v2",compassIcon:"chart-square",compassActiveIcon:"chart-square-filled"}
1,{key:"plus",compassIcon:"phone",compassActiveIcon:"phone-filled",label:function(){return(0,d.t)("circle_ai_dock.build.branded_app")},childLabels:(h(r={},a.ty.plus.landing_page,function(){return(0,d.t)("circle_ai_dock.build.branded_app_builder")}),h(r,a.ty.plus.index,function(){return(0,d.t)("circle_ai_dock.build.branded_app_builder")}),r)}],j=function(e,t){var n=t.map(function(t){var n,r,o,i=null==(o=e.childLabels)?void 0:o[t.to];return i?(n=g({},t),r=r={label:i()},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n):t});if(!e.childOrder)return n;var r=e.childOrder.flatMap(function(e){return n.filter(function(t){return t.to===e})}),o=n.filter(function(t){var n;return!(null==(n=e.childOrder)?void 0:n.includes(t.to))});return v(r).concat(v(o))},_=function(){var e=(0,i.KU)(),t=(0,o.h)(),n=(0,m.$)(),r={members:b(n.members),content:b(n.content),email:b(n.email),newsletter:b(n.newsletter),courses:b(n.courses),workflows:b(n.workflows),analytics_v2:b(n.analytics_v2),community_bot:b(n.community_bot),paywalls:b(n.paywalls),affiliates:b(n.affiliates),plans:b(n.plans),plus:b(n.plus),site:b(n.site),developers:b(n.developers),settings:b(n.settings)},l=new Set(v((0,f.F)(n).flatMap(function(e){var t;return(null!=(t=e.children)?t:[]).map(function(e){return e.to})})).concat([a.ty.content.pages]).filter(function(e){return e!==a.ty.content.moderation})),c={fromSettingsNav:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.flatMap(function(e){var t;return null!=(t=r[e])?t:[]}).filter(function(e){return!l.has(e.to)})},isAffiliatesEnabled:t.some(function(e){return"affiliates"===e.pathKey&&e.enabled}),subItemsByPathKey:r},u=new Map(t.filter(function(e){return e.enabled}).map(function(e){return[e.pathKey,e]})),y=x.flatMap(function(t){var n,r,o,i,s,l,d=u.get(t.key);if(!d||(null==(i=t.isEnabled)?void 0:i.call(t,c))===!1)return[];var p=j(t,null!=(n=null==(s=t.children)?void 0:s.call(t,c))?n:c.fromSettingsNav(t.key)),f="content"!==t.key||e?null!=(r=t.path)?r:d.path:a.ty.content.posts;return[g({id:t.key,label:null!=(o=null==(l=t.label)?void 0:l.call(t))?o:d.label,icon:d.icon,compassIcon:t.compassIcon,compassActiveIcon:t.compassActiveIcon,path:f},p.length?{children:p}:{})]});return e?[{id:p.U,label:(0,d.t)("admin_nav_v4.dashboard"),icon:"dashboard",compassIcon:"compass",compassActiveIcon:"compass-filled",path:s.S.index(),exact:!0}].concat(v(y)):y}},762864(e,t,n){"use strict";n.d(t,{S:()=>w,$:()=>O});var r=n(24814),o=n(230763),i=n(915779),a=n(519104),s=n(417980),l=n(665118),c=n(618817),u=n(911550),d=n(962506),p=n(529883),f=n(27202),m=n(677123),b=n(178905),y=n(555169),h=n(335158),g=n(972717),v=n(933578),x=function(){var e=(0,m.IH)(),t=e.totalUnreadPausedAiChatsCount,n=e.fetchPausedAiUnreadChatsCount,r=(0,g.l)().data,o=(0,b.h)().unreadChatCount,i=(0,f.I)().inboxCount,a=(0,y.V)(),s=(0,h.G)({options:{enabled:a}}).totalQueryAudience;return(0,v.useEffect)(function(){n()},[n]),(void 0===t?0:t)>0||(void 0===r?0:r)>0||(void 0===o?0:o)>0||(void 0===i?0:i)>0||(void 0===s?0:s)>0};function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function _(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}
1var w=function(){var e=(0,o.KU)(),t=(0,o.Od)().isViewOnlyMasquerading,n=(0,r.V)(function(e){return e.conversationPanelState}),f=(0,r.V)(function(e){return e.setConversationPanelState}),m=(0,r.V)(function(e){return e.setAdminDockForced}),b=(0,r.V)(function(e){return e.setMode}),y=(0,c.R)(),h=(0,l.M)(),g=(0,p.U)(),v=g.isAiRoute,x=g.isAiIndexRoute,j=(0,a.Z)(),_=(0,d.B)(function(e){return e.activeConversation.id}),w=(0,d.B)(function(e){return e.startNewChat}),O="closed"!==n,S=(0,u.DU)(),P=[];return S&&e&&!t&&(O||h||v||P.push({id:"circle-ai",label:(0,s.t)("circle_ai_dock.primary.circle_ai"),icon:"sparkles",activeIcon:"sparkles-filled",isActive:O,onClick:function(){var t=!O;f(t?"default":"closed"),e&&(m(t),t||h||v||b("community"))},"data-testid":"circle-ai-shell-dock-ai-toggle"}),y&&(P.push({id:"new-chat",label:(0,s.t)("circle_ai_dock.primary.new_chat"),icon:"circle-plus",activeIcon:"circle-plus-filled",isActive:x&&!_,onClick:function(){w({openPanel:!1}),j({to:"/ai"})}}),P.push({id:"skills",label:(0,s.t)("circle_ai_skills.nav.skills"),icon:"ai-box",activeIcon:"ai-box-filled",to:"/ai/skills",exact:!1}),P.push({id:"circle-ai-projects",label:(0,s.t)("circle_ai_dock.primary.projects"),icon:"folder",activeIcon:"folder-filled",to:"/ai/projects",exact:!1}))),e&&P.push({id:"inbox",label:(0,s.t)("circle_ai_dock.primary.inbox"),icon:"inbox-empty",activeIcon:"inbox-empty",to:i.ty.unified_inbox.index,exact:!1}),{id:"primary",items:P}},O=function(){var e=w(),t=x();return _(j({},e),{items:e.items.map(function(e){return"inbox"===e.id?_(j({},e),{badge:t}):e})})}},402284(e,t,n){"use strict";var r=n(355104),o=function(){return(0,r.c)().isCircleV4};n.d(t,{N:()=>o})},849832(e,t,n){"use strict";var r=n(606549),o=n(320451),i=n(216621),a=n(563536),s=n(777127),l=n(960316),c=n(573669),u=n(523797),d=n(564900),p=n(336783),f=n(384036),m=n(439225),b=n(766894),y=n(320188),h=n(357010),g=function(){return{members:(0,u.x)(),content:(0,a.$v)(),email:(0,c.R)(),newsletter:(0,d.q)(),courses:(0,s.R)(),workflows:(0,h.c)(),analytics_v2:(0,r.T)(),community_bot:(0,i.B)(),paywalls:(0,p.$)(),affiliates:(0,f.O)(),plans:(0,m.p)().links,plus:(0,o.f)(),site:(0,y.U)(),developers:(0,l.o)(),settings:(0,b.W)()}};n.d(t,{$:()=>g})},653529(e,t,n){"use strict";n.d(t,{o:()=>E,k:()=>A});var r=n(391426),o=n(552189),i=n(933578),a=n(258752),s=n(417980),l="circle_ai_home.delete_chat",c="circle_ai_home.conversation_actions",u=n(791009),d=function(e){var t=e.confirmText,n=e.description,o=e.isDeleting,i=e.isOpen,a=e.onCancel,l=e.onConfirm,c=e.title;return(0,r.jsx)(u.a.Root,{open:i,onOpenChange:function(e){e||a()},children:(0,r.jsxs)(u.a.Content,{children:[(0,r.jsx)(u.a.Header,{title:c,showCloseButton:!o}),(0,r.jsx)(u.a.Body,{children:n}),(0,r.jsx)(u.a.Footer,{secondaryAction:o?void 0:{label:(0,s.t)("cancel"),onClick:a,shouldCloseModal:!1},primaryAction:{label:t,variant:"destructive",loading:o,onClick:l,type:"button"}})]})})},p=n(914829);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var m=function(e){var t,n=e.confirmText,o=e.currentTitle,a=e.inputLabel,l=e.isOpen,c=e.isSaving,d=e.onCancel,m=e.onSave,b=e.placeholder,y=e.title,h=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(null!=o?o:""))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return f(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),g=h[0],v=h[1],x=(0,i.useRef)(null);(0,i.useEffect)(function(){if(l){v(null!=o?o:"");var e=requestAnimationFrame(function(){var e;return null==(e=x.current)?void 0:e.select()});return function(){return cancelAnimationFrame(e)}}},[l,o]);var j=g.trim(),_=j===(null!=o?o:"").trim(),w=0===j.length||_||c,O=function(){w||m(j)};return(0,r.jsx)(u.a.Root,{open:l,initialFocus:x,onOpenChange:function(e){e||d()},children:(0,r.jsxs)(u.a.Content,{children:[(0,r.jsx)(u.a.Header,{title:y,showCloseButton:!c}),(0,r.jsx)(u.a.Body,{children:(0,r.jsx)(p.k,{ref:x,name:"conversation-title",label:a,value:g,maxLength:255,placeholder:b,onChange:function(e){return v(e.target.value)},onKeyDown:function(e){"Enter"!==e.key||w||(e.preventDefault(),O())}})}),(0,r.jsx)(u.a.Footer,{secondaryAction:c?void 0:{label:(0,s.t)("cancel"),onClick:d,shouldCloseModal:!1},primaryAction:{label:n,variant:"primary",disabled:w,loading:c,onClick:O,type:"button"}})]})})},b=n(796159),y=n(215089),h=n(962506),g=n(274685),v=n(268342),x=function(){var e=(0,v.o)();return{success:function(t){return e.add({title:t,variant:"primary",icon:"circle-check-filled",iconColor:"success","data-testid":"conversation-action-toast"})},error:function(t){return e.add({title:t,variant:"destructive",icon:"triangle-exclamation-filled",iconColor:"danger","data-testid":"conversation-action-toast"})}}},j=function(e){var t=e.buildMovedMessage,n=e.buildSuccessMessage,r=e.errorMessage,s=e.removeSuccessMessage,l=e.removeErrorMessage,c=(0,g.jE)(),u=x(),d=u.success,p=u.error,f=(0,a.n_)({mutationFn:function(e){var t=e.uuid,n=e.projectId;return b.D.update({id:t,projectId:n})},onSuccess:function(e,t){var n,r,i=t.uuid,a=t.projectId,s=t.successMessage;c.invalidateQueries({queryKey:[y.A]}),c.invalidateQueries({queryKey:o.n4.key()});var l=h.B.getState();i===l.activeConversation.id&&l.setActiveConversation((n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},l.activeConversation),r=r={projectId:a},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n)),d(s)},onError:function(e,t){p(t.errorMessage)}}),m=f.mutate,v=f.isPending;return{addToProject:(0,i.useCallback)(function(e,o){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return m({uuid:e,projectId:o.uuid,successMessage:i?t(o.name):n(o.name),errorMessage:r})},[m,t,n,r]),removeFromProject:(0,i.useCallback)(function(e){return m({uuid:e,projectId:null,successMessage:s,errorMessage:l})},[m,s,l]),isUpdatingProject:v}},_=n(24814),w=n(519104),O=n(16876);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var P=function(e){var t,n=e.errorMessage,r=e.successMessage,o=(0,g.jE)(),s=(0,w.Z)(),l=(0,O._f)(),c=x(),u=c.success,d=c.error,p=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return S(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return S(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),f=p[0],m=p[1],v=(0,a.n_)({mutationFn:function(e){var t=e.uuid;return b.D.destroy({id:t})},onSuccess:function(e,t){var n=t.uuid;o.invalidateQueries({queryKey:[y.A]});var i=h.B.getState(),a=n===i.activeConversation.id,c=l({to:"/ai/$conversationId"});a&&i.startNewChat({openPanel:!1}),c&&c.conversationId===n?s({to:"/ai"}):a&&_.V.getState().setConversationPanelState("closed"),u(r)},onError:function(){d(n)}}),j=v.mutate,P=v.isPending,C=(0,i.useCallback)(function(e){return m({uuid:e.uuid,title:e.title})},[]),k=(0,i.useCallback)(function(){P||m(null)},[P]),I=(0,i.useCallback)(function(){f&&j({uuid:f.uuid},{onSuccess:function(){return m(null)}})},[f,j]);return{conversationPendingDeletion:f,isDeleting:P,requestDelete:C,cancelDelete:k,confirmDelete:I}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var k=function(e){var t,n=e.errorMessage,r=e.successMessage,o=(0,g.jE)(),s=x(),l=s.success,c=s.error,u=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return C(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return C(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=u[0],p=u[1],f=(0,a.n_)({mutationFn:function(e){var t=e.uuid,n=e.title;return b.D.update({id:t,title:n})},onSuccess:function(e,t){var n,i,a=t.uuid,s=t.title;o.invalidateQueries({queryKey:[y.A]});var c=h.B.getState();a===c.activeConversation.id&&c.setActiveConversation((n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},c.activeConversation),i=i={title:s},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n)),l(r)},onError:function(){c(n)}}),m=f.mutate,v=f.isPending,j=(0,i.useCallback)(function(e){return p({uuid:e.uuid,title:e.title})},[]),_=(0,i.useCallback)(function(){v||p(null)},[v]),w=(0,i.useCallback)(function(e){d&&m({uuid:d.uuid,title:e},{onSuccess:function(){return p(null)}})},[d,m]);return{conversationPendingRename:d,isRenaming:v,requestRename:j,cancelRename:_,confirmRename:w}};function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var N=(0,i.createContext)(null);N.displayName="ConversationActionsContext";var A=function(){var e=(0,i.useContext)(N);if(!e)throw Error("useConversationActions must be used within a ConversationActionsProvider");return e},E=function(e){var t,n,u,p,f,b,y,h=e.children,g=(0,i.useMemo)(function(){return{newConversationTitle:(0,s.t)("circle_ai_home.new_conversation"),delete:{menuLabel:(0,s.t)("".concat(l,".actions.delete")),modalTitle:(0,s.t)("".concat(l,".confirm.delete.title")),confirmText:(0,s.t)("".concat(l,".confirm.delete.confirm")),successMessage:(0,s.t)("".concat(l,".toasts.delete_success")),errorMessage:(0,s.t)("".concat(l,".toasts.delete_error"))},rename:{menuLabel:(0,s.t)("".concat(c,".rename.label")),modalTitle:(0,s.t)("".concat(c,".rename.modal.title")),confirmText:(0,s.t)("".concat(c,".rename.modal.confirm")),inputLabel:(0,s.t)("".concat(c,".rename.input_label")),placeholder:(0,s.t)("".concat(c,".rename.modal.placeholder")),successMessage:(0,s.t)("".concat(c,".rename.toasts.success")),errorMessage:(0,s.t)("".concat(c,".rename.toasts.error"))},addToProject:{menuLabel:(0,s.t)("".concat(c,".add_to_project.label")),switchMenuLabel:(0,s.t)("".concat(c,".add_to_project.switch_label")),emptyLabel:(0,s.t)("".concat(c,".add_to_project.empty")),loadingLabel:(0,s.t)("".concat(c,".add_to_project.loading")),errorLabel:(0,s.t)("".concat(c,".add_to_project.load_error")),errorMessage:(0,s.t)("".concat(c,".add_to_project.toasts.error")),buildSuccessMessage:function(e){return(0,s.t)("".concat(c,".add_to_project.toasts.success"),{project:e})},buildMovedMessage:function(e){return(0,s.t)("".concat(c,".add_to_project.toasts.moved"),{project:e})},removeMenuLabel:(0,s.t)("".concat(c,".remove_from_project.label")),removeSuccessMessage:(0,s.t)("".concat(c,".remove_from_project.toasts.success")),removeErrorMessage:(0,s.t)("".concat(c,".remove_from_project.toasts.error"))}}},[]),v=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return I(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return I(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),x=v[0],_=v[1],w=P({successMessage:g.delete.successMessage,errorMessage:g.delete.errorMessage}),O=w.conversationPendingDeletion,S=w.isDeleting,C=w.requestDelete,A=w.cancelDelete,E=w.confirmDelete,R=k({successMessage:g.rename.successMessage,errorMessage:g.rename.errorMessage}),L=R.conversationPendingRename,D=R.isRenaming,T=R.requestRename,M=R.cancelRename,F=R.confirmRename,K=j({buildMovedMessage:g.addToProject.buildMovedMessage,buildSuccessMessage:g.addToProject.buildSuccessMessage,errorMessage:g.addToProject.errorMessage,removeSuccessMessage:g.addToProject.removeSuccessMessage,removeErrorMessage:g.addToProject.removeErrorMessage}),B=K.addToProject,q=K.removeFromProject,U=K.isUpdatingProject,z=(0,a.qu)((n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},o.S_.list()),u=u={enabled:x},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(u)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(u)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(u,e))}),n)),W=z.data,$=z.isLoading,V=z.isError,H=z.isFetching,G=z.hasNextPage,Z=z.fetchNextPage;(0,i.useEffect)(function(){x&&G&&!H&&!V&&Z({cancelRefetch:!1})},[x,G,H,V,Z]);var Q=(0,i.useMemo)(function(){var e;return(null!=(e=null==W?void 0:W.pages.flatMap(function(e){return e.records}))?e:[]).map(function(e){return{uuid:e.uuid,name:e.name}})},[W]);return y=Q.length>0?"ready":$||H?"loading":V?"error":"empty",(0,r.jsxs)(N.Provider,{value:{addToProject:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];U||B(e,t,n)},copy:g,onMenuOpenChange:function(e){e&&_(!0)},projects:Q,projectsState:y,removeFromProject:function(e){U||q(e)},requestDelete:C,requestRename:T},children:[h,(0,r.jsx)(d,{isOpen:!!O,isDeleting:S,onCancel:A,onConfirm:E,title:g.delete.modalTitle,confirmText:g.delete.confirmText,description:(p=null!=(f=null==O?void 0:O.title)?f:g.newConversationTitle,(0,s.t)("".concat(l,".confirm.delete.description"),{title:p}))}),(0,r.jsx)(m,{isOpen:!!L,isSaving:D,currentTitle:null!=(b=null==L?void 0:L.title)?b:null,onCancel:M,onSave:F,title:g.rename.modalTitle,confirmText:g.rename.confirmText,inputLabel:g.rename.inputLabel,placeholder:g.rename.placeholder})]})}},134937(e,t,n){"use strict";n.d(t,{r:()=>c});var r=n(391426),o=n(653529),i=n(34819),a=n(70719),s=n(417980),l=function(e){var t=e.onOpenChange,n=e.options;return(0,r.jsx)(a.t,{align:"end",side:"bottom",options:n,onOpenChange:t,trigger:(0,r.jsx)(i.K,{icon:"dot-menu",variant:"ghost",size:"sm",className:"cursor-pointer","aria-label":(0,s.t)("actions")})})},c=function(e){var t,n=e.conversation,i=(0,o.k)(),a=i.copy,s=i.projectsState,c=i.projects,u=i.onMenuOpenChange,d=i.requestRename,p=i.requestDelete,f=i.addToProject,m=i.removeFromProject,b=c.filter(function(e){return e.uuid!==n.projectUuid}),y=null!=(t=({loading:[{label:a.addToProject.loadingLabel,disabled:!0}],error:[{label:a.addToProject.errorLabel,disabled:!0}]})[s])?t:0===b.length?[{label:a.addToProject.emptyLabel,disabled:!0}]:b.map(function(e){return{label:e.name,onClick:function(){return f(n.uuid,e,!!n.projectUuid)}}}),h=[{icon:"pencil",label:a.rename.menuLabel,onClick:function(){return d(n)}}];return n.isDailyBriefConversation||h.push({icon:"folder",label:n.projectUuid?a.addToProject.switchMenuLabel:a.addToProject.menuLabel,submenu:y}),n.projectUuid&&h.push({icon:"cross",label:a.addToProject.removeMenuLabel,onClick:function(){return m(n.uuid)}}),h.push("divider"),h.push({icon:"trash-can",label:a.delete.menuLabel,danger:!0,onClick:function(){return p(n)}}),(0,r.jsx)(l,{options:h,onOpenChange:u})}},38509(e,t,n){"use strict";var r=n(391426),o=n(817751),i=n(892907),a=n(84201),s=function(e){var t=e.preview,n=e.title;return(0,r.jsxs)(r.Fragment,{children:[n&&(0,r.jsx)(i.o5,{variant:"label-sm",color:"primary",truncate:!0,component:"p",children:n}),t&&(0,r.jsx)(i.o5,{variant:"body-sm",color:"tertiary",truncate:!0,component:"p",children:t})]})},l=function(e){var t=e.actions,n=e.dateLabel,l=e.onClick,c=e.preview,u=e.title,d=e.variant;return"list"===(void 0===d?"card":d)?(0,r.jsxs)("div",{className:"group flex rounded-lg transition-colors hover:bg-secondary",children:[(0,r.jsxs)("button",{type:"button",onClick:l,"data-testid":"circle-ai-project-chat-row",className:"min-w-0 flex-1 p-4 text-left",children:[(0,r.jsx)("div",{className:"space-y-1",children:(0,r.jsx)(s,{title:u,preview:c})}),n&&(0,r.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,r.jsx)(o.t,{name:"clock-dash",size:"sm",color:"tertiary"}),(0,r.jsx)(i.o5,{variant:"caption",color:"tertiary",component:"p",children:n})]})]}),t&&(0,r.jsx)("div",{className:"shrink-0 self-start p-4 ".concat(a.oy),children:t})]}):(0,r.jsxs)("div",{className:"group flex rounded-lg border border-secondary bg-primary shadow-2xs transition-colors hover:bg-secondary",children:[(0,r.jsxs)("button",{type:"button",onClick:l,className:"min-w-0 flex-1 space-y-1 p-4 text-left",children:[n&&(0,r.jsx)(i.o5,{variant:"caption",color:"disabled",component:"p",children:n}),(0,r.jsx)(s,{title:u,preview:c})]}),t&&(0,r.jsx)("div",{className:"shrink-0 self-start p-4 pl-0 ".concat(a.oy),children:t})]})};n.d(t,{s:()=>l})},294985(e,t,n){"use strict";var r=n(391426),o=n(622559),i=n(24814),a=n(80851),s=n(552189),l=n(99654),c=n(892907),u=n(534529),d=n(258752),p=n(417980),f=n(962506),m=n(36913),b=n(444153),y=n(682610),h=n(653529),g=n(134937),v=function(e){var t,n,v=e.surface,x="hidden"===(0,m.L)(),j=(0,f.B)(function(e){return e.activeConversation.id}),_=(0,f.B)(function(e){return e.activeConversation.title}),w=(0,f.B)(function(e){return e.activeConversation.projectId}),O=(0,f.B)(function(e){return e.activeConversation.dailyBrief}),S=(0,f.B)(function(e){return e.activeConversation.dailyBriefConversation}),P=(0,i.V)(function(e){return e.conversationPanelState}),C=(0,i.V)(function(e){return e.setConversationPanelState}),k=(0,d.IT)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},s.S_.detail(null!=w?w:"")),n=n={enabled:!!w},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)).data,I=w&&k,N=O?(0,a.P)(O):_||(0,p.t)("circle_v4.conversation_panel.title"),A="panel"===v,E=!A||"fullscreen"===P,R=!!j&&E,L=A&&"default"===P,D=function(){A&&"fullscreen"===P&&C("default")},T=(I||O)&&{label:I?I.name:(0,p.t)("".concat(b.IA,".title")),renderLink:I?(0,r.jsx)(u.N_,{to:y.$T,params:{projectId:I.uuid},onClick:D}):(0,r.jsx)(u.N_,{to:b.Ui,onClick:D})};return x?null:(0,r.jsxs)("div",{"data-testid":"circle-ai-conversation-header",className:"flex h-16 shrink-0 items-center justify-between gap-2.5 px-5 py-3",children:[(0,r.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[T&&(0,r.jsx)(l.BI,{items:[T,{label:N}],size:"sm"}),!T&&(0,r.jsx)(c.o5,{variant:"heading-sm",color:"primary",children:N})]}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[R&&j&&(0,r.jsx)(h.o,{children:(0,r.jsx)(g.r,{conversation:{uuid:j,title:_,projectUuid:w,isDailyBriefConversation:!!S}})}),A&&(0,r.jsx)(o.i.ConversationPanelFullscreenButton,{}),L&&(0,r.jsx)(o.i.ConversationPanelCloseButton,{})]})]})};n.d(t,{h:()=>v})},215089(e,t,n){"use strict";var r=n(796159),o=n(258752),i="circle-ai-conversations",a=function(e){var t=e.query,n=e.enabled,a=e.perPage,s=void 0===a?20:a;return(0,o.qu)({queryKey:[i,t,s],queryFn:function(e){var n=e.pageParam;return r.D.list({params:{page:void 0===n?1:n,per_page:s,query:t}})},enabled:void 0===n||n,initialPageParam:1,getNextPageParam:function(e){var t=e.pagination;if(t.page*t.per_page<t.total_count)return t.page+1}})};n.d(t,{A:()=>i,U:()=>a})},97742(e,t,n){"use strict";var r=n(391426),o=n(617593),i=function(){return(0,r.jsxs)("output",{"aria-busy":"true","aria-live":"polite",className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)(o.E,{className:"h-4 w-2/3"}),(0,r.jsx)(o.E,{className:"h-4 w-1/2"})]}),(0,r.jsx)(o.E,{className:"h-52 w-full"}),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)(o.E,{className:"h-4 w-1/3"}),(0,r.jsx)(o.E,{className:"h-3 w-full"}),(0,r.jsx)(o.E,{className:"h-3 w-11/12"}),(0,r.jsx)(o.E,{className:"h-3 w-3/4"})]})]})};n.d(t,{M:()=>i})},84201(e,t,n){"use strict";n.d(t,{$_:()=>3e3,BQ:()=>6e4,MS:()=>"CircleAi::ConversationChannel",OS:()=>"/internal_api/circle_ai/claude_status",S3:()=>"https://status.claude.com",S9:()=>20,_s:()=>"circle-ai-onboarding-message-scroll-view",c1:()=>"circle-ai-message-scroll-view",dN:()=>4e3,f6:()=>1e3,h:()=>100,jF:()=>3e4,mU:()=>400,oy:()=>"pointer-events-auto opacity-100 [@media(hover:hover)]:pointer-events-none [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover:pointer-events-auto [@media(hover:hover)]:group-hover:opacity-100 [@media(hover:hover)]:group-focus-within:pointer-events-auto [@media(hover:hover)]:group-focus-within:opacity-100 has-[[data-popup-open]]:pointer-events-auto has-[[data-popup-open]]:opacity-100",qx:()=>3e4})},739745(e,t,n){"use strict";var r=n(230763),o=n(933578);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a=function(){var e,t=(0,r.Od)(),n=t.onboardingFlags,a=t.currentCommunity,s=t.currentCommunityMember,l=!!(null==n?void 0:n.suf_onboarding_replit),c=(null==s?void 0:s.id)===(null==a?void 0:a.owner_community_member_id),u=l&&c&&!(null==a?void 0:a.replit_onboarding_questions_answered),d=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(u))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return i(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=d[0],f=d[1];return u&&!p&&f(!0),p};n.d(t,{B:()=>a})},553648(e,t,n){"use strict";n.d(t,{J:()=>"circle_ai_conversation",e:()=>"circle_ai_panel"})},911550(e,t,n){"use strict";var r=n(450225),o=function(){return(0,r.nR)("circle_ai_enabled")},i=function(){return(0,r.nR)("circle_ai_daily_brief_enabled")},a=function(){return(0,r.nR)("circle_ai_debug_panel_enabled")},s=function(){return(0,r.nR)("circle_ai_credits_management_enabled")},l=function(e){return!!(null==e?void 0:e.circle_ai_onboarding_enabled)};n.d(t,{DU:()=>o,Nl:()=>l,ON:()=>i,S_:()=>s,yT:()=>a})},962506(e,t,n){"use strict";var r=n(24814),o=n(698804),i=n(167928),a={page:function(){},panel:function(){}},s=(0,o.vt)()((0,i.Zr)(function(e,t){return{activeConversation:{id:null,title:null,projectId:null},analyticsReportArtefactUuid:null,isDockRecentChatsOpen:!1,isFullPageAiMode:!1,isRecentChatsOpen:!1,pendingComposerDraft:null,loadConversation:function(){},pendingInitialMessage:null,switchToNewThread:function(){a.page(),a.panel()},openAnalyticsReport:function(t){e({analyticsReportArtefactUuid:t}),r.V.getState().setConversationPanelState("default")},closeAnalyticsReport:function(){e({analyticsReportArtefactUuid:null}),r.V.getState().setConversationPanelState("fullscreen")},clearAnalyticsReport:function(){return e({analyticsReportArtefactUuid:null})},setActiveConversation:function(t){return e({activeConversation:t})},setDockRecentChatsOpen:function(t){return e({isDockRecentChatsOpen:t})},setFullPageAiMode:function(t){return e({isFullPageAiMode:t})},setIsRecentChatsOpen:function(t){return e({isRecentChatsOpen:t})},setLoadConversation:function(t){return e({loadConversation:t})},setPendingComposerDraft:function(t){return e({pendingComposerDraft:t})},setPendingInitialMessage:function(t){return e({pendingInitialMessage:t})},setSwitchToNewThread:function(e,t){a[e]=t},startChatWithPrompt:function(n,r){e({pendingComposerDraft:{target:(null==r?void 0:r.openPanel)===!1?"page":"panel",text:n}}),t().startNewChat(r)},startNewChat:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.openPanel;e({activeConversation:{id:null,title:null,projectId:null,dailyBrief:null},analyticsReportArtefactUuid:null,isRecentChatsOpen:!1}),t().switchToNewThread(),(void 0===o||o)&&r.V.getState().setConversationPanelState("fullscreen")},openConversation:function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e({activeConversation:{id:n,title:o,projectId:i,dailyBrief:null},analyticsReportArtefactUuid:null,isRecentChatsOpen:!1,isDockRecentChatsOpen:!1}),t().loadConversation(n);var a=r.V.getState();"fullscreen"!==a.conversationPanelState&&a.setConversationPanelState("default")},toggleRecentChats:function(){var n=r.V.getState();if("closed"===n.conversationPanelState){n.setConversationPanelState("default"),e({isRecentChatsOpen:!0});return}e({isRecentChatsOpen:!t().isRecentChatsOpen})}}},{name:"circle-ai-home",version:2,partialize:function(e){return{activeConversation:{id:e.activeConversation.id,title:null}}}}));n.d(t,{B:()=>s})},529883(e,t,n){"use strict";var r=n(16876),o=n(109257),i=function(){var e=(0,r._f)(),t=!!e({to:"/ai"}),n=(0,o.k)({select:function(e){return e.matches.some(function(e){return"/_protected/ai/$conversationId"===e.routeId})}}),i=!!e({to:"/ai/projects",fuzzy:!0}),a=!!e({to:"/ai",fuzzy:!0}),s=(0,o.k)({select:function(e){return e.matches.some(function(e){return"/_protected/ai/daily-briefs/$dailyBriefId"===e.routeId})}});return{isAiRoute:a,isAiConversationRoute:n,isFullPageAiRoute:t||n||s,isAiIndexRoute:t,isAiProjectsRoute:i}};n.d(t,{U:()=>i})},127140(e,t,n){"use strict";var r=n(519104),o=n(962506),i=n(529883),a=function(){var e=(0,r.Z)(),t=(0,i.U)().isFullPageAiRoute,n=(0,o.B)(function(e){return e.openConversation});return function(r,o,i){t?e({to:"/ai/$conversationId",params:{conversationId:r}}):n(r,o,i)}};n.d(t,{N:()=>a})},36913(e,t,n){"use strict";n.d(t,{L:()=>c,U:()=>l});var r=n(24814),o=n(933578),i=(0,n(698804).vt)()(function(e){return{phase:"idle",setPhase:function(t){return e({phase:t})}}}),a=n(529883),s=n(36329),l=function(){var e=(0,a.U)().isAiRoute,t=(0,s.E)(),n=(0,o.useRef)(t),l=i(function(e){return e.phase}),c=i(function(e){return e.setPhase});(0,o.useEffect)(function(){if(n.current&&!t&&e){c("holding");var o=r.V.getState();o.isDockManualOverride||o.setDockMode("expanded")}n.current=t},[t,e,c]),(0,o.useEffect)(function(){if("holding"===l){var e=setTimeout(function(){return c("revealing")},2500);return function(){return clearTimeout(e)}}
1if("revealing"===l){var t=setTimeout(function(){return c("idle")},1200);return function(){return clearTimeout(t)}}},[l,c])},c=function(){var e=(0,s.E)(),t=i(function(e){return e.phase});return e||"holding"===t?"hidden":"revealing"===t?"revealing":"visible"}},36329(e,t,n){"use strict";var r=n(529883),o=n(230763),i=function(){var e,t=(0,r.U)().isAiRoute,n=(0,o.qE)(),i=(0,o.KU)(),a=!!(null==(e=(0,o.Od)().currentCommunity)?void 0:e.basic_questions_completed);return n&&t&&i&&!a};n.d(t,{E:()=>i})},674553(e,t,n){"use strict";var r=n(391426),o=n(933578),i=(0,o.createContext)(null);i.displayName="CommentsConfigContext";var a=function(e){var t=e.children,n=e.canCompose,a=e.isCommentsClosed,s=e.isCommentsEnabled,l=e.isEmbedded,c=e.isLikingEnabled,u=e.isReadOnly,d=e.isReplyingEnabled,p=e.onCommentCreated,f=e.onCommentDeleted,m=e.path,b=e.postId,y=e.spaceId,h=(0,o.useMemo)(function(){return{canCompose:n,isCommentsClosed:a,isCommentsEnabled:s,isEmbedded:l,isLikingEnabled:c,isReadOnly:u,isReplyingEnabled:d,onCommentCreated:p,onCommentDeleted:f,path:m,postId:b,spaceId:y}},[n,a,s,l,c,u,d,p,f,m,b,y]);return(0,r.jsx)(i.Provider,{value:h,children:t})},s=function(){var e=(0,o.useContext)(i);if(!e)throw Error("useCommentsConfig must be used inside Comments.Provider.");return e};n.d(t,{e:()=>s,o:()=>a})},740712(e,t,n){"use strict";n.d(t,{f:()=>d,$:()=>p});var r=n(391426),o=n(933578),i=n(460842);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var s=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return a(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return{requestComposerFocus:(0,o.useCallback)(function(e){return r(e)},[]),clearComposerFocusRequest:(0,o.useCallback)(function(){return r(null)},[]),isTopLevelFocusPending:(null==n?void 0:n.kind)==="top-level",matchReplyFocusTarget:(0,o.useCallback)(function(e){return(null==n?void 0:n.kind)==="reply"&&n.commentId===e?n:null},[n])}};function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var u=(0,o.createContext)(null);u.displayName="CommentsSectionContext";var d=function(e){var t=e.children,n=c((0,o.useState)(!0),2),a=n[0],l=n[1],d=c((0,o.useState)(!1),2),p=d[0],f=d[1],m=(0,i.g)(),b=s(),y=b.requestComposerFocus,h=b.clearComposerFocusRequest,g=b.isTopLevelFocusPending,v=b.matchReplyFocusTarget,x=(0,o.useCallback)(function(){l(function(e){return!e})},[]),j=(0,o.useCallback)(function(){l(!0),y({kind:"top-level"})},[y]),_=(0,o.useCallback)(function(){f(!1)},[]);(0,o.useEffect)(function(){m&&(l(!0),f(!0))},[m]);var w=(0,o.useMemo)(function(){return{clearComposerFocusRequest:h,clearSectionScrollRequest:_,focusComposer:j,isCommentsOpen:a,isSectionScrollPending:p,isTopLevelFocusPending:g,matchReplyFocusTarget:v,requestComposerFocus:y,toggleComments:x}},[h,_,j,a,p,g,v,y,x]);return(0,r.jsx)(u.Provider,{value:w,children:t})},p=function(){var e=(0,o.useContext)(u);if(!e)throw Error("Comments section state is unavailable — mount Comments.Provider around the comments UI and any external 
1controls (engagement bars, comment buttons) that interact with it.");return e}},9995(e,t,n){"use strict";var r="comment_wrapper_",o="#".concat(r),i=["poll","ai_copilot","cta"];n.d(t,{eV:()=>i,ho:()=>r,r0:()=>o})},755018(e,t,n){"use strict";n.d(t,{H:()=>nR});var r=n(391426),o=n(230763),i=n(765724),a=n(915779),s=n(739042),l=n(892907),c=n(417980),u=n(674553),d=n(627539),p=n(547570),f=n(345451),m=n(910846),b=n(933578);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var h=(0,b.createContext)(null);h.displayName="CommentsContainerContext";var g=(0,b.forwardRef)(function(e,t){var n,o=e.children,i=(0,b.useRef)(null),a=(0,b.useMemo)(function(){return(0,m.A)(i,t)},[t]),s=function(e){if(Array.isArray(e))return e}(n=(0,b.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(n)||function(e){if(e){if("string"==typeof e)return y(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return y(e,2)}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1];(0,b.useLayoutEffect)(function(){var e=i.current;if(e){var t=function(){return c(e.offsetWidth<=480)};t();var n=new ResizeObserver(t);return n.observe(e),function(){return n.disconnect()}}},[]);var u=(0,b.useMemo)(function(){return{isNarrow:l}},[l]);return(0,r.jsx)(h.Provider,{value:u,children:(0,r.jsx)("div",{ref:a,children:o})})});g.displayName="CommentsContainer";var v=function(){var e=(0,b.useContext)(h);if(!e)throw Error("useCommentsContainer must be used inside a CommentsContainer.");return e},x=n(817751),j="comments.error_boundary",_=function(e){e.error;var t=e.resetState;return(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3 py-6 text-center",children:[(0,r.jsx)(x.t,{name:"triangle-exclamation-filled",color:"danger",size:"lg"}),(0,r.jsx)(l.o5,{variant:"heading-md",color:"primary",children:(0,c.t)([j,"title"])}),(0,r.jsx)(l.o5,{variant:"body-sm",color:"secondary",children:(0,c.t)([j,"description"])}),(0,r.jsx)(s.$,{variant:"primary",onClick:t,size:"md",children:(0,c.t)([j,"try_again"])}),!1]})},w=n(740712),O=n(519104),S=n(310860),P=n(9995),C=n(998597),k=n(547938),I=n(472385),N=/^\d+$/,A=function(e){return"".concat(P.ho).concat(e)},E=function(e){if(!e.startsWith(P.r0))return null;var t=e.slice(P.r0.length);return N.test(t)?Number(t):null},R=function(){var e=(0,O.Z)(),t=(0,C.zf)(),n=(0,C.HH)(),r=n.spaceSlug,o=n.postSlug,i=(0,S.z)({select:function(e){var t,n;return null!=(t=null==(n=e.maskedLocation)?void 0:n.hash)?t:""}}),a=(0,S.z)({select:function(e){var t;return null!=(t=e.hash)?t:""}}),s=(0,u.e)(),l=s.isEmbedded,c=s.path;return{deepLinkedCommentId:E((0,I.f)(t?i:a)),getCommentLinkProps:(0,b.useCallback)(function(e){return{to:c,hash:A(e),target:l?"_blank":void 0,rel:l?"noreferrer":void 0}},[c,l]),getCommentUrl:(0,b.useCallback)(function(e){return new URL((0,k.n)({pathname:c,hash:A(e)}),window.location.origin).href},[c]),showAllComments:(0,b.useCallback)(function(){t&&r&&o?e({replace:!0,state:function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={__commentsAllView:Date.now()},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t},mask:{to:"/c/$spaceSlug/$postSlug",params:{spaceSlug:r,postSlug:o},hash:"",unmaskOnReload:!0}}):e({replace:!0,hash:""})},[t,e,o,r])}},L=n(570310),D=n(927561),T=n(844842),M=n(258752),F=n(717526),K=n(51730),B=n(824847),q=function(e){var t=e.postId,n=e.parentCommentId,r=e.onSuccess,o=(0,F.d)().error;return{createComment:(0,M.n_)({mutationFn:function(e){return(0,K.oK)(a.iK.comments.create({postId:t}),{comment:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({parent_comment_id:n},e)})},onSuccess:function(e){B.S0.add({postId:t,parentCommentId:n,comment:e}),r(e)},onError:function(){return o((0,c.t)("comments.create.alerts.failure"))}}).mutateAsync}},U=n(288513),z=n(80816),W=n(531404),$=n(34819),V=n(361971),H=function(e){if(!e)return!0;var t=e.content;return!t||0===t.length||t.every(function(e){return"paragraph"===e.type&&(!e.content||0===e.content.length)})},G=function(e){return"tiptap"===e.editor},Z=function(e){return"CommunityAiAgent"===e.community_member.type},Q=function(e){return!!e.flagged_for_approval_at},Y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.filter(function(e){var t;return!!(e.is_public&&(null==(t=e.display_locations)?void 0:t.post_bio))})},J=n(383711),X=n(504531),ee=n(750127);function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function en(e){return function(e){if(Array.isArray(e))return et(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return et(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return et(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var er=function(){var e,t,n=(0,V.xW)(),r=n.setValue,o=n.getValues,i=n.watch;return{body:i("tiptap_body.body"),sgidMap:null!=(e=i("tiptap_body.sgids_to_object_map"))?e:{},inlineAttachments:null!=(t=i("tiptap_body.inline_attachments"))?t:[],mergeSgidMap:function(e){var t;r("tiptap_body.sgids_to_object_map",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},null!=(t=o("tiptap_body.sgids_to_object_map"))?t:{},e))},mergeInlineAttachments:function(e){var t;r("tiptap_body.inline_attachments",Array.from(new Set(en(null!=(t=o("tiptap_body.inline_attachments"))?t:[]).concat(en(e)))))}}},eo=function(e){var t=e.autoFocus,n=e.editorApiRef,o=e.formId,i=e.hideSubmitButton,a=e.isCollapsed,s=void 0!==a&&a,l=e.placeholder,u=void 0===l?(0,c.t)("comments.form.fields.body_placeholder"):l,d=e.shouldSupportTables,p=e.spaceId,f=e.submitLabel,m=void 0===f?(0,c.t)("comments.create.actions.submit"):f,y=e.toolbar,h=void 0===y?z.y:y,g=(0,X.b)(),v=(0,J.D)(),x=(0,V.lN)().isSubmitting,j=er(),_=j.body,w=j.sgidMap,O=j.inlineAttachments,S=j.mergeSgidMap,C=j.mergeInlineAttachments,k=H(_)||x,I=(0,b.useRef)(null);(0,ee.B)({enabled:!k,targetRef:I});var N=(0,b.useId)().replaceAll(":",""),A="comment-toolbar-".concat(N);return(0,r.jsxs)("div",{ref:I,className:(0,L.x)("rounded-xl border border-primary transition-all duration-300 ease-in-out focus-within:border-light active:border-light",s?"py-[9px]":"pb-2 pt-3",{"pointer-events-none opacity-50":x}),children:[(0,r.jsx)("div",{className:"flex min-h-6 items-center px-4",children:(0,r.jsx)(W.P,{variant:"compact",editorApiRef:n,autofocus:!!(void 0!==t&&t)&&"end",placeholder:u,name:"tiptap_body.body",toolbars:[{portalId:A,component:h}],className:"max-h-72 w-full overflow-y-auto",spaceId:p,sgidToObjectMap:w,inlineAttachments:O,onLocalSgidToObjectMapChange:S,onLocalAttachmentsChange:C,disabledExtensions:P.eV,isVoiceMessageAllowed:v,isMediaUploadAllowed:g,isVideoClipAllowed:!0,allowBubbleMenuOverflow:!1,shouldSupportTables:void 0!==d&&d})}),(0,r.jsxs)("div",{className:(0,L.x)("flex items-end justify-between overflow-hidden px-2 transition-all duration-300 ease-in-out",s?"h-0 opacity-0":"h-[50px] opacity-100"),children:[(0,r.jsx)("div",{id:A,className:"scrollbar-hide min-w-0 overflow-x-auto overflow-y-hidden"}),!(void 0!==i&&i)&&(0,r.jsx)($.K,{type:"submit",form:o,variant:"branded",size:"md",icon:"arrow-up",loading:x,disabled:k,"aria-label":m})]})]})},ei=["file","gif"],ea=function(e){var t,n;return(0,r.jsx)(z.y,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={hiddenButtons:ei},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},es=n(168293);function el(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ec=function(e){var t=e.parentCommentId,n=(0,u.e)().postId;return t?"post-".concat(n,"-comment-").concat(t,"-reply-form-values"):"post-".concat(n,"-comment-form-values")},eu=function(e){var t,n=ec({parentCommentId:e.parentCommentId}),r=(0,es.bE)({cacheKey:n}).getPersistedFormFieldValues;return{storedDraft:(function(e){if(Array.isArray(e))return e}(t=(0,b.useState)(function(){var e,t=null==(e=r())?void 0:e.tiptap_body;return H(null==t?void 0:t.body)?void 0:t}))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return el(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return el(e,1)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]}},ed=function(e){var t=e.parentCommentId,n=(0,V.lN)(),r=n.isDirty,o=n.isSubmitting,i=n.isSubmitSuccessful,a=ec({parentCommentId:t});(0,es.Bp)({cacheKey:a,fields:["tiptap_body"],enabled:r&&!o&&!i}),(0,b.useEffect)(function(){i&&(0,es.XF)(a)},[i,a])},ep=(0,b.createContext)(null);ep.displayName="CommentsScrollContext";var ef=function(e,t){requestAnimationFrame(function(){e.scrollIntoView(t)})},em=function(e){var t=e.children,n=e.isAutoScrollEnabled,o=(0,b.useRef)(new Map),i=(0,b.useRef)(null),a=(0,b.useRef)(null),s=(0,b.useCallback)(function(e){if(n){var t=o.current.get(e);t?ef(t,{block:"center",behavior:"instant"}):i.current=e}},[n]),l=(0,b.useCallback)(function(e,t){t?(o.current.set(e,t),i.current===e&&(i.current=null,ef(t,{block:"center",behavior:"instant"}))):o.current.delete(e)},[]),c=(0,b.useCallback)(function(e){i.current===e&&(i.current=null)},[]),u=(0,b.useCallback)(function(e){a.current=e},[]),d=(0,b.useCallback)(function(){n&&a.current&&ef(a.current,{block:"start",behavior:"smooth"})},[n]),p=(0,b.useCallback)(function(e){n&&e&&ef(e,{block:"center",behavior:"smooth"})},[n]),f=(0,b.useMemo)(function(){return{cancelScrollToComment:c,registerCommentScrollTarget:l,registerSectionScrollTarget:u,requestScrollToComment:s,scrollToComposer:p,scrollToSection:d}},[c,l,u,s,p,d]);return(0,r.jsx)(ep.Provider,{value:f,children:t})},eb=function(){var e=(0,b.useContext)(ep);if(!e)throw Error("useCommentsScroll must be used inside Comments.Provider.");return e},ey=function(e){var t=eb().registerCommentScrollTarget;return(0,b.useCallback)(function(n){t(e,n)},[t,e])},eh=function(e){var t=e.editorApiRef,n=e.wrapperRef,r=e.initialContent,o=e.isFocusPending,i=e.onFocusHandled,a=eb().scrollToComposer;(0,b.useEffect)(function(){if(o){var e=setTimeout(function(){var e=t.current;e&&(r&&e.isEmpty()&&e.setContent(r.body,{sgidToObjectMap:r.sgids_to_object_map}),e.focus(),a(n.current),i())},0);return function(){return clearTimeout(e)}}},[n,t,r,o,i,a])};function eg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ev=function(e){var t,n=e.wrapperRef,r=e.isCollapsible,o=(0,V.xW)().getValues,i=(0,b.useRef)(!1),a=function(e){if(Array.isArray(e))return e}(t=(0,b.useState)(function(){return!H(o("tiptap_body.body"))}))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eg(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eg(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=a[0],l=a[1];(0,b.useEffect)(function(){if(r){var e=function(e){var t,r,o;return r=e.target,(null!=(o=Node)&&"u">typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](r):r instanceof o)&&!!(null==(t=n.current)?void 0:t.contains(e.target))},t=function(t){i.current=e(t)},o=function(t){i.current="Tab"!==t.key&&e(t)};return document.addEventListener("pointerdown",t,!0),document.addEventListener("keydown",o,!0),function(){document.removeEventListener("pointerdown",t,!0),document.removeEventListener("keydown",o,!0)}}},[r,n]);var c=(0,b.useCallback)(function(){return l(!1)},[]);return r?{isCollapsed:!s,collapse:c,onFocus:function(){return l(!0)},onBlur:function(e){var t,r=e.relatedTarget;r&&(null==(t=n.current)?void 0:t.contains(r))||!i.current&&H(o("tiptap_body.body"))&&l(!1)}}:{isCollapsed:!1,collapse:c,onFocus:void 0,onBlur:void 0}},ex=n(859214);function ej(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var e_=function(e,t){if(!e)return null;var n,r,o=e.id,i=e.type,a=e.rich_text_field_sgid;return a&&o!==t&&"CommunityMember"===i?(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ej(e,t,n[t])})}return e}({},(0,ex.aK)({bodyContent:[(0,ex.uj)({content:[(0,ex.wO)({sgid:a}),(0,ex.fI)({text:" "})]})]})),r=r={sgids_to_object_map:ej({},a,e)},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n):null},ew=function(e){var t=(0,o.Od)().currentCommunityMember;return(0,b.useMemo)(function(){return e_(e,null==t?void 0:t.id)},[e,null==t?void 0:t.id])},eO=function(e){var t=e.editorApiRef,n=e.collapse,r=e.shouldRefocus,o=(0,V.xW)().reset,i=(0,V.lN)().isSubmitSuccessful;(0,b.useEffect)(function(){var e,a,s;i&&(o({tiptap_body:void 0}),null==(e=t.current)||e.reset(),r?null==(a=t.current)||a.focus():null==(s=t.current)||s.blur(),n())},[i,o,n,r,t])},eS="comments.form.fields",eP=function(e){var t=e.isCollapsible,n=void 0!==t&&t,o=e.mentionCommunityMember,i=e.parentCommentId,a=e.replyToCommunityMember,s=e.isFocusPending,l=e.onFocusHandled,d=(0,u.e)().spaceId,p=v().isNarrow,f=(0,b.useRef)(null),m=(0,b.useRef)(null),y=ev({wrapperRef:f,isCollapsible:n}),h=y.isCollapsed,g=y.collapse,x=y.onFocus,j=y.onBlur;ed({parentCommentId:i}),eh({editorApiRef:m,wrapperRef:f,initialContent:ew(o),isFocusPending:s,onFocusHandled:l}),eO({editorApiRef:m,collapse:g,shouldRefocus:!n});var _=a?(0,c.t)([eS,"body_reply_placeholder"],{name:a.name}):(0,c.t)([eS,"body_placeholder"]);return(0,r.jsx)("div",{ref:f,onFocus:x,onBlur:j,children:(0,r.jsx)(eo,{editorApiRef:m,isCollapsed:h,placeholder:_,spaceId:d,toolbar:p?ea:z.y})})};function eC(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var ek=function(e){var t,n,i,a=e.className,s=e.isCollapsible,l=e.mentionCommunityMember,c=e.parentCommentId,d=e.replyToCommunityMember,p=e.isFocusPending,f=e.onCreate,m=e.onFocusHandled,b=(0,u.e)(),y=b.onCommentCreated,h=b.postId,g=(0,o.Od)().currentCommunityMember,v=eu({parentCommentId:c}).storedDraft,x=q({postId:h,parentCommentId:c,onSuccess:function(e){y(e),null==f||f(e)}}).createComment;return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:a},(0,U.Bs)({anchor:"comment-composer"})),n=n={children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)(T.t,{size:c?"md":"lg",name:null!=(i=null==g?void 0:g.name)?i:"",src:null==g?void 0:g.avatar_url}),(0,r.jsx)(D.l,{className:"relative min-w-0 flex-1",defaultValues:{tiptap_body:v},onSubmit:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return[4,x(e)];case 1:return t.sent(),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){eC(i,r,o,a,s,"next",e)}function s(e){eC(i,r,o,a,s,"throw",e)}a(void 0)})})()},children:(0,r.jsx)(eP,{isCollapsible:s,mentionCommunityMember:l,parentCommentId:c,replyToCommunityMember:d,isFocusPending:p,onFocusHandled:m})})]})}
1,Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},eI=n(228464),eN=n(617593),eA=n(224444),eE=n(288349),eR=function(e){var t=e.postId,n=e.id,r=(0,M.IT)(B.Kd.hierarchy({postId:t,id:n}));return{comment:r.data,isLoading:r.isLoading}},eL=n(70719),eD=n(316172),eT=n.n(eD),eM=n(46346),eF=function(e){var t=e.comment,n=t.id,r=t.post_id,o=t.bookmark_id,i=(0,eM.T)({bookmarkId:o,bookmarkType:"comment",record:t,onSuccess:function(e){return B.S0.setBookmark({postId:r,id:n,bookmarkId:e})},disableFetch:!0}),a=i.createBookmark,s=i.deleteBookmark;return{toggleBookmark:function(){o?s():a()}}},eK=n(791009),eB="comments.delete",eq=function(e){var t=e.comment,n=e.onSuccess,r=t.id,o=t.post_id,i=t.parent_comment_id,s=(0,F.d)(),l=s.success,u=s.error,d=(0,M.n_)({mutationFn:function(){return(0,K.Dc)(a.iK.comments.destroy({postId:o,id:r}))},onSuccess:function(){B.S0.remove({postId:o,id:r,parentCommentId:i}),n(),l((0,c.t)([eB,"alerts.success"]))},onError:function(){u((0,c.t)([eB,"alerts.failure"]))}});return{deleteComment:d.mutate,isPending:d.isPending}},eU=n(974618),ez="comments.delete",eW=eU.PT.create(function(e){var t=e.comment,n=e.onCommentDeleted,o=(0,eU.hS)(),i=eq({comment:t,onSuccess:function(){null==n||n(t),o.hide()}}),a=i.deleteComment,s=i.isPending;return(0,r.jsx)(eK.a.Root,{open:o.visible,onOpenChange:function(e){e||o.hide()},onOpenChangeComplete:function(e){e||o.remove()},children:(0,r.jsxs)(eK.a.Content,{children:[(0,r.jsx)(eK.a.Header,{title:(0,c.t)([ez,"confirm.title"]),showCloseButton:!0}),(0,r.jsx)(eK.a.Body,{children:(0,c.t)([ez,"confirm.description"])}),(0,r.jsx)(eK.a.Footer,{secondaryAction:{label:(0,c.t)([ez,"actions.cancel"]),onClick:function(){o.hide()}},primaryAction:{type:"button",label:(0,c.t)([ez,"actions.delete"]),variant:"destructive",loading:s,onClick:function(){return a()}}})]})})}),e$="comments.edit",eV=function(e){var t=e.comment,n=e.onSuccess,r=t.id,o=t.post_id,i=(0,F.d)(),s=i.success,l=i.error;return{updateComment:(0,M.n_)({mutationFn:function(e){return(0,K.kS)(a.iK.comments.update({postId:o,id:r}),{comment:e})},onSuccess:function(e){B.S0.update({postId:o,id:r,updater:function(t){var n,r;return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),r=r={replies:t.replies},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n}}),n(),s((0,c.t)([e$,"alerts.success"]))},onError:function(){l((0,c.t)([e$,"alerts.failure"]))}}).mutateAsync}},eH=n(461795),eG="comments.edit",eZ=function(e){var t=e.children,n=e.formId,o=e.disabled,i=(0,eU.hS)(),a=(0,eH.u)(),s=(0,V.lN)(),l=s.isSubmitting,u=s.isDirty,d=function(){u?a.show({onConfirm:function(){i.hide()}}):i.hide()};return(0,r.jsx)(eK.a.Root,{open:i.visible,onOpenChange:function(e){e||d()},onOpenChangeComplete:function(e){e||i.remove()},size:"md",children:(0,r.jsxs)(eK.a.Content,{children:[(0,r.jsx)(eK.a.Header,{title:(0,c.t)([eG,"form.title"]),showCloseButton:!0}),(0,r.jsx)(eK.a.Body,{children:t}),(0,r.jsx)(eK.a.Footer,{secondaryAction:{label:(0,c.t)([eG,"actions.cancel"]),onClick:d,shouldCloseModal:!1},primaryAction:{type:"submit",form:n,label:(0,c.t)([eG,"actions.save_changes"]),loading:l,disabled:o}})]})})},eQ="comment-edit-tiptap-form",eY=function(e){var t=e.shouldSupportTables,n=e.spaceId,o=(0,V.xW)().control,i=(0,V.FH)({control:o,name:"tiptap_body.body"});return(0,r.jsx)(eZ,{formId:eQ,disabled:H(i),children:(0,r.jsx)(eo,{formId:eQ,spaceId:n,shouldSupportTables:t,hideSubmitButton:!0,autoFocus:!0})})};function eJ(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var eX=function(e){var t=e.comment,n=e.spaceId,o=(0,eU.hS)(),i=eV({comment:t,onSuccess:function(){o.hide()}}).updateComment;return(0,r.jsx)(D.l,{id:eQ,defaultValues:{tiptap_body:t.tiptap_body},onSubmit:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return[4,i(e)];case 1:return t.sent(),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){eJ(i,r,o,a,s,"next",e)}function s(e){eJ(i,r,o,a,s,"throw",e)}a(void 0)})})()},preventAccidentalLeave:!0,children:(0,r.jsx)(eY,{shouldSupportTables:Z(t),spaceId:n})})},e0=n(914104),e1="comment-edit-trix-form",e2=function(e){var t=e.spaceId,n=(0,V.xW)(),o=n.control,i=n.formState.isSubmitting,a=!(0,V.FH)({control:o,name:"body"});return(0,ee.B)({enabled:!a&&!i}),(0,r.jsx)(eZ,{formId:e1,disabled:a,children:(0,r.jsx)("div",{className:"nEWytIJDGroOxfCJ",children:(0,r.jsx)(e0.k,{id:"comment-edit-body",name:"body",placeholder:(0,c.t)("comments.form.fields.body_placeholder"),className:"h-full",editorContainerClassName:"flex flex-col h-full",textboxClassName:"overflow-auto rounded-md py-4 sm:max-h-[40vh]",space_id:t})})})};function e3(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var e4=function(e){var t=e.comment,n=e.spaceId,o=(0,eU.hS)(),i=eV({comment:t,onSuccess:function(){o.hide()}}).updateComment;return(0,r.jsx)(D.l,{id:e1,defaultValues:{body:t.body_for_editor},onSubmit:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return[4,i(e)];case 1:return t.sent(),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){e3(i,r,o,a,s,"next",e)}function s(e){e3(i,r,o,a,s,"throw",e)}a(void 0)})})()},preventAccidentalLeave:!0,children:(0,r.jsx)(e2,{spaceId:n})})},e5=eU.PT.create(function(e){var t=e.comment,n=e.spaceId;return G(t)?(0,r.jsx)(eX,{comment:t,spaceId:n}):(0,r.jsx)(e4,{comment:t,spaceId:n})}),e6=n(477593);function e8(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function e9(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var e7="comments.report",te=function(e){var t=e.comment,n=e.onSuccess,r=t.id,o=t.post_id,i=(0,F.d)(),s=i.success,l=i.error,u=(0,M.n_)({mutationFn:function(e){return(0,K.oK)(a.iK.flaggedContent.create(),{flagged_content:e9(e8({},e),{flagged_contentable_id:r,flagged_contentable_type:e6.lr})})},onSuccess:function(){B.S0.update({postId:o,id:r,updater:function(e){return e9(e8({},e),{unresolved_flagged_reports_count:e.unresolved_flagged_reports_count+1})}}),n(),s((0,c.t)([e7,"alerts.success"]))},onError:function(){l((0,c.t)([e7,"alerts.failure"]))}});return{reportComment:u.mutate,isPending:u.isPending}},tt=n(894723),tn=n(6418),tr="comments.report",to="report-comment-modal-form",ti=["harassment","spam","incorrect_location","against_guidelines","other"],ta=eU.PT.create(function(e){var t=e.comment,n=(0,eU.hS)(),i=(0,o.Od)().currentCommunityMember,a=te({comment:t,onSuccess:function(){(0,tn.V8)(i)&&eU.PT.show(tt.A,{templateKey:"ai_moderate_new_comments"}),n.hide()}}),s=a.reportComment,l=a.isPending,u=ti.map(function(e){return{value:e,label:(0,c.t)([tr,"form.reasons",e])}});return(0,r.jsx)(eK.a.Root,{open:n.visible,onOpenChange:function(e){e||n.hide()},onOpenChangeComplete:function(e){e||n.remove()},size:"md",children:(0,r.jsxs)(eK.a.Content,{children:[(0,r.jsx)(eK.a.Header,{title:(0,c.t)([tr,"form.title"])}),(0,r.jsx)(eK.a.Body,{children:(0,r.jsxs)(D.l,{id:to,defaultValues:{reported_reason_body:"",reported_reason_type:""},onSubmit:function(e){return s(e)},children:[(0,r.jsx)(D.l.Item,{hideBorder:!0,isFirstChild:!0,name:"reported_reason_type",rules:{required:(0,c.t)([tr,"form.this_field_is_required"])},translationRoot:"".concat(tr,".form"),children:(0,r.jsx)(D.l.SelectNative,{name:"reported_reason_type",options:u,prompt:(0,c.t)([tr,"form.reported_reason_type_select"])})}),(0,r.jsx)(D.l.Item,{fullWidth:!0,hideBorder:!0,name:"reported_reason_body",translationRoot:"".concat(tr,".form"),children:(0,r.jsx)(D.l.TextArea,{name:"reported_reason_body"})})]})}),(0,r.jsx)(eK.a.Footer,{secondaryAction:{label:(0,c.t)([tr,"actions.cancel"]),onClick:function(){n.hide()}},primaryAction:{type:"submit",form:to,label:(0,c.t)([tr,"actions.submit"]),loading:l}})]})})}),ts=function(e){var t=e.policies;return{canBookmark:t.can_bookmark,canDestroy:t.can_destroy,canEdit:t.can_edit,canModerate:t.can_manage,canReport:t.can_report}},tl=n(555376),tc="comments.action_menu",tu=function(e){var t=(0,u.e)(),n=t.spaceId,r=t.isReadOnly,o=t.onCommentDeleted,i=R(),a=i.getCommentUrl,s=i.deepLinkedCommentId,l=i.showAllComments,d=ts(e),p=d.canReport,f=d.canEdit,m=d.canDestroy,b=d.canBookmark,y=(0,F.d)().success,h=eF({comment:e}).toggleBookmark,g=(0,eU.hS)(e5),v=(0,eU.hS)(ta),x=(0,eU.hS)(eW),j=function(e){o(e),s&&!e.parent_comment_id&&l()};return[b&&{label:e.bookmark_id?(0,c.t)([tc,"bookmark.remove"]):(0,c.t)([tc,"bookmark.add"]),disabled:r,onClick:h},p&&!Q(e)&&{label:(0,c.t)([tc,"report.label"]),disabled:r,onClick:function(){v.show({comment:e})}},f&&{label:(0,c.t)([tc,"edit.label"]),disabled:r,onClick:function(){g.show({comment:e,spaceId:n})}},{label:(0,c.t)([tc,"copy_url.label"]),onClick:function(){eT()(a(e.id)),y((0,c.t)([tc,"copy_url.url_copied"]))}},m&&{label:(0,c.t)([tc,"delete.label"]),danger:!0,disabled:r,onClick:function(){x.show({comment:e,onCommentDeleted:j})}}].filter(tl.z)},td=function(e){var t=tu(e.comment);return(0,u.e)().isEmbedded||!t.length?null:(0,r.jsx)("div",{className:"flex h-5 items-center",children:(0,r.jsx)(eL.t,{align:"end",side:"bottom",options:t,trigger:(0,r.jsx)($.K,{"aria-label":(0,c.t)("comments.actions"),icon:"dot-menu",size:"sm",variant:"ghost"})})})},tp=n(955015),tf=n(409858),tm=n(275603),tb=n(488441),ty=function(e){var t,n=e.community_member,r=(0,tb.l)({public_uid:null!=(t=n.public_uid)?t:"",params:{show_back_link:!0}}),o=(0,tm.w)({id:n.id,params:{show_back_link:!0}});return Z(e)?o:r},th=n(790389),tg=n(314054),tv=n(922896),tx=n(202090),tj=function(e){var t=(0,tx.wR)().isDarkAppearance?e.custom_emoji_dark_url||e.custom_emoji_url:e.custom_emoji_url||e.custom_emoji_dark_url;return t?{emojiUrl:t}:e.emoji?{emoji:e.emoji}:{}},t_=function(e){var t,n,o=e.tag,i="icon"===o.display_format,a=i&&!o.emoji&&!o.custom_emoji_url&&!o.custom_emoji_dark_url,s=o.is_background_enabled?o.color:void 0,l=!!s,c=tj(o);if(a)return null;var u=s?{"--color-background-badge-branded":s,"--color-text-badge-branded":(0,tv.Mj)(s).isDark()?"#ffffff"
1:"#000000","--color-border-badge-branded":s}:void 0,d=(0,r.jsx)(tp.E,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},c),n=n={style:u,label:!i&&o.name||"",variant:l?"branded":"secondary"},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t));return i&&o.name?(0,r.jsx)(tg.m,{content:o.name,children:d}):d};function tw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var tO="comments.author_tags",tS=function(e){var t,n,o,i=e.comment,a=v().isNarrow,s=[];if(Z(i)&&s.push((0,r.jsx)(tp.E,{variant:"secondary",icon:"sparkles",label:(0,c.t)([tO,"ai_agent"])},"ai-agent")),i.community_member.admin&&s.push((0,r.jsx)(tp.E,tw({label:(0,c.t)([tO,"admin"])},(0,U.Bs)({anchor:"comment-author-admin-tag"})),"admin")),Y(null!=(o=i.member_tags)?o:[]).forEach(function(e){s.push((0,r.jsx)(t_,{tag:e},e.id))}),!s.length)return null;var l=i.parent_comment_id||a?1:2,u=s.slice(0,l),d=s.slice(l);return(0,r.jsxs)("div",(t=tw({className:"flex items-center gap-1"},(0,U.Bs)({anchor:"comment-author-tags"})),n=n={children:[u,d.length>0&&(0,r.jsx)(th.A,{trigger:(0,r.jsx)("button",{type:"button",className:"inline-flex cursor-pointer rounded-md focus-visible:shadow-focus focus-visible:outline-none",children:(0,r.jsx)(tp.E,{label:"+".concat(d.length),variant:"secondary"})}),children:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:d})})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},tP=n(534529),tC=n(199563),tk=n(328187);function tI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var tN=function(e){var t,n,o=e.comment,i=(0,R().getCommentLinkProps)(o.id);return(0,r.jsx)(tg.m,{content:(0,tk.VG)(o.created_at),children:(0,r.jsx)(tf.N,(t=tI({renderLink:(0,r.jsx)(tP.N_,tI({},i)),variant:"custom",typography:"body-sm",color:"secondary",hoverColor:"primary",className:"shrink-0"},(0,U.Bs)({anchor:"comment-author-timestamp"})),n=n={children:(0,tC.z9)(o.created_at,{format:tC.Or.short})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))})};function tA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function tE(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var tR=function(e){var t=e.comment,n=ty(t),o=t.community_member.headline;return(0,r.jsxs)("div",tE(tA({className:"flex flex-col"},(0,U.Bs)({anchor:"comment-author"})),{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,r.jsx)(tf.N,tE(tA(tE(tA({},n),{variant:"custom",typography:"label-sm",hoverColor:"primary"}),(0,U.Bs)({anchor:"comment-author-name"})),{children:(0,r.jsx)("span",{className:"overflow-anywhere",children:t.community_member.name})})),(0,r.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,r.jsx)(tS,{comment:t}),(0,r.jsx)(tN,{comment:t}),Q(t)&&(0,r.jsx)(tp.E,{label:(0,c.t)("comments.in_review"),variant:"warning"})]})]}),o&&(0,r.jsx)("div",{className:"inline-flex mb-0.5",children:(0,r.jsx)(tf.N,tE(tA(tE(tA({},n),{variant:"custom",typography:"caption",color:"tertiary",hoverColor:"secondary"}),(0,U.Bs)({anchor:"comment-author-headline"})),{children:(0,r.jsx)("span",{className:"overflow-anywhere line-clamp-1",children:o})}))})]}))},tL=n(116047),tD=n(451251);function tT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function tM(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var tF=function(e){var t=e.comment,n=t.community_member,o=ty(t),i=Z(t),a=(0,u.e)().isEmbedded,s=i?tL.b:tD.C;return(0,r.jsx)(tf.N,tM(tT(tM(tT({},o),{variant:"custom",typography:"body-sm"}),(0,U.Bs)({anchor:"comment-avatar"})),{children:(0,r.jsx)(s,{communityMemberId:n.id,name:n.name,publicUid:n.public_uid,headline:i?void 0:n.headline,avatarURL:n.avatar_url,disabled:a,children:(0,r.jsx)(T.t,{size:"md",name:n.name,src:n.avatar_url})})}))},tK=n(988269),tB=n(757264),tq=n(585529),tU=function(e){var t,n,o=e.comment,i=o.body_trix_content,a=o.tiptap_body;return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({"data-testid":"comment-body"},(0,U.Bs)({anchor:"comment-body"})),n=n={children:(0,r.jsx)(tB.W,{seeMoreClassName:"text-sm",lines:8,children:G(o)?(0,r.jsx)(tq.H,{readOnly:!0,shouldRefetch:!0,value:a.body,sgidToObjectMap:a.sgids_to_object_map,inlineAttachments:a.inline_attachments,openInternalLinksInCurrentTab:!0,disabledExtensions:P.eV,shouldSupportTables:!0,variant:"compact"}):(0,r.jsx)("div",{className:"EAdr6FwBenQFw9XR",children:(0,r.jsx)(tK.X,{content:i})})})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},tz=n(902e3),tW=n(58661),t$=n(466330),tV=function(e){var t=e.comment,n=t.id,r=t.post_id,o=t.is_liked,i=(0,F.d)().error,a=function(e){B.S0.update({postId:r,id:n,updater:function(t){var n,r;return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({}
1,t),r=r={is_liked:e,likes_count:t.likes_count+(e?1:-1)},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n}})},s=(0,M.n_)({mutationFn:function(e){return(e.nextLiked?tW.p.create:tW.p.destroy)({userLikeableId:n,userLikableType:"Comment",forReactQuery:!0})},onMutate:function(e){return a(e.nextLiked)},onError:function(e,t){a(!t.nextLiked),i((0,c.t)("comments.like.alerts.failure"))},onSettled:function(){return t$.e.list(n)}}),l=s.mutate,u=s.isPending;return{toggleLike:function(){u||l({nextLiked:!o})},isPending:u}},tH=n(356140),tG=n(694812),tZ=n(881220),tQ=function(e){var t,n=e.comment,r=e.reactionType,o=(0,M.qu)(t$.R.list(n.id,r)),i=o.data,a=o.isInitialLoading,s=o.fetchNextPage,l=o.hasNextPage;return{members:(0,b.useMemo)(function(){var e;return null!=(e=null==i?void 0:i.pages.flatMap(function(e){return e.records}))?e:[]},[i]),totalCount:null==i||null==(t=i.pages.at(-1))?void 0:t.count,isInitialLoading:a,fetchNextPage:s,hasNextPage:null!=l&&l}},tY=n(804939),tJ=n(123124),tX=n(831610),t0=n(491720),t1=n(41907),t2=n(411718),t3=n(928160),t4=n(340479),t5=function(e){var t,n,o=e.className,i=e.communityMember,a=e.onNavigate,s=e.showReactionBadge,c=(0,tb.l)({public_uid:i.public_uid}),u=c.onClick,d=c.href,p=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(c,["onClick","href"]),f=void 0!==s&&s&&i.reaction_type?t3.t7[i.reaction_type].sentiment:null;return(0,r.jsxs)("a",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,L.x)("flex items-center gap-3",o),href:d,onClick:function(e){(0,t4.s6)(e)||a(),null==u||u(e)}},p),n=n={children:[(0,r.jsx)("div",{className:"shrink-0",children:(0,r.jsx)(tD.C,{communityMemberId:i.id,name:i.name,publicUid:i.public_uid,headline:i.headline,avatarURL:i.avatar_url,children:f?(0,r.jsx)(T.t,{size:"lg",name:i.name,src:i.avatar_url,sentiment:f}):(0,r.jsx)(T.t,{size:"lg",name:i.name,src:i.avatar_url})})}),(0,r.jsxs)("div",{className:(0,L.x)("flex min-h-10 min-w-0 flex-1 flex-col",!i.headline&&"justify-center"),children:[(0,r.jsx)(l.o5,{variant:"label-sm",truncate:!0,children:i.name}),i.headline&&(0,r.jsx)(l.o5,{variant:"body-sm",color:"secondary",truncate:!0,children:i.headline})]})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},t6=function(e){var t=e.className;return(0,r.jsxs)("div",{className:(0,L.x)("flex items-center gap-3",t),children:[(0,r.jsx)(eI.L,{size:"lg"}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,r.jsx)(eN.E,{shape:"pill",className:"h-4 w-32"}),(0,r.jsx)(eN.E,{shape:"pill",className:"h-3 w-48"})]})]})},t8=function(e){var t=e.className,n=e.count,o=e.rowClassName,i=Math.min(null!=n?n:8,8);return(0,r.jsx)("div",{className:(0,L.x)("flex flex-col",null!=t?t:"gap-4"),children:Array.from({length:i},function(e,t){return(0,r.jsx)(t6,{className:o},t)})})};function t9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t7(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return t9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t9(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ne=eU.PT.create(function(e){var t,n,o,i,a=e.comment,s=(0,eU.hS)(),l=(0,tY.P)(),u=(0,tz.c)(),d=t7((0,b.useState)(null),2),p=d[0],f=d[1],m=t7((0,b.useState)(a.likes_count),2),y=m[0],h=m[1],g=t7((0,b.useState)(null),2),v=g[0],x=g[1],j=tQ({comment:a,reactionType:p}),_=j.members,w=j.totalCount,O=j.isInitialLoading,S=j.hasNextPage,P=j.fetchNextPage,C=null!=w?w:a.likes_count,k=u?(0,c.t)("reactions.title"):(0,c.t)("comments.likes",{count:C,formatted_count:(0,t1.Rt)(C)}),I=(0,tJ.l)({allReactionsCount:y,selectedReaction:p,totalCount:w}),N=function(e){h(I),f(e)},A=function(e){e||s.hide()},E=function(e){e||s.remove()},R=(0,r.jsxs)("div",{className:(0,L.x)("flex flex-col",l?"divide-primary -mx-4 divide-y":"gap-4"),children:[_.map(function(e){return(0,r.jsx)(t5,{className:l?"px-4 py-3":void 0,communityMember:e,showReactionBadge:u,onNavigate:function(){s.hide()}},e.id)}),v&&(0,r.jsx)(tH.A,{dataLength:_.length,hasMore:S,onLoadMore:P,scrollContainer:v,loader:(0,r.jsx)(t6,{className:l?"px-4 py-3":void 0})})]});return l?(0,r.jsx)(tG._s.Root,{open:s.visible,onOpenChange:A,onOpenChangeComplete:E,snapTo:"half",children:(0,r.jsxs)(tG._s.Content,{ref:x,"aria-label":k,children:[(0,r.jsx)(tX.s,{title:k}),u&&(0,r.jsx)(t0.I,{className:"px-0 py-2",counts:null!=(o=null==(i=a.reaction_summary)?void 0:i.counts)?o:t2.l,selectedReaction:p,totalCount:I,onChange:N}),O?(0,r.jsx)(t8,{className:"divide-primary -mx-4 divide-y",count:C,rowClassName:"px-4 py-3"}):R]})}):(0,r.jsx)(eK.a.Root,{open:s.visible,onOpenChange:A,onOpenChangeComplete:E,size:"lg",children:(0,r.jsxs)(eK.a.Content,{children:[(0,r.jsx)(eK.a.Header,{title:k,showCloseButton:!0}),u&&(0,r.jsx)(t0.I,{counts:null!=(t=null==(n=a.reaction_summary)?void 0:n.counts)?t:t2.l,selectedReaction:p,totalCount:I,onChange:N}),(0,r.jsx)(eK.a.Body,{customLayout:!0,children:(0,r.jsx)(tZ.t,{viewportRef:x,scrollFades:!1,className:(0,L.x)({"h-96":u,"max-h-96":!u}),children:O?(0,r.jsx)(t8,{count:C}):R})})]})})}),nt=function(){var e=(0,u.e)(),t=e.isLikingEnabled,n=e.isReplyingEnabled,r=(0,o.PM)();return{canShowLikeAction:t&&r,canShowReplyAction:n&&r}};function nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nr=(0,b.createContext)(null);nr.displayName="ThreadContext";var no=function(e){var t,n=e.children,o=e.commentId,i=e.defaultReplyFormOpen,a=(0,w.$)().requestComposerFocus,s=function(e){if(Array.isArray(e))return e}(t=(0,b.useState)(i))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return nn(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nn(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1],u=(0,b.useCallback)(function(e){var t=e.communityMember;c(!0),a({kind:"reply",commentId:o,mentionCommunityMember:t})},[o,a]),d=(0,b.useMemo)(function(){return{isReplyFormOpen:l,openReplyForm:u}},[l,u]);return(0,r.jsx)(nr.Provider,{value:d,children:n})},ni=function(){var e=(0,b.useContext)(nr);if(!e)throw Error("useCommentsThread must be used inside a CommentsThreadProvider. Threads are scoped to a top-level Comment — render this component as a descendant of a top-level Comment in CommentsCompass.");return e},na=n(554283),ns=n(830520),nl=function(e){var t,n,i=e.className,s=e.children,l=e.active,c=e.anchorProps,u=e.disabled,p=void 0!==u&&u,f=e.requiresAuth,m=void 0!==f&&f,b=e.onClick,y=e.dataTestId,h=(0,o.iZ)(),g=(0,d.W)();return(0,r.jsx)("span",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,L.x)("inline-flex",i,{"text-brand hover:text-brand-dark":l})},c),n=n={children:(0,r.jsx)(tf.N,{asButton:!0,variant:"custom",typography:l?"label-sm":"body-sm",color:l?"current":"secondary",hoverColor:l?"current":"primary","data-testid":y,onClick:function(e){if(e.preventDefault(),!p){if
1(m&&!h)return void g(a.L9.signIn());b()}},"aria-disabled":p,"aria-pressed":l,children:s})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};function nc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var nu="comments.engagement_actions",nd=function(e){var t,n,o,i,a,s,l,d=e.comment,p=(0,u.e)(),f=p.isEmbedded,m=p.isReadOnly,b=nt(),y=b.canShowLikeAction,h=b.canShowReplyAction,g=tV({comment:d}),v=g.toggleLike,x=g.isPending,j=ni().openReplyForm,_=(0,eU.hS)(ne),w=R().getCommentUrl,O=(0,tz.c)(),S=d.is_liked,P=d.likes_count,C=y&&P>0,k=function(){f?window.open(w(d.id),"_blank","noreferrer"):_.show({comment:d})};return(0,r.jsxs)("div",(t=nc({className:(0,L.x)("flex min-h-8 items-center",O?"gap-3":"gap-4")},(0,U.Bs)({anchor:"comment-engagement-actions"})),n=n={children:[O&&y&&(0,r.jsx)(na.h,{canReact:!m,currentUserReaction:null==(a=d.reaction_summary)?void 0:a.current_user_reaction_type,iconOnly:!0,isLiked:S,likesCount:P,loginNotice:(0,c.t)("comments.log_in_to_like_comments"),onChange:function(e){B.S0.update({postId:d.post_id,id:d.id,updater:function(t){return nc({},t,e)}})},onSettled:function(){return t$.e.list(d.id)},reactionCounts:null!=(o=null==(s=d.reaction_summary)?void 0:s.counts)?o:t2.l,reactionableId:d.id,reactionableType:"comment",showSummary:!1}),!O&&y&&(0,r.jsx)(nl,{requiresAuth:!0,active:S,anchorProps:(0,U.Bs)({anchor:"comment-like-button",modifiers:{liked:S}}),disabled:x||m,onClick:v,children:(0,c.t)([nu,S?"liked":"like"])}),h&&(0,r.jsx)(nl,{requiresAuth:!0,anchorProps:(0,U.Bs)({anchor:"comment-reply-button"}),disabled:m,onClick:function(){return j({communityMember:d.community_member})},children:(0,c.t)([nu,"reply"])}),C&&O&&(0,r.jsx)(ns.O,{className:"ml-auto",count:P,counts:null!=(i=null==(l=d.reaction_summary)?void 0:l.counts)?i:t2.l,onClick:k}),C&&!O&&(0,r.jsx)(nl,{className:"ml-auto",anchorProps:(0,U.Bs)({anchor:"comment-like-count"}),dataTestId:"like-count",onClick:k,children:(0,c.t)("comments.likes",{count:P,formatted_count:(0,t1.Rt)(P)})})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},np=n(99443),nf=n(69245),nm="comments.moderation_banner",nb=function(e){var t=e.comment,n=(0,np.v)(),o=v().isNarrow,i=(0,u.e)().isEmbedded;return(0,r.jsx)(p.F,{icon:"triangle-exclamation-filled",iconColor:"warning",variant:"warning",layout:o?"vertical":"horizontal",title:(0,c.t)([nm,"title"]),description:(0,c.t)([nm,"description"],{count:t.unresolved_flagged_reports_count}),primaryActionProps:{children:(0,c.t)([nm,"review"]),onClick:function(){i?window.open(nf.xj.moderationDashboard.index(),"_blank","noreferrer"):n.show({flaggedContentId:String(t.id),flaggedContentType:e6.lr})}}})},ny=function(e){var t,n,o=e.comment,i=e.indented,a=void 0!==i&&i,s=ts(o).canModerate,l=nt(),c=l.canShowLikeAction,u=l.canShowReplyAction,d=ey(o.id),p=s&&o.unresolved_flagged_reports_count>0;return(0,r.jsxs)("article",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:d,className:"col-span-4 grid grid-cols-subgrid items-start pt-2"},(0,U.Bs)({anchor:"comment"})),n=n={children:[(0,r.jsx)("div",{className:(0,L.x)("row-span-2 flex",a?"col-start-2":"col-start-1"),children:(0,r.jsx)(tF,{comment:o})}),(0,r.jsx)("div",{className:(0,L.x)("flex flex-col gap-0.5",a?"col-start-3":"col-start-2 col-span-2"),children:(0,r.jsx)(tR,{comment:o})}),(0,r.jsx)("div",{className:"col-start-4",children:(0,r.jsx)(td,{comment:o})}),(0,r.jsx)("div",{className:(0,L.x)("mt-0.5 mb-2",a?"col-start-3 col-span-2":"col-start-2 col-span-3"),children:(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)(tU,{comment:o}),p&&(0,r.jsx)(nb,{comment:o})]})}),(c||u)&&(0,r.jsx)("div",{className:(0,L.x)("mt-0.5",a?"col-start-3 col-span-2":"col-start-2 col-span-3"),children:(0,r.jsx)(nd,{comment:o})})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},nh=n(39927),ng=n.n(nh),nv=function(e){var t=e.comments,n=e.totalCount,r=e.hasNextPage;return{pages:[{records:t,page:0,has_next_page:null!=r?r:n>t.length,count:n,page_count:1,per_page:t.length}],pageParams:[void 0]}},nx=function(e){var t=e.postId,n=e.parentCommentId,r=e.preloaded,o=(0,M.qu)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},B.Kd.list({postId:t,parentCommentId:n}),r&&{initialData:function(){return nv(r)}})),i=o.data,a=o.isLoading,s=o.isFetching,l=o.hasNextPage,c=o.fetchNextPage;return{comments:(0,b.useMemo)(function(){var e;return ng()((null!=(e=null==i?void 0:i.pages)?e:[]).flatMap(function(e){return e.records}),"id")},[i]),isLoading:a,isFetching:s,hasNextPage:null!=l&&l,fetchNextPage:c}},nj=function(e){var t,n=(0,w.$)(),r=n.matchReplyFocusTarget,o=n.clearComposerFocusRequest,i=r(e);return{isFocusPending:null!==i,mentionCommunityMember:null!=(t=null==i?void 0:i.mentionCommunityMember)?t:null,onFocusHandled:o}},n_=function(e){var t=e.parentComment,n=eb().requestScrollToComment,o=nj(t.id),i=o.isFocusPending,a=o.mentionCommunityMember,s=o.onFocusHandled;return(0,r.jsx)(ek,{className:"py-5",parentCommentId:t.id,replyToCommunityMember:t.community_member,mentionCommunityMember:a,isFocusPending:i,onFocusHandled:s,onCreate:function(e){return n(e.id)}})},nw=function(e){var t,n=e.parentComment,o=e.allRepliesPreloaded,i=(0,u.e)(),a=i.postId,s=i.canCompose,l=v().isNarrow,d=ni().isReplyFormOpen,p=nx({postId:a,parentCommentId:n.id,preloaded:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({comments:null!=(t=n.replies)?t:[],totalCount:n.replies_count},void 0!==o&&o&&{hasNextPage:!1})}),f=p.comments,m=p.hasNextPage,b=p.fetchNextPage,y=p.isFetching;return(0,r.jsxs)("div",{className:"col-span-4 grid grid-cols-subgrid gap-y-1",children:[f.map(function(e){return(0,r.jsx)(ny,{comment:e,indented:!0},e.id)}),y&&(0,r.jsx)("div",{className:"col-start-2 col-span-3",children:(0,r.jsx)(eA.y,{})}),!y&&m&&(0,r.jsx)("div",{className:"col-start-2 col-span-3 pt-1.5 pb-2.5 text-left",children:(0,r.jsx)(tf.N,{asButton:!0,variant:"custom",typography:"body-sm",color:"secondary",hoverColor:"primary",onClick:function(e){e.preventDefault(),b()},children:(0,c.t)("comments.list.show_more_replies")})}),s&&d&&(0,r.jsx)("div",{className:l?"col-span-4":"col-start-2 col-span-3",children:(0,r.jsx)(n_,{parentComment:n})})]})},nO=function(e){var t=e.comment,n=e.allRepliesPreloaded,o=e.defaultReplyFormOpen;return(0,r.jsx)(no,{commentId:t.id,defaultReplyFormOpen:void 0!==o&&o,children:(0,r.jsxs)("div",{className:"grid grid-cols-[2rem_2rem_1fr_auto] gap-x-3 gap-y-1",children:[(0,r.jsx)(ny,{comment:t}),(0,r.jsx)(nw,{parentComment:t,allRepliesPreloaded:void 0!==n&&n})]})})},nS=function(e){var t=e.commentId,n=e.commentsCount,o=(0,u.e)().postId,i=R().showAllComments,a=eb(),l=a.requestScrollToComment,d=a.cancelScrollToComment,p=(0,w.$)(),f=p.isTopLevelFocusPending,m=p.requestComposerFocus,y=eR({postId:o,id:t}),h=y.comment,g=y.isLoading;return(0,b.useEffect)(function(){return l(t),function(){return d(t)}},[t,l,d]),(0,b.useEffect)(function(){h&&f&&m({kind:"reply",commentId:h.id})},[h,f,m]),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(s.$,{variant:"outline",startIcon:"arrow-left",onClick:i,children:(0,c.t)("comments.list.show_all_count_comments",{count:n,formatted_count:(0,t1.Rt)(n)})}),g?(0,r.jsx)(eA.y,{}):h?(0,r.jsx)(nO,{comment:h,allRepliesPreloaded:!0,defaultReplyFormOpen:!0}):(0,r.jsx)("div",{className:"flex min-h-72 items-center justify-center",children:(0,r.jsx)(eE.p,{fontSize:"sm",header:(0,c.t)("comments.hierarchy.not_found_title"),description:(0,c.t)("comments.hierarchy.not_found")})})]})},nP=n(325335),nC=n(715208),nk=function(e){var t=e.scrollableTarget,n=nx({postId:(0,u.e)().postId}),o=n.comments,i=n.hasNextPage,a=n.fetchNextPage,s=n.isLoading,l=(0,nC.u)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(nP.A,{dataLength:o.length,next:a,hasMore:i,loader:(0,r.jsx)(eA.y,{}),scrollableTarget:null!=t?t:l,scrollThreshold:.8,className:"flex flex-col gap-1",style:{overflow:"initial"},children:o.map(function(e){return(0,r.jsx)(nO,{comment:e},e.id)})},t?"elementTarget":"idTarget"),s&&(0,r.jsx)(eA.y,{})]})},nI=n(661116),nN=n(305553),nA=function(){},nE=n(164372),nR={Provider:function(e){var t=e.children,n=e.commentable,i=e.onCommentCreated,a=void 0===i?nA:i,s=e.onCommentDeleted,l=void 0===s?nA:s,c=n.id,d=n.spaceId,p=n.isCommentsClosed,f=n.isCommentsEnabled,m=n.isLikingEnabled,b=n.path,y=(0,o.Od)(),h=y.
1currentCommunityMember,g=y.isViewOnlyMasquerading,v=(0,nI.W)().isElectron,x=(0,nN.h)(),j=f&&!p,_=!!h&&j&&!g;return(0,r.jsx)(w.f,{children:(0,r.jsx)(u.o,{postId:c,spaceId:d,path:b,canCompose:_,isEmbedded:x,isReadOnly:g,isCommentsClosed:p,isCommentsEnabled:f,isLikingEnabled:m,isReplyingEnabled:j,onCommentCreated:a,onCommentDeleted:l,children:(0,r.jsx)(em,{isAutoScrollEnabled:!v,children:t})})})},Section:function(e){var t=e.children;return(0,nE.h)()?(0,r.jsx)(r.Fragment,{children:t}):null},ClosedBanner:function(e){var t=e.description,n=void 0===t?(0,c.t)("post.comments_section.comments_closed"):t;return(0,u.e)().isCommentsClosed?(0,r.jsx)(p.F,{icon:"lock",description:n}):null},AuthGate:function(){var e,t=(0,o.Od)(),n=t.currentCommunity,p=t.currentUser,f=(0,u.e)().isCommentsClosed,m=(0,d.W)();if(!n||p||f)return null;var b=a.L9.signIn(),y=n.private_sign_up_url,h=n.private_sign_up_label,g=(0,i.Xy)(n)||!!y,v=null!=(e=null!=y?y:(0,i.T4)(n))?e:b,x=y&&h||(0,c.t)("sign_up");return(0,r.jsxs)("div",{className:"flex flex-col gap-6 border-primary border-y px-7 py-10 text-center",children:[(0,r.jsx)(l.o5,{variant:"heading-md",color:"primary",children:(0,c.t)("login_to_comment")}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-4",children:[(0,r.jsx)(s.$,{variant:"outline",onClick:function(){return m(b)},children:(0,c.t)("log_in")}),g&&(0,r.jsx)(s.$,{variant:"branded",onClick:function(){return m(v)},children:x})]})]})},Feed:function(e){var t=e.commentsCount,n=e.scrollableTarget,o=R().deepLinkedCommentId,i=eb(),a=i.registerSectionScrollTarget,s=i.scrollToSection,l=(0,w.$)(),c=l.isSectionScrollPending,u=l.clearSectionScrollRequest;return(0,b.useEffect)(function(){c&&(o||s(),u())},[c,o,s,u]),(0,r.jsx)(f.t,{name:"CommentFeed",fallback:_,children:(0,r.jsx)(g,{ref:a,children:o?(0,r.jsx)(nS,{commentId:o,commentsCount:t}):(0,r.jsx)(nk,{scrollableTarget:n})})})},Composer:function(e){var t=e.className,n=e.isCollapsible,o=(0,u.e)().canCompose,i=R().deepLinkedCommentId,a=(0,w.$)(),s=a.clearComposerFocusRequest,l=a.isTopLevelFocusPending;return!o||i?null:(0,r.jsx)(f.t,{name:"CommentComposer",fallback:_,children:(0,r.jsx)("div",{className:(0,L.x)("bg-primary sticky bottom-0 py-5",t),children:(0,r.jsx)(g,{children:(0,r.jsx)(ek,{isCollapsible:void 0!==n&&n,isFocusPending:l,onFocusHandled:s})})})})},CollapsibleComposerSkeleton:function(e){var t=e.className;return(0,r.jsx)("div",{className:(0,L.x)("bg-primary sticky bottom-0 py-5",t),children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)(eI.L,{size:"lg"}),(0,r.jsx)(eN.E,{className:"h-11 flex-1 rounded-xl"})]})})}}},460842(e,t,n){"use strict";var r=n(310860),o=n(933578),i=n(674453),a=n(998597),s=function(){return{shouldFocusOnCommentsSection:!0}},l=function(){var e=(0,i.is)(),t=(0,i.te)(),n=(0,a.zf)(),s=(0,r.z)({select:function(e){var t,n;return null!=(t=null==(n=e.state)?void 0:n.shouldFocusOnCommentsSection)&&t}})&&(n||!t);return(0,o.useEffect)(function(){s&&e({shouldFocusOnCommentsSection:void 0})},[s,e]),s};n.d(t,{g:()=>l,x:()=>s})},627539(e,t,n){"use strict";var r=n(933578),o=n(674553),i=function(){var e=(0,o.e)().isEmbedded;return(0,r.useCallback)(function(t){e?window.open(t,"_blank","noreferrer"):window.location.href=t},[e])};n.d(t,{W:()=>i})},164372(e,t,n){"use strict";var r=n(674553),o=n(740712),i=function(){var e=(0,r.e)().isCommentsEnabled,t=(0,o.$)().isCommentsOpen;return e&&t};n.d(t,{h:()=>i})},786158(e,t,n){"use strict";n.d(t,{_:()=>i});var r=n(391426),o=n(585529),i=function(e){var t=e.tiptapBody,n=e.variant;return(0,r.jsx)(o.H,{readOnly:!0,value:t.body,sgidToObjectMap:t.sgids_to_object_map,inlineAttachments:t.inline_attachments,openInternalLinksInCurrentTab:!0,disabledExtensions:["cta"],shouldSupportTables:!0,variant:void 0===n?"default":n})}},870969(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(933578),a=n(258752),s=n(274685),l=n(545923),c=function(e){var t=e.postId,n=e.id;return[l.W,t,"hierarchy",String(n)]},u=function(e){var t=e.postId,n=e.id,l=e.postCommentsClosed,u=e.postLikingDisabled,d=(0,s.jE)(),p=(0,i.useMemo)(function(){return c({postId:t,id:n})},[t,n]);(0,i.useEffect)(function(){d.removeQueries({queryKey:p})},[l,u,d,p]);var f=(0,a.IT)({queryKey:p,queryFn:function(){return(0,r.i_)(o.iK.comments.commentHierarchy({postId:t,id:null!=n?n:void 0}))},gcTime:0,onError:function(e){404===e.status&&d.setQueryData(p,null)},retry:function(e,t){return 404!==t.status&&e<3}}),m=f.data;return{comment:m,isLoading:f.isLoading,updateQueryData:function(e){var t,n;return d.setQueryData(p,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={replies:m.replies},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}}};n.d(t,{A:()=>c,w:()=>u})},545923(e,t,n){"use strict";var r="comments",o=function(e){var t=e.postId,n=e.parentCommentId,o=e.usedIn;return[r,t,"list",n,void 0===o?null:o].filter(Boolean)};n.d(t,{W:()=>r,_:()=>o})},424390(e,t,n){"use strict";n.d(t,{L:()=>"#all_comments",r:()=>"#comment_wrapper_"})},80151(e,t,n){"use strict";var r="chilipiper-concierge",o=function(){return new Promise(function(e,t){if(window.ChiliPiper)return void e();var n=document.getElementById(r);if(n){n.addEventListener("load",function(){return e()}),n.addEventListener("error",t);return}var o=document.createElement("script");o.id=r,o.src="https://circle-co.chilipiper.com/concierge-js/cjs/concierge.js",o.crossOrigin="anonymous",o.type="text/javascript",o.onload=function(){return e()},o.onerror=t,document.head.appendChild(o)})};n.d(t,{f:()=>o})},340990(e,t,n){"use strict";var r=n(80151);function o(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,l,"next",e)}function l(e){o(a,r,i,s,l,"throw",e)}s(void 0)})}}function a(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var s={UPGRADE_PLAN:"upgradeplan",UPGRADE_PLAN_EXP:"upgradeplanexp",PLUS_PAGE:"pluspage",PLUS_PLAN_EXP:"plusplanexp",PLUS_PAGE_EXP:"pluspageexp",USAGE_MODAL:"usagemodal",USAGE_MODAL_EXP:"usagemodalexp",TRIAL_EXPIRED_BANNER:"trialexpiredbanner",GET_STARTED_DLC_PLUS:"getstarteddlcplus",GET_STARTED_DLC_PLUS_EXP:"getstarteddlcplusexp",SSO_UPGRADE:"ssoupgrade",SSO_UPGRADE_EXP:"ssoupgradeexp",CIRCLE_AI:"circleai",CI
1RCLE_AI_HARD:"caih",CIRCLE_AI_SOFT:"cais",CIRCLE_AI_PRODUCT:"caip",CIRCLE_AI_PROACTIVE:"caipro",CIRCLE_AI_ONBOARDING:"caiob",CIRCLE_AI_PLANS_PAGE:"caiplusfit",CIRCLE_AI_SSO:"AI_SSO",CIRCLE_AI_BRANDED_APPS:"AI_brandedapps",CIRCLE_AI_AI_AGENTS:"AI_AIAgents",REPLIT_ONBOARDING_MODAL:"websufcai",TRIAL_SIDEBAR_BADGE:"trialsidebarbadge"},l=function(e){return"string"==typeof e&&Object.values(s).includes(e)},c=function(e,t,n){return i(function(){return a(this,function(o){var s;return[2,(s={lead:{email:e,sales_utm_source:"Product",sales_utm_campaign:t},onSuccess:n,router:"product",trigger:"InAppButton"},i(function(){return a(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,(0,r.f)()];case 1:return e.sent(),window.ChiliPiper&&window.ChiliPiper.submit("circle-co",s.router,{trigger:s.trigger,lead:s.lead,onSuccess:function(e){var t;null==(t=s.onSuccess)||t.call(s,e)}}),[3,3];case 2:return console.error("Failed to load or trigger ChiliPiper:",e.sent()),[3,3];case 3:return[2]}})})())]})})()};n.d(t,{TI:()=>s,a1:()=>l,me:()=>c})},688720(e,t,n){"use strict";var r=n(417980),o=n(230763),i="authentication_app.new_onboarding_flow_march_2026",a="authentication_app.questions.form.april_2025_questions.options",s="circle_ai.onboarding.sign_up_questions",l=function(e){var t=e.community_size;return[(0,r.t)("".concat(i,".community_size_questions.options.over_5000")),(0,r.t)("".concat(s,".community_size_questions.options.over_5000"))].includes(null!=t?t:"")},c=function(e){var t=e.community_size,n=e.annual_revenue,o=e.team_size,a=[(0,r.t)("".concat(i,".community_size_questions.options.1000_5000")),(0,r.t)("".concat(i,".community_size_questions.options.100_1000")),(0,r.t)("".concat(s,".community_size_questions.options.1000_5000")),(0,r.t)("".concat(s,".community_size_questions.options.100_1000"))].includes(null!=t?t:""),l=[(0,r.t)("".concat(i,".annual_revenue_questions.options.over_10m")),(0,r.t)("".concat(i,".annual_revenue_questions.options.1m_10m")),(0,r.t)("".concat(s,".annual_revenue_questions.options.over_10m")),(0,r.t)("".concat(s,".annual_revenue_questions.options.1m_10m"))].includes(null!=n?n:""),c=!!o&&o!==(0,r.t)("".concat(i,".team_questions.options.just_me"))&&o!==(0,r.t)("".concat(s,".team_questions.options.just_me"));return(a||l)&&c},u=function(e){var t=e.achieve_with_circle,n=e.annual_revenue,o=[(0,r.t)("".concat(i,".goal_questions.options.build_new_community")),(0,r.t)("".concat(i,".goal_questions.options.migrate_to_circle")),(0,r.t)("".concat(s,".goal_questions.options.build_new_community")),(0,r.t)("".concat(s,".goal_questions.options.migrate_to_circle"))].includes(null!=t?t:"");return!!n&&o},d=function(e){var t=e.achieve_with_circle,n=e.customer_journey_stage,o=[(0,r.t)("".concat(a,".achieve_with_circle.build_new_community")),(0,r.t)("".concat(a,".achieve_with_circle.migrate_to_circle"))].includes(null!=t?t:""),i=[(0,r.t)("".concat(a,".customer_journey_stage.over_250k")),(0,r.t)("".concat(a,".customer_journey_stage.100_250k"))].includes(null!=n?n:"");return o&&i},p=function(e,t){return!!e&&!!t&&(l(e)||c(e)||u(e)||d(e))},f=function(){var e,t=(0,o.Od)().currentCommunity;return p(null==t?void 0:t.sign_up_flow_responses,null!=(e=null==t?void 0:t.owner_has_business_email)&&e)};n.d(t,{Y:()=>p,j:()=>f})},913395(e,t,n){"use strict";var r=n(911550),o=n(355104),i=n(230763),a=function(e){var t=e.currentCommunitySettings,n=e.experimentationFlags;return!!e.isCircleV4||(0,r.Nl)(t)||(null==n?void 0:n.circle_ai_onboarding_test)===!0},s=function(){var e=(0,i.Od)(),t=e.currentCommunitySettings,n=e.experimentation,r=(0,o.c)().isCircleV4;return a({currentCommunitySettings:t,experimentationFlags:n.flags,isCircleV4:r})};n.d(t,{$:()=>a,Y:()=>s})},437785(e,t,n){"use strict";var r=n(570310),o=n(68981),i=n(410016),a=n(202090),s=n(16876),l=n(288513),c=n(618817),u=n(906532),d=function(e){var t=(0,c.R)(),n=(0,o.R)(),d=(0,u.mg)(),p=!!(0,a.wR)().isDarkAppearance,f=(0,s._f)()({to:"/settings/analytics",fuzzy:!0}),m=(0,i.Y)();return{presentationClasses:(0,r.x)((0,l.W2)("community__switcher"),e,!t&&"min-h-screen",{"!bg-c-switcher border-primary border-r":!p&&!n&&!t,"!bg-c-switcher border-c-sidebar border-r":p&&!n&&!t}),bodyClasses:(0,r.x)("p-4",{"min-h-screen":!t,"!bg-c-sidebar overflow-hidden border-r":n&&!t,"!top-24":!f&&m}),bodyStyles:d}};n.d(t,{I:()=>d})},135679(e,t,n){"use strict";var r=n(915779),o=n(51730);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a="community-switch",s=function(){window.dispatchEvent(new Event(a))},l=function(e,t){var n=new URL(e);return n.searchParams.set("automatic_login","true"),n.searchParams.set("token",t),n.toString()},c=window.DISCOVER_BASE_URL||"/discover",u=function(e,t){var n=new URL(e,globalThis.location.origin);return n.searchParams.set("source","community_switcher"),t&&n.searchParams.set("community_id",String(t)),n.toString()},d=function(e,t,n){return!!e&&t.includes("settings/plans")&&"Expired Trial"===n}
1,p=function(e,t,n){var r=new URL("".concat(globalThis.location.origin).concat(e).concat(t).concat(n));return r.searchParams.set("pendo","0oguJmJrou1SpPPXRwwyzbd4Wlo"),r.toString()},f=function(e,t,n){var r,o;return e[t]===n?e:(r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}({},e),o=null!=(o=i({},t,n))?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r)},m=function(e,t,n){e(function(e){return f(e,t,n)})},b=function(e,t){(0,o.i_)("".concat((0,r.bN)(),"?community_id=").concat(e.id)).then(function(n){m(t,e.id,n.new_notifications_count)})};n.d(t,{Ht:()=>p,RL:()=>d,So:()=>b,UP:()=>l,Ub:()=>a,cT:()=>c,gS:()=>u,nZ:()=>s})},716224(e,t,n){"use strict";var r=n(391426),o=n(739042),i=n(417980),a=n(570310),s=function(e){var t=e.className,n=e.flexDirection,s=e.fullWidth,l=e.handleAccept,c=e.handleIgnore,u=e.isAccepting,d=e.isIgnoring,p=s?"flex-1":void 0;return(0,r.jsxs)("div",{className:(0,a.x)("flex gap-2",n,s?"w-full":"w-fit",t),children:[(0,r.jsx)(o.$,{variant:"primary",loading:u,disabled:d,onClick:l,"aria-label":(0,i.t)("member_directory.accept"),"data-testid":"accept-button",className:p,children:(0,i.t)("member_directory.accept")}),(0,r.jsx)(o.$,{variant:"outline",loading:d,disabled:u,onClick:c,"aria-label":(0,i.t)("member_directory.ignore"),"data-testid":"ignore-button",className:p,children:(0,i.t)("member_directory.ignore")})]})};n.d(t,{g:()=>s})},933741(e,t,n){"use strict";n.d(t,{A:()=>j});var r=n(391426),o=n(974618),i=n(140716),a=n(432202),s=n(154093),l=n(355104),c=n(34819),u=n(417980),d=n(570310),p=function(e){var t=e.className,n=e.flexDirection,o=e.handleAccept,i=e.handleIgnore,a=e.isAccepting,s=e.isIgnoring;return(0,r.jsxs)("div",{className:(0,d.x)("flex gap-2 w-fit",n,t),children:[(0,r.jsx)(c.K,{variant:"primary",size:"sm",icon:"checkmark","aria-label":(0,u.t)("member_directory.accept"),loading:a,disabled:s,onClick:o,"data-testid":"accept-button"}),(0,r.jsx)(c.K,{variant:"ghost",size:"sm",icon:"cross","aria-label":(0,u.t)("member_directory.ignore"),loading:s,disabled:a,onClick:i,"data-testid":"ignore-button"})]})},f=n(973646),m=n(387099),b=n(674251),y={sm:"!h-7 !px-3",md:"!h-8 !px-4",lg:"!h-10 !px-5",full:"w-full"},h=function(e){var t=e.className,n=e.flexDirection,o=e.handleAccept,i=e.handleIgnore,a=e.isAccepting,s=e.isIgnoring,l=e.size,c=void 0===l?"md":l,p=s||a;return(0,r.jsxs)("div",{className:(0,d.x)("flex gap-2 w-fit",n,t),children:[(0,r.jsx)(m.$,{variant:"circle",onClick:o,disabled:p,"aria-label":(0,u.t)("member_directory.accept"),"data-testid":"accept-button",large:"lg"===c,className:(0,d.x)("!border-primary !font-medium flex justify-center items-center !gap-1",y[c],t),children:a?(0,r.jsx)(f.In,{type:"loader"}):(0,r.jsx)(b.o.LabelSm,{color:"text-lighter",weight:"font-medium",children:(0,u.t)("member_directory.accept")})}),(0,r.jsx)(m.$,{variant:"secondary",onClick:i,disabled:p,"aria-label":(0,u.t)("member_directory.ignore"),"data-testid":"ignore-button",large:"lg"===c,className:(0,d.x)("!border-primary !font-medium flex justify-center items-center !gap-1",y[c],t),children:s?(0,r.jsx)(f.In,{type:"loader"}):(0,r.jsx)(b.o.LabelSm,{color:"text-primary",weight:"font-medium",children:(0,u.t)("member_directory.ignore")})})]})},g=n(716224);function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function x(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var j=function(e){var t,n,c=e.connectionId,u=e.recipient,d=e.showMomentumModal,f=void 0===d||d,m=e.acceptButtonPosition,b=e.size,y=e.iconOnly,j=e.fullWidth,_=e.className,w=(0,l.c)().isCircleV4,O={first_name:null!=(t=u.first_name)?t:"",id:u.id,public_uid:null!=(n=u.public_uid)?n:""},S=(0,i.O)({initiator:O,onSuccess:function(){f&&u.name&&c&&o.PT.show(s.c,{recipient:u})}}),P=S.acceptConnectionForUser,C=S.isAccepting,k=(0,a.Q)({initiator:O}),I=k.ignoreConnectionForUser,N=k.isIgnoring;if(!u.first_name||!u.public_uid)return null;var A={handleAccept:function(){c&&P(c)},handleIgnore:function(){c&&I(c)},isAccepting:C,isIgnoring:N,flexDirection:"left"===(void 0===m?"right":m)?"flex-row":"flex-row-reverse",className:_};return void 0!==y&&y?(0,r.jsx)(p,v({},A)):w?(0,r.jsx)(g.g,x(v({},A),{fullWidth:void 0!==j&&j})):(0,r.jsx)(h,x(v({},A),{size:void 0===b?"md":b}))}},110875(e,t,n){"use strict";n.d(t,{p:()=>j});var r=n(391426),o=n(973646),i=n(739042),a=n(274685),s=n(417980),l=n(210541),c=n(387099),u=n(717526),d=n(674251),p=n(294374),f=n(570310),m=n(258752),b=n(952476),y=n(355104),h=n(202090);function g(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var v={sm:"!h-7 !px-3 gap-1.5",md:"!h-8 !px-4 gap-2",lg:"!h-10 !px-5 gap-2.5",full:"w-full"},x={sm:14,md:16,lg:18,full:16},j=function(e){var t,n=e.recipient,j=e.recommendationId,_=e.size,w=void 0===_?"md":_,O=e.className,S=e.disabled,P=e.fullWidth,C=e.buttonVariant,k=void 0===C?"secondary":C,I=e.onClick,N=(0,y.c)().isCircleV4,A=(0,u.d)(),E=(0,a.jE)(),R=(0,p.V)(),L=(0,h.wR)().isDarkAppearance,D=(t={onSuccess:function(){var e;return(e=function(){var e;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return[4,(0,l.$e)(E,null!=(e=n.public_uid)?e:"")];case 1:return t.sent(),A.success((0,s.t)("profile_drawer.connect_banner.messages.connection_created")),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){g(i,r,o,a,s,"next",e)}function s(e){g(i,r,o,a,s,"throw",e)}a(void 0)})})()},onError:function(e){e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"&&"message"in e?A.error(String(e.message)):A.error((0,s.t)("profile_drawer.connect_banner.messages.connection_creation_error"))}},(0,m.n_)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({mutationFn:b.K.createConnection},t))),T=D.mutate,M=D.isLoading,F=function(e){T({memberId:n.id,note:e,recommendationId:j})},K=function(){R.show({recipient:n,onConnect:F})},B=function(e){e.preventDefault(),e.stopPropagation(),null==I||I(),K()};if(N)return(0,r.jsx)(i.$,{variant:"circle"===k?"primary":"outline",startIcon:"people-add",loading:M,disabled:S,onClick:B,"aria-label":(0,s.t)("connect"),"data-testid":"connect-button",fullWidth:void 0!==P&&P,className:O,children:(0,s.t)("connect")});var q=x[w];return(0,r.jsx)(c.$,{variant:k,onClick:B,"aria-label":(0,s.t)("connect"),"data-testid":"connect-button",large:"lg"===w,className:(0,f.x)("!border-primary !font-medium flex justify-center items-center !gap-1 min-w-30",v[w],O),disabled:S||M,children:M?(0,r.jsx)(o.In,{type:"loader"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{type:"16-plus-v2",size:q,useWithFillCurrentColor:!0}),(0,r.jsx)(d.o.LabelSm,{weight:"font-medium",color:function(){if("circle"===k)return L?"text-badge":"text-white"}(),children:(0,s.t)("connect")})]})})}},861769(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(889828),a=n(955015),s=n(314054),l=n(417980),c=n(898666),u=n(674251),d=n(570310),p=n(355104),f={sm:"!h-5 !px-2 gap-1",md:"!h-8 !px-4 gap-1.5",lg:"!h-10 !px-5 gap-2",full:"w-full"},m=function(e){var t=e.connectedAt,n=e.showTooltip,m=void 0===n||n,b=e.size,y=e.className,h=(0,p.c)().isCircleV4,g=t?(0,l.t)("members_directory.connected_on_hover_text",{date_string:(0,i.w)({dateTime:new Date(t),format:i.z.short_month_and_date_with_year})}):(0,l.t)("profile_drawer.connect_banner.states.active");if(h){var v=(0,r.jsx)(a.E,{label:(0,l.t)("profile_drawer.connect_banner.states.active"),variant:"secondary","data-testid":"connected-badge"});return m&&t?(0,r.jsx)(s.m,{content:g,side:"bottom",children:v}):v}var x=(0,r.jsxs)("div",{className:(0,d.x)("bg-secondary text-dark flex items-center justify-center rounded-3xl font-medium",f[void 0===b?"md":b],y),"data-testid":"connected-badge",children:[(0,r.jsx)(o.In,{type:"20-checkmark",size:20,useWithFillCurrentColor:!0,className:"size-4"}),(0,r.jsx)(u.o.LabelXs,{weight:"medium",children:(0,l.t)("profile_drawer.connect_banner.states.active")})]});return m&&t?(0,r.jsx)(c.$,{content:g,placement:"bottom",children:x}):x};n.d(t,{V:()=>m})},659038(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(739042),a=n(417980),s=n(387099),l=n(570310),c=n(355104),u={sm:"!h-7 !px-3 gap-1",md:"!h-8 !px-4 gap-1.5",lg:"!h-10 !px-5 gap-2",full:"w-full"},d={sm:16,md:20,lg:22,full:16},p=function(e){var t=e.className,n=e.compassClassName,p=e.size,f=void 0===p?"md":p,m=e.fullWidth;if((0,c.c)().isCircleV4)return(0,r.jsx)(i.$,{variant:"secondary",startIcon:"checkmark",disabled:!0,"data-testid":"connected-button",fullWidth:void 0!==m&&m,className:n,children:(0,a.t)("profile_drawer.connect_banner.states.active")});var b=u[f],y=d[f];return(0,r.jsxs)(s.$,{variant:"secondary",disabled:!0,large:"lg"===f,className:(0,l.x)("flex items-center gap-x-2 min-w-30",b,t),"data-testid":"connected-button",children:[(0,r.jsx)(o.In,{type:"20-checkmark",size:y,useWithFillCurrentColor:!0}),(0,a.t)("profile_drawer.connect_banner.states.active")]})};n.d(t,{m:()=>p})}
1,260059(e,t,n){"use strict";n.d(t,{g:()=>L});var r=n(391426),o=n(121517),i=n(570310),a=n(355104),s=n(555169),l=n(933741),c=n(659038),u=n(932838),d=n(257149);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var f=function(e){var t=e.activeStateDisplay,n=e.closeParent,o=e.fullWidth,i=e.iconOnly,a=e.isCircleV4,s=e.isConnectEnabled,l=e.member,f=e.shouldShowMessageCTA,m=e.size,b=e.variant,y=a?{fullWidth:o}:{size:m},h=a?{iconOnly:i,fullWidth:o}:{variant:b,size:m},g=a?{fullWidth:o}:{variant:b,size:m};return"badge"===t&&s?(0,r.jsx)(c.m,p({},y)):f?(0,r.jsx)(u.k,p({memberId:l.id,closeParent:n},h)):(0,r.jsx)(d.t,p({member:l},g))},m=n(110875),b=n(434204),y=n(973646),h=n(739042),g=n(274685),v=n(417980),x=n(210541),j=n(387099),_=n(717526),w=n(674251),O=n(587189),S=n(258752),P=n(952476);function C(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function k(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){C(i,r,o,a,s,"next",e)}function s(e){C(i,r,o,a,s,"throw",e)}a(void 0)})}}function I(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var N={sm:"!h-7 !px-3 gap-1.5",md:"!h-8 !px-4 gap-2",lg:"!h-10 !px-5 gap-2.5",full:"w-full"},A={sm:14,md:16,lg:18,full:16},E=function(e){var t,n=e.connectionId,o=e.recipientName,s=e.memberPublicUid,l=e.size,c=void 0===l?"md":l,u=e.className,d=e.disabled,p=e.fullWidth,f=(0,a.c)().isCircleV4,m=(0,O.l5)(),b=(0,_.d)(),C=(0,g.jE)(),E=(t={onSuccess:function(){return k(function(){return I(this,function(e){switch(e.label){case 0:return[4,(0,x.$e)(C,null!=s?s:"")];case 1:return e.sent(),b.success((0,v.t)("profile_drawer.connect_banner.messages.connection_withdrawn")),[2]}})})()}},(0,S.n_)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({mutationFn:function(e){return P.K.withdrawConnection(e)}},t))),R=E.mutate,L=E.isLoading,D=function(e){return k(function(){return I(this,function(t){switch(t.label){case 0:return e.preventDefault(),e.stopPropagation(),[4,m.show({onConfirm:function(){m.hide(),n&&R(n)},onCancel:function(){m.hide()},disabled:L,recipient:o})];case 1:return t.sent(),[2]}})})()};if(f)return(0,r.jsx)(h.$,{variant:"outline",startIcon:"clock-dash",loading:L,disabled:d,onClick:D,"aria-label":(0,v.t)("pe
1nding"),"data-testid":"pending-button",fullWidth:void 0!==p&&p,className:u,children:(0,v.t)("pending")});var T=A[c];return(0,r.jsx)(j.$,{variant:"secondary",className:(0,i.x)("bg-secondary hover:!bg-tertiary hover:!border-secondary !border-transparent !font-medium flex justify-center items-center !gap-1 min-w-30",N[c],u),onClick:D,disabled:d||L,"aria-label":(0,v.t)("pending"),"data-testid":"pending-button",large:"lg"===c,children:L?(0,r.jsx)(y.In,{type:"loader"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y.In,{type:"16-clock",size:T,useWithFillCurrentColor:!0,className:"mr-1"}),(0,r.jsx)(w.o.LabelSm,{color:"text-primary",weight:"font-medium",children:(0,v.t)("pending")})]})})};function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var L=function(e){var t,n,c,u=e.member,p=e.variant,y=void 0===p?"default":p,h=e.size,g=void 0===h?"md":h,v=e.className,x=e.showMomentumModal,j=e.acceptButtonPosition,_=e.acceptIgnoreIconOnly,w=e.activeStateDisplay,O=e.closeParent,S=e.recommendationId,P=e.canReceiveDmFromCurrentMember,C=e.fullWidth,k=void 0!==C&&C,I=e.iconOnly,N=(0,a.c)().isCircleV4,A=(0,s.V)(),L=(0,o.$)().shouldShowMessageOption,D=null!=P?P:L(u),T=(0,b.R)(u),M=T.isCurrentUser,F=T.isEmpty,K=T.isPendingSent,B=T.isPendingReceived,q=T.isActive,U=T.connection;if(!u||!u.name||!u.public_uid||!u.first_name)return null;var z=N?{fullWidth:k}:{variant:y,size:g},W=N?{fullWidth:k}:{variant:y,size:g};if(M)return(0,r.jsx)("div",{className:(0,i.x)("flex flex-col",N&&k?"w-full":"w-fit",v),children:(0,r.jsx)(d.t,R({member:u},W))});var $=(0,r.jsx)(f,{activeStateDisplay:void 0===w?"message":w,closeParent:O,fullWidth:k,iconOnly:void 0!==I&&I,isCircleV4:N,isConnectEnabled:A,member:u,shouldShowMessageCTA:D,size:g,variant:y});return A?(0,r.jsxs)("div",{className:(0,i.x)("flex flex-col",N&&k?"w-full":"w-fit",v),children:[F&&(0,r.jsx)(m.p,R({recipient:u,recommendationId:S},z)),K&&(0,r.jsx)(E,R({connectionId:null==U||null==(n=U.id)?void 0:n.toString(),recipientName:null!=(t=null==U?void 0:U.recipient.name)?t:"",memberPublicUid:u.public_uid},z)),B&&(0,r.jsx)(l.A,R({connectionId:null==U||null==(c=U.id)?void 0:c.toString(),recipient:u,showMomentumModal:void 0===x||x,acceptButtonPosition:void 0===j?"right":j,iconOnly:void 0!==_&&_},N?{fullWidth:k}:{size:g,className:v})),q&&$]}):(0,r.jsx)("div",{className:(0,i.x)("flex w-fit flex-col",v),children:$})}},932838(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(244174),a=n(230763),s=n(915779),l=n(429807),c=n(739042),u=n(34819),d=n(519104),p=n(451430),f=n(258752),m=n(417980),b=n(387099),y=n(674251),h=n(570310),g=n(355104),v=n(810327),x={sm:"!h-7 !px-3 gap-1.5",md:"!h-8 !px-4 gap-2",lg:"!h-10 !px-5 gap-2.5",full:"w-full"},j={sm:14,md:16,lg:18,full:16},_=function(e){var t=e.memberId,n=e.onMessageSent,_=e.closeParent,w=e.iconOnly,O=e.variant,S=e.size,P=void 0===S?"md":S,C=e.className,k=e.disabled,I=e.fullWidth,N=(0,g.c)().isCircleV4,A=(0,d.Z)(),E=(0,a.Od)().isViewOnlyMasquerading,R=(0,l.n)().findOrCreateChatRoom,L=(0,v.B)(),D=(0,f.n_)({mutationFn:function(){return R({kind:i.Br,community_member_ids:[t]})},onSuccess:function(e){var t,r;A((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},(0,s.mF)({uuid:e})),r=r={state:L},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t)),null==n||n(),null==_||_()}}),T=D.mutate,M=D.isPending,F=function(e){e.preventDefault(),e.stopPropagation(),E?(0,p.noop)():T()};if(N)return void 0!==w&&w?(0,r.jsx)(u.K,{variant:"ghost",icon:"message-dots",loading:M,disabled:k,onClick:F,"aria-label":(0,m.t)("message"),"data-testid":"message-button"}):(0,r.jsx)(c.$,{variant:"outline",startIcon:"message-dots",loading:M,disabled:k,onClick:F,"aria-label":(0,m.t)("message"),"data-testid":"message-button",fullWidth:void 0!==I&&I,className:C,children:(0,m.t)("message")});var K="icon-only"===(void 0===O?"default":O),B=j[P];return(0,r.jsx)(b.$,{variant:"secondary",onClick:F,"aria-label":(0,m.t)("message"),"data-testid":"message-button",large:"lg"===P,className:(0,h.x)("flex min-w-30 items-center justify-center !gap-1 !border-primary !font-medium",x[P],K?"!w-8 min-w-0 !px-0":"w-full",C),disabled:k||M,children:M?(0,r.jsx)(o.In,{type:"loader"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{type:"16-bubble-annotation",size:B,useWithFillCurrentColor:!0}),!K&&(0,r.jsx)(y.o.LabelSm,{color:"text-primary",weight:"font-medium",children:(0,m.t)("message")})]})})};n.d(t,{k:()=>_})},257149(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(568316),a=n(739042),s=n(34819),l=n(417980),c=n(617492),u=n(387099),d=n(570310),p=n(355104),f={sm:"!h-7 !px-3 gap-1.5",md:"!h-8 !px-4 gap-2",lg:"!h-10 !px-5 gap-2.5",full:"w-full"},m={sm:14,md:16,lg:18,full:16},b=function(e){var t=e.member,n=e.fullWidth,b=e.onProfileOpen,y=e.variant,h=e.size,g=void 0===h?"md":h,v=e.className,x=e.disabled,j=(0,p.c)().isCircleV4,_=(0,c.g)().show,w=function(e){var n;e.preventDefault(),e.stopPropagation(),_({memberPublicId:null!=(n=t.public_uid)?n:""}),null==b||b()},O="icon-only"===(void 0===y?"default":y);if(j)return O?(0,r.jsx)(s.K,{variant:"ghost",icon:"people",disabled:x,onClick:w,"aria-label":(0,l.t)("view_profile"),"data-testid":"view-profile-button"}):(0,r.jsx)(a.$,{variant:"outline",startIcon:"people",disabled:x,onClick:w,"aria-label":(0,l.t)("view_profile"),"data-testid":"view-profile-button",fullWidth:n,className:v,children:(0,l.t)("view_profile")});var S=m[g];return(0,r.jsxs)(u.$,{variant:"secondary",onClick:w,"aria-label":(0,l.t)("view_profile"),"data-testid":"view-profile-button",full:!O&&n,className:(0,d.x)("!border-primary !font-medium flex justify-center items-center !gap-1",f[g],O?"!w-8 !px-0 min-w-0":"",v),disabled:x,large:"lg"===g,children:[(0,r.jsx)(o.In,{type:"16-people",size:S,useWithFillCurrentColor:!0}),!O&&(0,r.jsx)(i.o.LabelSm,{color:"text-primary",weight:"font-medium",children:(0,l.t)("view_profile")})]})};n.d(t,{t:()=>b})},434204(e,t,n){"use strict";var r=n(603595),o=n(230763),i=function(e){var t=(0,o.iZ)();if(!e)return{isActive:!1,isCurrentUser:!1,isEmpty:!0,isFlaggedForModeration:!1,isPendingReceived:!1,isPendingSent:!1};var n=e.connection_to_current_community_member,i=(null==t?void 0:t.id)===e.user_id,a=n&&(n.status===r.v.DETACHED||n.status===r.v.WITHDRAWN),s=n&&n.status===r.v.IGNORED,l=n&&n.status===r.v.PENDING&&n.initiator.user_id===(null==t?void 0:t.id),c=n&&n.status===r.v.PENDING&&n.initiator.user_id!==(null==t?void 0:t.id)&&!!n.is_flagged_for_moderation,u=n&&n.status===r.v.PENDING&&n.initiator.user_id!==(null==t?void 0:t.id)&&!n.is_flagged_for_moderation;return{isEmpty:!!(!n||a||s),isActive:(null==n?void 0:n.status)===r.v.ACTIVE,isFlaggedForModeration:!!c,isPendingSent:!!l,isPendingReceived:!!u,isCurrentUser:i,connection:n}};n.d(t,{R:()=>i})},972287(e,t,n){"use strict";var r=n(391426),o=n(927561),i=n(417980),a=n(503747),s=function(e){var t=e.hideLabel,n=e.isFirstChild,s=e.name,l=void 0===s?a.sh:s,c=e.shouldConfirmChange,u=(0,a.XD)();return(0,r.jsx)(o.l.Item,{name:l,hideDescription:!0,rules:u,hideBorder:!0,fullWidth:!0,isFirstChild:n,variant:"extra-bottom-margin",label:(0,i.t)("spaces.form.create.course_types.label"),hideLabel:t,shouldForceV4FormItem:!0,children:(0,r.jsx)(a.am,{name:l,rules:u,shouldConfirmChange:void 0!==c&&c})})};n.d(t,{M:()=>s})},503747(e,t,n){"use strict";var r=n(391426),o=n(402642),i=n(933578),a=n(361971),s=n(417980),l=n(66108);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u="course_setting.course_type",d=function(){return{required:(0,s.t)("spaces.form.create.choose_course_type"),maxLength:255}},p=[{icon:"clock-dash",get label(){return(0,s.t)("spaces.form.create.course_types.self_paced")},value:"self_paced",get description(){return(0,s.t)("spaces.form.create.course_types.self_paced_info")}},{icon:"steps",get label(){return(0,s.t)("spaces.form.create.course_types.structured")},value:"structured",get description(){return(0,s.t)("spaces.form.create.course_types.structured_info")}},{icon:"calendar-clock",get label(){return(0,s.t)("spaces.form.create.course_types.scheduled")},value:"scheduled",get description(){return(0,s.t)("spaces.form.create.course_types.scheduled_info")}}],f=function(e){var t,n=e.description,d=e.error,f=e.invalid,m=e.label,b=e.name,y=void 0===b?u:b,h=e.rules,g=e.shouldConfirmChange,v=void 0!==g&&g,x=(0,a.xW)().control,j=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return c(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),_=j[0],w=j[1],O=function(){w(null)};return(0,r.jsx)(a.xI,{control:x,name:y,rules:h,render:function(e){var t=e.field,i=t.onChange,a=t.value;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.z,{description:n,error:d,invalid:f,legend:null!=m?m:(0,s.t)("spaces.form.create.course_types.label"),legendProps:m?void 0:{className:"sr-only"},name:y,onValueChange:function(e){v&&"string"==typeof a&&e!==a?w(e):i(e)},optionCardContentLayout:"horizontal",options:p,value:"string"==typeof a?a:void 0,variant:"option-cards"}),(0,r.jsx)(l.R,{isOpen:!!_,title:(0,s.t)("spaces.form.create.course_types.change_course_type"),onClose:O,onCancel:O,onConfirm:function(){_&&(i(_),O())},confirmText:(0,s.t)("confirm"),confirmVariant:"primary",children:_&&(0,s.t)("spaces.form.create.course_types.".concat(_,"_confirmation"))})]})}})};f.displayName="CourseTypePickerRadioGroup",n.d(t,{XD:()=>d,am:()=>f,kS:()=>"course_setting_attributes.course_type",sh:()=>u})},161810(e,t,n){"use strict";var r=n(391426),o=n(933578),i=n(258752),a=n(417980),s=n(51730);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var u=function(e){var t=e;if(null==t)throw TypeError("Cannot destructure "+t);var n=c({},e);return(0,s.Ez)("/internal_api/discover_login_tokens",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({method:"POST"},n))},d=function(e){var t=e.onSuccess;return(0,i.n_)({mutationFn:function(){return u({}).then(function(e){return null==e?void 0:e.json()})},onSuccess:t})};n.d(t,{yj:()=>d},{Ay:function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return l(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],i=t[1],s=d({onSuccess:function(e){return i(e.login_url)}}).mutate;return((0,o.useEffect)(function(){s()},[]),n)?(0,r.jsx)("iframe",{title:(0,a.t)("discover.iframe_title"),src:n,allow:"clipboard-write",className:"h-[100vh] w-full border-none",loading:"lazy"}):null}})},44537(e,t,n){"use strict";n.d(t,{x:()=>f});var r=n(391426),o=n(34819),i=n(451430),a=n(933578),s=n(417980),l=n(570310),c=n(204993),u=function(e){var t=e.className,n=e.inputClassName,o=e.inputRef,i=e.onChange,a=e.onClose,s=e.placeholder,u=e.shouldAnimate,d=e.shouldShowClose,p=e.value;return(0,r.jsx)("div",{className:(0,l.x)((void 0===u||u)&&"animate-in fade-in slide-in-from-right-2 duration-200",n,t),children:(0,r.jsx)(c.D,{ref:o,value:p,onChange:function(e){return i(e.target.value)},onClear:void 0===d||d?a:function(){return i("")},placeholder:s,"aria-label":s})})};function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var f=function(e){var t=e.inputClassName,n=e.isExpandedOnMobile,l=void 0!==n&&n,c=e.onChange,d=e.placeholder,f=void 0===d?(0,s.t)("spaces.form.edit.members.search_members"):d,m=p((0,a.useState)(!1),2),b=m[0],y=m[1],h=p((0,a.useState)(""),2),g=h[0],v=h[1],x=(0,a.useRef)(null),j=(0,a.useRef)((0,i.debounce)(c,300)).current;(0,a.useEffect)(function(){if(b){var e;null==(e=x.current)||e.focus()}},[b]),(0,a.useEffect)(function(){return function(){j.cancel()}},[j]);var _=function(){j.cancel(),v(""),c(""),y(!1)},w=function(e){v(e),j(e)},O=(0,r.jsx)("div",{className:l?"hidden md:flex":void 0,children:(0,r.jsx)(o.K,{onClick:function(){return y(!0)},"aria-label":f,icon:"magnifying-glass",size:"sm",variant:"outline"})});return b||l?b?(0,r.jsx)(u,{inputClassName:t,inputRef:x,onChange:w,onClose:_,placeholder:f,value:g}):(0,r.jsxs)(r.Fragment,{children:[O,l&&(0,r.jsx)(u,{className:"md:hidden",inputClassName:t,inputRef:x,onChange:w,onClose:_,placeholder:f,shouldAnimate:!1,shouldShowClose:!1,value:g})]}):O}},273704(e,t,n){"use strict";var r=n(391426),o=n(230763),i=n(739042),a=function(e){var t=e.changeButtonText,n=e.onChange,a=e.onDelete,s=e.removeButtonText,l=(0,o.Od)().isViewOnlyMasquerading;return(0,r.jsxs)("div",{className:"absolute top-0 flex size-full items-center justify-center gap-2 rounded-md bg-inverse/20 opacity-0 transition-opacity duration-300 hover:opacity-100 focus-within:opacity-100","data-testid":"image-input-overlay",children:[(0,r.jsx)(i.$,{variant:"secondary",size:"sm",startIcon:"arrow-box-up",type:"button",onClick:n,disabled:l,children:t}),(0,r.jsx)(i.$,{variant:"destructive",size:"sm",startIcon:"cross",onClick:a,type:"button",disabled:l,children:s})]})};n.d(t,{P:()=>a})},765350(e,t,n){"use strict";n.d(t,{p:()=>v});var r=n(391426),o=n(339950),i=n(849531),a=n(933578),s=n(417980),l=n(570310),c=n(817751),u=n(892907),d=function(e){var t=e.emptyStateDescription,n=e.emptyStateIconName,o=e.emptyStateTitle;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"bg-secondary group-hover:bg-secondary-hover flex rounded-full p-2 transition-colors duration-200",children:(0,r.jsx)(c.t,{name:void 0===n?"image":n,size:"md",color:"primary"})}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[o&&(0,r.jsx)(u.o5,{variant:"label-sm",color:"primary",children:o}),(0,r.jsx)(u.o5,{variant:"body-sm",color:"secondary",children:t})]})]})},p=n(257957),f=function(e){var t=e.label,n=void 0===t?"".concat((0,s.t)("uploading"),"..."):t;return(0,r.jsxs)("div",{className:"bg-secondary border-primary flex size-full min-h-30 flex-col items-center justify-center rounded-lg border-2 border-dashed gap-2 p-6",children:[(0,r.jsx)(p.a,{className:"!p-0"}),(0,r.jsx)(u.o5,{variant:"body-sm",color:"secondary",children:n})]})},m=n(273704),b=function(e){var t=e.changeImageText,n=e.emptyStateDescription,o=e.emptyStateIconName,i=e.emptyStateTitle,a=e.handleChangeCoverClick,l=e.handleDelete,c=e.imageUrl,u=e.previewAlt,p=e.processingLabel,b=e.processing,y=!!e.value;return y||b?(0,r.jsxs)("div",{className:"relative h-full",children:[b&&(0,r.jsx)(f,{label:p}),y&&c&&!b&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{loading:"lazy",className:"size-full rounded-md object-cover",src:c,alt:null!=u?u:""}),(0,r.jsx)(m.P,{onDelete:l,onChange:a,removeButtonText:(0,s.t)("remove"),changeButtonText:null!=t?t:(0,s.t)("replace")})]})]}):(0,r.jsx)("button",{type:"button","aria-label":(0,s.t)("add_image"),className:"bg-primary border-primary hover:bg-hover hover:border-hover active:bg-active active:border-active group flex size-full min-h-30 cursor-pointer select-none items-center gap-4 roun
1ded-lg border-2 border-dashed p-6 text-left transition-colors duration-200",onClick:a,children:(0,r.jsx)(d,{emptyStateDescription:n,emptyStateIconName:o,emptyStateTitle:i})})};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function g(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var v=function(e){var t,n=e.alt,c=e.className,u=e.emptyStateDescription,d=e.emptyStateIconName,p=e.emptyStateTitle,f=e.isProcessing,m=e.onChange,v=e.title,x=e.value,j=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["alt","className","emptyStateDescription","emptyStateIconName","emptyStateTitle","isProcessing","onChange","title","value"]),_=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)())||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return y(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return y(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),w=_[0],O=_[1];(0,a.useEffect)(function(){!f&&w&&O(void 0)},[f,w]);var S=(0,a.useCallback)(function(e){return(0,r.jsx)(b,g(h({},e),{emptyStateDescription:u,emptyStateIconName:d,emptyStateTitle:p,handleChangeCoverClick:function(t){var n;O(void 0),null==(n=e.handleChangeCoverClick)||n.call(e,t)},handleDelete:function(t){O((0,s.t)("removing")),e.handleDelete(t)},previewAlt:n,processingLabel:w,processing:!!(f||e.processing)}))},[n,u,d,p,f,w]),P=g(h({},j),{alt:n,className:(0,l.x)("relative min-w-0 w-full",c),renderer:S,title:null!=v?v:(0,s.t)("choose_image")});return void 0!==x||m?(0,r.jsx)(i.L,g(h({},P),{onChange:m,value:null!=x?x:""})):(0,r.jsx)(o.M,h({},P))};v.displayName="CompassLikeImageInput"},617492(e,t,n){"use strict";n.d(t,{g:()=>O});var r=n(391426),o=n(132416),i=n(294395),a=n(791009),s=n(310860),l=n(933578),c=n(417980),u=n(620708),d=n(677123),p=n(177631),f=(0,u.Z)(function(){return Promise.all([n.e(24014),n.e(10443),n.e(14982),n.e(84338),n.e(11753),n.e(88502),n.e(52965)]).then(n.bind(n,641471)).then(function(e){return{default:e.ProfileMessaging}})}),m=(0,u.Z)(function(){return Promise.all([n.e(10204),n.e(79862),n.e(37954),n.e(73501),n.e(87126),n.e(19165)]).then(n.bind(n,588507)).then(function(e){return{default:e.ProfileV4}})}),b={page_name:o.TP.PROFILE_VIEW},y=n(809061),h=n(737225),g=n(758777),v=n(278636),x=n(674251),j=(0,u.Z)(function(){return Promise.all([n.e(24014),n.e(10443),n.e(14982),n.e(84338),n.e(11753),n.e(88502),n.e(91068)]).then(n.bind(n,837562)).then(function(e){return{default:e.ProfileMessaging}})}),_=(0,u.Z)(function(){return n.e(71738).then(n.bind(n,617217)).then(function(e){return{default:e.ProfileV3}})}),w={page_name:o.TP.PROFILE_VIEW},O=(0,y.F)(function(e){var t,n,o=e.memberPublicId,u=e.params,y=e.open,h=e.onOpenChange,g=(0,s.z)({select:function(e){return e.pathname}}),v=(0,l.useRef)(g),x=(0,d.tc)(),j=x.liveChatRoomUuid,_=x.setLiveChatRoomUuid,w=(0,i.dS)({publicId:o,params:b}).getProfileInfoQuery,O=w.data,S=w.isLoading,P=w.refetch,C=function(e){e||_(null),h(e)};(0,l.useEffect)(function(){y&&(v.current=g)},[y]),(0,l.useEffect)(function(){y&&g!==v.current&&C(!1)},[y,g]);var k=null!=(t=null==u?void 0:u.recommendation_id)?t:void 0,I=j?null!=(n=null==O?void 0:O.name)?n:"":(0,c.t)("profile");return(0,r.jsx)(a.a.Root,{open:y,onOpenChange:C,size:"full-screen",children:(0,r.jsxs)(a.a.Content,{children:[(0,r.jsx)(a.a.Header,{title:I}),(0,r.jsx)(a.a.Body,{children:(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(p.D,{}),children:j?(0,r.jsx)(f,{uuid:j}):(0,r.jsx)("div",{className:"flex min-h-full w-full flex-col gap-6 md:flex-row xl:mx-auto xl:max-w-7xl",children:(0,r.jsx)(m,{member:O,isLoading:S,onClose:function(){return C(!1)},recommendationId:k,refetchProfileInfo:P})})})})]})})},function(e){var t,n,o=e.memberPublicId,a=e.params,s=(0,d.tc)(),u=s.liveChatRoomUuid,f=s.setLiveChatRoomUuid,m=(0,v.hS)(),b=(0,i.dS)({publicId:o,params:w}).getProfileInfoQuery,y=b.data,O=b.isLoading,S=b.refetch,P=null!=(t=null==a?void 0:a.recommendation_id)?t:void 0,C=function(){f(null),m.remove()};return(0,r.jsxs)(h.aF,{isOpen:m.visible,onClose:C,contentPortalId:"post-modal-portal",children:[(0,r.jsx)(h.aF.Overlay,{}),(0,r.jsxs)(h.aF.Content,{size:"full",className:"max-w-screen-xl",children:[(0,r.jsxs)("div",{className:"border-primary text-dark flex justify-between border-b !px-9 !py-4",children:[(0,r.jsx)(x.o.TitleSm,{weight:"semibold",children:u?null!=(n=null==y?void 0:y.name)?n:"":(0,c.t)("profile")}),(0,r.jsx)(g.s,{onClick:C})]}),(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(p.D,{}),children:u?(0,r.jsx)(j,{uuid:u}):(0,r.jsx)(h.aF.Body,{className:"md:!px-0 md:!pt-0 md:!overflow-hidden block grid-cols-12 !p-0 md:grid md:grid-flow-row-dense",children:(0,r.jsx)(_,{member:y,isLoading:O,onClose:function(){return m.remove()},recommendationId:P,refetchProfileInfo:S})})})]})]})})},180774(e,t,n){"use strict";var r=n(824622),o=n(242934),i=n(713864),a={OVERVIEW:"overview",PEOPLE:"people",BASIC_INFO:"basicInfo",NOTIFICATIONS:"notifications",PAYMENT:"payment",REMINDERS:"reminders",ADVANCED:"advanced"},s=[a.OVERVIEW,a.PEOPLE,a.BASIC_INFO,a.NOTIFICATIONS,a.REMINDERS,a.ADVANCED],l=[a.BASIC_INFO],c=[a.OVERVIEW,a.PEOPLE,a.BASIC_INFO,a.NOTIFICATIONS,a.PAYMENT,a.REMINDERS,a.ADVANCED],u={details:a.BASIC_INFO,email:a.REMINDERS,advancedOptions:a.ADVANCED},d=function(e){var t=e.canManageEventPayments,n=e.isEditMode,r=e.isEventsBuilderEnabled;return n?r&&t?c:s:l},p=function(e){var t,n,r=e.tab,o=e.tabs,i=e.isEventsBuilderEnabled&&null!=(t=u[null!=r?r:""])?t:r;return null!=(n=o.find(function(e){return e===i}))?n:a.BASIC_INFO},f={PAID:"paid",FREE:"free"},m=[r.cD.LIVE_ROOM,r.cD.LIVE_STREAM],b={PUBLISHED:"published",DRAFT:"draft"},y={CURRENT:"current",REMAINING:"remaining",ALL:"all"},h=function(){return(0,o.Q)((0,i.e)(new Date,10))};n.d(t,{DF:()=>a,Fg:()=>y,G$:()=>0xffffff,Or:()=>d,T8:()=>f,TG:()=>"event_setting_attributes",XQ:()=>b,dr:()=>h,e:()=>p,er:()=>"events.create.form",f5:()=>m,p2:()=>"events.edit_modal",xp:()=>3})}
1,718391(e,t,n){"use strict";n.d(t,{I:()=>E});var r=n(391426),o=n(46346),i=n(569132),a=n(906354),s=n(172271),l=n(647894),c=n(408861),u=n(41558),d=n(361287),p=n(930260),f=n(398061),m=n(230763),b=n(605274),y=n(14930),h=n(34819),g=n(70719),v=n(790389),x=n(417980),j=n(955321),_=n(804939),w=n(66108),O=n(6418),S=n(258752),P=n(410924),C=n(717526),k=function(e){var t=e.event,n=e.onPostDestroy,r=e.onRefetch,o=(0,C.d)(),i=o.success,s=o.error;return(0,S.n_)({mutationFn:function(e){return P.v.destroy({event:t,params:{delete_mode:e}})},onSuccess:function(){var e,o;n(t.id),i((0,a.aS)(t),{shouldUseProgress:!1}),null==r||null==(o=r())||null==(e=o.catch)||e.call(o,function(){})},onError:function(){return s((0,x.t)("event_dropdown_actions.delete_failed"))}})},I=function(e){var t=e.isBookmarked,n=e.onBookmarkToggle,r=e.shouldShowShareInMenu,o=e.onShareClick,i=e.canUpdatePost,a=e.onEditClick,s=e.canDuplicatePost,l=e.onDuplicateClick,c=e.canManagePost,u=e.isPinned,d=e.onPinClick,p=e.canDestroyPost,f=e.onDeleteClick,m=e.isEventShareableViaBroadcast,b=e.onSendAnnouncementClick,y=e.isSendingAnnouncement;return[{entry:{label:t?(0,x.t)("bookmarks.actions.remove"):(0,x.t)("bookmarks.actions.add_by_type.event"),icon:t?"bookmark-filled":"bookmark",onClick:n},show:!0},{entry:{label:(0,x.t)("events.event_actions_dropdown.share_event"),icon:"arrow-share",onClick:o},show:r},{entry:{label:(0,x.t)("edit_event"),icon:"edit",onClick:a},show:i},{entry:{label:(0,x.t)("duplicate_event"),icon:"copy",onClick:l},show:s},{entry:{label:u?(0,x.t)("unpin_from_space"):(0,x.t)("pin_to_space"),icon:u?"unpin":"pin",onClick:d},show:c&&!!d},{entry:{label:(0,x.t)("delete_event"),icon:"trash-can",onClick:f,danger:!0},show:p},{entry:"divider",show:m},{entry:{label:(0,x.t)("share_via_broadcast"),icon:"megaphone",onClick:b,disabled:y},show:m}].filter(function(e){return e.show}).map(function(e){return e.entry})};function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var E=function(e){var t=e.displayPinOption,n=e.variant,S=e.onChange,P=e.onPostDestroy,C=e.size,N=(0,d.W)({onChangeSharePost:S}),E=N.post,R=N.canUpdatePost,L=N.canDuplicatePost,D=N.canDestroyPost,T=N.canManagePost,M=N.refetchPostDetails,F=N.showShareOnWebOptions,K=N.get
1SharePostLink,B=N.sharePostData,q=(0,u.T)(),U=(0,f.Ir)(),z=U.refetch,W=U.data,$=(0,b.qI)(),V=(0,_.P)(),H=A((0,y.C)(!1),2),G=H[0],Z=H[1],Q=A((0,y.C)(!1),3),Y=Q[0],J=Q[1],X=Q[2],ee=(0,c.F)({event:E}),et=ee.onDeleteClickHandler,en=ee.onPinToTop,er=ee.isConfirmationModalOpen,eo=ee.closeConfirmationModal,ei=ee.isRecurringModalOpen,ea=ee.toggleRecurringModal,es=(0,m.Od)().currentCommunityMember,el=(0,O.V8)(es)&&"draft"!==E.status,ec=!!E.pinned_at_top_of_space,eu=($||V)&&F(W),ed=(0,j.l)(),ep=ed.onSendAnnouncement,ef=ed.isLoading,em=(0,o.T)({bookmarkId:E.bookmark_id,bookmarkType:"event",record:E,onSuccess:M,disableFetch:!0}),eb=em.createBookmark,ey=em.deleteBookmark,eh=k({event:E,onPostDestroy:P,onRefetch:z}),eg=I({isBookmarked:!!E.bookmark_id,onBookmarkToggle:function(){E.bookmark_id?ey():eb()},shouldShowShareInMenu:eu,onShareClick:J,canUpdatePost:R,onEditClick:function(){q.show({event:E})},canDuplicatePost:L,onDuplicateClick:Z,canManagePost:T,isPinned:ec,onPinClick:W&&(void 0===t||t)?function(){en()}:void 0,canDestroyPost:D,onDeleteClick:et,isEventShareableViaBroadcast:el,onSendAnnouncementClick:function(){return ep({eventId:E.id})},isSendingAnnouncement:ef});return R||L||D||T||V?(0,r.jsxs)(p.F,{children:[(0,r.jsx)(g.t,{options:eg,trigger:(0,r.jsx)(h.K,{variant:void 0===n?"ghost":n,size:void 0===C?"sm":C,icon:"dot-menu","aria-label":(0,x.t)("events.event_actions"),"data-testid":"action-more"}),align:"end",side:"bottom"}),eu&&(0,r.jsx)(v.A,{trigger:(0,r.jsx)("span",{"aria-hidden":"true"}),nativeButton:!1,open:Y,onOpenChange:X,side:"bottom",align:"end",sideOffset:8,className:"w-[360px]",children:(0,r.jsx)(i.U,{post:E,getSharePostLink:K,sharePostData:B})}),(0,r.jsx)(w.R,{isOpen:er,title:(0,x.t)("event_delete_modal.confirm.title"),onClose:eo,onCancel:eo,onConfirm:function(){return eh.mutate("")},confirmVariant:"danger",loading:eh.isPending,confirmText:(0,x.t)("delete_event"),children:(0,x.t)("event_delete_modal.confirm.description")}),(0,r.jsx)(l.L,{event:E,show:G,onClose:Z}),!(0,a.vF)(E)&&(0,r.jsx)(s.K,{show:ei,isDeleting:eh.isPending,onConfirm:function(e){return eh.mutate(e)},onCloseModal:ea})]}):null}},569132(e,t,n){"use strict";n.d(t,{U:()=>j});var r=n(391426),o=n(341409),i=n(547570),a=n(739042),s=n(958498),l=n(892907),c=n(417980),u=n(160870),d=n(398061),p=n(230763),f=n(268342),m=n(316172),b=n.n(m),y=n(933578),h=n(915779);function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var v=function(e){var t,n=e.post,r=e.getSharePostLink,o=e.sharePostData,i=(0,f.o)(),a=(0,p.Od)().currentCommunity,s=(0,d.Ir)().data,l=function(e){if(Array.isArray(e))return e}(t=(0,y.useState)({post:{show_post_teaser:!!(null==n?void 0:n.show_post_teaser),share_to_web:!!(null==n?void 0:n.share_post_enabled),share_post_enabled:!!(null==n?void 0:n.share_post_enabled),minimal_layout:!!(null==n?void 0:n.minimal_layout)}}))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return g(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=l[0],m=l[1],v=(0,y.useRef)(u),x=(0,h.sY)({spaceSlug:null==n?void 0:n.space_slug,slug:null==n?void 0:n.slug});return(0,y.useEffect)(function(){n.share_post_enabled&&!o&&r({postId:null==n?void 0:n.id,body:v.current})},[null==n?void 0:n.share_post_enabled,o,r,null==n?void 0:n.id]),{onClickCopyLink:function(e){b()(e||window.location.origin+x),i.add({title:(0,c.t)("post.share.link_copied"),icon:"circle-check-filled",iconColor:"success",isDismissible:!1})},onChange:function(e){m(function(t){var o={post:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t.post,e)};return queueMicrotask(function(){return r({postId:null==n?void 0:n.id,body:o})}),o})},formData:u,currentCommunity:a,currentSpace:s}},x="post.share",j=function(e){var t,n=e.getSharePostLink,d=e.post,p=e.sharePostData,f=v({post:d,getSharePostLink:n,sharePostData:p}),m=f.onClickCopyLink,b=f.onChange,y=f.formData,h=f.currentCommunity,g=f.currentSpace,j=(null==d||null==(t=d.event_setting_attributes)?void 0:t.allow_non_members_to_rsvp)||!1,_=!!((0,o.jx)(g)||(0,o._J)(g)||(null==g?void 0:g.is_hidden)||(null==h?void 0:h.is_private)),w=j?(0,c.t)([x,"share_to_web_public_content_warning"]):(null==h?void 0:h.is_private)&&(null==g?void 0:g.visibility)==="open"?(0,c.t)([x,"share_to_web_open_content_warning"]):null==g||!g.is_hidden||(0,o._J)(g)||(0,o.jx)(g)||(null==h?void 0:h.is_private)?(0,o.jx)(g)?(0,c.t)([x,"share_to_web_secret_content_warning"]):(0,c.t)([x,"share_to_web_private_content_warning"]):(0,c.t)([x,"share_to_web_hidden_content_warning"]);return(null==h?void 0:h.is_private)||(0,o._J)(g)||(null==g?void 0:g.is_hidden)||(0,o.jx)(g)?(0,r.jsxs)("div",{className:"flex min-w-64 flex-col gap-4",children:[(0,r.jsx)(s.d,{label:(0,c.t)([x,"share_to_web"]),checked:y.post.share_to_web,disabled:j,onCheckedChange:function(e){j||b({share_to_web:e})},labelTooltip:j?(0,c.t)([x,"share_to_web_on_description_allow_non_members_to_rsvp"]):(0,c.t)([x,"share_to_web_on_description"])}),y.post.share_to_web&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.Y,{value:null==p?void 0:p.share_post_link}),(_||j)&&(0,r.jsx)(i.F,{variant:"info",icon:"circle-info-filled",iconColor:"info",description:w}),!(null==h?void 0:h.is_private)&&(0,r.jsx)(s.d,{label:(0,c.t)([x,"minimal_layout"]),checked:y.post.minimal_layout,onCheckedChange:function(e){return b({minimal_layout:e})},labelTooltip:(0,c.t)([x,"minimal_layout_description"])})]})]}):(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-1 flex-col gap-1",children:[(0,r.jsx)(l.o5,{variant:"heading-sm",color:"primary",children:(0,c.t)([x,"share_to_web"])}),(0,r.jsx)(l.o5,{variant:"body-sm",color:"secondary",children:(0,c.t)([x,"post_is_public"])})]}),(0,r.jsx)(a.$,{type:"button",variant:"outline",size:"sm",onClick:function(){return m(null)},children:(0,c.t)("copy_link")})]})}},906354(e,t,n){"use strict";var r=n(180774),o=n(824622),i=n(794713),a=n(693410),s=n(417980),l={overview:"overview",people:"people",basicInfo:"basicInfo",details:"details",notifications:"notifications",email:"email",advancedOptions:"advancedOptions"},c=function(e){var t;return(null==e||null==(t=e.event_setting_attributes)?void 0:t.location_type)===o.cD.LIVE_STREAM},u=function(e){var t,n;return c(e)&&(null==e||null==(n=e.event_setting_attributes)||null==(t=n.live_stream_room_setting_attributes)?void 0:t.access_type)===a.tx.PUBLIC_STREAM},d=function(e){var t;
1return(null==e||null==(t=e.event_setting_attributes)?void 0:t.ticket_type)==r.T8.PAID},p=function(e){var t;return!!(e&&(0,i.PJ)(null==e||null==(t=e.event_setting_attributes)?void 0:t.ends_at))},f=function(e){return p(e)||(null==e?void 0:e.status)===o.XQ.DRAFT},m=function(e){var t=(null==e?void 0:e.event_type)===o.Ru.RECURRING,n=t?(0,s.t)("events.recurring_deletion_successful"):(0,s.t)("event_dropdown_actions.delete_successful");return f(e)&&(n=t?(0,s.t)("events.recurring_draft_deletion_successful"):(0,s.t)("event_dropdown_actions.draft_delete_successful")),n};n.d(t,{EZ:()=>u,aS:()=>m,bP:()=>l,vF:()=>d})},706949(e,t,n){"use strict";var r=n(391426),o=n(333789),i=n(570310),a=function(e){var t=e.dateString,n=e.isSquare,a=void 0!==n&&n,s=(0,o.H)(t),l=s.dayOfMonth,c=s.shortMonthString;return(0,r.jsxs)("div",{className:(0,i.x)("bg-secondary flex cursor-default flex-col items-center justify-center rounded-md py-1.5",{"h-12 w-12":a,"w-10":!a}),children:[(0,r.jsx)("div",{className:"text-dark text-center text-md font-bold leading-5",children:l}),(0,r.jsx)("div",{className:"text-dark text-center font-medium uppercase",style:{fontSize:"9px"},children:c})]})};n.d(t,{I:()=>a})},172271(e,t,n){"use strict";var r=n(391426),o=n(629070),i=n(933578),a=n(417980),s=n(66108),l=n(824622);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u="events.delete.recurring_event_modal",d=function(e){var t,n=e.show,d=e.onConfirm,p=e.onCloseModal,f=e.isDeleting,m=void 0!==f&&f,b=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)())||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return c(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=b[0],h=b[1];return(0,r.jsx)(s.R,{title:(0,a.t)("".concat(u,".title")),isOpen:void 0!==n&&n,confirmText:m?(0,a.t)("deleting"):(0,a.t)("".concat(u,".accept")),cancelText:(0,a.t)("".concat(u,".cancel")),onClose:p,onCancel:p,onConfirm:function(){y&&d(y)},disabled:m,confirmVariant:"danger",size:"sm",modalBodyClassName:"mt-6",children:(0,r.jsx)(o.z,{defaultChecked:l.Fg.CURRENT,name:"recurring_event_settings.frequency_edit",options:[{label:(0,a.t)("".concat(u,".this_event")),value:l.Fg.CURRENT},{label:(0,a.t)("".concat(u,".this_and_following")),value:l.Fg.REMAINING},{label:(0,a.t)("".concat(u,".all_events")),value:l.Fg.ALL}],size:"sm",onChange:function(e){h(e)}})})};n.d(t,{K:()=>d})},647894(e,t,n){"use strict";n.d(t,{L:()=>N});var r=n(391426),o=n(231127),i=n(382814),a=n(398061),s=n(339551),l=n(791009),c=n(892907),u=n(933578),d=n(417980),p=n(41558),f=n(51730),m=n(915779),b=n(519104),y=n(258752),h=n(717526),g=function(e){var t=(0,b.Z)(),n=(0,h.d)(),r=n.success,o=n.error,i=(0,s.E)().helpers.findById,a=(0,p.T)();return(0,y.n_)({mutationFn:function(t){return(0,f.$H)(m.iK.events.duplicate({spaceId:e.space_id,slug:e.slug}),{event:{event_id:e.id,space_id:t.space_id}})},onSuccess:function(e){var n=i(e.space_id);n?(t({to:"/c/$spaceSlug/$postSlug",params:{spaceSlug:n.slug,postSlug:e.slug}}),setTimeout(function(){a.show({event:e})},500),r((0,d.t)("event_duplicated_successfully"))):o((0,d.t)("space_not_found"))},onError:function(){o((0,d.t)("event_duplication_failed"))}})};function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var x=function(e){var t,n=e.event,o=e.onClose,p=e.show,f=(0,s.E)(),m=f.isLoading,b=f.helpers.spacesWithEventCreationAllowed,y=(0,a.Ir)().data,h=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(null==y?void 0:y.id))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return v(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return v(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),x=h[0],j=h[1],_=g(n);if((0,u.useEffect)(function(){(null==y?void 0:y.id)!==void 0&&void 0===x&&j(y.id)},[null==y?void 0:y.id,x]),m)return null;var w=b();return(0,r.jsx)(l.a.Root,{open:p,onOpenChange:function(e){e||o()},children:(0,r.jsxs)(l.a.Content,{children:[(0,r.jsx)(l.a.Header,{title:(0,d.t)("duplicate_event_title",{event_title:n.name})}),(0,r.jsxs)(l.a.Body,{children:[(0,r.jsx)(i.Y,{spaces:w,value:null!=x?x:null,onChange:function(e){return j(null!=e?e:null)},label:(0,d.t)("space"),description:(0,d.t)("duplicate_event_to_space"),"aria-label":(0,d.t)("select_space")}),(0,r.jsx)(c.o5,{variant:"caption",color:"tertiary",children:(0,d.t)("attendees_wont_be_duplicated")})]}),(0,r.jsx)(l.a.Footer,{primaryAction:{label:(0,d.t)("duplicate"),onClick:function(){return _.mutate({space_id:null!=x?x:void 0})},disabled:!x,loading:_.isLoading},secondaryAction:{label:(0,d.t)("cancel")}})]})})},j=n(927561),_=n(251334),w=n(570310),O=n(387099),S=n(429273),P=n(288513);function C(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var k=function(e){var t=e.event,n=e.onClose,o=e.show,i=(0,b.Z)(),l=(0,h.d)(),c=l.success,u=l.error,g=(0,s.E)(),v=g.isLoading,x=g.helpers,k=x.findById,I=x.spacesWithEventCreationAllowed,N=(0,a.Ir)().data,A=(0,p.T)(),E=(0,y.n_)({mutationFn:function(e){var n;return(n=function(){var n;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:return[4,(0,f.Ez)(m.iK.events.duplicate({spaceId:t.space_id,slug:t.slug}),{method:"PUT",body:JSON.stringify({event:{event_id:t.id,space_id:e.space_id}}),forReactQuery:!0})];case 1:if(!(n=r.sent())||!("id"in n))throw Error("Failed to duplicate event");return[2,n]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){C(i,r,o,a,s,"next",e)}function s(e){C(i,r,o,a,s,"throw",e)}a(void 0)})})()},onSuccess:function(e){var t=k(e.space_id);t?(i({to:"/c/$spaceSlug/$postSlug",params:{spaceSlug:t.slug,postSlug:e.slug}}),setTimeout(function(){A.show({event:e})},500),c((0,d.t)("event_duplicated_successfully"))):u((0,d.t)("space_not_found"))},onError:function(){u((0,d.t)("event_duplication_failed"))}});if(v)return null;var R=I();return(0,r.jsx)(_.a,{overflowVisible:!0,title:(0,d.t)("duplicate_event_title",{event_title:t.name}),show:o,onClose:n,children:(0,r.jsxs)(j.l,{onSubmit:function(e){E.mutate({space_id:e.space_id})},defaultValues:{space_id:null==N?void 0:N.id},children:[(0,r.jsx)(j.l.Item,{name:"space_id",hideBorder:!0,fullWidth:!0,description:(0,d.t)("duplicate_event_to_space"),rules:{required:(0,d.t)("events.create.form.space_required_error")},children:(0,r.jsx)(S.r,{spaces:R,name:"space_id",variant:"form-input",defaultValue:null==N?void 0:N.id})}),(0,r.jsx)("p",{className:(0,w.x)((0,P._h)("modal__small"),"mb-4 text-dark"),children:(0,d.t)("attendees_wont_be_duplicated")}),(0,r.jsx)(O.$,{type:"submit",variant:"primary",children:(0,d.t)("duplicate")})]})})};function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var N=function(e){return(0,o.T)("circle_v4_modals_enabled")?(0,r.jsx)(x,I({},e)):(0,r.jsx)(k,I({},e))}},22123(e,t,n){"use strict";var r=n(391426),o=n(529648),i=n(339043),a=n(417980),s=n(408861),l=function(e){var t=e.canEdit,n=e.event,l=n.pinned_at_top_of_space,c=(0,s.F)({event:n}).onPinToTop;return t?(0,r.jsx)(o.ms.ItemLink,{onClick:c,children:(0,r.jsx)(i.Pf,{label:(0,a.t)("pin_to_
1space"),field:"pin_to_top",value:l,variant:"small"})}):null};n.d(t,{a:()=>l})},408861(e,t,n){"use strict";var r=n(410924),o=n(344168),i=n(626538),a=n(602507),s=n(41558),l=n(230763),c=n(14930),u=n(933578),d=n(258752),p=n(417980),f=n(717526);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var h=function(e){var t=e.event,n=e.onDestroy,m=(0,l.Od)().isViewOnlyMasquerading,h=(0,o.d)(),g=(0,s.T)(),v=t.policies||{},x=v.can_destroy_post,j=v.can_update_post,_=v.can_duplicate_post,w=t.pinned_at_top_of_space,O=(0,f.d)(),S=O.success,P=O.error,C=y((0,c.C)(!1),2),k=C[0],I=C[1],N=y((0,u.useState)(!1),2),A=N[0],E=N[1],R=(0,u.useCallback)(function(){return E(function(e){return!e})},[]),L=(0,u.useCallback)(function(){return E(!1)},[]),D=y((0,c.C)(!1),2),T=D[0],M=D[1],F=(0,d.n_)({mutationFn:function(e){return r.v.destroy({event:t,params:{delete_mode:e}})},onSuccess:function(){null==n||n(t.id),S((0,i.aS)(t)),h()},onError:function(){return P((0,p.t)("event_dropdown_actions.delete_failed"))}});return{canEdit:j,onEdit:function(){j&&!m&&g.show({event:t})},canDelete:x,canDuplicate:_,onDelete:F.mutate,isDeleting:F.isPending,onPinToTop:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,r.v.pin({event:t,formData:{pin_to_top:!0,is_pinned:!w}})];case 1:return e.sent().ok?(S((0,p.t)(w?"event_unpinned":"event_pinned")),h()):P((0,p.t)(w?"event_unpinned_error":"event_pinned_error")),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,s,"next",e)}function s(e){b(i,r,o,a,s,"throw",e)}a(void 0)})})()},onDuplicate:I,onDeleteClickHandler:function(){m||((0,a.iD)(t)?M():R())},isDuplicateEventModalOpen:k,isConfirmationModalOpen:A,toggleConfirmationModal:R,closeConfirmationModal:L,isRecurringModalOpen:T,toggleRecurringModal:M}};n.d(t,{F:()=>h})},360093(e,t,n){"use strict";n.d(t,{q:()=>O});var r=n(391426),o=n(973646),i=n(529648),a=n(568316),s=n(398061),l=n(605274),c=n(417980),u=n(361287),d=n(339043),p=n(341409),f=n(809179),m=n(387099),b=n(230763),y=n(316172),h=n.n(y),g=n(933578),v=n(717526),x=n(915779);function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var _=function(e){var t,n=e.post,r=e.getSharePostLink,o=e.sharePostData,i=(0,v.d)().success,a=(0,b.Od)().currentCommunity,l=(0,s.Ir)().data,u=function(e){if(Array.isArray(e))return e}(t=(0,g.useState)({post:{show_post_teaser:!!(null==n?void 0:n.show_post_teaser),share_to_web:!!(null==n?void 0:n.share_post_enabled),share_post_enabled:!!(null==n?void 0:n.share_post_enabled),minimal_layout:!!(null==n?void 0:n.minimal_layout)}}))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return j(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return j(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=u[0],p=u[1],f=(0,x.sY)({spaceSlug:null==n?void 0:n.space_slug,slug:null==n?void 0:n.slug});return(0,g.useEffect)(function(){n.share_post_enabled&&!o&&r({postId:null==n?void 0:n.id,body:d})},[null==n?void 0:n.share_post_enabled,o,d,r,null==n?void 0:n.id]),{onClickCopyLink:function(e){h()(e||window.location.origin+f),i((0,c.t)("post.share.link_copied"),{duration:"short",shouldUseProgress:!1})},onChange:function(e){p(function(t){var o={post:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t.post,e)};return r({postId:null==n?void 0:n.id,body:o}),o})},formData:d,currentCommunity:a,currentSpace:l}},w=function(e){var t,n=e.getSharePostLink,s=e.post,l=e.sharePostData,u=_({post:s,getSharePostLink:n,sharePostData:l}),b=u.onClickCopyLink,y=u.onChange,h=u.formData,g=u.currentCommunity,v=u.currentSpace,x=(null==s||null==(t=s.event_setting_attributes)?void 0:t.allow_non_members_to_rsvp)||!1,j=!!((0,p.jx)(v)||(0,p._J)(v)||(null==v?void 0:v.is_hidden)||(null==g?void 0:g.is_private));return(null==g?void 0:g.is_private)||(0,p._J)(v)||(null==v?void 0:v.is_hidden)||(0,p.jx)(v)?(0,r.jsxs)("div",{children:[(0,r.jsx)(i.ms.ItemLink,{onClick:function(){x||y({share_to_web:!h.post.share_to_web})},children:(0,r.jsx)(d.Pf,{label:(0,c.t)("post.share.share_to_web"),tooltipText:x?(0,c.t)("post.share.share_to_web_on_description_allow_non_members_to_rsvp"):(0,c.t)("post.share.share_to_web_on_description"),field:"share_to_web",value:h.post.share_to_web,variant:"small",disabled:x})}),h.post.share_to_web&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex flex-row items-center",children:(0,r.jsx)("div",{className:"mb-2 mt-1 flex-1 px-5",children:(0,r.jsx)(f.p,{disabled:!0,value:null==l?void 0:l.share_post_link,rightAddon:(0,r.jsx)("button",{type:"button",onClick:function(){return b(null==l?void 0:l.share_post_link)},children:(0,r.jsx)(o.In,{type:"20-copy"})})})})}),(j||x)&&(0,r.jsx)("div",{className:"flex flex-row items-center",children:(0,r.jsx)("div",{className:"mb-2 mt-1 flex-1 px-5",children:(0,r.jsx)(a.o.LabelSm,{children:x?(0,c.t)("post.share.share_to_web_public_content_warning"):(null==g?void 0:g.is_private)&&(null==v?void 0:v.visibility)=="open"?(0,c.t)("post.share.share_to_web_open_content_warning"):null==v||!v.is_hidden||(0,p._J)(v)||(0,p.jx)(v)||(null==g?void 0:g.is_private)?(0,p.jx)(v)?(0,c.t)("post.share.share_to_web_secret_content_warning"):(0,c.t)("post.share.share_to_web_private_content_warning"):(0,c.t)("post.share.share_to_web_hidden_content_warning")})})}),!(null==g?void 0:g.is_private)&&(0,r.jsx)(i.ms.ItemLink,{onClick:function(){return y({minimal_layout:!h.post.minimal_layout})},children:(0,r.jsx)(d.Pf,{label:(0,c.t)("post.share.minimal_layout"),tooltipText:(0,c.t)("post.share.minimal_layout_description"),field:"minimal_layout",value:h.post.minimal_layout,variant:"small"})})]})]}):(0,r.jsxs)("div",{className:"flex flex-row items-center px-4 py-2",children:[(0,r.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,r.jsx)(a.o.LabelMd,{weight:"bold",children:(0,c.t)("post.share.share_to_web")}),(0,r.jsx)(a.o.LabelSm,{children:(0,c.t)("post.share.post_is_public")})]}),(0,r.jsx)("div",{children:(0,r.jsx)(m.$,{type:"button",variant:"secondary",onClick:function(){return b(null)},children:(0,c.t)("copy_link")})})]})},O=function(e){var t=e.onChange,n=e.button,d=(0,u.W)({onChangeSharePost:t}),p=d.showShareOnWebOptions,f=d.post,m=d.getSharePostLink,b=d.sharePostData,y=(0,l.qI)(),h=(0,s.Ir)().data,g=null!=n?n:(0,r.jsx)(o.In,{type:"16-share",size:20});return p(h)?(0,r.jsx)(i.ms,{size:"extra-large",direction:"bottom-end",menuButtonEl:"button",className:"w-full",buttonClassName:"w-full focus-visible:outline-secondary focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 md:p-1 hover:bg-tertiary rounded group flex items-center",button:y?g:(0,r.jsx)(a.o.LabelSm,{weight:"medium",color:"text-default group-hover:text-dark",children:(0,c.t)("post.share.title")}),children:(0,r.jsx)(w,{post:f,getSharePostLink:m,sharePostData:b})}):null}},526418(e,t,n){"use strict";var r=n(339551),o=n(488872),i=function(){var e,t=(0,r.E)(),n=(0,o.E)(),i=(t.helpers.space
1sWithPostCreationAllowed()||[]).filter(function(e){return"event"===e.post_type}),a=(null==(e=i.find(function(e){return e.slug===n}))?void 0:e.id)||null;return{spaces:i,spaceId:a}};n.d(t,{D:()=>i})},344168(e,t,n){"use strict";var r=n(372308),o=function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.shouldInvalidateAllEvents;r.eW.postBackedSurfaces(),void 0!==t&&t&&r.eW.all()}};n.d(t,{d:()=>o})},837496(e,t,n){"use strict";var r=n(391426),o=n(333789),i=n(892907),a=function(e){var t=e.dateString,n=e.timeZone,a=(0,o.H)(t,n),s=a.dayOfMonth,l=a.shortMonthString;return(0,r.jsxs)("div",{className:"border-primary bg-primary flex size-11 shrink-0 flex-col items-center justify-center rounded-md border shadow-sm",children:[(0,r.jsx)(i.o5,{variant:"heading-sm",color:"primary",component:"span",children:s}),(0,r.jsx)("span",{className:"text-tertiary text-[10px] font-bold capitalize leading-tight",children:l})]})};n.d(t,{O:()=>a})},955321(e,t,n){"use strict";var r=n(519104),o=n(755997),i=n(627522),a=n(914351),s=function(){var e=(0,r.Z)(),t=(0,o.N)(),n=t.mutate,s=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(t,["mutate"]),l=(0,a.W)();return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({onSendAnnouncement:function(t){var r=t.eventId,o=t.onSuccess;if(!l){e({href:i.C.list()}),null==o||o();return}n({source_content_id:r,source_content_type:"Event"},{onSuccess:function(t){null==o||o(),e({to:"/settings/emails/broadcast/$id/edit",params:{id:String(t.broadcast.id)}})}})}},s)};n.d(t,{l:()=>s})},168211(e,t,n){"use strict";var r,o=n(417980);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a={overview:"overview",people:"people",basicInfo:"basicInfo",details:"details",notifications:"notifications",email:"email",advancedOptions:"advancedOptions"},s=(i(r={},a.overview,"events.edit_modal.overview.title"),i(r,a.people,"events.edit_modal.people.title"),i(r,a.basicInfo,"events.create.form.basic_info"),i(r,a.details,"events.edit_modal.details.title"),i(r,a.notifications,"events.edit_modal.notifications.title"),i(r,a.email,"events.edit_modal.email.title"),i(r,a.advancedOptions,"events.edit_modal.advanced_options.title"),r),l=function(e){return(0,o.t)(s[e])},c={VIRTUAL:"virtual",IN_PERSON:"in_person",TBD:"tbd",LIVE_STREAM:"live_stream",LIVE_ROOM:"live_room"},u={SINGLE:"single",RECURRING:"recurring"},d={FREE:"free",PAID:"paid"},p={ON:"on",NEVER:"never",AFTER:"after"},f={CURRENT:"current",REMAINING:"remaining",ALL:"all"},m={PUBLISHED:"published",DRAFT:"draft"},b={PARTICIPANT:"participant",COHOST:"cohost",HOST:"host"},y={ATTENDEES:"attendees",COHOSTS:"cohosts"};n.d(t,{$s:()=>y,Fg:()=>f,Ru:()=>u,T8:()=>d,XQ:()=>m,Yb:()=>l,bP:()=>a,cD:()=>c,ft:()=>b,uL:()=>p})},602507(e,t,n){"use strict";var r=n(794713),o=n(693410),i=n(417980),a=n(168211),s=function(e){return(null==e?void 0:e.status)===a.XQ.DRAFT},l=function(e){return(null==e?void 0:e.status)===a.XQ.PUBLISHED},c=function(e){return(null==e?void 0:e.event_type)===a.Ru.RECURRING},u=function(e){var t;return(null==e||null==(t=e.event_setting_attributes)?void 0:t.location_type)===a.cD.LIVE_ROOM},d=function(e){var t;return(null==e||null==(t=e.event_setting_attributes)?void 0:t.location_type)===a.cD.LIVE_STREAM},p=function(e){var t,n;return d(e)&&(null==e||null==(n=e.event_setting_attributes)||null==(t=n.live_stream_room_setting_attributes)?void 0:t.access_type)===o.tx.PUBLIC_STREAM},f=function(e){return[a.cD.LIVE_STREAM,a.cD.LIVE_ROOM].includes(e)},m=function(e){var t;return!!(e&&(0,r.PJ)(null==e||null==(t=e.event_setting_attributes)?void 0:t.ends_at))},b=function(e){var t;return!!(e&&(0,r.PJ)(null==e||null==(t=e.event_setting_attributes)?void 0:t.starts_at))},y=function(e){var t;
1return(null==e||null==(t=e.event_setting_attributes)?void 0:t.ticket_type)==a.T8.PAID},h=function(e){var t;return e&&(null==e||null==(t=e.paywall_attributes)?void 0:t.published)},g=function(e){return c(e)&&!y(e)},v=function(e,t,n,r){if(e||r)return t?n?"yes":void 0:n?"yes":"invited"},x=function(e){var t=c(e),n=t?(0,i.t)("events.recurring_deletion_successful"):(0,i.t)("event_dropdown_actions.delete_successful");return(m(e)||s(e))&&(n=t?(0,i.t)("events.recurring_draft_deletion_successful"):(0,i.t)("event_dropdown_actions.draft_delete_successful")),n};n.d(t,{AD:()=>c,EZ:()=>p,Gb:()=>b,HF:()=>l,Qx:()=>s,aS:()=>x,iD:()=>g,ir:()=>v,nK:()=>m,sj:()=>f,ug:()=>u,vF:()=>y,x7:()=>h})},626538(e,t,n){"use strict";var r=n(168211),o=n(602507);n.d(t,{$s:()=>r.$s,AD:()=>o.AD,EZ:()=>o.EZ,Fg:()=>r.Fg,Gb:()=>o.Gb,HF:()=>o.HF,Qx:()=>o.Qx,Ru:()=>r.Ru,T8:()=>r.T8,XQ:()=>r.XQ,Yb:()=>r.Yb,aS:()=>o.aS,bP:()=>r.bP,cD:()=>r.cD,ft:()=>r.ft,ir:()=>o.ir,nK:()=>o.nK,sj:()=>o.sj,uL:()=>r.uL,ug:()=>o.ug,vF:()=>o.vF,x7:()=>o.x7})},809179(e,t,n){"use strict";var r=n(391426),o=n(570310),i=function(e){var t=e.label,n=e.value,i=e.placeholder,a=e.error,s=e.disabled,l=e.leftAddon,c=e.rightAddon,u=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["label","value","placeholder","error","disabled","leftAddon","rightAddon"]);return(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("div",{className:"text-sm font-semibold",children:t}),(0,r.jsxs)("div",{className:"mt-2 flex w-full",children:[l&&(0,r.jsx)("div",{className:(0,o.x)({"cursor-not-allowed bg-gray-50":s},"flex h-11 items-center rounded-l-md border border-gray-300 bg-white px-4 py-3"),children:l}),(0,r.jsx)("input",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,o.x)("placeholder:text-light h-11 grow rounded-md border border-solid px-4 py-3 outline-none placeholder:opacity-100 focus:border-2 focus:border-gray-500",{"border-red-600 focus:border-red-600":a,"border-primary bg-secondary text-light cursor-not-allowed":s,"text-dark border-gray-400":!s,"rounded-l-none":l,"rounded-r-none":c}),value:n,placeholder:i,disabled:s},u)),c&&(0,r.jsx)("div",{className:(0,o.x)({"border-primary bg-secondary text-light cursor-not-allowed":s},"bg-primary border-primary text-dark ml-[-1px] flex h-11 items-center rounded-r-md border px-4 py-3"),children:c})]}),a&&(0,r.jsx)("div",{className:"mt-2 text-sm text-red-600",children:a})]})};n.d(t,{p:()=>i})},748612(e,t,n){"use strict";n.d(t,{q:()=>_});var r=n(391426),o=n(441240),i=n(244174),a=n(915779),s=n(409858),l=n(892907),c=n(933578),u=n(574795),d=n(417980),p=n(387099),f=n(697890),m=function(){var e=new Date;return e.setTime(e.getTime()+31536e6),e},b={AT:"Austria",BE:"Belgium",BG:"Bulgaria",HR:"Croatia",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",EE:"Estonia",FI:"Finland",FR:"France",DE:"Germany",GR:"Greece",HU:"Hungary",IE:"Ireland",IT:"Italy",LV:"Latvia",LT:"Lithuania",LU:"Luxembourg",MT:"Malta",NL:"Netherlands",PL:"Poland",PT:"Portugal",RO:"Romania",SK:"Slovakia",SI:"Slovenia",ES:"Spain",SE:"Sweden",GB:"United Kingdom",CH:"Switzerland"};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g=["/sign_up","/communities/new",/^\/communities\/\d+\/templates$/,/^\/communities\/\d+\/questions$/,/^\/live\//],v=function(){return(0,f.R6)()||(0,f.xg)()},x=function(){var e=window.location.pathname;return g.some(function(t){return"string"==typeof t?e===t:t.test(e)})},j=function(){var e,t,n=!!(null==(e=window.webview)?void 0:e.isComingFromReactNativeWebview)||!!(null==(t=window.webview)?void 0:t.isInsideMobileWebview),f=h((0,o.lT)([i.z0]),2),y=f[0],g=f[1],j=h((0,c.useState)(!0),2),_=j[0],w=j[1],O=h((0,c.useState)(window.CLOUDFLARE_COUNTRY_CODE),2),S=O[0],P=O[1],C=y[i.z0],k=function(){var e=window.location.hostname;return e.endsWith(".circle.so")&&3===e.split(".").length?i.cq:e},I=function(e){g(i.z0,e,{expires:m(),domain:k(),path:"/",sameSite:"none",secure:v()})},N=function(){v()&&(C||(null==S?void 0:S.length)||fetch("https://cloudflare-quic.com/b/headers").then(function(e){return e.json()}).then(function(e){return P(e.headers["Cf-Ipcountry"])}).catch(function(e){console.error(e)}))},A=function(){w(!Object.keys(b).includes(S||""))};return((0,c.useEffect)(function(){N()}),(0,c.useEffect)(function(){A()},[S]),!document.cookie||_||void 0!==C||n||"app.circle.so"===new URLSearchParams(window.location.search).get("request_host")||x()||!v())?null:(0,u.createPortal)((0,r.jsxs)("div",{id:"circle-cookie-banner",className:"border-primary bg-primary fixed bottom-0 z-[999999] w-full gap-4 border p-4 shadow-lg md:bottom-8 md:right-8 md:flex md:w-auto md:max-w-[calc(100%-4rem)] md:items-center md:rounded-md",children:[(0,r.jsx)("div",{className:"mb-4 leading-4 md:mb-0 md:flex-1",children:(0,r.jsxs)(l.o5,{variant:"body-sm",color:"primary",children:[(0,d.t)(["gdpr.cookie_banner.description"])," ",(0,d.t)("gdpr.cookie_banner.privacy_policy.prefix").trim()," ",(0,r.jsx)(s.N,{href:a.h2.privacy_policy(),target:"_blank",rel:"noreferrer",variant:"custom",typography:"body-sm",color:"primary",children:(0,r.jsx)("span",{className:"underline",children:(0,d.t)("gdpr.cookie_banner.privacy_policy.link")})})," ",(0,d.t)("gdpr.cookie_banner.privacy_policy.suffix").trim()]})}),(0,r.jsxs)("div",{className:"flex flex-row items-center gap-4",children:[(0,r.jsx)("div",{className:"flex-1 md:flex-none",children:(0,r.jsx)(p.$,{onClick:function(){return I(!1)},variant:"secondary",full:!0,children:(0,d.t)("gdpr.cookie_banner.decline_button")})}),(0,r.jsx)("div",{className:"flex-1 md:flex-none",children:(0,r.jsx)(p.$,{onClick:function(){return I(!0)},variant:"primary",full:!0,children:(0,d.t)("gdpr.cookie_banner.accept_button")})})]})]}),document.body)},_=function(){return(0,r.jsx)(o.vD,{children:(0,r.jsx)(j,{})})}},231584(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(417980),a=n(387099),s=function(e){var t=e.value,n=e.handleFeedback,s=e.isFeedbackGiven,l=void 0===s?null:s;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.$,{variant:!0===t?"circle":"secondary",type:"button",full:!0,disabled:!!l,onClick:function(){!0!==t&&n(!0)},children:[(0,i.t)("help_widget.post.feedback_yes"),(0,r.jsx)(o.In,{type:"16-thumbs-up",size:16,className:"ml-1"})]}),(0,r.jsxs)(a.$,{variant:!1===t?"circle":"secondary",type:"button",full:!0,disabled:!!l,onClick:function(){!1!==t&&n(!1)},children:[(0,i.t)("help_widget.post.feedback_no"),(0,r.jsx)(o.In,{type:"16-thumbs-down",size:16,className:"ml-1"})]})]})};n.d(t,{p:()=>s})},592194(e,t,n){"use strict";var r=n(417980),o=["/messages/new","/messages","/live","/settings/workflows/edit","/settings/workflows/new","/settings/workflows/view","/discover","/settings/branded_apps_builder_ui","/settings/pages/edit","/settings/recap-2025","/2025"],i={enter:"transition ease-out duration-200 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease-in duration-200 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95"},a=[{get text(){return(0,r.t)("help_widget.constants.bug")},value:"bug"},{get text(){return(0,r.t)("help_widget.constants.feedback")},value:"feedback"},{get text(){return(0,r.t)("help_widget.constants.question")},value:"question"}],s=[{get text(){return(0,r.t)("help_widget.constants.ticket_priorities.i_have_a_question_or_feedback")},value:"low_i_have_a_question_or_feedback"},{get text(){return(0,r.t)("help_widget.constants.ticket_priorities.a_non_critical_issue_is_slowing_me_down")},value:"low_a_non_critical_issue_is_slowing_me_down"},{get text(){return(0,r.t)("help_widget.constants.ticket_priorities.a_critical_issue_is_impacting_some_members_of_my_community")},value:"high_a_critical_issue_is_impacting_some_members_of_my_community"},{get text(){return(0,r.t)("help_widget.constants.ticket_priorities.a_member_or_admin_cannot_access_their_account")},value:"urgent_a_member_or_admin_cannot_access_their_account"},{get text(){return(0,r.t)("help_widget.constants.ticket_priorities.a_major_feature_does_not_work_for_my_community")},value:"urgent_a_major_feature_does_not_work_for_my_community"}],l=[{get text(){return(0,r.t)("help_widget.constants.conversations.types.all")},value:"all"},{get text(){return(0,r.t)("help_widget.constants.conversations.types.copilot")},value:"circle_bot"},{get text(){return(0,r.t)("help_widget.constants.conversations.types.live_chat")},value:"live_chat"},{get text(){return(0,r.t)("help_widget.constants.conversations.types.email")},value:"email"}],c=[{get text(){return(0,r.t)("help_widget.constants.conversations.statuses.all")},value:"all"},{get text(){return(0,r.t)("help_widget.constants.conversations.statuses.draft")},value:"draft"},{get text(){return(0,r.t)("help_widget.constants.conversations.statuses.open")},value:"open"},{get text(){return(0,r.t)("help_widget.constants.conversations.statuses.solved")},value:"solved"},{get text(){return(0,r.t)("help_widget.constants.conversations.statuses.closed")},value:"closed"}];n.d(t,{CN:()=>"help-widget-is-sidebar-open",De:()=>"https://circle.so/partner-directory",Eu:()=>i,G9:()=>"virtual",MA:()=>36e5,MW:()=>"https://circle-academy.circle.so/c/start-here/",Mu:()=>"help-widget-virtual-messages",NP:()=>"help-widget-is-open",Ne:()=>"https://help.circle.so",Pt:()=>"https://community.circle.so/feed",T8:()=>a,Tg:()=>"help-widget-is-expanded",W4:()=>l,X3:()=>0x3200000,bl:()=>c,dF:()=>"uploading",e0:()=>9e5,eR:()=>s,fh:()=>"failed",gI:()=>"help-widget-fab-visible",iG:()=>"https://community.circle.so/c/product-updates",kE:()=>"https://community.circle.so/c/live-events/",nL:()=>"completed",ok:()=>"help-widget-virtual-conversation-type",xs:()=>o})},476283(e,t,n){"use strict";var r=n(391426),o=n(230763),i=n(933578),a=n(244405),s=n(592194);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||u(e,t)||function(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}}var d="400ms",p=(0,i.createContext)({isOpen:!1,toggleWidget:function(){},openWidget:function(){},isExpanded:!1,isFabVisible:!0,isShowingLeaveWarning:!1,isSidebarOpen:!1,leaveWarningTrigger:null,expandWidget:function(){},collapseWidget:function(){},currentSpaceProperties:{name:"",emoji:"",custom_emoji_url:"",custom_emoji_dark_url:""},setCurrentSpaceProperties:function(){},sidebarTransitionDuration:d,setIsShowingLeaveWarning:function(){},setLeaveWarningTrigger:function(){},expandSideBar:function(){},collapseSideBar:function(){},hideFab:function(){},showFab:function(){},shouldDisplayOnboarding:!1,virtualMessages:[],virtualConversationType:null,addVirtualMessage:function(){},setVirtualMessages:function(){},clearVirtualMessages:function(){},setVirtualConversationType:function(){}});p.displayName="HelpWidgetContext";var f=function(){var e=(0,i.useContext)(p);if(!e)throw Error("useHelpWidgetContext must be used within a HelpWidgetContextProvider");return e},m=function(e){var t,n=e.children,f=(0,o.Od)(),m=f.isViewOnlyMasquerading,b=f.currentCommunityMember,y=(0,i.useRef)(null),h=(null==b||null==(t=b.preferences)?void 0:t.has_seen_widget_onboarding)===!1,g=c((0,i.useState)(function(){return!m&&"true"===a.H.getItem(s.NP)}),2),v=g[0],x=g[1],j=c((0,i.useState)(function(){return"true"===a.H.getItem(s.Tg)}),2),_=j[0],w=j[1],O=c((0,i.useState)(function(){return"true"===a.H.getItem(s.CN)}),2),S=O[0],P=O[1],C=c((0,i.useState)(function(){var e=a.H.getItem(s.gI);return null===e||"true"===e}),2),k=C[0],I=C[1],N=c((0,i.useState)(!1),2),A=N[0],E=N[1],R=c((0,i.useState)(null),2),L=R[0],D=R[1],T=c((0,i.useState)(function(){try{var e=a.H.getItem(s.Mu);return e?JSON.parse(e):[]}catch(e){return[]}}),2),M=T[0],F=T[1],K=c((0,i.useState)(function(){try{return a.H.getItem(s.ok)||null}catch(e){return null}}),2),B=K[0],q=K[1],U=c((0,i.useState)(d),2),z=U[0],W=U[1],$=(0,i.useRef)(null);(0,i.useEffect)(function(){a.H.setItem(s.Tg,_.toString())},[_]),(0,i.useEffect)(function(){a.H.setItem(s.NP,v.toString())},[v]),(0,i.useEffect)(function(){a.H.setItem(s.CN,S.toString())},[S]),(0,i.useEffect)(function(){a.H.setItem(s.gI,k.toString())},[k]),(0,i.useEffect)(function(){var e=M.map(function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={show_fading_text_effect:!1},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t});a.H.setItem(s.Mu,JSON.stringify(e))},[M]),(0,i.useEffect)(function(){B&&a.H.setItem(s.ok,B)},[B]);var V=c((0,i.useState)({name:"",emoji:"",custom_emoji_url:"",custom_emoji_dark_url:""}),2),H=V[0],G=V[1],Z=(0,i.useCallback)(function(){null!==$.current&&(clearTimeout($.current),$.current=null)},[]),Q=(0,i.useCallback)(function(){Z(),W("200ms"),$.current=setTimeout(function(){W(d),$.current=null},200)},[Z]);(0,i.useEffect)(function(){return function(){return Z()}},[Z]);var Y=(0,i.useCallback)(function(){return w(!0)},[]),J=(0,i.useCallback)(function(){return w(!1)},[]),X=(0,i.useCallback)(function(){Q(),P(!0)},[Q]),ee=(0,i.useCallback)(function(){Q(),P(!1)},[Q]),et=(0,i.useCallback)(function(){return I(!1)},[]),en=(0,i.useCallback)(function(){return I(!0)},[]),er=(0,i.useCallback)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.shouldTriggerOnWidgetClose;m||(void 0!==t&&t&&v&&null!==y.current?y.current():x(!v))},[m,v]),eo=(0,i.useCallback)(function(){return x(!0)},[]),ei=(0,i.useCallback)(function(e){return F(function(t){return((function(e){if(Array.isArray(e))return l(e)})(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||u(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])})},[]),ea=(0,i.useCallback)(function(){F([]),q(null),a.H.removeItem(s.Mu),a.H.removeItem(s.ok)},[]),es=(0,i.useMemo)(function(){return{isOpen:v,toggleWidget:er,openWidget:eo,isExpanded:_,isFabVisible:k,isShowingLeaveWarning:A,isSidebarOpen:S,leaveWarningTrigger:L,expandWidget:Y,collapseWidget:J,currentSpaceProperties:H,setCurrentSpaceProperties:G,setIsShowingLeaveWarning:E,setLeaveWarningTrigger:D,expandSideBar:X,collapseSideBar:ee,sidebarTransitionDuration:z,hideFab:et,showFab:en,shouldDisplayOnboarding:h,addVirtualMessage:ei,clearVirtualMessages:ea,setVirtualConversationType:q,setVirtualMessages:F,virtualMessages:M,virtualConversationType:B}},[v,er,eo,_,k,A,S,L,Y,J,H,X,ee,z,et,en,h,ei,ea,M,B]);return(0,r.jsx)(p.Provider,{value:es,children:n})};n.d(t,{O:()=>m,sO:()=>f})},489994(e,t,n){"use strict";var r=n(258752),o=n(51730),i=n(915779);function a(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onSuccess,n=e.onError;return(0,r.n_)({mutationFn:function(e){var t,n=e.postId,r=e.helpful;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){return[2,(0,o.oK)(i.iK.helpWidget.createPostFeedback(),{post_id:n,helpful:r})]})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function s(e){a(i,r,o,s,l,"next",e)}function l(e){a(i,r,o,s,l,"throw",e)}s(void 0)})})()},onSuccess:function(){null==t||t()},onError:n})};n.d(t,{X:()=>s})},102608(e,t,n){"use strict";var r=n(933578),o="circle:widget-navigate",i=function(){return(0,r.useCallback)(function(e,t){var n=new CustomEvent(o,{bubbles:!0,cancelable:!0,composed:!1,detail:{url:e,shouldReload:null==t?void 0:t.shouldReload}});document.dispatchEvent(n)},[])};n.d(t,{F:()=>i,y:()=>o})},58007(e,t,n){"use strict";var r=n(391426),o=n(34819),i=n(617593),a=n(892907),s=n(417980),l=n(570310),c=n(266572),u=function(e){var t=e.isLgScreen,n=e.onClose;return(0,r.jsxs)("div",{className:(0,l.x)("grid min-h-0 items-stretch overflow-hidden",t&&["lg:-mx-6 lg:-mb-8","lg:grid-cols-[65fr_35fr]"],!t&&"gap-6"),children:[(0,r.jsx)("div",{className:"min-w-0 lg:min-h-0",children:(0,r.jsx)("div",{className:(0,l.x)(c.DC,"lg:max-h-[calc(100dvh-4rem)]"),children:(0,r.jsx)(i.E,{shape:"square",className:"absolute inset-0 size-full"})})}),(0,r.jsx)("div",{className:"relative min-w-0 lg:min-h-0",children:(0,r.jsx)("div",{className:"lg:absolute lg:inset-0",children:(0,r.jsxs)("div",{className:"border-primary bg-primary flex min-h-0 flex-col overflow-hidden lg:h-full",children:[(0,r.jsxs)("div",{className:"border-primary flex min-h-16 shrink-0 items-center justify-between gap-3 border-b px-5 py-3",children:[(0,r.jsx)(a.o
15,{variant:"heading-lg",color:"primary",component:"h2",className:"min-w-0 flex-1 truncate",children:(0,s.t)("image_space.grid_view.post_details")}),(0,r.jsx)(o.K,{icon:"cross","aria-label":(0,s.t)("close"),variant:"ghost",size:"sm",onClick:n})]}),(0,r.jsxs)("div",{className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto p-5 pb-0",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,r.jsx)(i.E,{shape:"rounded",className:"size-10 shrink-0"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,r.jsx)(i.E,{className:"h-4 w-32"}),(0,r.jsx)(i.E,{className:"h-3 w-24"})]})]}),(0,r.jsx)(i.E,{className:"size-8 shrink-0"})]}),(0,r.jsxs)("div",{className:"space-y-2.5",children:[(0,r.jsx)(i.E,{className:"h-4 w-full"}),(0,r.jsx)(i.E,{className:"h-4 w-full"}),(0,r.jsx)(i.E,{className:"h-4 w-5/6"}),(0,r.jsx)(i.E,{className:"h-4 w-2/3"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(i.E,{className:"size-8"}),(0,r.jsx)(i.E,{className:"size-8"}),(0,r.jsx)(i.E,{className:"h-4 w-16"}),(0,r.jsx)(i.E,{className:"h-4 w-20"})]})]}),(0,r.jsxs)("div",{className:"space-y-4 pt-5",children:[(0,r.jsx)(i.E,{className:"h-4 w-40"}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)(i.E,{shape:"rounded",className:"size-8 shrink-0"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,r.jsx)(i.E,{className:"h-4 w-28"}),(0,r.jsx)(i.E,{className:"h-4 w-full"}),(0,r.jsx)(i.E,{className:"h-4 w-4/5"})]})]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)(i.E,{shape:"rounded",className:"size-8 shrink-0"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,r.jsx)(i.E,{className:"h-4 w-24"}),(0,r.jsx)(i.E,{className:"h-4 w-11/12"})]})]})]})]})]})]})})})]})};n.d(t,{n:()=>u})},266572(e,t,n){"use strict";n.d(t,{BH:()=>50,DC:()=>"bg-secondary relative flex aspect-square w-full items-center justify-center overflow-hidden rounded-md lg:rounded-none",Q9:()=>100,XX:()=>3,ZF:()=>6,de:()=>
12,mc:()=>1,r5:()=>50,uj:()=>0})},355101(e,t,n){"use strict";n.d(t,{h:()=>K});var r=n(391426),o=n(417105),i=n(339551),a=n(341409),s=n(428266),l=n(580909),c=n(230763),u=n(570310),d=n(92406),p=n(534529),f=n(417980),m=n(244174),b=n(208690),y=n(75132),h=n(661368),g=n(810284),v=n(274685),x=new g.E((0,y.Dn)()),j=function(){var e=(0,b.w)();return(0,h.A)(m.dL.OPEN_SEARCH_MODAL,function(t){t.preventDefault(),e.show()}),(0,r.jsx)(v.Ht,{client:x})},_=n(511888),w=n(288513),O=n(693546),S=n(202090),P=function(e){var t=e.currentCommunity,n=(0,S.wR)().isDarkAppearance,o=t||{},i=o.name,a=o.logo_url,s=o.dark_logo_url,l=a;return(n&&s&&(l=s),l)?(0,r.jsx)("a",{href:"/",className:(0,w.W2)("community__brand"),children:(0,r.jsx)("div",{className:(0,w.W2)("community__logo"),children:(0,r.jsx)("img",{loading:"lazy",alt:(0,f.t)("community_logo_alt",{community_name:i}),src:l})})}):(0,r.jsxs)("a",{href:"/",className:(0,w.W2)("community__brand"),children:[(0,r.jsx)("div",{className:(0,u.x)((0,w.W2)("brand-icon"),(0,w._h)("brand-icon__initial"),"!rounded-lg")}),(0,r.jsx)("div",{className:(0,w.W2)("name"),children:i})]})},C=n(529648),k=n(915779),I=n(818185),N=n(310860),A=n(617492),E=n(734527),R=n(6418),L=function(){var e=(0,c.Od)(),t=e.currentUser,n=e.currentCommunityMember,o=(0,N.z)({select:function(e){return{pathname:e.pathname,search:e.searchStr}}}),i=(0,c.U3)(),a=(0,A.g)().show,l=(0,R.V8)(n),d=(0,I.a)().post_login_redirect,p=(null==n?void 0:n.policies)||{},m=p.can_access_billing,b=p.can_access_authentication_page,y=[{action:function(){n&&a({memberPublicId:n.public_uid})},label:(0,f.t)("my_profile")},{to:k.Qr.profile(o),label:(0,f.t)("edit_profile")},{to:k.Qr.notifications(o),label:(0,f.t)("notification")}];return(b&&y.push({to:k.Qr.authentication(o),label:(0,f.t)("authentication")}),m&&y.push({to:k.Qr.billing(o),label:(0,f.t)("billing")}),l&&y.push({action:function(){window.location.href="/analytics"},label:(0,f.t)("analytics_title")},{to:"/settings/audience/manage",label:(0,f.t)("audience")},{to:"/settings",label:(0,f.t)("settings_title")}),t&&n)?(0,r.jsx)(C.ms,{className:(0,u.x)((0,w.W2)("user-menu"),"z-[9999]"),button:(0,r.jsx)(E.J,{name:null==n?void 0:n.name,src:null==n?void 0:n.avatar_url,size:"8"}),appendTo:document.getElementById("mainHeader")||document.body,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:(0,u.x)("bg-secondary -mt-2 mb-1.5 w-full py-1"),children:(0,r.jsx)(C.ms.ItemWithLink,{to:"/u/".concat(null==n?void 0:n.public_uid,"?show_back_link=true"),children:null==n?void 0:n.name})}),y.map(function(e){return(0,r.jsx)(C.ms.ItemWithLink,{to:e.to,onClick:e.action,children:e.label},e.label)}),(0,r.jsx)(C.ms.Separator,{}),(0,r.jsx)(C.ms.ItemLink,{onClick:function(){return window.location.href="/users/sign_out"},children:(0,f.t)("sign_out")})]})}):(0,r.jsx)("div",{className:(0,w._h)("user-join__mobile"),children:(0,r.jsx)("div",{className:(0,w._h)("user-join__menu"),children:(0,r.jsxs)(C.ms,{button:(0,r.jsx)(s.K,{name:"20-user",iconSize:20,buttonSize:28,ariaLabel:(0,f.t)("log_in"),iconClassName:"!w-5 !h-5 !text-c-header"}),className:"z-[9999]",appendTo:document.getElementById("mainHeader")||document.body,children:[(0,r.jsx)(C.ms.ItemLink,{onClick:function(){return window.location.href=k.L9.signIn(Array(d).join(","))},children:(0,f.t)("log_in")}),i(function(e){var t=e.communitySignupUrl;return(0,r.jsx)(C.ms.ItemLink,{onClick:function(){return window.location.href=t},children:(0,f.t)("sign_up")})})]})})})},D=function(){var e=(0,d.i)().minimal_layout,t=(0,_.t)(),n=(0,c.Od)(),o=n.currentCommunity,i=n.currentCommunitySettings,a=(0,l.vJ)(),m=!!(0,O.a)().isPostDetailPage,b=!!(null==i?void 0:i.post_details_mobile_header_enabled);return m&&b?null:(0,r.jsx)("div",{className:"sticky top-0 z-30",children:(0,r.jsx)("header",{id:"mainHeader",className:(0,u.x)((0,w.W2)("header header-v2"),"!bg-c-header"),style:a,children:(0,r.jsxs)("div",{className:(0,w.W2)("header__inside"),children:[!e&&(0,r.jsx)("div",{className:(0,w.W2)("header__menu"),children:(0,r.jsx)(s.K,{name:"hamburger",onPointerDown:function(e){return e.stopPropagation()}
1,onClick:function(){null==t||t.toggle()},ariaLabel:(0,f.t)("toggle_menu"),className:(0,w._h)("toggle-button"),buttonSize:28,iconSize:20,iconClassName:"!w-5 !h-5 !text-c-header"})}),(0,r.jsx)("div",{className:(0,u.x)((0,w.W2)("header__left"),{"!justify-start":e}),children:(0,r.jsx)(P,{currentCommunity:o})}),(0,r.jsxs)("div",{className:(0,w.W2)("header__actions"),children:[(0,r.jsx)(j,{}),(0,r.jsx)("div",{className:(0,w.W2)("header__action"),children:(0,r.jsx)("a",{href:"/analytics",children:(0,r.jsx)("svg",{className:(0,u.x)((0,w.W2)("icon"),(0,w._h)("icon-analytics")),viewBox:"0 0 24 24",children:(0,r.jsx)("use",{xlinkHref:"#icon-analytics"})})})}),(0,r.jsx)("div",{className:(0,w.W2)("header__action"),children:(0,r.jsx)(p.N_,{to:"/settings/audience/manage",children:(0,r.jsx)("svg",{className:(0,u.x)((0,w.W2)("icon"),(0,w._h)("icon-members")),viewBox:"0 0 24 24",children:(0,r.jsx)("use",{xlinkHref:"#icon-members"})})})}),(0,r.jsx)("div",{className:(0,w.W2)("header__action"),children:(0,r.jsx)(p.N_,{to:"/settings",children:(0,r.jsx)("svg",{className:(0,u.x)((0,w.W2)("icon"),(0,w._h)("icon-settings")),viewB
1ox:"0 0 24 24",children:(0,r.jsx)("use",{xlinkHref:"#icon-settings"})})})}),(0,r.jsx)("div",{className:(0,u.x)((0,w.W2)("header__user"),"relative z-30"),children:(0,r.jsx)(L,{})})]})]})})})},T=n(776577),M=n(488872),F=n(877793),K=function(){var e=(0,M.E)(),t=(0,i.E)().helpers.findBy({slug:e}),n=(0,F.s)(),s=(0,T.z)();return n?s?(0,r.jsx)("header",{className:(0,w.W2)("header"),children:(0,r.jsx)(o.D,{showMemberAvatarsRow:!!t&&((0,a.QM)(t)||(0,a.ge)(t))})}):(0,r.jsx)(D,{}):null}},803224(e,t,n){"use strict";n.d(t,{rl:()=>d,m1:()=>v,DN:()=>f,wM:()=>m,h3:()=>g,KR:()=>b,kY:()=>h,w8:()=>y});var r=n(391426),o=n(173630),i=n(109257),a=n(933578);function s(e){var t=[];return{push:function(n,r){var o=t.findIndex(function(e){return e.id===n});o>=0&&t.splice(o,1),t.push({id:n,crumb:r}),e(r)},pop:function(n){var r,o,i=t.findIndex(function(e){return e.id===n});i>=0&&t.splice(i,1),e(null!=(r=null==(o=t.at(-1))?void 0:o.crumb)?r:null)}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var u=(0,a.createContext)(null);u.displayName="CanvasHeaderContext";var d=function(e){var t=e.children,n=(0,o.r)(),l=(0,i.k)({select:function(e){var t;return null!=(t=e.location.state.__TSR_index)?t:0}}),d=c((0,a.useState)(l),2),p=d[0],f=d[1],m=c((0,a.useState)(null),2),b=m[0],y=m[1],h=c((0,a.useState)(null),2),g=h[0],v=h[1],x=c((0,a.useState)(null),2),j=x[0],_=x[1],w=(0,a.useRef)(s(y)).current,O=(0,a.useRef)(s(v)).current,S=(0,a.useRef)(s(_)).current,P=(0,a.useRef)(null),C=(0,a.useCallback)(function(e){P.current=e},[]);(0,a.useEffect)(function(){return n.history.subscribe(function(e){var t,r=e.action,o=null!=(t=n.state.location.state.__TSR_index)?t:0;f(function(e){return"PUSH"===r.type?o:Math.max(e,o)})})},[n]);var k=(0,a.useMemo)(function(){return{canGoBack:n.history.canGoBack(),canGoForward:l<p,goBack:function(){var e;(null==(e=P.current)?void 0:e.call(P))||n.history.back()},goForward:function(){return n.history.forward()},invokeBeforeGoBack:function(){var e;return!!(null==(e=P.current)?void 0:e.call(P))},pageTitleCrumb:b,pageTitleParentCrumb:g,pageTitleGrandparentCrumb:j,setBeforeGoBack:C,titleStack:w,parentStack:O,grandparentStack:S}},[n,l,p,b,g,j,C,w,O,S]);return(0,r.jsx)(u.Provider,{value:k,children:t})};d.displayName="CanvasHeaderProvider";var p=function(){var e=(0,a.useContext)(u);if(!e)throw Error("useCanvasHeaderContext must be used within a CanvasHeaderProvider");return e},f=function(){var e=p();return{canGoBack:e.canGoBack,canGoForward:e.canGoForward,goBack:e.goBack,goForward:e.goForward}},m=function(){return p().invokeBeforeGoBack},b=function(){var e,t;return null!=(e=null==(t=(0,a.useContext)(u))?void 0:t.pageTitleCrumb)?e:null},y=function(){var e,t;return null!=(e=null==(t=(0,a.useContext)(u))?void 0:t.pageTitleParentCrumb)?e:null},h=function(){var e,t;return null!=(e=null==(t=(0,a.useContext)(u))?void 0:t.pageTitleGrandparentCrumb)?e:null},g=function(e,t,n){var r=(0,a.useId)(),o=(0,a.useContext)(u),i=null!=o?o:{},s=i.titleStack,l=i.parentStack,c=i.grandparentStack;(0,a.useEffect)(function(){if(s&&void 0!==e)return s.push(r,e?{label:e}:null),function(){return s.pop(r)}},[s,r,e]),(0,a.useEffect)(function(){if(l&&void 0!==e)return l.push(r,null!=t?t:null),function(){return l.pop(r)}},[l,r,e,null==t?void 0:t.label,null==t?void 0:t.href]),(0,a.useEffect)(function(){if(c&&void 0!==e)return c.push(r,null!=n?n:null),function(){return c.pop(r)}},[c,r,e,null==n?void 0:n.label,null==n?void 0:n.href])},v=function(e){var t,n=null==(t=(0,a.useContext)(u))?void 0:t.setBeforeGoBack;(0,a.useEffect)(function(){if(n)return n(null!=e?e:null),function(){return n(null)}},[n,e])}},955453(e,t,n){"use strict";var r="canvas-header-actions",o="#".concat(r),i="canvas-header-left-actions",a="#".concat(i),s="canvas-header-title-actions",l="#".concat(s),c="canvas-mobile-header-left-actions",u="#".concat(c),d="canvas-mobile-header-title-actions",p="#".concat(d),f="canvas-mobile-header-actions",m="#".concat(f),b="canvas-mobile-settings-header-actions",y="#".concat(b);n.d(t,{G8:()=>l,L2:()=>d,O0:()=>f,RQ:()=>r,S5:()=>o,Wm:()=>m,eU:()=>b,i$:()=>p,jc:()=>y,mI:()=>c,rJ:()=>a,rM:()=>u,tb:()=>i,uR:()=>s})},888243(e,t,n){"use strict";var r=n(972181),o=n(860179),i=n(849832),a=n(170922),s=n(310860),l=n(417980),c="/settings",u=function(){var e=(0,s.z)({select:function(e){return e.pathname}}),t=(0,l.t)("circle_ai_dock.settings.landing.title"),n=(0,i.$)(),o=(0,a.h)(),u=[{l1Label:(0,l.t)("settings_nav_v3.members.label"),links:n.members},{l1Label:(0,l.t)("settings_nav_v3.emails.title"),links:n.email},{l1Label:(0,l.t)("settings_nav_v3.newsletter.title"),links:n.newsletter},{l1Label:(0,l.t)("settings_nav_v3.site.label"),links:n.site},{l1Label:(0,l.t)("settings_nav_v3.content.label"),links:n.content},{l1Label:(0,l.t)("settings_nav_v3.courses.title"),links:n.courses},{l1Label:(0,l.t)("settings_nav_v3.workflows.label"),links:n.workflows},{l1Label:(0,l.t)("settings_nav_v3.payments.label"),links:n.paywalls},{l1Label:(0,l.t)("settings_nav_v3.paywalls_affiliates.label"),links:n.affiliates},{l1Label:(0,l.t)("settings_nav_v3.settings.label"),links:n.settings},{l1Label:(0,l.t)("settings_nav_v3.plans.label"),links:n.plans},{l1Label:(0,l.t)("settings_nav_v3.branded_apps_dashboard.title"),links:n.plus},{l1Label:(0,l.t)("settings_nav_v3.analytics_v2.label"),links:n.analytics_v2},{l1Label:(0,l.t)("settings_nav_v3.developers.title"),links:n.developers}];if(e===c)return[{label:t}];var m=p(e,(0,r.F)(n).flatMap(function(e){var t;return null!=(t=e.children)?t:[]}));if(m)return[{label:t,href:c},{label:m.label,href:m.to}];var b=d(e,u);if(b)return[{label:b.link.label}
1];var y=f(e,o);return y?[{label:y.label}]:[{label:t}]},d=function(e,t){var n=!0,r=!1,i=void 0;try{for(var a,s,l=t[Symbol.iterator]();!(n=(s=l.next()).done);n=!0){var c=s.value,u=!0,d=!1,p=void 0;try{for(var f,m=c.links[Symbol.iterator]();!(u=(f=m.next()).done);u=!0){var b=f.value;((0,o.q)({pathname:e,to:b.path,exact:b.exact})||e.startsWith("".concat(b.path,"/")))&&(!a||b.path.length>a.link.path.length)&&(a={group:c,link:b})}}catch(e){d=!0,p=e}finally{try{u||null==m.return||m.return()}finally{if(d)throw p}}}}catch(e){r=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw i}}return a},p=function(e,t){var n=!0,r=!1,i=void 0;try{for(var a,s,l=t[Symbol.iterator]();!(n=(s=l.next()).done);n=!0){var c=s.value;((0,o.q)({pathname:e,to:c.to,exact:c.exact})||e.startsWith("".concat(c.to,"/")))&&(!a||c.to.length>a.to.length)&&(a=c)}}catch(e){r=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw i}}return a},f=function(e,t){var n=!0,r=!1,i=void 0;try{for(var s,l,c=t[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){var u=l.value;u.enabled&&u.pathKey!==a.w&&((0,o.q)({pathname:e,to:u.path,exact:!0})||e.startsWith("".concat(u.path,"/")))&&(!s||u.path.length>s.path.length)&&(s=u)}}catch(e){r=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw i}}return s};n.d(t,{k:()=>u})},277800(e,t,n){"use strict";var r=n(24814),o=n(347848),i=function(){return(0,r.V)((0,o.k)(function(e){return{dockMode:e.dockMode,conversationPanelState:e.conversationPanelState,conversationPanelWidth:e.conversationPanelWidth,isLeftSidebarVisible:e.isLeftSidebarVisible,leftSidebarWidth:e.leftSidebarWidth,isRightSidebarVisible:e.isRightSidebarVisible,rightSidebarWidth:e.rightSidebarWidth,onConversationPanelWidthChange:e.setConversationPanelWidth}}))};n.d(t,{P:()=>i})},12810(e,t,n){"use strict";var r=n(827676),o=n(605274),i=n(693546),a=function(){var e=(0,i.a)(),t=e.isSpaceRoute,n=e.isSpaceGroupRoute,a=e.isFeedRoute,s=e.isGettingStartedRoute,l=(0,o.t2)(),c=(0,r.w)();return(!t||c)&&!n&&!a&&!s&&l};n.d(t,{B:()=>a})},779504(e,t,n){"use strict";n.d(t,{Qp:()=>eL,an:()=>eK,bs:()=>eB,Gv:()=>eI,DQ:()=>eD,TK:()=>eE,ud:()=>eM,A1:()=>eR,ML:()=>eA,Qs:()=>ez,NS:()=>eN,En:()=>eU,mH:()=>eq,Nz:()=>eT,lY:()=>eF});var r=n(391426);n(979778);var o=n(935846),i=n(933599),a=n(401274),s=n(847708),l=n(51206),c=n(411533),u=n(402175),d=n(703047);n(477348);var p=n(658687),f=n(257957),m=n(244174),b=function(e){var t=e.isLoading;return void 0===t||t?(0,r.jsx)(p.J,{selectorQuery:"#".concat(m.Yk),children:(0,r.jsx)("div",{className:"bg-primary relative h-[30vh]",children:(0,r.jsx)("div",{className:"absolute top-0 m-auto flex size-full","data-testid":"cover-image-loader",children:(0,r.jsx)(f.a,{center:!0})})})}):null},y=n(340772),h=n(927561),g=n(578792),v=n(570310),x=n(417980),j=n(805608),_=function(e){var t=e.url,n=e.isLoading,o=e.onChange,i=e.onDelete;return(0,r.jsx)(j._,{children:(0,r.jsx)("div",{className:(0,v.x)("bg-primary aspect-16/5 relative h-full max-h-[20.625rem] md:mx-auto md:max-w-5xl md:overflow-hidden md:rounded-xl"),children:void 0!==n&&n?(0,r.jsx)("div",{className:"absolute top-0 m-auto flex size-full",children:(0,r.jsx)(f.a,{center:!0})}):(0,r.jsxs)(r.Fragment,{children:[t?(0,r.jsx)("img",{loading:"lazy",className:"size-full object-cover",src:t,alt:""}):(0,r.jsx)("div",{className:"bg-tertiary size-full"}),(0,r.jsx)(g.x,{onDelete:i,onChange:o,removeButtonText:(0,x.t)("remove_cover_image"),changeButtonText:t?(0,x.t)("edit_cover_image"):(0,x.t)("add_cover_image")})]})})})},w=function(e){var t=e.isLoading,n=void 0!==t&&t,o=e.onDelete,i=e.onSubmit,a=e.url;return(0,r.jsx)(h.l,{onSubmit:i,className:"bg-primary dark:bg-secondary",children:function(e){var t=e.triggerFormSubmit;return(0,r.jsx)(y.t,{name:"cover_image",renderImagePreview:function(){return(0,r.jsx)(_,{url:a})},onImageAttachSuccess:t,showAddCoverBtn:!1,aspectRatio:m.nT.COVER_V3,renderer:function(e){var t=e.value,i=e.processing,s=e.imageUrl,l=e.handleChangeCoverClick;return(0,r.jsx)(_,{url:t?s:a,isLoading:i||n,onChange:l,onDelete:o})}})}})},O=function(e){var t=e.thumbnailImageUrl,n=e.coverImageUrl;return(0,r.jsx)(p.J,{selectorQuery:"#".concat(m.Yk),children:(0,r.jsx)(d.D,{url:t||n,thumbnail:!!t})})},S="#".concat(m.Yk),P=function(e){var t=e.coverImage,n=e.enabled,o=e.isMobile,i=e.isLoading,a=e.onDelete,s=e.onSubmit,l=e.showForm,c=e.thumbnailImage;return void 0===n||n?void 0!==o&&o?(0,r.jsx)(O,{thumbnailImageUrl:c,coverImageUrl:t}):(0,r.jsx)(p.J,{selectorQuery:S,children:void 0!==l&&l?(0,r.jsx)(w,{url:t,onSubmit:s,onDelete:a,isLoading:void 0!==i&&i}):t&&(0,r.jsx)(d.D,{url:t})}):null},C=n(360650),k=n(230763),I=n(605274),N=n(382544),A=n(6418);function E(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var R=function(){var e=(0,k.Od)().currentCommunityMember,t=(0,N.a)(),n=t.mutateAsync,r=t.isPending,o=(0,C.hO)(),i=o.actions.refresh,a=o.helpers.isDataRefreshing,s=o.record.home_page_cover_image_url,l=(0,I.qI)(),c=s||"";return{coverImage:c,hasCoverImage:!!c,isAdmin:(0,A.V8)(e),isLoading:r||!!(null==a?void 0:a()),isSmallScreen:l,onDelete:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,n({community:{home_page_cover_image:null}})];case 1:return e.sent(),[4,i()];case 2:return e.sent(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){E(i,r,o,a,s,"next",e)}function s(e){E(i,r,o,a,s,"throw",e)}a(void 0)})})()},onSubmit:function(e){n({community:{home_page_cover_image:e.cover_image}})}}},L=function(){var e=R(),t=e.coverImage,n=e.hasCoverImage,o=e.isAdmin,i=e.isLoading,a=e.isSmallScreen,s=e.onDelete,l=e.onSubmit;return(0,r.jsx)(P,{coverImage:t,enabled:n,isLoading:i,isMobile:a,onDelete:s,onSubmit:l,showForm:o})},D=n(381301),T=n(867494),M=n(574795),F=function(e){var t,n,o=e.position,i=e.children,a=e.isLoading,s=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["position","children","isLoading"]),l=(0,T.t)().shouldShowRailBar,c=document.querySelector("#rail-bar-".concat(void 0===o?"header":o));return c&&(void 0===l||l)?(0,M.createPortal)((0,r.jsx)(D.h,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({isLoading:a},s),n=n={children:i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)),c):null};n(275074);var K=n(341409),B=n(652020),q=n(595260);function U(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function z(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){U(i,r,o,a,s,"next",e)}function s(e){U(i,r,o,a,s,"throw",e)}a(void 0)})}}function W(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var $=function(e){var t=e.id,n=(0,q.G)().updateSpace,r=(0,B.q)({spaceId:t}),o=r.refetch,i=r.isLoading,a=(0,I.qI)();return{coverImage:e.cover_image_url||"",isCoverImageVisible:e.cover_image_visible,isLoading:i,isSmallScreen:a,onDelete:function(){return z(function(){return W(this,function(e){switch(e.label){case 0:return[4,n({cover_image:null,cover_image_visible:!1},t)];case 1:return e.sent(),[4,o()];case 2:return e.sent(),[2]}})})()},onSubmit:function(e){var r=e.cover_image;return z(function(){return W(this,function(e){switch(e.label){case 0:return[4,n({cover_image:r},t)];case 1:return e.sent(),[4,o()];case 2:return e.sent(),[2]}})})()},thumbnailImage:e.thumbnail_image_url||""}},V=function(e){var t=e.space,n=$(t),o=n.coverImage,i=n.isCoverImageVisible,a=n.isLoading,s=n.isSmallScreen,l=n.onDelete,c=n.onSubmit,u=n.thumbnailImage;return(0,r.jsx)(P,{coverImage:o,enabled:i,isLoading:a,isMobile:s,onDelete:l,onSubmit:c,showForm:(0,K.wp)(t),thumbnailImage:u})},H=n(875309),G=n(849265),Z=n(181122);n(525498);var Q=n(618817),Y=n(630050),J=n(973646),X=n(519104),ee=n(387099),et=n(639113),en=n(81417),er=function(e){var t,n,o=e.leftContent,i=e.rightContent,a=e.filters,s=e.headline,l=e.hasBorder,c=e.className,u=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["leftContent","rightContent","filters","headline","hasBorder","className"]),d=(0,k.Od)().isViewOnlyMasquerading;return(0,r.jsxs)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},u),n=n={className:(0,v.x)("bg-primary flex flex-col",(void 0===l||l)&&"border-primary border-b",c),children:[(o||i||!!s)&&(0,r.jsxs)("div",{className:(0,v.x)("flex min-h-16 items-center justify-between gap-4 px-6",{"!cursor-not-allowed":d}),children:[(0,r.jsx)("div",{className:(0,v.x)("min-w-0",{"!pointer-events-none":d}),children:null!=o?o:s}),i&&(0,r.jsx)("div",{className:(0,v.x)("shrink-0",{"!pointer-events-none":d}),children:i})]}),!!a&&(0,r.jsx)("div",{className:"px-6 pb-4",children:a})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},eo="".concat(en.hl,"-child"),ei=function(e){var t,n,o=e.children,i=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children"]);return(0,r.jsxs)(et.Z,{selectorQuery:en.oU,children:[(0,r.jsx)(er,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},i),n=n={id:eo},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)),o]})},ea=function(e){var t=e.hidden,n=e.backLink,o=void 0===n?"":n,i=e.backLinkText,a=void 0===i?(0,x.t)("back"):i,s=e.customRightContent,l=e.className,c=e.hasBorder,u=(0,X.Z)(),d=(0,k.Od)().isViewOnlyMasquerading;return void 0!==t&&t||!o?null:(0,r.jsx)(ei,{hasBorder:void 0===c||c,className:l,leftContent:(0,r.jsxs)(ee.$,{type:"button",variant:"text",extraLarge:!0,onClick:function(){u({to:o})},className:(0,v.x)("flex items-center gap-2",{"!pointer-events-auto":d}),children:[(0,r.jsx)(J.In,{type:"20-arrow-left",size:20}),a]}),rightContent:null!=s?s:null})},es=n(234819),el=n(31359);function ec(){return(ec=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var eu=function(e){var t=e;if(null==t)throw TypeError("Cannot destructure "+t);var n,o,i=ec({},e);return(0,r.jsx)("div",(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},i),o=o={id:en.C7,"data-testid":"cover-image-container"},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n))},ed=function(e){var t=e.isLoading;return void 0===t||t?(0,r.jsx)(p.J,{selectorQuery:en.cF,children:(0,r.jsx)("div",{className:"bg-primary relative h-[30vh]",children:(0,r.jsx)("div",{className:"absolute top-0 m-auto flex size-full","data-testid":"cover-image-loader",children:(0,r.jsx)(f.a,{center:!0})})})}):null},ep=function(e){var t=e.url,n=e.isLoading,o=e.onChange,i=e.onDelete;return(0,r.jsx)("div",{className:"md:px-6 md:pb-3 md:pt-5 lg:px-9",children:(0,r.jsx)("div",{className:"bg-primary aspect-16/5 relative h-full max-h-[20.625rem] md:mx-auto md:max-w-5xl md:overflow-hidden md:rounded-xl",children:void 0!==n&&n?(0,r.jsx)("div",{className:"absolute top-0 m-auto flex size-full",children:(0,r.jsx)(f.a,{center:!0})}):(0,r.jsxs)(r.Fragment,{children:[t?(0,r.jsx)("img",{loading:"lazy",className:"size-full object-cover",src:t,alt:""}):(0,r.jsx)("div",{className:"bg-tertiary size-full"}),(0,r.jsx)(g.x,{onDelete:i,onChange:o,removeButtonText:(0,x.t)("remove_cover_image"),changeButtonText:t?(0,x.t)("edit_cover_image"):(0,x.t)("add_cover_image")})]})})})},ef=function(e){var t=e.isLoading,n=void 0!==t&&t,o=e.onDelete,i=e.onSubmit,a=e.url;return(0,r.jsx)(h.l,{onSubmit:i,children:function(e){var t=e.triggerFormSubmit;return(0,r.jsx)(y.t,{name:"cover_image",renderImagePreview:function(){return(0,r.jsx)(ep,{url:a})},onImageAttachSuccess:t,showAddCoverBtn:!1,aspectRatio:m.nT.COVER_V3,renderer:function(e){var t=e.value,i=e.processing,s=e.imageUrl,l=e.handleChangeCoverClick;return(0,r.jsx)(ep,{url:t?s:a,isLoading:i||n,onChange:l,onDelete:o})}})}})},em=function(e){var t=e.thumbnailImageUrl,n=e.coverImageUrl;return(0,r.jsx)(p.J,{selectorQuery:en.cF,children:(0,r.jsx)(el.D,{url:t||n,thumbnail:!!t})})},eb=function(e){var t=e.coverImage,n=e.enabled,o=e.isMobile,i=e.isLoading,a=e.onDelete,s=e.onSubmit,l=e.showForm,c=e.thumbnailImage;return void 0===n||n?void 0!==o&&o?(0,r.jsx)(em,{thumbnailImageUrl:c,coverImageUrl:t}):(0,r.jsx)(p.J,{selectorQuery:en.cF,children:void 0!==l&&l?(0,r.jsx)(ef,{url:t,onSubmit:s,onDelete:a,isLoading:void 0!==i&&i}):t&&(0,r.jsx)(el.D,{url:t})}):null};function ey(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function eh(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){ey(i,r,o,a,s,"next",e)}function s(e){ey(i,r,o,a,s,"throw",e)}a(void 0)})}}function eg(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var ev=function(){var e=(0,k.Od)().currentCommunityMember,t=(0,N.a)(),n=t.mutateAsync,r=t.isPending,o=(0,C.hO)(),i=o.actions.refresh,a=o.helpers.isDataRefreshing,s=o.record.home_page_cover_image_url,l=(0,I.qI)(),c=s||"";return{coverImage:c,hasCoverImage:!!c,isAdmin:(0,A.V8)(e),isLoading:r||!!(null==a?void 0:a()),isSmallScreen:l,onDelete:function(){return eh(function(){return eg(this,function(e){switch(e.label){case 0:return[4,n({community:{home_page_cover_image:null}})];case 1:return e.sent(),[4,i()];case 2:return e.sent(),[2]}})})()},onSubmit:function(e){n({community:{home_page_cover_image:e.cover_image}})}}},ex=function(e){var t=e.id,n=(0,q.G)().updateSpace,r=(0,B.q)({spaceId:t}),o=r.refetch,i=r.isLoading,a=e.cover_image_url,s=e.cover_image_visible,l=e.thumbnail_image_url;return{coverImage:a||"",isCoverImageVisible:s,isLoading:i,isSmallScreen:(0,I.qI)(),onDelete:function(){return eh(function(){return eg(this,function(e){switch(e.label){case 0:return[4,n({cover_image:null,cover_image_visible:!1},t)];case 1:return e.sent(),[4,o()];case 2:return e.sent(),[2]}})})()},onSubmit:function(e){var r=e.cover_image;return eh(function(){return eg(this,function(e){switch(e.label){case 0:return[4,n({cover_image:r},t)];case 1:return e.sent(),[4,o()];case 2:return e.sent(),[2]}})})()},thumbnailImage:l||""}},ej=function(){var e=ev(),t=e.coverImage,n=e.hasCoverImage,o=e.isAdmin,i=e.isLoading,a=e.isSmallScreen,s=e.onDelete,l=e.onSubmit;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eu,{}),(0,r.jsx)(eb,{coverImage:t,enabled:n,isLoading:i,isMobile:a,onDelete:s,onSubmit:l,showForm:o})]})},e_=function(e){var t=e.space,n=ex(t),o=n.coverImage,i=n.isCoverImageVisible,a=n.isLoading,s=n.isSmallScreen,l=n.onDelete,c=n.onSubmit,u=n.thumbnailImage;return(0,r.jsx)(eb,{coverImage:o,enabled:i,isLoading:a,isMobile:s,onDelete:l,onSubmit:c,showForm:(0,K.wp)(t),thumbnailImage:u})},ew=n(233480),eO=n(698532),eS=n(788578),eP=function(e){var t=e.children,n=e.isFullWidth,o=e.isLoading,i=e.loaderVariant,a=e.noBorderLeft,s=e.position,l=void 0===s?"header":s,c=e.selectorQuery,u=(0,T.t)(),d=u.shouldShowRailBar,p=void 0===d||d,m=u.isUnifiedInbox,b=u.toggleShowRailBar,y=(0,eS.q)();if(c)return(0,r.jsx)(et.Z,{selectorQuery:c,children:t});if(m)return(0,r.jsx)(eO.$.Root,{open:p,onOpenChange:b,size:"sm",noBackdrop:!0,children:(0,r.jsx)(eO.$.Content,{children:(0,r.jsx)("div",{className:"dark:bg-secondary flex h-full min-h-0 flex-col",children:o?(0,r.jsx)(f.a,{center:!0}):t})})});var h="header"===l||"content"===l,g=y&&h?y.getTarget(l):document.querySelector("#rail-bar-".concat(l));return g&&p?(0,M.createPortal)((0,r.jsx)(D.h,{isFullWidth:n,isLoading:o,loaderVariant:i,noBorderLeft:a,children:t}),g):null},eC=n(577742);function ek(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}n(323734),n(200753);var eI=function(e){return(0,Q.R)()?(0,r.jsx)(Y.G,ek({},e)):(0,r.jsx)(o.n,ek({},e))},eN=function(e){var t=e.children;return(0,Q.R)()?(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsx)(l.n,{children:t})},eA=function(e){return(0,Q.R)()?(0,r.jsx)(eC.M,ek({},e)):(0,r.jsx)(a.x,ek({},e))},eE=function(e){return(0,Q.R)()?(0,r.jsx)(es.TK,ek({},e)):(0,r.jsx)(u.U,ek({},e))},eR=function(e){return(0,Q.R)()?(0,r.jsx)(es.TK,ek({},e)):(0,r.jsx)(i.U,ek({},e))},eL=function(e){return(0,Q.R)()?(0,r.jsx)(ea,ek({},e)):(0,r.jsx)(c.Q,ek({},e))},eD=eL,eT=function(e){return(0,Q.R)()?(0,r.jsx)(er,ek({},e)):(0,r.jsx)(H.N,ek({},e))},eM=function(e){return(0,Q.R)()?(0,r.jsx)(ew.u,ek({},e)):(0,r.jsx)(Z.e,ek({},e))},eF=function(e){return(0,Q.R)()?(0,r.jsx)(ei,ek({},e)):(0,r.jsx)(G.l,ek({},e))},eK=function(e){return(0,Q.R)()?(0,r.jsx)(ed,ek({},e)):(0,r.jsx)(b,ek({},e))},eB=function(){return(0,Q.R)()?(0,r.jsx)(ej,{}):(0,r.jsx)(L,{})},eq=function(e){var t=e.space;return(0,Q.R)()?(0,r.jsx)(e_,{space:t}):(0,r.jsx)(V,{space:t})},eU=function(e){return(0,Q.R)()?(0,r.jsx)(eP,ek({},e)):(0,r.jsx)(F,ek({},e))},ez=function(e){var t,n,o=e.children,i=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children"]);return(0,Q.R)()?(0,r.jsx)(r.Fragment,{children:o}):(0,r.jsx)(s.Q,(t=ek({},i),n=n={children:o},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}},34306(e,t,n){"use strict";n.d(t,{K:()=>I});var r=n(391426),o=n(973646),i=n(244174),a=n(570310),s=n(451430),l=n(417980),c=n(534529),u=n(101075),d=n.n(u);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function f(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var m=function(e){var t=e.children,n=e.className,o=e.onClick,i=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","className","onClick"]);return"to"in i?(0,r.jsx)(c.N_,f(p({className:(0,a.x)("text-dark flex w-full justify-center p-5",n),onClick:o||d()},i),{children:t})):(0,r.jsx)("button",f(p({type:"submit",className:(0,a.x)("text-dark flex w-full justify-center p-5",n),onClick:o||d()},i),{children:t}))},b=function(e){var t=e.children;return(0,r.jsx)("span",{className:"text-xs bg-brand absolute right-[-12px] top-[-6px] block rounded-full border-2 border-white px-[6px] py-[4px] text-center font-bold leading-none text-white",children:t})},y=n(339551),h=n(341409),g=n(488872),v=function(e){var t=e.newPostUrl,n=e.newPostUseDataRemote;return(0,r.jsx)("a",{href:t,"data-remote":n,className:"text-dark flex w-full justify-center p-5",children:(0,r.jsx)(o.In,{"aria-label":(0,l.t)("mobile_nav.quick_post"),type:"bar-plus",size:24,useWithFillCurrentColor:!0})})},x=n(526418),j=n(486338),_=function(){var e=(0,x.D)().spaceId,t=(0,j.N)();return(0,r.jsx)("button",{type:"button",onClick:function(){return t.show({spaceId:e})},className:"text-dark flex w-full justify-center p-5",children:(0,r.jsx)(o.In,{"aria-label":(0,l.t)("events.create.title"),type:"bar-plus",size:24,useWithStrokeCurrentColor:!0})})},w=n(48821),O=function(e){var t=e.spaceId,n=(0,w.A)();return(0,r.jsx)("button",{type:"button",className:"text-dark flex w-full justify-center p-5",onClick:function(){n.show({spaceId:t,onClose:function(){n.remove()}})},children:(0,r.jsx)(o.In,{"aria-label":(0,l.t)("mobile_nav.quick_post"),type:"bar-plus",size:24,useWithFillCurrentColor:!0})})},S=n(538587),P=function(e){var t=e.currentSpaceId;return(0,r.jsx)(S.j,{currentSpaceId:t,render:function(e){var t=e.onClick;return(0,r.jsx)("button",{type:"button",className:"text-dark flex w-full justify-center p-5",onClick:t,children:(0,r.jsx)(o.In,{"aria-label":(0,l.t)("mobile_nav.quick_post"),type:"bar-plus",size:24,useWithFillCurrentColor:!0})})}})},C=function(e){var t=e.newPostUrl,n=e.newPostUseDataRemote,o=e.shouldNewPostOpenModal,i=(0,g.E)(),a=(0,y.E)().helpers.findBy({slug:i});return(0,h.QM)(a)?(0,r.jsx)(_,{}):(0,h.nK)(a)?(0,r.jsx)(O,{spaceId:null==a?void 0:a.id}):void 0!==o&&o?(0,r.jsx)(P,{currentSpaceId:null==a?void 0:a.id}):(0,r.jsx)(v,{newPostUrl:t,newPostUseDataRemote:void 0!==n&&n})};function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var I=function(e){var t,n,c=e.className,u=e.newPostUrl,d=e.newPostUseDataRemote,p=e.onHomeClick,f=e.onNotificationsClick,y=e.onSearchClick,h=e.shouldNewPostOpenModal,g=e.shouldShowMessagingRoutes,v=e.style,x=e.unreadChatCount,j=void 0===x?0:x,_=e.unreadNotificationCount,w=void 0===_?0:_,O=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["className","newPostUrl","newPostUseDataRemote","onHomeClick","onNotificationsClick","onSearchClick","shouldNewPostOpenModal","shouldShowMessagingRoutes","style","unreadChatCount","unreadNotificationCount"]);
1return(0,r.jsx)("div",(t=k({id:i.x,className:(0,a.x)("bg-primary fixed bottom-0 z-10 w-full",void 0===c?"":c),style:k({boxShadow:"0px 0px 10px 0px rgb(0 0 0 / 11%)"},void 0===v?{}:v)},O),n=n={children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("button",{type:"submit",onClick:function(e){return(0,s.isFunction)(p)&&p(e)},className:"text-dark flex w-full cursor-pointer justify-center p-5",children:(0,r.jsx)(o.In,{"aria-label":(0,l.t)("mobile_nav.home"),type:"home",size:24,useWithStrokeCurrentColor:!0})}),(0,r.jsx)(m,{onClick:function(e){return(0,s.isFunction)(y)&&y(e)},children:(0,r.jsx)(o.In,{"aria-label":(0,l.t)("mobile_nav.search"),type:"search",size:24,useWithFillCurrentColor:!0})}),(0,r.jsx)(C,{newPostUseDataRemote:void 0!==d&&d,newPostUrl:void 0===u?"":u,shouldNewPostOpenModal:void 0!==h&&h}),(0,r.jsx)(m,{onClick:function(e){return(0,s.isFunction)(f)&&f(e)},children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(o.In,{"aria-label":(0,l.t)("mobile_nav.notifications"),type:"bell",size:24,useWithFillCurrentColor:!0}),w>0&&(0,r.jsx)(b,{children:w})]})}),void 0!==g&&g&&(0,r.jsx)(m,{to:"/messages",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(o.In,{"aria-label":(0,l.t)("mobile_nav.messages"),type:"dm",size:24,useWithFillCurrentColor:!0}),j>0&&(0,r.jsx)(b,{children:j})]})})]})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}},314899(e,t,n){"use strict";n.d(t,{z:()=>j});var r=n(391426),o=n(298463),i=n(804939),a=n(336372),s=n(495118),l=n(339551),c=n(178905),u=n(947331),d=n(519104),p=n(933578),f=n(341409),m=n(915779),b=n(488872),y=n(693546);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v=function(){var e=(0,y.a)().isFeedRoute,t=(0,b.E)(),n=(0,l.E)().helpers.findBy({slug:t}),r=(0,f.QM)(n),o=g((0,p.useState)(""),2),i=o[0],h=o[1],v=g((0,p.useState)(!1),2),x=v[0],j=v[1],_=(0,d.Z)(),w=(0,s.c)().spotlightSearch,O=(0,u.UF)().shouldShowMessagingRoutes,S=(0,a.Y)(),P=S.newNotificationCount,C=S.resetNewNotificationsCount,k=(0,c.h)().unreadChatCount;return(0,p.useEffect)(function(){var o;e||!t?(o="/c/new_post_in_space",j(!0)):(o=r?(0,m.AV)({spaceSlug:(null==n?void 0:n.slug)||""}):m.Yl.new({spaceSlug:(null==n?void 0:n.slug)||""}),j(!1)),h(o)},[null==n?void 0:n.slug,r,e,t]),{newPostUrl:i,shouldNewPostUseDataRemote:x,shouldNewPostOpenModal:!r,unreadChatCount:k,unreadNotificationCount:P,onNotificationsClick:function(){C(),_({to:"/notifications"})},onSearchClick:function(){w.show()},shouldShowMessagingRoutes:O}},x=n(34306),j=function(){var e=(0,i.P)(),t=v(),n=t.newPostUrl,a=t.shouldNewPostUseDataRemote,s=t.shouldNewPostOpenModal,l=t.unreadChatCount,c=t.unreadNotificationCount,u=t.onNotificationsClick,d=t.onSearchClick,p=t.shouldShowMessagingRoutes,f=(0,o.J)().goToCommunityRootPath;return e?null:(0,r.jsx)(x.K,{onSearchClick:d,onNotificationsClick:u,onHomeClick:function(){return f()},unreadNotificationCount:c,unreadChatCount:l,newPostUseDataRemote:a,newPostUrl:n,shouldNewPostOpenModal:s,shouldShowMessagingRoutes:p})}},511888(e,t,n){"use strict";n.d(t,{R:()=>w,t:()=>_});var r=n(391426),o=n(64340),i=n(933578),a=function(){var e,t=document.querySelector('[data-target="mobile-sidebar.panel"]');return(null!=(e=HTMLElement)&&"u">typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e)?t:null},s="transform ".concat(300,"ms ease"),l=function(e,t){e.style.transition=s,e.style.transform=t},c=function(e){e.style.transition="",e.style.transform=""},u=function(e,t,n){document.documentElement.classList.add("slideout-open"),e.classList.add("panel-open"),n&&l(e,"translateX(".concat(t,"px)"))},d=function(e,t){var n=null;return e.classList.remove("panel-open"),t&&l(e,"translateX(0)"),n=window.setTimeout(function(){document.documentElement.classList.remove("slideout-open"),t&&c(e),n=null},350),function(){null!==n&&(window.clearTimeout(n),n=null)}},p=function(e){var t=e.isOpen;(0,i.useLayoutEffect)(function(){var e,n=a();if(n){n.classList.add("slideout-panel","slideout-panel-left");var r=function(){null==e||e(),e=void 0};r();var o=!document.body.classList.contains("is-standard-layout-v2"),i=window.outerWidth-50;return t?u(n,i,o):(document.documentElement.classList.contains("slideout-open")||n.classList.contains("panel-open"))&&(e=d(n,o)),r}},[t])},f=n(639113),m=n(570310),b=n(904994),y=n(281810),h=n(825697),g=["pointerdown"],v=function(e){var t=e.isOpen,n=e.onClose,a=e.renderLeftSidebar,s=(0,o.j)().data,l=(0,y.L)().config,c=(0,i.useRef)(null),u=(0,i.useCallback)(function(){t&&n()},[t,n]);(0,b.A)(c,u,g);var d=null!=a?a:null==l?void 0:l.renderLeftSidebar;return(null==s?void 0:s.mobile_drawer)?(0,r.jsx)(f.Z,{selectorQuery:"#react-mobile-drawer-root",children:(0,r.jsx)("div",{ref:c,id:"menu",className:(0,m.x)("sidebar","sidebar--mobile","slideout-menu","slideout-menu
1-left","sidebar--mobile-v2"),"data-target":"mobile-sidebar.menu",children:(0,r.jsx)("div",{className:"sidebar--mobile__content",children:(0,r.jsx)("div",{className:"sidebar--mobile__content__inside",children:d?d():(0,r.jsx)(h.z,{})})})})}):null};function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}v.displayName="MobileDrawerView";var j=(0,i.createContext)(null);j.displayName="MobileDrawerContext";var _=function(){return(0,i.useContext)(j)},w=function(e){var t,n=e.children,a=e.renderLeftSidebar,s=(0,o.j)().data,l=null==s?void 0:s.mobile_drawer,c=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return x(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return x(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=c[0],d=c[1],f=(0,i.useCallback)(function(){d(!1)},[]),m=(0,i.useCallback)(function(){l&&d(!0)},[l]),b=(0,i.useCallback)(function(){l&&d(function(e){return!e})},[l]),y=!!l&&u;p({isOpen:y});var h=(0,i.useMemo)(function(){return{close:f,isOpen:y,open:m,toggle:b}},[f,y,m,b]);return(0,r.jsxs)(j.Provider,{value:h,children:[n,(0,r.jsx)(v,{isOpen:y,onClose:f,renderLeftSidebar:a})]})};w.displayName="MobileDrawerProvider"},935846(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(804939),a=n(288513),s=function(e){var t=e.hasPaddingTopMobile,n=e.isMinimalLayout,s=e.children,l=e.className,c=e.wrapperClassName,u=(0,i.P)();return(0,r.jsx)("div",{className:(0,o.x)((0,a.W2)("main"),"h-full",{"bg-secondary":!n&&!u},l),children:(0,r.jsx)("div",{className:(0,o.x)((0,a.W2)("main__wrapper"),"h-full sm:mx-6 md:pt-6 lg:mx-9",{"pt-0":!(void 0===t||t),"px-4 sm:px-0":n},c),children:s})})};n.d(t,{n:()=>s})},933599(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(288513),a=function(e){var t=e.children,n=e.className;return(0,r.jsx)("div",{className:(0,o.x)((0,i.W2)("main__content"),"mx-auto h-full max-w-5xl",n),children:t})};n.d(t,{U:()=>a})},401274(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(417980),a=n(288513),s=function(e){var t=e.className,n=e.children,s=e.hidden;return void 0!==s&&s?null:(0,r.jsx)("aside",{"aria-label":(0,i.t)("right_sidebar"),className:(0,o.x)((0,a.W2)("sidebar sidebar--right"),t),"data-testid":"sidebar-right",children:(0,r.jsx)("div",{className:(0,a.W2)("sidebar__content"),"data-draggable":"false",children:n})})};n.d(t,{x:()=>s})},51206(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(288513),a=function(e){var t,n,a=e.className,s=e.children,l=e.fullHeight,c=void 0!==l&&l,u=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["className","children","fullHeight"]);return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,o.x)((0,i.W2)("main"),c&&"flex min-h-0 flex-1 flex-col")},u),n=n={children:(0,r.jsx)("div",{className:(0,o.x)((0,i.W2)("main__wrapper"),c&&"flex min-h-0 flex-1 flex-col",a),children:s})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{n:()=>a})},411533(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(890783),a=n(230763),s=n(570310),l=n(519104),c=n(417980),u=n(849265),d=n(387099),p=function(e){var t=e.hidden,n=e.backLink,p=void 0===n?"":n,f=e.backLinkText,m=void 0===f?(0,c.t)("back"):f,b=e.className,y=e.customRightContent,h=e.hasBorder,g=(0,a.Od)().isViewOnlyMasquerading,v=(0,l.Z)();return void 0!==t&&t||!p?null:(0,r.jsx)(u.l,{className:b,hasBorder:h,leftContent:(0,r.jsx)(i.J,{children:(0,r.jsxs)(d.$,{type:"button",variant:"text",extraLarge:!0,onClick:function(){v({to:p})},className:(0,s.x)("flex items-center gap-2",{"!pointer-events-auto":g}),children:[(0,r.jsx)(o.In,{type:"20-arrow-left",size:20}),m]})}),rightContent:y||null})};n.d(t,{Q:()=>p})},514040(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(288513),a=function(e){var t,n,a=e.disableSidebar,s=e.children,l=e.className,c=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["disableSidebar","children","className"]);return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({id:"panel","data-testid":"community-content",className:(0,o.x)((0,i.W2)("community__content trix-v2",{"community__content--no-sidebar":void 0!==a&&a}),"bg-secondary h-[calc(100vh-48px)] w-full flex-1 overflow-y-auto print:overflow-visible",l),"data-target":"mobile-sidebar.panel"},c),n=n={children:s},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{T:()=>a})},848298(e,t,n){"use strict";var r=n(391426),o=n(570310),i=function(e){var t,n,i=e.children,a=e.className,s=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","className"]);return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,o.x)("bg-secondary",void 0===a?"":a),"data-testid":"community-wrapper"},s),n=n={children:i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{P:()=>i})},402175(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(417980),a=n(804939),s=n(288513),l=n(830254),c=function(e){var t,n,c=e.children,u=e.fullWidth,d=e.fullHeight,p=void 0===d||d,f=e.noPadding,m=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","fullWidth","fullHeight","noPadding"]),b=(0,a.P)();return(0,r.jsxs)("main",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({"aria-label":(0,i.t)("main_content")},m),n=n={className:(0,o.x)((0,s.W2)("standard-layout-v2__content",{"standard-layout-v2__content--full":u}),!b&&"bg-secondary",f&&(0,s._h)("standard-layout-v2__content--no-padding"),{"h-full min-h-full":p}),children:[(0,r.jsx)("div",{className:(0,o.x)({"bg-secondary":!b,"h-full min-h-full":p}),children:c}),(0,r.jsx)(l.Z,{id:"rail-bar-content"})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{U:()=>c})},637014(e,t,n){"use strict";n.d(t,{H:()=>d});var r=n(391426),o=n(179780),i=n(570310),a=n(410016),s=n(605274),l=n(981416),c=n(288513),u=n(661116),d=function(e){var t,n,d=e.children,p=e.isBgSecondary,f=e.isBgPrimary,m=e.className,b=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","isBgSecondary","isBgPrimary","className"]),y=(0,l.Q)().shouldShowTrialBanner,h=(0,s.J6)(),g=(0,a.Y)(),v=(0,u.W)().isElectron,x=(0,o.W)(),j=x.isReactFlowWorkflowsRoute,_=x.isBotBuilderEditorRoute,w=j||_?"":(0,i.x)({"lg:!min-h-[calc(100vh-64px)]":!v&&!y&&h&&!g,"lg:!min-h-[calc(100vh-105px)]":v&&!y&&h&&!g,"lg:!min-h-[calc(100vh-64px-48px)]":(y||h)&&g,"lg:!min-h-[calc(100vh-112px)]":h&&g||h&&y,"lg:!min-h-[calc(100vh-160px)]":y&&h&&g,"lg:!min-h-[calc(100vh-64px-48px-48px)]":h&&g&&y});return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,i.x)((0,c.W2)("standard-layout-v2__content-wrapper"),{"!bg-secondary":void 0!==p&&p,"bg-primary":void 0!==f&&f},w,m)},b),n=n={children:d},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}},703047(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(805608),a=function(e){var t,n,a=e.url,s=e.alt,l=e.thumbnail,c=void 0!==l&&l,u=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["url","alt","thumbnail"]);return(0,r.jsx)(i._,{children:(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},u),n=n={className:(0,o.x)("bg-primary block h-auto lg:relative",{"aspect-16/5 h-full max-h-[20.625rem] md:mx-auto md:max-w-5xl md:overflow-hidden md:rounded-xl":!c}),"data-testid":"cover-image-container",children:(0,r.jsx)("img",{loading:"lazy",src:a,alt:void 0===s?"":s,className:(0,o.x)("size-full",{"object-contain":c,"object-cover":!c}),"data-testid":"cover-image"})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))})};n.d(t,{D:()=>a})},477348(e,t,n){"use strict";var r=n(391426),o=n(244174);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var a=function(e){var t=e;if(null==t)throw TypeError("Cannot destructure "+t);var n,a,s=i({},e);return(0,r.jsx)("div",(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},s),a=a={id:o.Yk,"data-testid":"cover-image-container"},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(a)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(a,e))}),n))};n.d(t,{c:()=>a})},805608(e,t,n){"use strict";var r=n(391426),o=n(570310),i=function(e){var t=e.children;return(0,r.jsx)("div",{className:(0,o.x)("md:px-6 md:pb-3 md:pt-5 lg:px-9"),children:t})};n.d(t,{_:()=>i})},679975(e,t,n){"use strict";n.d(t,{v:()=>v});var r=n(391426),o=n(973646),i=n(570310),a=n(355104),s=n(546244),l=n(417980),c=n(387099),u=n(732873),d=n(852362),p=n(605274),f=n(933578),m=n(474811),b=n(244405);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var h="plan_trial_opt_in_banner_dismissed",g=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,f.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return y(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return y(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1],o=(0,m.f)();return(0,f.useEffect)(function(){r("true"===b.H.getItem(h))},[]),{shouldShowBanner:o&&!n,handleDismiss:function(){b.H.setItem(h,"true"),r(!0)}}},v=function(){var e=g(),t=e.shouldShowBanner,n=e.handleDismiss,f=(0,d.X)().trackEvent,m=(0,u.u)(),b=(0,p.Ub)("(max-width: 500px)"),y=(0,a.c)().isCircleV4;if(!t)return null;var h=function(){f("plan_trial_opt_in_banner.clicked",{is_plan_trial:!0,location:"top_banner"}),m.show()},v=function(){n()};return y?(0,r.jsx)(s.l,{variant:"info",title:(0,l.t)("plan_trial_top_banner.try_business"),actionProps:{variant:"gradient",children:(0,l.t)("plan_trial_top_banner.upgrade_free"),onClick:h},onDismiss:v}):(0,r.jsxs)("div",{className:"border-b-primary bg-tertiary relative flex items-center justify-center border-b px-4 py-3",children:[(0,r.jsxs)("div",{className:(0,i.x)("flex items-center",{"gap-2":b,"gap-3":!b}),children:[(0,r.jsx)("span",{className:"text-default text-sm font-medium",children:(0,l.t)("plan_trial_top_banner.try_business")}),b?(0,r.jsx)(o.In,{type:"24-arrow-right",size:24,className:"text-dark",onClick:h}):(0,r.jsx)(c.$,{variant:"marketing-gradient",small:!0,onClick:h,children:(0,l.t)("plan_trial_top_banner.upgrade_free")})]}),!b&&(0,r.jsx)("button",{type:"button",onClick:v,className:"absolute right-4 top-1/2 -translate-y-1/2","aria-label":(0,l.t)("plan_trial_top_banner.dismiss"),children:(0,r.jsx)(o.In,{type:"16-close",size:16,className:"text-default"})})]})}},830254(e,t,n){"use strict";var r=n(391426),o=function(e){var t=e.id;return(0,r.jsx)("div",{id:void 0===t?"rail-bar-header":t})};n.d(t,{Z:()=>o})},275074(e,t,n){"use strict";var r=n(391426),o=function(e){var t=e.children;return(0,r.jsx)("div",{className:"md:hidden",children:t})};n.d(t,{n:()=>o})},949767(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(417980),a=n(288513),s=function(e){var t,n,s=e.children,l=e.className,c=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","className"]);return(0,r.jsx)("aside",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({"aria-label":(0,i.t)("left_sidebar"),className:(0,o.x)((0,a.W2)("standard-layout-v2__sidebar"),l),"data-testid":"standard-layout-v2-sidebar"},c),n=n={children:(0,r.jsx)("nav",{children:s})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{E:()=>s})},849265(e,t,n){"use strict";var r=n(391426),o=n(639113);n(933578);var i=n(875309),a=function(e){var t,n,a=e.children,s=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children"]);return(0,r.jsxs)(o.Z,{selectorQuery:"#standard-layout-header",children:[(0,r.jsx)(i.N,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},s),n=n={id:"standard-layout-header-child"},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)),a]})};n.d(t,{l:()=>a})},875309(e,t,n){"use strict";var r=n(391426),o=n(230763),i=n(570310),a=n(804939),s=n(61098),l=n(355104);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function u(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var d=function(e){var t=e.leftContent,n=e.rightContent,d=e.filters,p=e.headline,f=e.hasBorder,m=void 0===f||f,b=e.hideTitleRow,y=void 0!==b&&b,h=e.appShellVariant,g=e.titleGutterClassName,v=e.className,x=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["leftContent","rightContent","filters","headline","hasBorder","hideTitleRow","appShellVariant","titleGutterClassName","className"]),j=!!d,_=!!p,w=(0,o.Od)().isViewOnlyMasquerading,O=(0,l.c)().isCircleV4,S=(0,a.P)();return void 0!==h&&h?(0,r.jsxs)("div",u(c({},x),{className:(0,i.x)("w-full",{"bg-primary dark:bg-secondary":O,"bg-primary":!O},v),children:[!y&&(0,r.jsx)("div",{className:void 0===g?"px-4 lg:px-12":g,children:(0,r.jsx)("div",{className:(0,i.x)("mx-auto",s.Y,{"border-b border-primary":m}),children:(0,r.jsxs)("div",{className:(0,i.x)("flex items-center justify-between gap-4 pb-6 pt-8",{"!cursor-not-allowed":w,"px-0 py-3":S}),"data-testid":"space-header",children:[(0,r.jsx)("div",{className:(0,i.x)("min-w-0 flex-1",{"!pointer-events-none":w}),"data-testid":"space-settings",children:t}),n&&(0,r.jsx)("div",{className:(0,i.x)("relative flex shrink-0",{"!pointer-events-none":w}),children:n})]})})}),j&&d,_&&p]})):(0,r.jsxs)("div",u(c({},x),{className:(0,i.x)("w-full lg:sticky lg:top-0 lg:z-10",{"bg-primary dark:bg-secondary":O,"bg-primary":!O},v),children:[!y&&(0,r.jsxs)("div",{className:(0,i.x)("flex items-center gap-4 px-6",O?"h-14":"h-18",{"border-b border-primary":m,"!cursor-not-allowed":w}),"data-testid":"space-header",children:[(0,r.jsx)("div",{className:(0,i.x)("flex-1 truncate",{"!pointer-events-none":w}),"data-testid":"space-settings",children:t}),(0,r.jsx)("div",{className:(0,i.x)("relative flex",{"!pointer-events-none":w}),children:n})]}),j&&d,_&&p]}))};n.d(t,{N:()=>d})},181122(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(417980),a=n(877793),s=function(e){var t,n,s=e.children,l=e.className,c=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","className"]),u=(0,a.s)();return(0,r.jsx)("header",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({id:"standard-layout-header","aria-label":(0,i.t)("page_header"),className:(0,o.x)("z-20 sm:relative sm:top-0 lg:sticky",u?"top-16":"top-0",l)},c),n=n={children:s},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{e:()=>s})},525498(e,t,n){"use strict";var r=n(391426),o=n(765724),i=n(570310),a=n(941397),s=n(310860),l=n(230763),c=n(288513),u=function(e){var t,n,u=e.disableSidebar,d=void 0!==u&&u,p=e.disableSidebarNestedBarLinks,f=e.disableLayoutRightSidebar,m=e.hasSettingsSidebar,b=void 0!==m&&m,y=e.isFullHeight,h=e.children,g=e.className,v=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["disableSidebar","disableSidebarNestedBarLinks","disableLayoutRightSidebar","hasSettingsSidebar","isFullHeight","children","className"]),x=(0,s.z)({select:function(e){return e.pathname}}),j=(0,l.Od)().currentCommunity,_=x.includes(a.t.community_inbox.index),w=(0,o.Jc)(j)||(0,o.a$)(j);return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,i.x)((0,c.W2)("standard-layout-v2",{"standard-layout-v2--has-sidebar":!d,"standard-layout-v2--has-sidebar-v3":!d,"standard-layout-v2--has-settings-sidebar":b&&!_,"standard-layout-v2--no-right-sidebar":void 0!==f&&f}),"bg-secondary",_&&b&&(0,c._h)("standard-layout-v2--has-community-inbox-sidebar"),void 0!==p&&p&&!w&&(0,c._h)("standard-layout-v2--hidden-nested-links"),void 0!==y&&y&&"h-full",g),"data-testid":"standard-layout-v2-wrapper"},v),n=n={children:h},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{Z:()=>u})},296638(e,t,n){"use strict";n.d(t,{l:()=>L});var r=n(391426),o=n(926284),i=n(230763),a=n(570310),s=n(973646),l=n(568316),c=n(915779),u=n(355104),d=n(546244),p=n(519104),f=n(417980),m=n(387099),b="trial_banner.marketing_campaign",y=function(){var e=(0,p.Z)(),t=(0,u.c)().isCircleV4,n=function(){e({to:(0,c.kP)()})};return t?(0,r.jsx)(d.l,{variant:"info",title:(0,f.t)("".concat(b,".title")),description:(0,f.t)("".concat(b,".description")),actionProps:{variant:"gradient",children:(0,f.t)("".concat(b,".cta")),onClick:n}}):(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(s.In,{type:"16-clock",size:16}),(0,r.jsx)(l.o.BodySm,{weight:"font-semibold",color:"text-white",size:"text-md",children:(0,f.t)("".concat(b,".title"))}),(0,r.jsx)(m.$,{className:"ml-1 text-md font-semibold",variant:"secondary",onClick:n,children:(0,f.t)("".concat(b,".cta"))})]})})},h=n(310860),g=n(423969),v=n(852362),x=function(){var e=(0,g.h)(),t=e.isPlanTrialActive,n=e.planTrialDaysLeft,o=e.planTrialEndDateFormatted,i=e.planTrialExpiringInTimer,a=e.planTrial,b=(0,v.X)().trackEvent,y=(0,u.c)().isCircleV4,x=(0,p.Z)(),j=(0,h.z)({select:function(e){return e.pathname}});if(!t)return null;var _=j===(0,c.kP)(),w=function(){b("trial_banner.layout.manage_plan.clicked",{days_left:n,is_plan_trial:!0,trial_type:null==a?void 0:a.trial_type}),x({to:(0,c.kP)()})};return y?(0,r.jsx)(d.l,{variant:"warning",icon:"clock",iconColor:"warning",title:(0,f.t)("plan_trial_banner.business_trial_ends_in_days",{days:n}),description:i?(0,f.t)("plan_trial_banner.renews",{formatted_date:o,action:(0,f.t)("plan_trial_banner.cancel_anytime")}):void 0,actionProps:_?void 0:{variant:"outline",children:(0,f.t)("plan_trial_banner.manage_plan"),onClick:w}}):(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"text-darkest flex items-center gap-2",children:[(0,r.jsx)(s.In,{type:"16-clock",size:16}),(0,r.jsx)(l.o.BodySm,{weight:"font-semibold",size:"text-md",children:(0,f.t)("plan_trial_banner.business_trial_ends_in_days",{days:n})}),i&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-darkest",children:(0,f.t)("plan_trial_banner.separator")}),(0,r.jsx)(l.o.BodySm,{weight:"font-normal",size:"text-md",children:(0,f.t)("plan_trial_banner.renews",{formatted_date:o,action:(0,f.t)("plan_trial_banner.cancel_anytime")})})]}),!_&&(0,r.jsx)(m.$,{className:"ml-1 text-md font-semibold",variant:"circle",onClick:w,children:(0,f.t)("plan_trial_banner.manage_plan")})]})})}
1,j=n(911550),_=n(981416),w=n(450225),O="trial_banner.circle_ai_marketing_campaign",S=function(){var e=(0,p.Z)(),t=(0,v.X)().trackEvent;return(0,r.jsx)(d.l,{variant:"info",title:(0,f.t)("".concat(O,".title")),actionProps:{variant:"outline",children:(0,f.t)("".concat(O,".cta")),onClick:function(){t("trial_banner.circle_ai_campaign.cta_clicked",{}),e({to:"/ai"})}}})},P=n(775463),C=function(){var e=(0,_.Q)(),t=e.trialEndDateMonthAndDayFormatted,n=e.expiringInTimer,o=e.trackTrialBannerClick,i=(0,P.V)();return(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"text-darkest flex items-center gap-2",children:[(0,r.jsx)(s.In,{type:"16-clock",size:16}),(0,r.jsx)(l.o.BodySm,{weight:"font-semibold",size:"text-md",children:(0,f.t)("trial_banner.upgrade_to_prevent",{formatted_date:t})}),n&&(0,r.jsx)(l.o.BodySm,{weight:"font-normal",size:"text-md",children:(0,f.t)("trial_banner.expiring_in",{expiring_in_timer:n})}),(0,r.jsx)(m.$,{className:"ml-1 text-md font-semibold",variant:"circle",onClick:function(){o(),i.show()},children:(0,f.t)("trial_banner.cta")})]})})},k=function(){var e=(0,_.Q)().isCommunityOnTrial,t=(0,u.c)().isCircleV4,n=(0,w.nR)("growth_circle_ai_marketing_campaign_enabled"),o=(0,j.DU)();return e?t&&n&&o?(0,r.jsx)(S,{}):t?null:(0,r.jsx)(C,{}):null},I=n(640668),N=function(){var e=(0,u.c)().isCircleV4,t=function(){window.location.href=(0,c.kP)()};return e?(0,r.jsx)(d.l,{variant:"destructive",icon:"triangle-exclamation",iconColor:"danger",title:(0,f.t)("trial_banner.to_access_community"),description:(0,f.t)("trial_banner.to_access_community_description"),actionProps:{variant:"primary",children:(0,f.t)("trial_banner.renew_plan"),onClick:t}}):(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"flex items-center gap-2 text-badge",children:[(0,r.jsx)(l.o.BodySm,{weight:"font-normal",color:"text-badge",children:(0,f.t)("trial_banner.to_access_community")}),(0,r.jsx)(m.$,{className:"text-md font-semibold",variant:"secondary",onClick:t,children:(0,f.t)("trial_banner.renew_subscription")})]})})},A=n(157576),E=n(162082),R=function(){var e,t,n=(0,i.Od)().currentCommunity,o=(0,E.i)(),a=o.resumePlan,c=o.isLoading,p=(0,v.X)().trackEvent,b=(0,u.c)().isCircleV4,y=(e=null==n||null==(t=n.subscription)?void 0:t.ends_at)?(0,A.bU)(e,{month:"long",day:"numeric",year:"numeric"}):"";if(!y)return null;var h=function(){p("billing_page.cancellation_banner.resume_plan.clicked",{current_tier:null==n?void 0:n.current_plan_tier}),a()};return b?(0,r.jsx)(d.l,{variant:"warning",icon:"triangle-exclamation",iconColor:"warning",title:(0,f.t)("cancellation_banner.title",{date:y}),actionProps:{variant:"primary",children:(0,f.t)("cancellation_banner.resume_plan"),onClick:h,disabled:c}}):(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"text-darkest flex items-center gap-2",children:[(0,r.jsx)(s.In,{"aria-hidden":"true",type:"16-clock",size:16}),(0,r.jsx)(l.o.BodySm,{weight:"font-semibold",size:"text-md",children:(0,f.t)("cancellation_banner.title",{date:y})}),(0,r.jsx)(m.$,{className:"ml-1 text-md font-semibold",variant:"circle",onClick:h,disabled:c,children:(0,f.t)("cancellation_banner.resume_plan")})]})})},L=function(){var e=(0,i.Od)().displayCommunitySwitcher,t=(0,_.Q)(),n=t.shouldShowTrialBanner,s=t.isSubscriptionCancelled,l=(0,g.h)(),c=l.isPlanTrialActive,d=l.shouldShowPlanTrialBanner,p=(0,I.B)(),f=p.hasActiveOffer,m=p.isCommunitySubscriptionOnGracePeriod,b=(0,u.c)().isCircleV4;if(!(n||d))return null;var h=function(){return m?(0,r.jsx)(R,{}):s?(0,r.jsx)(N,{}):f?(0,r.jsx)(y,{}):c?(0,r.jsx)(x,{}):(0,r.jsx)(k,{})};return b?h():(0,r.jsx)(o.w,{className:(0,a.x)({"left-[60px]":e,"!bg-warning-light":!s||m,"!bg-black":f}),children:h()})}},847708(e,t,n){"use strict";n.d(t,{Q:()=>J});var r=n(391426),o=n(182255),i=n(179780),a=n(230763),s=n(339551),l=n(765724),c=n(75571),u=n(570310),d=n(410016),p=n(322249),f=n(44041),m=n(314899),b=n(51206),y=n(411533),h=n(402175),g=n(703047),v=n(288513),x=n(417980),j=n(850178),_=n(804939),w=n(124188),O=n(825697),S=n(340479),P=n(704752),C=n(855096),k=n(818185),I=n(488872),N=n(661116),A=n(693546),E=n(355101),R=n(511888),L=n(514040),D=n(848298),T=n(637014),M=n(679975),F=n(830254),K=n(341409),B=function(e){var t,n,r,o=e.postSlug,i=e.space,a=e.disableRightSidebar,s=e.currentCommunityMember,l=e.pinnedPosts;if(e.isHomePage)return!1;if(a||!((null==i||null==(t=i.visible_tabs)?void 0:t.members)||(null==i||null==(n=i.visible_tabs)?void 0:n.past)||(null==i||null==(r=i.visible_tabs)?void 0:r.upcoming)||(null==l?void 0:l.length)>0))return!0;var c=i.is_private&&!i.is_space_member&&!(null==s?void 0:s.is_admin);return!(o&&"members"!==o&&(0,K.QM)(i))&&(!!c||i.hide_right_sidebar)},q=n(949767),U=n(525498),z=n(296638),W=n(605274),$=function(){var e=(0,W.Ab)(),t=(0,a.Od)().currentCommunityMember,n=(0,A.a)(),r=n.isHomePage,o=n.isSpaceShowPage,i=n.isMemberDirectoryPage,s=n.isMessagesPage;return!!e&&!!t&&(r||o||(null==i?void 0:i.isExact)||s)},V=n(836795),H=n(92406),G=function(e,t){var n=(0,i.W)(),r=n.isReactFlowWorkflowsRoute,o=n.isBotBuilderEditorRoute,a=(0,H.i)().display_header,s=(0,V.U)(),l=s.shouldShowOptInBar,c=s.shouldShowPreviewEnabledBar,u=s.shouldShowWaitlistBar;if(r||o||!(void 0===a||a))return"";var d=64*!e;
1return t&&(d+=48),(l||c||u)&&(d+=48),"lg:h-[calc(100vh-".concat(d,"px)]")};function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function Q(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var Y=function(e){var t=e.bodyClassNames,n=e.children,b=e.disableRightSidebar,y=e.disableScroll,h=void 0!==y&&y,g=e.disableSidebar,x=void 0!==g&&g,_=e.hideAppBar,w=e.shouldHideSidebarNestedNavBar,K=void 0!==w&&w,W=e.id,V=e.renderLeftSidebar;(0,f.Y_)();var H=(0,f.Uj)(),Y=(0,a.Od)(),J=Y.currentCommunityMember,X=Y.currentCommunity,ee=(0,P.B)().posts,et=(0,j.r)(),en=(0,d.Y)(),er=(0,N.W)().isElectron,eo=(0,i.W)(),ei=eo.isSettingsRoute,ea=eo.isReactFlowWorkflowsRoute,es=eo.isBotBuilderEditorRoute,el=$(),ec=(0,S.lR)();(0,C.Q)((0,u.x)((0,v.W2)("is-standard-layout-v2 react-standard-layout"),(0,v._h)("is-standard-layout-v2--v3-enabled"),"bg-secondary",void 0===t?"":t,K&&(0,v._h)("is-standard-layout-v2--v3-enabled--hidden-nested-links"),{"safari-dvh-unsupported":ec}));var eu=(0,k.n)(),ed=(0,p.g)({strict:!1}).postSlug,ep=(0,A.a)().isHomePage,ef=(0,I.E)(),em=(0,s.E)().helpers.findBy({slug:ef}),eb=(0,l.Jc)(X)&&!(0,c.jR)(eu),ey=(0,l.a$)(X),eh=B({disableRightSidebar:void 0!==b&&b,postSlug:ed,space:em||{},pinnedPosts:ee,isHomePage:ep,currentCommunityMember:J}),eg=G(ey||eb,en),ev=(0,r.jsxs)(D.P,Q(Z({},{id:W}),{children:[x?null:(0,r.jsx)("div",{id:"react-mobile-drawer-root"}),(0,r.jsxs)("div",{className:(0,u.x)("bg-secondary flex w-full flex-col",eg,{"h-screen":!h,"h-full":h,"!h-[calc(100vh-105px)]":er&&ei}),"data-testid":"standard-layout-v2",children:[!H&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(M.v,{}),(0,r.jsx)(z.l,{}),(0,r.jsx)(o.k,{})]}),(0,r.jsxs)(L.T,{disableSidebar:x,children:[!(void 0!==_&&_)&&(0,r.jsx)(E.h,{}),(0,r.jsxs)(U.Z,{disableSidebar:x,disableLayoutRightSidebar:eh,isFullHeight:es,hasSettingsSidebar:!ea&&!es&&ei&&!eb&&!ey,disableSidebarNestedBarLinks:K,children:[!x&&!ea&&!es&&(0,r.jsx)(q.E,{children:V?V():(0,r.jsx)(O.z,{})}),(0,r.jsx)(T.H,{isBgSecondary:!et,isBgPrimary:!!et,children:n}),(0,r.jsx)("div",{className:(0,v.W2)("standard-layout-v2__railbar"),children:(0,r.jsx)(F.Z,{})}),(0,r.jsx)("div",{id:"mobile-dropdown-container"}),el&&(0,r.jsx)(m.z,{})]})]})]})]}));return x?ev:(0,r.jsx)(R.R,{renderLeftSidebar:V,children:ev})},J=Object.assign(function(e){var t=e.children,n=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children"]),o=(0,_.P)(),i=(0,f.Uj)();return o?i?(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsx)(w.H,{children:t}):(0,r.jsx)(Y,Q(Z({},n),{children:t}))},{Header:function(e){var t=e.sticky,n=e.children;return(0,r.jsx)("div",{className:(0,v.W2)("main__header",{"main__header--sticky":t}),children:n})},Breadcrumb:y.Q,Content:h.U,Body:b.n,Right:function(e){var t=e.children,n=e.hidden;return void 0!==n&&n?null:(0,r.jsx)("aside",{"aria-label":(0,x.t)("right_sidebar"),className:(0,v.W2)("sidebar sidebar--right"),"data-testid":"sidebar-right",children:(0,r.jsx)("div",{className:(0,v.W2)("sidebar__content"),"data-draggable":"false",children:t})})},CoverImage:g.D})},538749(e,t,n){"use strict";var r=n(391426),o=n(570310),i=function(e){var t=e.active,n=e.children,i=e.className;return(0,r.jsxs)("div",{className:(0,o.x)("relative rounded-xl",i),children:[(0,r.jsx)("div",{"aria-hidden":!0,
1className:(0,o.x)("circle-ai-animated-ring trial-badge-comet-border pointer-events-none absolute inset-0 rounded-[inherit] transition-opacity duration-700 motion-reduce:transition-none",void 0!==t&&t?"opacity-100":"opacity-0"),style:{background:"conic-gradient(from var(--circle-ai-ring-angle, 0deg), transparent 0%, transparent 30%, rgba(66, 183, 255, 0) 36%, rgba(66, 183, 255, 0.95) 46%, rgba(109, 67, 233, 0.95) 56%, rgba(208, 55, 194, 0.95) 66%, rgba(236, 109, 56, 0.95) 76%, rgba(236, 109, 56, 0.35) 92%, transparent 100%)"}}),n]})};n.d(t,{b:()=>i})},19577(e,t,n){"use strict";n.d(t,{x:()=>j});var r=n(603134),o=n(981416),i=n(775463),a=n(230763),s=n(417980),l=n(852362),c=n(391426),u=n(974618),d=n(739042),p=n(817751),f=n(791009),m=n(892907),b=n(340990);function y(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var h=[{icon:"sparkle-filled",iconColor:"info",titleKey:"book_a_call_modal.features.ai_agents.title",descriptionKey:"book_a_call_modal.features.ai_agents.description"},{icon:"phone",titleKey:"book_a_call_modal.features.branded_apps.title",descriptionKey:"book_a_call_modal.features.branded_apps.description"},{icon:"headphones",titleKey:"book_a_call_modal.features.support.title",descriptionKey:"book_a_call_modal.features.support.description"},{icon:"trending-up",titleKey:"book_a_call_modal.features.limits.title",descriptionKey:"book_a_call_modal.features.limits.description"}],g=function(e){var t=e.icon,n=e.iconColor,r=e.titleKey,o=e.descriptionKey;return(0,c.jsxs)("div",{className:"flex items-start gap-3",children:[(0,c.jsx)("div",{className:"bg-secondary flex size-9 shrink-0 items-center justify-center rounded-full",children:(0,c.jsx)(p.t,{name:t,size:"md",color:void 0===n?"primary":n})}),(0,c.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,c.jsx)(m.o5,{variant:"label-md",color:"primary",component:"p",children:(0,s.t)(r)}),(0,c.jsx)(m.o5,{variant:"body-sm",color:"tertiary",component:"p",children:(0,s.t)(o)})]})]})},v=function(){var e=(0,u.hS)(),t=(0,a.Od)().currentCommunityMember;return(0,c.jsx)(f.a.Root,{open:e.visible,onOpenChange:function(t){var n;return(n=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:if(t)return[3,2];return[4,e.hide()];case 1:n.sent(),e.remove(),n.label=2;case 2:return[2]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)})})()},size:"xl",children:(0,c.jsxs)(f.a.Content,{children:[(0,c.jsx)(f.a.Header,{title:(0,s.t)("book_a_call_modal.title")}),(0,c.jsx)(f.a.Body,{children:(0,c.jsxs)("div",{className:"grid grid-cols-1 gap-8 lg:grid-cols-2",children:[(0,c.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,c.jsx)(m.o5,{variant:"body-md",color:"tertiary",component:"p",children:(0,s.t)("book_a_call_modal.intro")}),(0,c.jsx)("div",{className:"flex flex-col gap-5",children:h.map(function(e){return(0,c.jsx)(g,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),e.titleKey)})})]}),(0,c.jsx)("div",{className:"bg-secondary rounded-2xl p-3",children:(0,c.jsxs)("div",{className:"bg-primary shadow-md flex flex-col gap-4 roun
1ded-2xl p-6",children:[(0,c.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,c.jsx)(m.o5,{variant:"heading-lg",color:"primary",component:"p",children:(0,s.t)("book_a_call_modal.card_title")}),(0,c.jsx)(m.o5,{variant:"body-md",color:"tertiary",component:"p",children:(0,s.t)("book_a_call_modal.card_description")})]}),(0,c.jsxs)("div",{className:"bg-secondary flex flex-col gap-3 rounded-lg p-7",children:[(0,c.jsxs)(m.o5,{variant:"label-lg",color:"primary",component:"p",children:[(0,s.t)("book_a_call_modal.testimonial_quote_start"),(0,c.jsx)("br",{}),(0,c.jsx)("span",{className:"bg-clip-text text-transparent",style:{backgroundImage:"linear-gradient(127.1625deg, rgb(62, 141, 239) 4.9108%, rgb(201, 91, 207) 46.429%, rgb(227, 94, 44) 87.948%)"},children:(0,s.t)("book_a_call_modal.testimonial_quote_highlight")})]}),(0,c.jsxs)(m.o5,{variant:"body-sm",color:"primary",component:"p",children:[(0,c.jsx)("span",{className:"font-semibold",children:(0,s.t)("book_a_call_modal.testimonial_founder_name")}),(0,s.t)("book_a_call_modal.testimonial_founder_title")]})]}),(0,c.jsx)(d.$,{variant:"gradient",size:"lg",fullWidth:!0,onClick:function(){var e=null==t?void 0:t.email;e&&(0,b.me)(e,b.TI.TRIAL_SIDEBAR_BADGE)},children:(0,s.t)("book_a_call_modal.cta")})]})})]})})]})})},x=u.PT.create(function(){return(0,c.jsx)(v,{})}),j=function(){var e=(0,a.KU)(),t=(0,a.Od)().currentCommunity,n=(0,o.Q)(),c=n.isCommunityOnTrial,d=n.daysLeft,p=(0,r.W)().shouldHideBanner,f=(0,l.X)().trackEvent,m=(0,i.V)(),b=(0,u.hS)(x),y=Math.max(d,0),h=!!(null==t?void 0:t.is_sales_icp),g=y<=3,v=h?(0,s.t)("trial_sidebar_badge.book_a_call"):(0,s.t)("trial_sidebar_badge.upgrade_your_plan");return{shouldShow:e&&c&&!p,isSalesIcp:h,isUrgent:g,title:v,trialEndsInDescription:(0,s.t)("trial_sidebar_badge.trial_ends_in",{count:y}),onCtaClick:function(){(f("trial_banner.upgrade_now.clicked",{variant:h?"book_a_call":"upgrade",days_left:d}),h)?b.show():m.show()}}}},603134(e,t,n){"use strict";var r=n(230763),o=n(605274),i=n(933578),a=n(6418),s=function(){var e,t=(0,r.Od)(),n=t.currentCommunity,s=t.currentCommunityMember,l=t.currentCommunitySettings,c=(0,o.Km)(),u=(e=window.location.pathname,(0,i.useMemo)(function(){return/^\/settings\/workflows\/(\d+|new|edit|view)(\/.*)?$/.test(e)&&!/^\/settings\/workflows(\?|$)/.test(e)},[e])),d=(0,i.useMemo)(function(){return window.location.pathname.startsWith("/communities/new")},[]),p=(0,i.useMemo)(function(){return/^\/communities\/\d+\/questions\/?$/.test(window.location.pathname)},[]),f=(0,i.useMemo)(function(){return/^\/communities\/\d+\/templates\/?$/.test(window.location.pathname)},[]),m=(0,i.useMemo)(function(){return!!(null==n?void 0:n.promotion_enabled)},[n]),b=(0,a.V8)(s),y=null==l?void 0:l.hide_trial_banner,h=!!(!b||d||p||f||y||c||m||u);return{isAdmin:b,shouldHideTrialBanner:y,isInCommunityCreationPage:d,isInOnboardingQuestionsPage:p,isInSelectTemplatePage:f,isPromotionBannerEnabled:m,isSmOrMdScreen:c,isSettingsWorkflowsRoute:u,shouldHideBanner:h,currentCommunity:n,currentCommunityMember:s,currentCommunitySettings:l}};n.d(t,{W:()=>s})},423969(e,t,n){"use strict";var r=n(157576),o=n(933578),i=n(417980),a=n(603134),s=n(356428),l=n(794713),c=n(978530),u=function(){var e=(0,a.W)().shouldHideBanner,t=(0,s.u)().currentPlan,n=(null==t?void 0:t.plan_trial)||null,u=(null==n?void 0:n.active)||!1,d=(0,c.E)({endDate:(null==n?void 0:n.expires_at)||void 0}),p=(0,o.useMemo)(function(){return u&&(null==n?void 0:n.expires_at)?(0,l.RN)(new Date,new Date(n.expires_at)):0},[u,n]),f=(0,o.useMemo)(function(){return(null==n?void 0:n.expires_at)?(0,r.bU)(n.expires_at,{month:"long",day:"2-digit"}):""},[n]),m=(0,o.useMemo)(function(){return p<=1?"1 ".concat(i.Ay.t("trial_banner.day")):"".concat(p," ").concat(i.Ay.t("trial_banner.days"))},[p]),b=(0,o.useMemo)(function(){return!!(!e&&u)},[e,u]);return{isPlanTrialActive:u,planTrial:n,planTrialDaysLeft:p,planTrialDaysRemainingInWords:m,planTrialExpiringInTimer:d,planTrialEndDateFormatted:f,shouldShowPlanTrialBanner:b}};n.d(t,{h:()=>u})},981416(e,t,n){"use strict";var r=n(157576),o=n(933578),i=n(417980),a=n(603134),s=n(794713),l=n(199563),c=n(852362),u=n(978530),d=n(640668),p=function(){var e=(0,a.W)(),t=e.currentCommunity,n=e.shouldHideBanner,p=(0,d.B)().isCommunityOnTrial,f=(0,c.X)().trackEvent,m=(0,u.E)({endDate:(null==t?void 0:t.trial_ends_at)||void 0}),b=(0,o.useMemo)(function(){return(null==t?void 0:t.trial_ends_at)?(0,r.bU)(t.trial_ends_at,{day:"2-digit",month:"2-digit"}):""},[t]),y=(0,o.useMemo)(function(){return(null==t?void 0:t.trial_ends_at)?(0,r.bU)(t.trial_ends_at,{month:"long",day:"2-digit"}):""},[t]),h=(0,o.useMemo)(function(){return(null==t?void 0:t.trial_ends_at)?(0,l.z9)(t.trial_ends_at):""},[t]),g=(0,s.RN)(new Date,new Date((null==t?void 0:t.trial_ends_at)||"")),v=(0,o.useMemo)(function(){return g<=1?"1 ".concat(i.Ay.t("trial_banner.day")):"".concat(g," ").concat(i.Ay.t("trial_banner.days"))},[g]),x=(0,o.useMemo)(function(){return!p&&null!=t&&!!t.subscription&&!!t.subscription.is_cancelled}
1,[t,p]),j=(0,o.useMemo)(function(){return!!(!n&&(p||x))},[n,p,x]);return{trialEndsInWords:h,trialDaysRemainingInWords:v,trialEndDateFormatted:b,trialEndDateMonthAndDayFormatted:y,daysLeft:g,expiringInTimer:m,isSubscriptionCancelled:x,isCommunityOnTrial:p,shouldShowTrialBanner:j,isTrialBannerExists:!!document.getElementById("trial-banner"),trackTrialBannerClick:function(){f("trial_banner.upgrade_now.clicked",{days_left:g})}}};n.d(t,{Q:()=>p})},630050(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(804939),a=function(e){var t,n,a=e.hasPaddingTopMobile,s=e.isMinimalLayout,l=e.children,c=e.className,u=e.wrapperClassName,d=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["hasPaddingTopMobile","isMinimalLayout","children","className","wrapperClassName"]),p=(0,i.P)();return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,o.x)("min-h-full [container-type:inline-size]",{"bg-secondary":!s&&!p,"flex grow":p},c)},d),n=n={children:(0,r.jsx)("div",{className:(0,o.x)("min-h-full pt-3 sm:mx-6 lg:mx-9 lg:pt-6",{"pt-0":!(void 0===a||a),"px-4 sm:px-0":s,"!mx-0 grow min-w-0":p},u),children:l})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{G:()=>a,n:()=>a})},234819(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(417980),a=n(804939),s=n(348284),l=function(e){var t,n,l=e.children,c=e.fullWidth,u=e.fullHeight,d=void 0===u||u,p=e.noPadding,f=e.className,m=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","fullWidth","fullHeight","noPadding","className"]),b=(0,a.P)(),y=b?null:"bg-secondary";return(0,r.jsxs)("main",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({"aria-label":(0,i.t)("main_content")},m),n=n={className:(0,o.x)(y,d&&"h-full",c?"max-w-none p-0":"mx-auto max-w-5xl",p&&"p-0",f),children:[(0,r.jsx)("div",{className:(0,o.x)(y,d&&"h-full",b&&"flex"),children:l}),(0,r.jsx)(s.Z,{id:"rail-bar-content"})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{TK:()=>l,UC:()=>l})},31359(e,t,n){"use strict";var r=n(391426),o=n(570310),i=function(e){var t,n,i=e.url,a=e.alt,s=e.thumbnail,l=void 0!==s&&s,c=e.className,u=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["url","alt","thumbnail","className"]);return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},u),n=n={className:(0,o.x)("bg-primary block h-auto lg:relative",!l&&"aspect-16/5 h-full max-h-[20.625rem] md:mx-auto md:max-w-5xl md:overflow-hidden md:rounded-xl",c),"data-testid":"cover-image-container",children:(0,r.jsx)("img",{loading:"lazy",src:i,alt:void 0===a?"":a,className:(0,o.x)("size-full",{"object-contain":l,"object-cover":!l}),"data-testid":"cover-image"})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{D:()=>i})},233480(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(417980),a=n(877793),s=n(81417),l=function(e){var t,n,l=e.children,c=e.className,u=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","className"]),d=(0,a.s)();return(0,r.jsx)("header",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({id:s.hl,"aria-label":(0,i.t)("page_header"),className:(0,o.x)("z-20 sm:relative sm:top-0 lg:sticky",d?"top-16":"top-0",c)},u),n=n={children:l},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{e:()=>l,u:()=>l})},348284(e,t,n){"use strict";var r=n(391426),o=n(933578),i=n(788578),a=function(e){var t=e.id,n=void 0===t?"rail-bar-header":t,a=e.className,s=(0,i.q)(),l="rail-bar-header"===n?"header":"rail-bar-content"===n?"content":null,c=null==s?void 0:s.registerTarget,u=(0,o.useCallback)(function(e){c&&l&&c(l,e)},[c,l]);return(0,r.jsx)("div",{id:n,className:a,ref:u})};n.d(t,{C:()=>a,Z:()=>a})},788578(e,t,n){"use strict";var r=n(391426),o=n(933578);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var s=(0,o.createContext)(null);s.displayName="RailbarPortalContext";var l=function(e){var t=e.children,n=a((0,o.useState)(null),2),i=n[0],l=n[1],c=a((0,o.useState)(null),2),u=c[0],d=c[1],p=(0,o.useCallback)(function(e,t){"header"===e?l(t):d(t)},[]),f=(0,o.useCallback)(function(e){return"header"===e?i:u},[i,u]),m=(0,o.useMemo)(function(){return{getTarget:f,registerTarget:p}},[f,p]);return(0,r.jsx)(s.Provider,{value:m,children:t})},c=function(){return(0,o.useContext)(s)};n.d(t,{l:()=>l,q:()=>c})},577742(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(417980),a=function(e){var t,n,a=e.className,s=e.children,l=e.hidden,c=e.anchorProps;return void 0!==l&&l?null:(0,r.jsx)("aside",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({"aria-label":(0,i.t)("right_sidebar"),className:(0,o.x)("hidden w-80 shrink-0 [@container(min-width:768px)]:block",a),"data-testid":"sidebar-right"},c),n=n={children:(0,r.jsx)("div",{className:"w-80 overflow-hidden","data-draggable":"false",children:s})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{M:()=>a,x:()=>a})},323734(e,t,n){"use strict";var r=n(391426),o=function(e){var t=e.children;return(0,r.jsx)("div",{className:"lg:hidden",children:t})};n.d(t,{n:()=>o})},612969(e,t,n){"use strict";var r=n(391426),o=n(570310),i=function(e){var t,n,i=e.children,a=e.className,s=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","className"]);return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,o.x)("bg-secondary size-full flex-1 overflow-y-auto",a)},s),n=n={children:i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{T:()=>i})},839879(e,t,n){"use strict";var r=n(391426),o=function(e){var t,n,o=e.children,i=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children"]);return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:"bg-secondary"},i),n=n={children:o},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{P:()=>o})},207431(e,t,n){"use strict";var r=n(391426),o=n(570310),i=function(e){var t,n,i=e.children,a=e.isBgSecondary,s=e.isBgPrimary,l=e.className,c=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","isBgSecondary","isBgPrimary","className"]);return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,o.x)(void 0!==a&&a&&"!bg-secondary",void 0!==s&&s&&"bg-primary",l)},c),n=n={children:i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{H:()=>i})},530818(e,t,n){"use strict";var r=n(391426),o=n(570310),i=function(e){var t=e.children,n=e.className;return(0,r.jsx)("aside",{className:(0,o.x)("border-primary bg-primary shrink-0 border-r",n),children:t})};n.d(t,{E:()=>i})},200753(e,t,n){"use strict";var r=n(391426),o=function(e){var t,n,o=e.children,i=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children"]);return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:"bg-secondary","data-testid":"standard-layout-v2-wrapper"},i),n=n={children:o},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{Z:()=>o})},81417(e,t,n){"use strict";var r="standard-layout-v2-cover-image-container",o="#".concat(r),i="standard-layout-header",a="#".concat(i);n.d(t,{C7:()=>r,cF:()=>o,hl:()=>i,oU:()=>a})},650809(e,t,n){"use strict";n.d(t,{A1:()=>i.A1,CL:()=>r.C,DQ:()=>i.DQ,Gv:()=>i.Gv,ML:()=>i.ML,Nz:()=>i.Nz,Qp:()=>i.Qp,Qs:()=>i.Qs,TK:()=>i.TK,ZY:()=>r.Z,an:()=>i.an,bs:()=>i.bs,lS:()=>o.l,lY:()=>i.lY,mH:()=>i.mH,ud:()=>i.ud});var r=n(348284),o=n(788578);n(612969),n(839879),n(207431),n(530818);var i=n(779504)},877793(e,t,n){"use strict";var r=n(506493),o=n(382273),i=n(605274),a=n(92406),s=function(){var e=(0,i.J6)(),t=(0,r.B)(),n=(0,a.i)(),s=n.display_header,l=n.pages_app_page,c=(0,o.Z)();return!e&&!t&&!(l&&!s)&&!c};n.d(t,{s:()=>s})},850178(e,t,n){"use strict";var r=n(230763),o=n(339551),i=n(765724),a=n(341409),s=n(627252),l=n(355104),c=n(555169),u=n(618817),d=n(488872),p=n(693546),f=function(){var e=(0,r.Od)().currentCommunity,t=(0,p.a)().isMemberDirectoryPage,n=(0,l.c)().isCircleV4,f=(0,d.E)(),m=(0,o.E)().helpers.findBy({slug:f})||{},b=(0,s.f)(),y=(0,p.a)().isSpaceShowPage,h=(0,c.V)(),g=(0,u.R)(),v=(0,i.a$)(e);return(0,a.$O)(m)||!g&&(0,a.Hq)(m)||g&&(0,a.Op)(m)&&h&&!n||v||!!t&&h&&!n||(0,a.yd)(m)&&b&&!y};n.d(t,{r:()=>f})},443200(e,t,n){"use strict";var r=n(391426),o=n(869932),i=n(570310),a=n(202090),s=n(417980),l=n(674251),c=n(734527),u={xlarge:128,large:104,medium:84,small:64},d={xlarge:"24",large:"24",medium:"16",small:"14"},p={xlarge:"h-9 w-9",large:"h-8 w-8",medium:"h-7 w-7",small:"h-6 w-6"},f=function(e){var t=e.avatarUrl,n=e.name,f=e.progress,m=void 0===f?0:f,b=e.level,y=e.size,h=void 0===y?"large":y,g=(0,a.wR)().isDarkAppearance,v=u[h],x=(v-4)/2,j=2*Math.PI*x,_=j-m/100*j,w=(0,o.s)(b||1);return(0,r.jsxs)("div",{className:"relative flex items-center justify-center rounded-full",style:{height:v,width:v},children:[(0,r.jsx)("progress",{value:m,max:100,"aria-label":(0,s.t)("leaderboard.gamification_level_progress"),"aria-valuenow":m,className:"sr-only"}),(0,r.jsxs)("svg",{className:"absolute",width:v,height:v,style:{transform:"rotate(-90deg)"}
1,"aria-hidden":!0,children:[(0,r.jsx)("circle",{cx:v/2,cy:v/2,r:x,stroke:g?"#42464D":"#F0F3F5",strokeWidth:4,fill:"none"}),(0,r.jsx)("circle",{cx:v/2,cy:v/2,r:x,stroke:w.progress,strokeWidth:4,fill:"none",strokeDasharray:j,strokeDashoffset:_,strokeLinecap:"round"})]}),(0,r.jsx)("div",{className:"absolute z-0 flex items-center justify-center overflow-hidden rounded-full bg-secondary [&>*]:!h-full [&>*]:!w-full",style:{height:v-8,width:v-8},children:(0,r.jsx)(c.J,{isFullRounded:!0,src:t,name:n,size:d[h]})}),b&&(0,r.jsx)("div",{className:(0,i.x)("absolute -bottom-1 -right-1 z-10 flex items-center justify-center rounded-full",p[h],w.bg),children:(0,r.jsx)(l.o.LabelSm,{weight:"bold",children:(0,r.jsx)("span",{className:w.text,children:b})})})]})};n.d(t,{v:()=>f})},640270(e,t,n){"use strict";var r={"7_days":"7_days","30_days":"30_days",all_time:"all_time"},o={1:{light:"leaderboard-rank-1",dark:"leaderboard-rank-1-dark"},2:{light:"leaderboard-rank-2",dark:"leaderboard-rank-2-dark"},3:{light:"leaderboard-rank-3",dark:"leaderboard-rank-3-dark"}};n.d(t,{$M:()=>r,GF:()=>o,kn:()=>"7_days"})},244751(e,t,n){"use strict";var r=n(391426),o=n(568316),i=n(869932),a=n(570310),s=n(417980),l=n(355104),c=function(e){var t=e.level,n=e.levelName,c=e.className,u=(0,i.s)(t),d=(0,l.c)().isCircleV4;return(0,r.jsxs)("div",{className:(0,a.x)("mb-2 inline-flex items-center space-x-3 rounded-full px-3 py-1",u.bg,u.text,d&&"rounded-md gap-2",c),children:[(0,r.jsxs)(o.o.LabelSm,{weight:"semibold",color:"text-inherit",children:[(0,r.jsx)("span",{className:"mr-2",children:(0,s.t)("leaderboard.trophy_emoji")}),(0,s.t)("leaderboard.level_number_only",{level:t})]}),(0,r.jsx)("div",{className:(0,a.x)("h-3 w-px rounded-md",u.divider)}),(0,r.jsx)(o.o.LabelSm,{weight:"semibold",color:"text-inherit",children:n||(0,s.t)("leaderboard.level_n",{level:t})})]})};n.d(t,{s:()=>c})},869932(e,t,n){"use strict";var r=n(202090),o={light:{basic:"bg-[#F8EFDD] text-[#D69B29]",mid:"bg-[#EAEDFD] text-[#506CF0]",pro:"bg-[#F5ECFC] text-[#AC61E7]"},dark:{basic:"bg-[#443E32] text-[#E2AB40]",mid:"bg-[#31374E] text-[#7A91FD]",pro:"bg-[#3E354D] text-[#CF93FF]"}},i={light:{basic:"text-[#D69B29]",mid:"text-[#506CF0]",pro:"text-[#AC61E7]"},dark:{basic:"text-[#E2AB40]",mid:"text-[#7A91FD]",pro:"text-[#CF93FF]"}},a={light:{basic:"bg-[#F4E3C1]",mid:"bg-[#D1D8FB]",pro:"bg-[#E9D6F9]"},dark:{basic:"bg-[#6C624E]",mid:"bg-[#4D577B]",pro:"bg-[#5D4278]"}},s={light:{basic:"#D69B29",mid:"#506CF0",pro:"#AC61E7"},dark:{basic:"#E2AB40",mid:"#7A91FD",pro:"#CF93FF"}},l={light:{basic:"bg-gradient-to-b from-[#F8EFDD] to-transparent",mid:"bg-gradient-to-b from-[#EAEDFD] to-transparent",pro:"bg-gradient-to-b from-[#F5ECFC] to-transparent"},dark:{basic:"bg-gradient-to-b from-[#443E32] to-transparent",mid:"bg-gradient-to-b from-[#31374E] to-transparent",pro:"bg-gradient-to-b from-[#3E354D] to-transparent"}},c=function(e){var t=(0,r.UN)(),n=e&&!(e<=3)?e<=6?"mid":"pro":"basic";return{bg:o[t][n],text:i[t][n],divider:a[t][n],progress:s[t][n],bgGradient:l[t][n]}};n.d(t,{s:()=>c})},233070(e,t,n){"use strict";var r=n(391426),o=n(620708),i=n(739042),a=n(933578),s=n(417980),l=(0,o.Z)(function(){return Promise.all([n.e(45208),n.e(31196)]).then(n.bind(n,960215)).then(function(e){return{default:e.CompassGoLiveModal}})}),c=function(e){var t=e.triggerSize,n=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["triggerSize"]);return(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(i.$,{startIcon:"video",size:t,variant:"outline",fullWidth:!0,disabled:!0,className:"pointer-events-none",children:(0,s.t)("sidebar_footer_v3.go_live")}
1),children:(0,r.jsx)(l,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({triggerSize:t},n))})};n.d(t,{u:()=>c})},387864(e,t,n){"use strict";var r=n(391426),o=n(8570),i=n(230763),a=n(6418),s=n(451430),l=n(933578);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var d=(0,l.createContext)({streamingHoursAvailable:!1,totalStreamingHours:0,limitsReachedIsOpen:!1,limitsReachedOnClose:s.noop,limitsReachedOnOpen:s.noop,shouldUpgradeAddons:!1,purchaseStreamingAddonWhenLimitReached:function(){return Promise.resolve()}});d.displayName="AddonsContext";var p=function(e){var t,n=e.children,p=(0,i.Od)().currentCommunityMember,f=(0,a.V8)(p),m=(0,o.KI)({enabled:f}),b=m.streamingHoursAvailable,y=m.streamingTotalPlanHours,h=m.isLoading,g=(0,o.bk)(s.noop,{enabled:f}),v=g.purchaseAsync,x=g.currentQuantity,j=g.unitSize,_=y+Number(x||0),w=function(e){if(Array.isArray(e))return e}(t=(0,l.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return c(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),O=w[0],S=w[1];(0,l.useEffect)(function(){S(f&&!h&&!b)},[f,h,b]);var P=!b;return(0,r.jsx)(d.Provider,{value:{streamingHoursAvailable:b,totalStreamingHours:_,limitsReachedIsOpen:O,limitsReachedOnClose:function(){S(!1)},limitsReachedOnOpen:function(){S(!0)},shouldUpgradeAddons:P,purchaseStreamingAddonWhenLimitReached:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:if(b||!j)return[2];return[4,v(j)];case 1:return e.sent(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,s,"next",e)}function s(e){u(i,r,o,a,s,"throw",e)}a(void 0)})})()}},children:n})},f=function(){var e=(0,l.useContext)(d);if(void 0===e)throw Error("useAddonsContext must be used within a AddonsProvider");return e};n.d(t,{E:()=>f,t:()=>p})},248638(e,t,n){"use strict";var r=n(391426),o=n(933578),i=n(66108);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var s=function(e){var t,n=e.title,s=e.onConfirm,l=e.bodyElement,c=e.description,u=e.buttonLabel,d=e.sentiment,p=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return a(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),f=p[0],m=p[1],b=function(){m(!1)},y=function(){m(!1),s()};return{confirmModal:(0,r.jsx)(i.R,{isOpen:f,onClose:b,onCancel:b,onConfirm:y,title:n,confirmVariant:void 0===d?"danger":d,confirmText:u,children:(void 0===l?null:l)||c}),isConfirmModalOpen:f,onConfirmButtonClick:function(){m(!0)},onConfirmModalClose:b,onConfirmModal:y}};n.d(t,{f:()=>s})},8570(e,t,n){"use strict";n.d(t,{E:()=>y,dc:()=>r.d,KI:()=>c,P5:()=>a,_J:()=>_,bk:()=>h,OR:()=>x});var r=n(865386),o=n(915779),i=n(258752),a=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{enabled:!0}).enabled,t=(0,i.IT)({queryKey:[o.iK.liveStreams.configurations()],enabled:e}),n=t.data,r=t.isInitialLoading,a={};return null==n||n.forEach(function(e){a[e.feature_flag]=e.value}),{isLoading:r,config:a}},s=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{enabled:!0}).enabled,t=(0,i.IT)({queryKey:[o.iK.liveStreams.usage()],enabled:e}),n=t.data,r=t.isInitialLoading,a={};return null==n||n.forEach(function(e){a[e.type]=e.value}),{isLoading:r,usage:a}},l=n(451430),c=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{enabled:!0}).enabled,t=a({enabled:e}),n=t.config,r=t.isLoading,o=s({enabled:e}),i=o.usage,c=o.isLoading,u=Number(h(l.noop,{enabled:e}).currentQuantity||0),d=(null==i?void 0:i.stream_duration)||0,p=Number((null==n?void 0:n.live_stream_monthly_stream_hours)||0);return{isLoading:r||c,streamingHoursAvailable:d<3600*p+3600*u,streamingTotalPlanHours:p+u}},u=n(254209),d=n(913961),p=n(640668),f=n(417980),m=function(e,t,n){var r=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{enabled:!0}).enabled,a=(0,p.B)().isCommunityOnTrial,s=(0,i.IT)({queryKey:[d.i.communityPlanAddons.show({addonId:e})],enabled:r,staleTime:6e5,retry:function(e,t){return![401,404].includes(null==t?void 0:t.status)}}),l=s.data,c=s.isInitialLoading,m=s.refetch,b=s.isFetching,y=l||{},h=y.id,g=y.max_purchasable_quantity,v=y.name,x=y.quantity,j=y.unit_size,_=!g||"number"==typeof x&&x<g,w=function(e){return!g||"number"==typeof x&&x+e<=g},O=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return a?Promise.resolve().then(function(){return window.location.href=(0,o.kP)()}):h&&x&&w(n)?u.v.create((e={},t="number"==typeof x?x+n:x,h in e?Object.defineProperty(e,h,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[h]=t,e)):Promise.reject((0,f.t)("addons.community_plan_addon_hook.quantity_not_available_message"))},S=(0,i.n_)({mutationFn:function(e){return O(e)},onSuccess:function(){m(),null==n||n()},onError:function(e){null==t||t(e)}});return{id:h,currentQuantity:x,maxPurchasableQuantity:g,name:v,unitSize:j,canPurchase:_,canPurchaseQuantity:w,purchase:S.mutate,purchaseAsync:S.mutateAsync,refetch:m,isLoading:c,isFetching:b,isPurchasing:S.isPending}},b=n(717526),y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{enabled:!0},t=(0,b.d)().error;return m("live_stream_spectators",function(){return t((0,f.t)("live_streams.room.attendees_addon_quantity_error"))},l.noop,e)},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.noop,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{enabled:!0},n=(0,b.d)().error;return m("live_stream_monthly_stream_hours",function(){return n((0,f.t)("live_streams.room.stream_hours_addon_error"))},e,t)},g=function(){var e=h(),t=e.isLoading,n=e.currentQuantity,r=e.refetch,o=y(),i=o.isLoading,a=o.currentQuantity,s=o.refetch;return{streamHoursAddonQuantity:n,attendeeSeatsAddonQuantity:a,isLoading:t||i,refetch:function(){r(),s()}}},v=n(794713),x=function(){var e,t,n=a(),r=n.config,o=n.isLoading,i=s(),l=i.usage,c=i.isLoading,u=g(),d=u.refetch,p=u.isLoading,f=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(u,["refetch","isLoading"]);return{monthlyHourLimit:parseInt(null==r?void 0:r.live_stream_monthly_stream_hours)+parseInt((null==f||null==(e=f.streamHoursAddonQuantity)?void 0:e.toString())||"0"),monthlyHourUsage:((null==l?void 0:l.stream_duration)||0)/3600,hostLimit:null==r?void 0:r.live_stream_max_host_capacity,participantLimit:parseInt(null==r?void 0:r.live_stream_max_spectator_capacity)+parseInt((null==f||null==(t=f.attendeeSeatsAddonQuantity)?void 0:t.toString())||"0"),streamingDurationResetDate:(null==l?void 0:l.streaming_duration_reset_date)?(0,v.S7)(null==l?void 0:l.streaming_duration_reset_date):void 0,isLoading:o||c||p,refetchAddons:d}},j=n(230763),_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.enabled,n=(0,j.Od)().currentCommunityMember,r=(0,i.IT)({queryKey:[o.iK.liveStreams.usageLimit()],enabled:(void 0===t||t)&&!!n}),a=r.data;return{isLoading:r.isLoading,isMonthlyHourLimitReached:null==a?void 0:a.streaming_limit_reached,isStorageLimitReached:null==a?void 0:a.recording_limit_reached}}},865386(e,t,n){"use strict";var r=n(686648),o=n(230763),i=n(693410),a=n(502216),s=n(519104),l=n(274685),c=n(258752),u=n(417980),d=n(717526),p=n(497489),f=function(){var e,t=(0,o.Od)().currentUser,n=(0,p.X)().currentContact,f
1=(0,d.d)(),m=f.error,b=f.success,y=(0,s.Z)(),h=(0,l.jE)(),g=a.EN.liveNow(),v=(0,c.IT)(g).data,x=null==v||null==(e=v.records)?void 0:e.find(function(e){return!e.breakout_room_id}),j=(0,c.n_)({mutationFn:function(){return r.R.endStream({id:null==x?void 0:x.id})},onSuccess:function(){b((0,u.t)("live_streams.room.".concat((0,i.sA)(x),".end_success"))),h.removeQueries({queryKey:g.queryKey})},onError:function(){return m((0,u.t)("live_streams.room.".concat((0,i.sA)(x),".end_error")))}});return{room:x,canManage:null==x?void 0:x.can_manage,handleNavigateToRoom:function(){if(x){var e=!!(n&&x.current_contact_rsvped_to_event);y({to:(0,i.EZ)(x)&&!(t||e)?"/live/$roomSlug/public":"/live/$roomSlug",params:{roomSlug:x.slug}})}},handleEndStream:function(e){null==e||e.stopPropagation(),j.mutate()}}};n.d(t,{d:()=>f})},395568(e,t,n){"use strict";n.d(t,{U:()=>U});var r=n(391426),o=n(486182),i=n(519104),a=n(933578),s=n(417980),l=n(717526),c=n(746526),u=n(595994);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var f=function(e){var t=e.rootLocale,n=e.closeChecklist,r=(0,l.d)(),o=(0,a.useRef)(null),i=(0,a.useRef)(!1),c=p((0,a.useState)(null),2),u=c[0],d=c[1],f=p((0,a.useState)(null),2),m=f[0],b=f[1],y=function(){n(),r.success((0,s.t)([t,"checklist_completed_message"]),{duration:"long"})},h=(0,a.useCallback)(function(e){if("visible"!==document.visibilityState)return!1;var t,n=null==(t=o.current)?void 0:t.querySelector('[data-member-checklist-item-id="'.concat(e,'"]'));if(!n)return!1;var r=n.getBoundingClientRect();if(0===r.width||0===r.height)return!1;
1var i=r.left+r.width/2,a=r.top+r.height/2;if(i<0||a<0||i>window.innerWidth||a>window.innerHeight)return!1;var s=document.elementFromPoint(i,a);return null!==s&&n.contains(s)},[]);return(0,a.useEffect)(function(){if(u){var e=Date.now(),t=window.setInterval(function(){h(u)?(b(u),d(null)):Date.now()-e>9e5&&d(null)},350);return function(){return window.clearInterval(t)}}},[u,h]),{contentRef:o,animateMemberChecklistItemId:m,onMemberChecklistItemCompleted:function(e,t){d(e),i.current=t},onMemberChecklistItemAnimationComplete:function(){b(null),i.current&&y()}}},m=n(274685),b=n(258752),y=n(51730),h=n(915779),g=function(){return(0,y.i_)(h.iK.memberChecklist.show())},v=function(e){return(0,y.oK)(h.iK.memberChecklist.completeItem(),{member_checklist_item_id:e})},x=function(e){return(0,y.oK)(h.iK.memberChecklist.incompleteItem(),{member_checklist_item_id:e})},j=function(e){var t,n,r,o=e.enabled,i=(0,m.jE)(),a=["memberChecklist","show"],s=function(){i.invalidateQueries({queryKey:a})},l=(0,b.IT)({queryKey:a,queryFn:g,enabled:o}),c=l.data,u=l.isLoading,d=(0,b.n_)({mutationFn:v,onSuccess:s}),p=d.mutate,f=d.isPending,y=(0,b.n_)({mutationFn:x,onSuccess:s}),h=y.mutate,j=y.isPending,_=null!=(t=null==c?void 0:c.member_checklist_items)?t:[],w=null!=(n=null==c?void 0:c.member_checklist_total_items)?n:0,O=null!=(r=null==c?void 0:c.member_checklist_total_completed_items)?r:0;return{memberChecklist:c,memberChecklistItems:_,memberChecklistTotalItems:w,memberChecklistTotalCompletedItems:O,memberChecklistProgressValue:w>0?O/w*100:0,isMemberChecklistLoading:u,completeItem:p,isMarkingAsComplete:f,incompleteItem:h,isMarkingIncomplete:j}},_=n(570310),w=n(817751),O=n(892907),S=n(162005),P=n(585529),C=n(739042),k=n(973646),I=n(67592),N=n(723781),A=n(442864),E="header.member_checklist.item_button",R=function(e){var t=e.item,n=e.onClick,o=e.isLoading;return(0,A.t)()?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-4 rounded-xl border px-4 py-3 shadow-2xs",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(k.In,{type:"apple-logo",className:"-mt-1 !w-5 text-black dark:text-white"}),(0,r.jsx)(O.o5,{variant:"label-sm",children:(0,s.t)([E,"ios"])})]}),(0,r.jsx)(C.$,{variant:"branded",size:"sm",onClick:function(){return n("ios")},children:(0,s.t)([E,"download"])})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4 rounded-xl border px-4 py-3 shadow-2xs",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(k.In,{type:"play-store-logo",className:"!w-4"}),(0,r.jsx)(O.o5,{variant:"label-sm",children:(0,s.t)([E,"android"])})]}),(0,r.jsx)(C.$,{variant:"branded",size:"sm",onClick:function(){return n("android")},children:(0,s.t)([E,"download"])})]})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)(N.a,{className:"flex flex-col items-center gap-1 w-fit mb-4",children:[(0,r.jsx)(I.r,{title:(0,s.t)([E,"scan"]),value:t.link_url.download_app,size:110}),(0,r.jsx)(O.o5,{variant:"caption",color:"tertiary",children:(0,s.t)([E,"scan"])})]}),(0,r.jsx)(C.$,{variant:"branded",size:"sm",loading:o,onClick:function(){return n()},children:t.completed?(0,s.t)([E,"done"]):(0,s.t)([E,"mark_as_complete"])})]})},L="header.member_checklist.item_button",D=function(e){var t=e.item,n=e.onButtonClick,o=e.buttonIsLoading,i=t.completed,a=t.link_type,l=t.button_text,c=l||("none"===a?i?(0,s.t)([L,"done"]):(0,s.t)([L,"mark_as_complete"]):(0,s.t)([L,"default_label"]));return"mobile_app"===a?(0,r.jsx)(R,{item:t,onClick:n,isLoading:o}):(0,r.jsx)("div",{children:(0,r.jsx)(C.$,{variant:"branded",size:"sm",loading:o,onClick:function(){return n()},children:c})})},T=function(e){var t=e.item,n=e.className;return t.completed?(0,r.jsx)(k.In,{type:"checkmark",className:(0,_.x)("!size-5 rounded-full bg-disabled p-px text-primary",n)}):(0,r.jsx)(k.In,{type:"circle-dashed",className:(0,_.x)("!size-5 text-disabled",n)})},M=function(e){var t=e.item,n=e.isExpanded,o=e.onExpandChange,i=e.onButtonClick,a=e.buttonIsLoading,s=t.title,l=t.content,c=t.completed,u={duration:.2,ease:"easeInOut"};return(0,r.jsxs)("div",{className:(0,_.x)("rounded-xl border border-primary",{"bg-secondary":c}),children:[(0,r.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between gap-4 px-3 py-4",onClick:o,children:[(0,r.jsxs)("div",{className:"flex items-center text-left gap-3",children:[(0,r.jsx)(T,{item:t,className:"shrink-0"}),(0,r.jsx)(O.o5,{variant:"label-sm",color:c?"secondary":"primary",className:c?"line-through":"",children:s})]}),(0,r.jsx)(S.P.div,{animate:{rotate:180*!!n},transition:u,children:(0,r.jsx)(w.t,{name:"chevron-down",color:"secondary",className:"shrink-0"})})]}),(0,r.jsx)(S.P.div,{initial:!1,"aria-hidden":!n,inert:!n,animate:n?{height:"auto",opacity:1}:{height:0,opacity:0}
1,transition:u,className:"overflow-hidden",children:(0,r.jsxs)("div",{className:"flex flex-col gap-3 pl-11 pr-3 pb-4",children:[l&&(0,r.jsx)(P.H,{value:null==l?void 0:l.body,inlineAttachments:null==l?void 0:l.inline_attachments,sgidToObjectMap:null==l?void 0:l.sgids_to_object_map,readOnly:!0,className:"[&_p]:!text-sm [&_p]:!leading-5 [&_p]:!text-secondary"}),(0,r.jsx)(D,{item:t,onButtonClick:i,buttonIsLoading:a})]})})]})},F=n(617593),K=function(){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-col gap-2",children:[(0,r.jsx)(F.E,{className:"h-4 w-24"}),(0,r.jsx)(F.E,{className:"h-2"})]}),(0,r.jsx)("div",{className:"flex flex-col gap-2",children:Array.from({length:5},function(e,t){return(0,r.jsx)(F.E,{className:"h-12"},t)})})]})};function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var q="header.member_checklist",U=function(e){var t,n=e.enabled,d=e.closeChecklist,p=e.previewMemberChecklistItems,m=e.className,b=(0,i.Z)(),y=(0,l.d)(),h=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return B(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return B(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),g=h[0],v=h[1],x=void 0!==p,_=f({rootLocale:q,closeChecklist:d}),w=_.contentRef,O=_.animateMemberChecklistItemId,S=_.onMemberChecklistItemCompleted,P=_.onMemberChecklistItemAnimationComplete,C=j({enabled:n&&!x}),k=C.memberChecklistItems,I=C.memberChecklistTotalItems,N=C.memberChecklistTotalCompletedItems,A=C.memberChecklistProgressValue,E=C.isMemberChecklistLoading,R=C.completeItem,L=C.isMarkingAsComplete,D=x?p:k,T=x?D.length:I,F=x?0:N,U=function(e,t){var n=e.link_type,r=e.link_url;if("mobile_app"===n)t&&window.open("android"===t?null==r?void 0:r.android:null==r?void 0:r.ios,"_blank","noopener,noreferrer");else if("custom"!==n||(0,u.J)(window,r)){if(r){var o=new URL(r,window.location.origin);b({to:"".concat(o.pathname).concat(o.search).concat(o.hash)}),("space"===n||"post"===n)&&d()}}else window.open(r,"_blank","noopener,noreferrer");v(null)},z=function(e,t){if(!x){if(e.completed)return void U(e,t);var n=F+1===T;R(e.id,{onSuccess:function(){U(e,t),S(e.id,n)},onError:function(){return y.error((0,s.t)([q,"complete_item_unexpected_error"]))}})}},W=function(e){v(e===g?null:e)};return!x&&E?(0,r.jsx)(K,{}):(0,r.jsxs)("div",{ref:w,className:void 0===m?"":m,children:[(0,r.jsx)("div",{className:"[&_.bg-inverse]:bg-v2-success",children:(0,r.jsx)(o.z,{label:(0,s.t)([q,"progress"],{completed:F,total:T}),value:x?0:A,hideValue:!0,className:"mb-4"})}),(0,r.jsx)("div",{className:"flex flex-col gap-2",children:D.map(function(e){return(0,r.jsxs)("div",{className:"relative","data-member-checklist-item-id":e.id,children:[(0,r.jsx)(M,{item:e,isExpanded:g===e.id,onExpandChange:function(){return W(e.id)},onButtonClick:function(t){return z(e,t)},buttonIsLoading:L}),(0,r.jsx)(c.X,{isActive:O===e.id,type:"tada",onComplete:P,className:"pointer-events-none absolute inset-x-0 h-80 bottom-full translate-y-1/2"})]},e.id)})})]})}},359583(e,t,n){"use strict";n.d(t,{u:()=>s});var r=n(391426),o=n(694812),i=n(417980),a=n(395568),s=function(e){var t=e.open,n=e.onOpenChange,s=e.container,l=e.previewMemberChecklistItems,c=e.indent;return(0,r.jsx)(o._s.Root,{open:t,onOpenChange:n,container:s,snapTo:"half",indent:void 0===c||c,children:(0,r.jsxs)(o._s.Content,{children:[(0,r.jsx)(o._s.Header,{title:(0,i.t)(["header.member_checklist","title"]),sticky:!0}),(0,r.jsx)(a.U,{enabled:t,closeChecklist:function(){return n(!1)},previewMemberChecklistItems:l,className:"px-1"})]})})}}
1,129086(e,t,n){"use strict";n.d(t,{d:()=>c});var r=n(391426),o=n(118393),i=n(698532),a=n(933578),s=n(417980),l=n(395568),c=function(e){var t=e.open,n=e.onOpenChange,c=e.container,u=e.previewMemberChecklistItems,d=(0,a.useRef)(null);return(0,a.useLayoutEffect)(function(){if(t&&!c){var e=document.getElementById(o.eL.workspaceBody),n=d.current;if(e&&n){var r=function(){var t=e.getBoundingClientRect(),r=t.top,o=t.right;n.style.top="".concat(r,"px"),n.style.right="".concat(window.innerWidth-o,"px")};r();var i=new ResizeObserver(r);return i.observe(e),window.addEventListener("resize",r),function(){i.disconnect(),window.removeEventListener("resize",r)}}}},[t,c,d.current]),(0,r.jsx)(i.$.Root,{open:t,onOpenChange:n,container:c,noBackdrop:!0,size:"md",children:(0,r.jsxs)(i.$.Content,{ref:d,children:[(0,r.jsx)(i.$.Header,{title:(0,s.t)(["header.member_checklist","title"])}),(0,r.jsx)(i.$.Body,{children:(0,r.jsx)(l.U,{enabled:t,closeChecklist:function(){return n(!1)},previewMemberChecklistItems:u})})]})})}},540078(e,t,n){"use strict";var r=n(230763),o=n(933578),i=n(697652);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var s=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoOpen,s=void 0===n||n,l=(0,r.Od)().currentCommunityMember,c=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return a(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=c[0],d=c[1],p=(0,o.useRef)(!1),f=(0,i.M)((null==l?void 0:l.id)?"member_checklist_dismissed_".concat(l.id):void 0),m=f.getValue,b=f.setValue;return(0,o.useEffect)(function(){s&&!p.current&&l&&(l.show_welcome_popup||m()||(p.current=!0,d(!0)))},[s,l,m]),{shouldShowMemberChecklist:!!(null==l?void 0:l.show_member_checklist),shouldShowMemberChecklistBadge:!u,isMemberChecklistOpen:u,handleMemberChecklistOpenChange:function(e){d(e),e||b(!0)}}};n.d(t,{u:()=>s})},127470(e,t,n){"use strict";n.d(t,{t:()=>a});var r=n(391426),o=n(417980),i=n(675158),a=function(e){var t,n=e.pendingConnectionsQuery,a=n.audience||[],s=!!n.hasNextPage,l=a.map(function(e){return{id:"".concat(e.id),person:e,type:"connection"}});return(0,r.jsx)(i.N,{title:(0,o.t)("members_directory.grow.requests"),items:l,totalCount:null!=(t=n.totalQueryAudience)?t:0,isLoading:!!n.isLoading,hasMore:s,fetchNextPage:function(){return n.fetchNextPage()},isFetchingNextPage:!!n.isFetchingNextPage,testId:"pending-connections-accordion",listTestId:"pending-connections-list"})}},888085(e,t,n){"use strict";n.d(t,{b:()=>a});var r=n(391426),o=n(417980),i=n(675158),a=function(e){var t,n=e.recommendationsQuery;if(n.isLoading)return null;var a=n.recommendations||[],s=!!n.hasNextPage,l=a.map(function(e){return{id:"".concat(e.id),person:e.target,type:"recommendation"}});return(0,r.jsx)(i.N,{title:(0,o.t)("members_directory.recommendations.title"),items:l,totalCount:null!=(t=n.count)?t:0,isLoading:!!n.isLoading,hasMore:s,fetchNextPage:n.fetchNextPage,isFetchingNextPage:!!n.isFetchingNextPage,className:"mb-10"})}},182663(e,t,n){"use strict";n.d(t,{Q:()=>I});var r=n(391426),o=n(288349),i=n(519104),a=n(417980),s=n(674251),l=n(692990),c=n(230763),u=n(6418),d=n(570310),p=n(558613),f=n.n(p),m=n(933578),b=n(258752),y=n(51730),h=n(533877),g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,h.H)("connect/connection/my_connections",e)};function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var x=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.perPage,r=void 0===n?10:n,o=t.initialPage,i=void 0===o?1:o,a=t.options,s=v({getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},getPreviousPageParam:function(e){return e.page>1?e.page-1:void 0},keepPreviousData:!0},void 0===a?{}:a),l=(0,b.qu)(v({initialPageParam:i,queryKey:["my-connections",r,i],queryFn:function(e){var t,n=e.pageParam,o=void 0===n?i:n,a=1;return"number"==typeof o&&o>0&&(a=o),t={page:a,per_page:r},(0,y.i_)(g(t))}},s)),c=l.data,u=l.fetchNextPage,d=l.hasNextPage,p=l.isLoading,h=(0,m.useMemo)(function(){return(null==c?void 0:c.pages)||[]},[null==c?void 0:c.pages]);return{fetchNextPage:u,hasNextPage:d,isLoading:p,totalCount:(null==(e=h[0])?void 0:e.count)||0,members:(0,m.useMemo)(function(){return f()(h.map(function(e){return e.records}))},[h])}},j=n(813455),_=n(202090),w=n(275360),O=n(729491),S=n(941388),P=n(435904),C=n(636709);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var I=function(e){var t,n,p=e.memberDirectorySettings,f=(0,l.n)(),m=f?S.Vw.LIST:p.view,b=(function(e){if(Array.isArray(e))return e}(t=(0,j.D)({defaultCommunityView:m,views:S.Vw}))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return k(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return k(e,1)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],y=(0,_.wR)().currentAppearance,h=(0,i.Z)(),g=x({perPage:10}),v=0===g.totalCount&&!g.isLoading,I=(0,c.Od)(),N=I.currentCommunityMember,A=I.currentCommunitySettings,E=(0,u.OM)(N,A);if(g.isLoading)return(0,r.jsx)(w.i,{view:S.Vw.LIST});var R=O.u[y];return v?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,r.jsx)("div",{className:"mt-14 flex flex-1 items-center justify-center",children:(0,r.jsx)(C.v,{className:"h-36",src:R.large,srcVariants:R,alt:(0,a.t)("members_directory.recommendations.empty_list.build_connection_header"),imageClassName:"object-contain"})}),(0,r.jsx)(o.p,{header:(0,a.t)("members_directory.recommendations.empty_list.build_connection_header"),description:(0,a.t)("members_directory.recommendations.empty_list.build_connection_description"),primaryLabel:E?(0,a.t)("members_directory.recommendations.empty_list.button"):void 0,onPrimaryClick:function(){h({to:"/members"})}})]}):(0,r.jsxs)("div",{className:(0,d.x)("flex flex-col gap-6 px-6 pb-20 sm:px-0",f?"md:pb-8":"md:pb-0"),children:[!f&&(0,r.jsx)("div",{className:"border-primary hidden items-center justify-between md:flex",children:(0,r.jsxs)("div",{className:"flex items-center gap-x-2 pl-2 md:pl-0",children:[(0,r.jsx)(s.o.LabelLg,{weight:"semibold",size:"text-lg",children:(0,a.t)("members_directory.connections.title")}),g.totalCount>0&&(0,r.jsx)("span",{className:"bg-secondary text-dark flex h-[22px] items-center justify-center rounded-3xl px-1.5 py-0.5 text-center text-xs font-medium",children:g.totalCount})]})}),(0,r.jsx)(P.A,{activeView:b,fetchNextPage:g.fetchNextPage,hasNextPage:null!=(n=g.hasNextPage)&&n,members:g.members,shouldShowHiddenMemberTooltip:!1})]})}},675158(e,t,n){"use strict";n.d(t,{N:()=>U});var r=n(391426),o=n(955015),i=n(933578),a=n(417980),s=n(284326),l=n(387099),c=n(674251),u=n(224444),d=n(570310),p=n(355104),f=n(228464),m=n(617593),b=function(){return(0,r.jsxs)("li",{className:"border-primary bg-primary group flex w-full min-w-0 flex-1 gap-x-4 rounded-xl px-6 py-4","data-testid":"expandable-list-item-skeleton",children:[(0,r.jsx)(f.L,{size:"lg"}),(0,r.jsx)("div",{className:"flex w-full min-w-0 flex-1 flex-col gap-y-3",children:(0,r.jsxs)("div",{className:"flex w-full min-w-0 flex-1 flex-row justify-between gap-y-3",children:[(0,r.jsx)("div",{className:"min-w-0 flex-1",children:(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-y-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,r.jsx)(m.E,{className:"h-3.5 w-16",shape:"pill"}),(0,r.jsx)(m.E,{className:"h-2.5 w-1/2",shape:"pill"})]}),(0,r.jsx)("div",{className:"flex items-center gap-1",children:(0,r.jsx)(m.E,{className:"h-2 w-7",shape:"pill"})})]})}),(0,r.jsx)("div",{className:"flex w-fit items-start gap-2",children:(0,r.jsx)(m.E,{className:"h-9 w-[100px] rounded-full",shape:"pill"})})]})})]})},y=n(152938),h=n(983979),g=function(){return(0,r.jsxs)("li",{className:"border-primary bg-primary group flex w-full min-w-0 flex-1 gap-x-4 rounded-xl px-6 py-4","data-testid":"expandable-list-item-skeleton",children:[(0,r.jsx)("div",{style:{aspectRatio:"1 / 1"},className:"h-10",children:(0,r.jsx)(y.e,{})}),(0,r.jsx)("div",{className:"flex w-full min-w-0 flex-1 flex-col gap-y-3",children:(0,r.jsxs)("div",{className:"flex w-full min-w-0 flex-1 flex-row justify-between gap-y-3",children:[(0,r.jsx)("div",{className:"min-w-0 flex-1",children:(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-y-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,r.jsx)(h.f,{md:!0,long:!0}),(0,r.jsx)(h.f,{sm:!0,half:!0})]}),(0,r.jsx)("div",{className:"flex items-center gap-1",children:(0,r.jsx)(h.f,{xs:!0,short:!0})})]})}),(0,r.jsx)("div",{className:"flex w-fit items-start gap-2",children:(0,r.jsx)(h.f,{md:!0,className:"!h-9 !w-[100px] !rounded-full"})})]})})]})},v=function(){return(0,p.c)().isCircleV4?(0,r.jsx)(b,{}):(0,r.jsx)(g,{})},x=function(e){var t=e.className,n=e.title,o=e.initialVisibleCount;return(0,r.jsxs)("div",{className:(0,d.x)("border-primary flex flex-col rounded-xl border bg-primary",t),children:[(0,r.jsx)("div",{className:"border-primary flex items-center gap-x-2 border-b px-6 py-3",children:(0,r.jsx)(c.o.LabelMd,{weight:"semibold",children:n})}),(0,r.jsx)("ul",{className:"flex list-none flex-col",children:Array.from({length:o}).map(function(e,t){return(0,r.jsxs)("div",{children:[(0,r.jsx)(v,{}),t<o-1&&(0,r.jsx)(s.c,{})]},t)})})]})},j=n(488441),_=n(452603),w=n(605274),O=n(260059),S=n(434204),P=n(973646),C=n(124503),k=n(492546),I=n(274104),N=n(274685),A=n(717526),E=n(258752),R=n(361379),L=n(34819),D=function(e){var t=e.onClick,n=e.ariaLabel;return(0,p.c)().isCircleV4?(0,r.jsx)(L.K,{icon:"cross",variant:"outline","aria-label":n,onClick:t}):(0,r.jsx)("button",{type:"button",className:"bg-secondary focus-visible:!outline-secondary rounded-full p-[0.3562rem] leading-[1.188rem]",onClick:t,"aria-label":n,children:(0,r.jsx)(P.In,{type:"20-close-sm","aria-hidden":!0,size:20,className:"text-light hover:text-dark"})})};function T(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var M=function(e){var t,n=e.recommendationId,o=(0,A.d)(),i=(0,N.jE)(),s=(t={onSuccess:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,i.invalidateQueries({queryKey:["recommendations"]})];case 1:return e.sent(),o.success((0,a.t)("members_directory.recommendations.messages.dismissed")),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){T(i,r,o,a,s,"next",e)}function s(e){T(i,r,o,a,s,"throw",e)}a(void 0)})})()}},(0,E.n_)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({mutationFn:function(e){return R.z.dismissRecommendation(e)}},t))).mutate;return(0,r.jsx)(D,{ariaLabel:(0,a.t)("members_directory.recommendations.actions.dismiss"),onClick:function(){return s(n)}})};function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function K(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var B=function(e){var t,n,o,i,s,l,u,d,f=e.communityMember,m=e.item,b="recommendation"===m.type?Number.parseInt(m.id,10):void 0,y=(0,j.l)({public_uid:null!=(t=null==f?void 0:f.public_uid)?t:"",params:b?{recommendation_id:b}:void 0}),h=(0,w.qI)(),g=(0,p.c)().isCircleV4,v=(0,I.s)().isAvailable,x=(0,S.R)(f),N=x.isPendingReceived,A=x.connection,E=null!=(n=f.mutual_connections_count)?n:0;return f?h&&g?(0,r.jsx)("li",{className:"border-primary bg-primary group rounded-xl px-6 py-4","data-testid":"expandable-list-item",children:(0,r.jsx)(k.x,{member:f,activeStateDisplay:"badge",showMomentumModal:!1,iconOnly:!0,recommendationId:b,profileLinkParams:b?{recommendation_id:b}:void 0,topRightExtra:"recommendation"===m.type?(0,r.jsx)(M,{recommendationId:m.id}):null})}):(0,r.jsxs)("li",{className:"border-primary bg-primary group flex w-full min-w-0 flex-1 gap-x-4 rounded-xl px-6 py-4","data-testid":"expandable-list-item",children:[(0,r.jsx)("div",{style:{aspectRatio:"1 / 1"},className:"h-10",children:(0,r.jsx)("a",K(F({},y),{children:(0,r.jsx)(C.A,{name:null!=(o=f.name)?o:"",src:null!=(i=f.avatar_url)?i:"",className:"!rounded-full"})}))}),(0,r.jsxs)("div",{className:"flex w-full min-w-0 flex-1 flex-col gap-y-3",children:[(0,r.jsxs)("div",{className:"flex w-full min-w-0 flex-1 flex-col md:flex-row justify-between gap-y-3",children:[(0,r.jsx)("a",K(F({},y),{className:"min-w-0 flex-1",children:(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-y-3",children:[(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)(c.o.LabelSm,{truncate:!0,color:"text-dark",weight:"semibold",children:f.name}),(0,r.jsx)(c.o.BodyXs,{truncate:!0,color:"text-default",children:f.headline})]}),!!E||f.location&&v&&(0,r.jsxs)("div",{className:"flex gap-4",children:[f.location&&v&&(0,r.jsx)("div",{className:"hidden items-center gap-1 md:flex",children:(0,r.jsxs)(c.o.LabelXs,{truncate:!0,color:"text-default",children:[(0,r.jsx)(P.In,{type:"16-location",size:16}),f.location]})}),!!E&&(0,r.jsx)("div",{className:"hidden items-center gap-1 md:flex",children:(0,r.jsxs)(c.o.LabelXs,{truncate:!0,color:"text-default",children:[(0,r.jsx)(P.In,{type:"16-members",size:16}),(0,a.t)("members_directory.mutual_connections_count",{count:E})]})})]})]})})),N&&(null==A?void 0:A.note)&&(0,r.jsx)("div",{className:"md:ml-0 block md:hidden",children:(0,r.jsx)(_.h,{note:null==A?void 0:A.note,connectionId:null==A||null==(s=A.id)?void 0:s.toString(),initiatorIsAdmin:null==A||null==(l=A.initiator)?void 0:l.admin,member:f})}),(0,r.jsxs)("div",{className:"flex w-fit items-start gap-2",children:[(0,r.jsx)(O.g,{member:f,acceptButtonPosition:h?"left":"right",activeStateDisplay:"badge",showMomentumModal:!1,recommendationId:b}),"recommendation"==m.type&&(0,r.jsx)(M,{recommendationId:m.id})]})]}),N&&(null==A?void 0:A.note)&&(0,r.jsx)("div",{className:"ml-[-56px] md:ml-0 hidden md:block",children:(0,r.jsx)(_.h,{note:null==A?void 0:A.note,connectionId:null==A||null==(u=A.id)?void 0:u.toString(),initiatorIsAdmin:null==A||null==(d=A.initiator)?void 0:d.admin,member:f})})]})]}):null};function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var U=function(e){var t,n=e.title,d=e.items,p=e.totalCount,f=e.isLoading,m=e.hasMore,b=void 0!==m&&m,y=e.fetchNextPage,h=e.isFetchingNextPage,g=void 0!==h&&h,v=e.initialVisibleCount,j=void 0===v?2:v,_=e.incrementCount,w=void 0===_?2:_,O=e.className,S=e.totalCountVariant,P=e.testId,C=e.listTestId,k=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(j))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return q(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return q(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),I=k[0],N=k[1],A=d.slice(0,I),E=!!(y&&(d.length>I||b));return f?(0,r.jsx)(x,{className:O,title:n,initialVisibleCount:j}):0===d.length?null:(0,r.jsxs)("div",{className:"flex flex-col overflow-hidden rounded-2xl border border-primary bg-primary","data-testid":P,children:[(0,r.jsxs)("div",{className:"flex items-center gap-x-2 border-b border-primary px-6 py-3",children:[(0,r.jsx)(c.o.LabelMd,{weight:"semibold",children:n}),!!p&&p>0&&(0,r.jsx)(o.E,{variant:void 0===S?"secondary":S,label:p>99?"99+":p.toString()})]}),(0,r.jsx)("ul",{className:"flex list-none flex-col","data-testid":null!=C?C:P?"".concat(P,"-list"):void 0,children:A.map(function(e,t){return(0,r.jsxs)("div",{children:[(0,r.jsx)(B,{communityMember:e.person,item:e}),t<A.length-1&&(0,r.jsx)(s.c,{})]},null==e?void 0:e.person.public_uid)})}),g&&(0,r.jsx)(u.y,{}),E&&!g&&(0,r.jsx)("div",{className:"flex justify-center rounded-b-xl bg-secondary",children:(0,r.jsx)(l.$,{variant:"tertiary",onClick:function(){var e=I+w;N(e),y&&b&&e>=d.length&&y()},className:"w-full !rounded-none !rounded-b-xl",children:(0,a.t)("show_more")})})]})}},850963(e,t,n){"use strict";var r=n(391426),o=n(933578);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a=(0,o.createContext)(null);a.displayName="MemberCountContext";var s=function(){var e=(0,o.useContext)(a);if(!e)throw Error("useMemberCount must be used within a MemberCountProvider");return e},l=function(e){var t,n=e.children,s=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return i(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1];return(0,r.jsx)(a.Provider,{value:{memberCount:l,setMemberCount:c},children:n})};n.d(t,{b:()=>s,z:()=>l})},274104(e,t,n){"use strict";var r=n(579880),o=n(51730),i=n(915779),a=n(258752),s=n(33139);function l(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var c=function(){var e,t=(0,r.Z)(),n=(0,a.IT)({queryKey:["location-profile-field"],queryFn:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){return[2,(0,o.i_)(i.iK.profileFields.showByKey("location"))]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){l(i,r,o,a,s,"next",e)}function s(e){l(i,r,o,a,s,"throw",e)}a(void 0)})})()},retry:!1,enabled:t}),c=n.data,u=n.isLoading;if(!t)return{isAvailable:!0,isLoading:!1};if(u)return{isAvailable:!1,isLoading:!0};if(!c||c.archived)return{isAvailable:!1,isLoading:!1};var d=null==(e=c.pages)?void 0:e.find(function(e){return e.name===s.A1.PROFILE_VIEW});return{isAvailable:(null==d?void 0:d.visible)===!0,isLoading:!1}};n.d(t,{s:()=>c})},387412(e,t,n){"use strict";var r=n(941388),o=n(230763),i=n(6418),a=n(436623),s=function(){var e,t,n=(0,a.Wj)().isAdminUsageContext,s=(0,o.Od)(),l=s.currentCommunitySettings,c=s.currentCommunityMember,u=s.isLoading,d={sort:r.QB["0"]},p=(null==l?void 0:l.member_directory_settings)||d,f={exclude_empty_name:!n},m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({visible_in_member_directory:!0},f),b=(0,i.V8)(c)?f:m;return{defaultSort:p.sort,scope:b,view:(t=r.Vw.CARDS,(null==l||null==(e=l.member_directory_settings)?void 0:e.view
1)&&(t=l.member_directory_settings.view),t),isLoading:u}};n.d(t,{C:()=>s})},124188(e,t,n){"use strict";n.d(t,{H:()=>tt});var r=n(391426),o=n(933578),i=n(725344),a=n(771787),s=n(327627),l=n(51935),c=n(907449),u=n(217521),d=n(279093),p=n(716189),f=n(842657);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var b=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return m(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return[n>0,(0,o.useCallback)(function(e){r(function(t){return Math.max(0,t+(e?1:-1))})},[])]};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g=function(e){var t,n=e.children,m=h((0,o.useState)(null),2),y=m[0],g=m[1],v=(0,o.useCallback)(function(e){g(function(t){var n,r;return t?(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t),r=r={selectedValue:e},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n):t})},[]),x=(0,o.useMemo)(function(){return{tabsOverride:y,setTabsOverride:g,updateSelectedValue:v}},[y,v]),j=h((0,o.useState)(null),2),_=j[0],w=j[1],O=(0,o.useMemo)(function(){return{titleOverride:_,setTitleOverride:w}},[_]),S=h((0,o.useState)(null),2),P=S[0],C=S[1],k=(0,o.useMemo)(function(){return{topBarOverride:P,setTopBarOverride:C}},[P]),I=h((0,o.useState)(null),2),N=I[0],A=I[1],E=(0,o.useMemo)(function(){return{trailingOverride:N,setTrailingOverride:A}},[N]),R=h((0,o.useState)(null),2),L=R[0],D=R[1],T=(0,o.useMemo)(function(){return{settingsHeaderOverride:L,setSettingsHeaderOverride:D}},[L]),M=h((0,o.useState)(null),2),F=M[0],K=M[1],B=(0,o.useMemo)(function(){return{backLink:F,setBackLink:K}},[F]),q=h(b(),2),U=q[0],z=q[1],W=h(b(),2),$=W[0],V=W[1],H=h(b(),2),G=H[0],Z=H[1],Q=h(b(),2),Y=Q[0],J=Q[1],X=h(b(),2),ee=X[0],et=X[1],en=h(b(),2),er=en[0],eo=en[1],ei=h(b(),2),ea=ei[0],es=ei[1],el=(0,o.useMemo)(function(){return{isChromeHidden:U,setIsChromeHidden:z,isBottomNavHidden:$,setIsBottomNavHidden:V,isTopNavHidden:G,setIsTopNavHidden:Z,isFullBleedContent:Y,setIsFullBleedContent:J,isFixedHeightContent:ee,setIsFixedHeightContent:et,isHideChromeOnScrollDisabled:er,setIsHideChromeOnScrollDisabled:eo,isTopBarUnbranded:ea,setIsTopBarUnbranded:es}},[U,z,$,V,G,Z,Y,J,ee,et,er,eo,ea,es]),ec=h((0,o.useState)(null),2),eu=ec[0],ed=ec[1],ep=null!=(t=null==eu?void 0:eu.className)?t:null,ef=(0,o.useCallback)(function(e,t){ed({token:e,className:t})},[]),em=(0,o.useCallback)(function(e){ed(function(t){return(null==t?void 0:t.token)===e?null:t})},[]),eb=(0,o.useMemo)(function(){return{mainClassName:ep,setMainClassName:ef,clearMainClassName:em}},[ep,ef,em]),ey=h((0,o.useState)(null),2),eh=ey[0],eg=ey[1],ev=(0,o.useCallback)(function(e){eg(function(){return e})},[]),ex=(0,o.useMemo)(function(){return{onCreateOpen:eh,setOnCreateOpen:ev}},[eh,ev]);return(0,r.jsx)(u.O.Provider,{value:x,children:(0,r.jsx)(d._.Provider,{value:O,children:(0,r.jsx)(p.q.Provider,{value:k,children:(0,r.jsx)(f.m.Provider,{value:E,children:(0,r.jsx)(c.I.Provider,{value:T,children:(0,r.jsx)(i.R.Provider,{value:B,children:(0,r.jsx)(a.A.Provider,{value:el,children:(0,r.jsx)(l.c.Provider,{value:eb,children:(0,r.jsx)(s.M.Provider,{value:ex,children:n})})})})})})})})})},v=n(182255),x=n(230763),j=n(765724),_=n(202090),w=n(694812),O=n(136112),S=n(417980),P=n(135679),C=n(722495),k=n(6418),I=n(941397),N=n(892907),A=n(519104),E=n(161810),R=n(465274),L=n(141320),D=n(817751),T=n(443111),M=function(e){var t=e.replace("#","");return!(t.length<6)&&.2126*(parseInt(t.slice(0,2),16)/255)+.7152*(parseInt(t.slice(2,4),16)/255)+.0722*(parseInt(t.slice(4,6),16)/255)>.65},F=function(e){var t=e.community,n=e.isDarkAppearance,o=e.size,i=(0,T.X)(t.light_brand_color,t.dark_brand_color,n),a=i&&M(i)?"text-zinc-800":"text-white";
1return(0,r.jsx)("span",{"aria-hidden":!0,className:"flex ".concat("sm"===(void 0===o?"md":o)?"size-8":"size-10"," shrink-0 select-none items-center justify-center overflow-hidden rounded-lg bg-zinc-800 text-sm font-bold leading-none ").concat(a),style:i?{backgroundColor:i}:void 0,children:(0,L.s)(t.name)})},K=function(e){var t=e.community,n=e.isDarkAppearance,o=e.token,i=e.isCurrent,a=void 0!==i&&i,s=(0,L.U)(t.root_url,o),l="";try{l=new URL(t.root_url).hostname}catch(e){}var c=(0,r.jsxs)("div",{className:"flex w-full items-center gap-3 rounded-lg px-3 py-2.5",children:[(0,r.jsx)(F,{community:t,isDarkAppearance:n,size:a?"md":"sm"}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsx)(N.o5,{variant:a?"label-lg":"body-md",children:t.name}),l&&(0,r.jsx)(N.o5,{variant:"label-sm",color:"tertiary",children:l})]}),a&&(0,r.jsx)(D.t,{name:"checkmark",size:"sm"})]});return a?c:(0,r.jsx)(w._s.Close,{nativeButton:!1,children:(0,r.jsx)("a",{href:s,className:"block rounded-lg hover:bg-hover","data-community-switcher-nav":"",children:c})})},B=n(978421),q=function(e){var t=e.onClose,n=(0,A.Z)(),o=(0,R.e)(),i=o.communities,a=o.token,s=o.isLoadingCommunities,l=(0,_.wR)().isDarkAppearance,c=(0,x.Od)(),u=c.currentCommunityMember,d=c.currentCommunity,p=(0,k.V8)(u),f=function(){null==t||t()},m=i.find(function(e){return e.is_current_community}),b=i.filter(function(e){return!e.is_current_community}),y=!!(null==d?void 0:d.community_switcher_enabled),h=(0,E.yj)({onSuccess:function(e){e.login_url&&(globalThis.location.href=(0,P.gS)(e.login_url,null==m?void 0:m.id))}}).mutate;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w._s.Header,{title:(0,S.t)("mobile_shell.communities"),sticky:!0}),s?(0,r.jsx)("div",{className:"flex flex-col gap-4 px-1",children:(0,r.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,r.jsx)(N.o5,{variant:"body-sm",color:"tertiary",children:(0,S.t)("mobile_shell.loading")})})}):(0,r.jsxs)("div",{className:"flex flex-col gap-2 px-1",children:[m&&(0,r.jsxs)("div",{className:"rounded-lg bg-secondary",children:[(0,r.jsx)(K,{community:m,isDarkAppearance:!!l,token:a,isCurrent:!0}),p&&(0,r.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,r.jsx)(B.g,{icon:"settings-gear",label:(0,S.t)("settings_title"),onClick:function(){n({to:"/admin-settings"}),f()}}),(0,r.jsx)(B.g,{icon:"people-add",label:(0,S.t)("messaging.add_members"),onClick:function(){n({to:I.t.members.invite,search:function(){return(0,C.FC)({})}}),f()}})]})]}),b.length>0&&(0,r.jsx)("div",{className:"flex flex-col",children:b.map(function(e){return(0,r.jsx)(K,{community:e,isDarkAppearance:!!l,token:a},e.id)})}),m&&0===b.length&&(0,r.jsx)(N.o5,{variant:"body-sm",color:"tertiary",children:(0,S.t)("mobile_shell.no_other_communities")}),y&&(0,r.jsx)(w._s.Close,{nativeButton:!1,children:(0,r.jsxs)("a",{href:P.cT,onClick:function(e){e.preventDefault(),e.stopPropagation(),h()},className:"flex items-center gap-3 rounded-lg px-3 py-2.5 hover:bg-hover",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:"flex size-8 shrink-0 items-center justify-center rounded-lg",children:(0,r.jsx)("img",{src:"https://assets-v2.circle.so/11oepcqxo8q008li605zp2ol7a8a",alt:"",width:32,height:32})}),(0,r.jsx)(N.o5,{variant:"body-md",children:(0,S.t)("discover.iframe_title")})]})})]})]})},U=n(358255),z=n(115177),W=n(310860),$=n(119498),V=function(e){var t=[e.isTopHidden&&"[&_main]:!pt-0",e.isBottomHidden&&"[&_main]:!pb-0"].filter(function(e){return!!e});return t.length>0?t.join(" "):null},H=n(339551),G=n(488872),Z=n(693546),Q=n(846320),Y=function(){var e=(0,Q.$)().setBackLink,t=(0,Z.a)().isPostDetailPage,n=(0,H.E)(),r=(0,G.E)(),i=r?n.helpers.findBy({slug:r}):void 0;return(0,o.useEffect)(function(){if((null==t?void 0:t.isExact)&&r){var n,o=null!=(n=null==i?void 0:i.name)?n:r;return e({label:(0,S.t)("mobile_shell.back_to_space",{space_name:o}),href:"/c/".concat(r)}),function(){return e(null)}}e(null)},[null==t?void 0:t.isExact,r,null==i?void 0:i.name,e]),null},J=n(658232),X=n(799684),ee=n(178905),et=n(947331),en=n(34819),er=n(451430),eo=n(692406),ei=n(2978),ea=function(e){return e>0?String((0,X.f)(e)):void 0},es=function(e){var t,n=e.currentPath,o=(0,x.Od)().currentCommunity,i=(0,J.lV)(null==o?void 0:o.id,er.noop).data,a=(0,ee.h)().unreadChatCount,s=(0,et.UF)().shouldShowMessagingRoutes,l=(0,eo.g)(),c=n.startsWith(l),u=n.startsWith("/notifications"),d=n.startsWith("/messages"),p=n.startsWith("/search");return(0,r.jsxs)("nav",{className:"flex w-full justify-around",children:[(0,r.jsx)(en.K,{renderLink:(0,r.jsx)(ei.W,{href:l}),icon:c?"home-filled":"home",variant:c?"secondary":"ghost",size:"lg","aria-label":(0,S.t)("mobile_shell.home")}),(0,r.jsx)(en.K,{renderLink:(0,r.jsx)(ei.W,{href:"/notifications"}),icon:u?"bell-filled":"bell",variant:u?"secondary":"ghost",size:"lg","aria-label":(0,S.t)("mobile_shell.notifications"),counter:ea(null!=(t=null==i?void 0:i.new_inbox_count)?t:0)}),s&&(0,r.jsx)(en.K,{renderLink:(0,r.jsx)(ei.W,{href:"/messages"}),icon:d?"message-filled":"message",variant:d?"secondary":"ghost",size:"lg","aria-label":(0,S.t)("mobile_shell.messages"),counter:ea(a)}),(0,r.jsx)(en.K,{renderLink:(0,r.jsx)(ei.W,{href:"/search"}),icon:"magnifying-glass",variant:p?"secondary":"ghost",size:"lg","aria-label":(0,S.t)("mobile_shell.search")})]})},el=n(540078),ec=n(359583),eu=n(570310),ed=n(915779);function ep(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ef(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ep(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ep(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var em=[(0,ed.ce)(),(0,ed.Z1)()],eb=function(e){var t=e.currentPath,n=(0,o.useRef)(null),i=(0,el.u)(),a=i.shouldShowMemberChecklist,s=i.isMemberChecklistOpen,l=i.handleMemberChecklistOpenChange,c=ef((0,o.useState)(!1),2),u=c[0],d=c[1],p=em.some(function(e){return t.startsWith(e)}),f=a&&!p;return((0,o.useEffect)(function(){if(f){var e,t=null==(e=n.current)?void 0:e.closest("footer");if(t){var r=new IntersectionObserver(function(e){return d(ef(e,1)[0].intersectionRatio<.9)},{threshold:[0,.9,1]});return r.observe(t),function(){return r.disconnect()}}}},[f]),f)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:n,className:(0,eu.x)("pointer-events-none absolute inset-x-0 bottom-full flex justify-end px-3 pb-3 transition-opacity duration-100 ease-out",u?"opacity-0":"opacity-100"),children:(0,r.jsx)("div",{className:u?"pointer-events-none":"pointer-events-auto",children:(0,r.jsx)(en.K,{icon:"to-do-list",variant:"outline",size:"lg","aria-label":(0,S.t)(["header.member_checklist","title"]),onClick:function(){return l(!s)}})})}),(0,r.jsx)(ec.u,{open:s,onOpenChange:l})]}):null},ey=n(119616),eh=n(68981),eg=n(133626),ev=n(169353),ex=n(669880),ej=n(559574),e_=n(301435),ew=n(617593),eO=function(){var e=(0,ej.r)(),t=e.links,n=e.isLoadingLinks,i=(0,W.z)({select:function(e){return e.pathname}}),a=(0,x.Od)(),s=a.currentCommunityMember,l=a.currentCommunity,c=(0,ev.J)().isSitePageRoute,u=(0,U.u)().isTopBarUnbranded,d=(0,eh.R)(),p=!!(!s&&(null==l?void 0:l.is_private)),f=!!(null==l?void 0:l.home_page_enabled),m=(0,o.useMemo)(function(){var e=t.filter(function(e){return e.isPresent&&!e.isDisabled}).filter(function(e){return"home"!==e.kind||f}).map(function(e){var t="custom"===e.kind?"custom-".concat(e.id):e.kind,n="custom"!==e.kind&&!p;return{value:t,label:e.label,renderLink:n?(0,r.jsx)(ei.W,{href:e.linkTo,target:e.openInNewWindow?"_blank":void 0,rel:e.openInNewWindow?"noopener noreferrer":void 0}):(0,r.jsx)("a",{"aria-label":e.label,href:e.linkTo,target:e.openInNewWindow?"_blank":void 0,rel:e.openInNewWindow?"noopener noreferrer":void 0})}});if(!c){var n={value:"spaces",label:(0,S.t)("spaces_label"),renderLink:p?(0,r.jsx)("a",{"aria-label":(0,S.t)("spaces_label"),href:"/spaces"}):(0,r.jsx)(ei.W,{href:"/spaces"})},o=e.findIndex(function(e){return"home"===e.value});e.splice(o>=0?o+1:0,0,n)}return e},[t,p,c,f]),b=(0,o.useMemo)(function(){if("/spaces"===i||i.startsWith("/spaces/"))return"spaces";var e,n=function(e){return"home"!==e.kind&&e.isPresent&&!e.isDisabled},r=null!=(e=t.find(function(e){return n(e)&&"custom"!==e.kind&&(0,e_.qy)(i,e.linkTo)}))?e:t.find(function(e){return n(e)&&"custom"===e.kind&&e.isActive});if(r)return"custom"===r.kind?"custom-".concat(r.id):r.kind;var o=t.find(function(e){return"home"===e.kind});return(null==o?void 0:o.isActive)&&m.some(function(e){return"home"===e.value})?"home":""},[t,i,m]);return n?(0,r.jsx)(O.j.HeaderBar,{border:"on-scroll",themeVars:u||!d?void 0:ey.pA,children:(0,r.jsx)("div",{className:"flex items-center gap-2",children:Array.from({length:4},function(e,t){return(0,r.jsx)(ew.E,{shape:"square",className:"h-8 w-16 shrink-0"},"section-tabs-skeleton-".concat(t))})})}):0===m.length?null:(0,r.jsx)(O.j.HeaderBar,{border:"on-scroll",themeVars:u||!d?void 0:ey.pA,children:(0,r.jsx)(eg.t.Root,{tabs:m,selectedValue:b,size:"md"})})},eS=["/feed","/spaces","/courses","/events","/members","/leaderboard"],eP=["settings/invitation_links"],eC=function(){var e=(0,ex.C)().tabsOverride,t=(0,W.z)({select:function(e){return e.pathname}}),n=(0,ev.J)().isSitePageRoute,o=(0,U.u)().isTopBarUnbranded,i=(0,eh.R)(),a=(eS.some(function(e){return t.startsWith(e)})||n)&&!eP.some(function(e){return t.includes(e)});return e||a?e?(0,r.jsx)(O.j.HeaderBar,{border:"always",themeVars:o||!i?void 0:ey.pA,children:(0,r.jsx)(eg.t.Root,{tabs:e.tabs,selectedValue:e.selectedValue,onValueChange:e.onValueChange,size:"md"})}):(0,r.jsx)(eO,{}):null},ek=n(986764),eI=n(555169),eN=n(617492),eA=n(734527),eE=n(661116),eR=n(304946),eL=n(72
11346),eD=function(e){var t=e.icon,n=e.label,o=e.snapTo,i=e.open,a=e.onOpenChange,s=e.ariaLabel,l=e.children;return(0,r.jsxs)(w._s.Root,{open:i,onOpenChange:a,snapTo:o,children:[(0,r.jsx)(w._s.Trigger,{children:(0,r.jsxs)("button",{type:"button",className:eL.A,children:[(0,r.jsx)(D.t,{name:t,size:"md"}),(0,r.jsx)(N.o5,{variant:"body-md",children:n})]})}),(0,r.jsx)(w._s.Content,{"aria-label":s,children:l})]})},eT=n(622779),eM=n(819053),eF=function(e){var t=e.onClose,n=(0,eT.wR)(),o=n.storedPreference,i=n.setAppearance,a=(0,eM.D4)(o)?o:"",s=function(e){null==i||i(e),null==t||t()},l=(0,r.jsx)(D.t,{name:"checkmark",size:"md"});return(0,r.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,r.jsx)(B.g,{icon:"sun",label:(0,S.t)("mobile_shell.appearance_light"),onClick:function(){return s(eM.xz.LIGHT)},trailing:a===eM.xz.LIGHT?l:void 0}),(0,r.jsx)(B.g,{icon:"moon",label:(0,S.t)("mobile_shell.appearance_dark"),onClick:function(){return s(eM.xz.DARK)},trailing:a===eM.xz.DARK?l:void 0}),(0,r.jsx)(B.g,{icon:"phone",label:(0,S.t)("mobile_shell.appearance_system"),onClick:function(){return s(eM.$f)},trailing:a===eM.$f?l:void 0})]})},eK=n(841957),eB=n(244174),eq=function(){return(0,r.jsx)("div",{id:eB.Vu,className:"h-full overflow-y-auto",children:(0,r.jsx)(eK.I,{isRenderedOnHeader:!0})})},eU=n(395568),ez=function(e){var t=e.enabled,n=e.onClose;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w._s.Header,{title:(0,S.t)(["header.member_checklist","title"]),sticky:!0}),(0,r.jsx)(eU.U,{enabled:t,closeChecklist:n,className:"px-1"})]})};function eW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function e$(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eW(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eV=function(e){var t=e.onClose,n=(0,eE.W)(),i=n.isElectron,a=n.electronAPI,s=(0,W.z)({select:function(e){return{pathname:e.pathname,search:e.searchStr}}}),l=(0,A.Z)(),c=(0,x.Od)().currentCommunityMember,u=(0,eN.g)().show,d=e$((0,o.useState)(!1),2),p=d[0],f=d[1],m=e$((0,o.useState)(!1),2),b=m[0],y=m[1],h=e$((0,o.useState)(!1),2),g=h[0],v=h[1],j=(0,eI.V)(),_=(0,el.u)({autoOpen:!1}),O=_.shouldShowMemberChecklist,P=_.isMemberChecklistOpen,C=_.handleMemberChecklistOpenChange;if(!c)return null;var I=c.avatar_url,N=c.name,E=c.public_uid,R=c.email,L=c.policies||{},D=L.can_access_billing,T=L.can_access_authentication_page,M=L.can_show_paywalls_affiliate,F=(0,k.V8)(c),K=(0,k.IZ)(c),U=function(){f(!1),y(!1),v(!1),C(!1),null==t||t()},z=function(e){"string"==typeof e?l({to:e}):l({to:e.pathname,state:e.state}),U()};return(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)(w._s.Header,{prefix:(0,r.jsx)(eA.J,{name:N,src:I,size:"10",isFullRounded:!0}),title:N,subtitle:R||void 0,sticky:!0}),(0,r.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,r.jsx)(B.g,{icon:"people",label:(0,S.t)("view_profile"),onClick:function(){u({memberPublicId:null!=E?E:""}),null==t||t()}}),(0,r.jsx)(B.g,{icon:"edit",label:(0,S.t)("edit_profile"),onClick:function(){return z(ed.Qr.profile(s))}}),(0,r.jsx)(B.g,{icon:"bell",label:(0,S.t)("notification"),onClick:function(){return z(ed.Qr.notifications(s))}}),(0,r.jsx)(eD,{icon:"message-dots",label:(0,S.t)("header_v3.chat_threads"),ariaLabel:(0,S.t)("header_v3.chat_threads"),open:g,onOpenChange:v,children:(0,r.jsx)(eq,{})}),(0,r.jsx)(B.g,{icon:"bookmark",label:(0,S.t)("header_v3.bookmarks"),onClick:function(){return z((0,ed.jb)())}}),j&&(0,r.jsx)(B.g,{icon:"people",label:(0,S.t)("header_v3.connect.title"),onClick:function(){return z((0,ed.xF)())}}),O&&(0,r.jsx)(eD,{icon:"to-do-list",label:(0,S.t)("header.member_checklist.title"),ariaLabel:(0,S.t)("header.member_checklist.title"),open:P,onOpenChange:C,children:(0,r.jsx)(ez,{enabled:P,onClose:U})})]}),(0,r.jsx)(eR.l,{}),(0,r.jsxs)("div",{className:"flex flex-col gap-0.5",children:[T&&(0,r.jsx)(B.g,{icon:"lock",label:(0,S.t)("authentication"),onClick:function(){return z(ed.Qr.authentication(s))}}),D&&(0,r.jsx)(B.g,{icon:"credit-card",label:(0,S.t)("billing"),onClick:function(){return z(ed.Qr.billing(s))}}),M&&(0,r.jsx)(B.g,{icon:"affiliates",label:(0,S.t)("member_profile_modal.affiliate_dashboard.title"),onClick:function(){return z(ed.Qr.affiliate(s))}}),(0,r.jsx)(eD,{icon:"shuffle",label:(0,S.t)("mobile_shell.switch_community"),ariaLabel:(0,S.t)("mobile_shell.switch_community"),open:b,onOpenChange:y,children:(0,r.jsx)(q,{onClose:U})}),(0,r.jsx)(eD,{icon:"sun",label:(0,S.t)("mobile_shell.appearance"),ariaLabel:(0,S.t)("mobile_shell.appearance"),open:p,onOpenChange:f,children:(0,r.jsx)(eF,{onClose:U})}),F&&(0,r.jsx)(B.g,{icon:"settings-gear",label:(0,S.t)("mobile_shell.admin_settings"),onClick:function(){return z("/admin-settings")}}),K&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(B.g,{icon:"page",label:(0,S.t)("settings_nav_v3.content.label"),onClick:function(){return z(ed.ty.content.posts)}}),(0,r.jsx)(B.g,{icon:"shield-check",label:(0,S.t)("sidebar_moderation"),onClick:function(){return z("/settings/moderation")}})]})]}),(0,r.jsx)(eR.l,{}),(0,r.jsx)("div",{className:"flex flex-col gap-0.5",children:(0,r.jsx)(B.g,{icon:"arrow-box-left",label:(0,S.t)("sign_out"),onClick:function(){try{if(i){var e;null==a||null==(e=a.logout)||e.call(a)}}finally{window.location.href=(0,ed.Nb)()}},danger:!0})})]})},eH=n(314833),eG=n(490503),eZ=n(288513),eQ=n(704500),eY=n(842154),eJ=function(e){var t=e.communityName,n=e.logoUrl,o=(0,r.jsx)(eY.U,{});return n?(0,r.jsx)(eQ.z,{logo:{src:n,alt:(0,S.t)("community_logo_alt",{community_name:t}),imgProps:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}
1({id:"community-logo"},(0,eZ.Bs)({anchor:"app-topbar-logo-image"}))},primaryAction:o}):(0,r.jsx)(eQ.z,{title:t,primaryAction:o})},eX=n(21281),e0=n(260007),e1=/^\/c\/[^/]+\/[^/]+\/?$/,e2=function(e){var t=e.avatarName,n=e.avatarUrl,o=e.communityName,i=e.isHidden,a=e.logoUrl,s=e.onTitleClick,l=e.title,c=e.trailing,u=(0,r.jsxs)("div",{className:"flex items-center gap-x-2",children:[c,(0,r.jsx)(w._s.Trigger,{children:(0,r.jsx)("button",{type:"button",className:"rounded-full focus-visible:outline-secondary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","aria-label":(0,S.t)("mobile_shell.open_navigation_menu"),children:(0,r.jsx)(eA.J,{name:t,src:n,size:"8",isFullRounded:!0})})})]}),d=s&&a?(0,r.jsx)(eQ.z,{logo:{src:a,alt:(0,S.t)("community_logo_alt",{community_name:o}),imgProps:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({id:"community-logo"},(0,eZ.Bs)({anchor:"app-topbar-logo-image"}))},onTitleClick:s,onTitleClickLabel:(0,S.t)("mobile_shell.switch_community"),primaryAction:u}):s?(0,r.jsx)(eQ.z,{title:l,onTitleClick:s,onTitleClickLabel:(0,S.t)("mobile_shell.switch_community"),primaryAction:u}):(0,r.jsx)(eQ.z,{title:l,primaryAction:u});return void 0!==i&&i?(0,r.jsx)("div",{className:"invisible pointer-events-none","aria-hidden":"true",children:d}):d};function e3(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var e4=function(e){var t,n=e.avatarName,i=e.avatarUrl,a=e.communityName,s=e.logoUrl,l=e.onTitleClick,c=(0,W.z)({select:function(e){return e.pathname}}),u=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return e3(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e3(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=u[0],p=u[1],f=(0,eX.u)().titleOverride,m=(0,e0.K)().trailingOverride,b=null!=f,y=!(c.startsWith("/notifications")||c.startsWith("/messages")||c.startsWith("/c/")||c.startsWith("/s/")||e1.test(c)||c.startsWith("/settings/members/invite")||c.startsWith("/settings/workflows/new")||c.startsWith("/settings/workflows/view")||c.startsWith("/settings/workflows/edit"))||d===c;return((0,o.useEffect)(function(){if(!y){var e=requestAnimationFrame(function(){p(c)});return function(){return cancelAnimationFrame(e)}}},[y,c]),b||y)?(0,r.jsx)(e2,{avatarName:n,avatarUrl:i,communityName:a,logoUrl:s,title:null!=f?f:a,onTitleClick:b?void 0:l,trailing:m}):(0,r.jsx)(e2,{avatarName:n,avatarUrl:i,communityName:a,logoUrl:s,title:a,isHidden:!0})};function e5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var e6=function(e){var t,n=e.isNavOpen,i=e.setIsNavOpen,a=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["isNavOpen","setIsNavOpen"]),s=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return e5(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e5(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1],u=(0,eG.W)().topBarOverride,d=(0,eH.g)().setOnCreateOpen,p=(0,x.Od)(),f=p.currentUser,m=p.currentCommunityMember;return((0,o.useEffect)(function(){return d(function(){return c(!0)}),function(){return d(null)}},[d]),f&&m)?u||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(w._s.Root,{open:n,onOpenChange:i,children:[(0,r.jsx)(e4,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},a)),(0,r.jsx)(w._s.Content,{"aria-label":(0,S.t)("mobile_shell.navigation_menu"),children:(0,r.jsx)(eV,{onClose:function(){return i(!1)}})})]}),(0,r.jsx)(ek.i,{open:l,onOpenChange:c})]}):(0,r.jsx)(eJ,{communityName:a.communityName,logoUrl:a.logoUrl})},e8=function(e){var t=e.children,n=e.isNavOpen,o=e.setIsNavOpen,i=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","isNavOpen","setIsNavOpen"]),a=(0,W.z)({select:function(e){return e.pathname}}),s=(0,x.Od)(),l=s.currentUser,c=s.currentCommunityMember,u=(0,U.u)(),d=u.isChromeHidden,p=u.isBottomNavHidden,f=u.isTopNavHidden,m=u.isFullBleedContent,b=u.isFixedHeightContent,y=u.isTopBarUnbranded,h=(0,$.P)().mainClassName,g=(0,z.q)(),v=a.startsWith("/live/"),j=d||v,_=j||f,w=j||p,S=V({isTopHidden:_,isBottomHidden:w}),P=(0,r.jsxs)(r.Fragment,{children:[!_&&(0,r.jsxs)(O.j.Header,{themeVars:y?void 0:g,children:[(0,r.jsx)(e6,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({isNavOpen:n,setIsNavOpen:o},i)),(0,r.jsx)(eC,{})]}),!_&&(0,r.jsx)(Y,{}),(0,r.jsx)(O.j.Content,{id:"panel",className:null!=h?h:void 0,fullBleed:m,fixedHeight:b,children:t}),!w&&!!(l&&c)&&(0,r.jsxs)(O.j.Footer,{children:[(0,r.jsx)(eb,{currentPath:a}),(0,r.jsx)(O.j.BottomBar,{children:(0,r.jsx)(es,{currentPath:a})})]})]});return(0,r.jsx)("div",{className:null!=S?S:void 0,children:P})};function e9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function e7(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return e9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e9(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var te=function(e){var t,n,i,a=e.children,s=(0,x.Od)(),l=s.currentCommunity,c=s.currentCommunityMember,u=(0,_.wR)().isDarkAppearance,d=null!=(t=null==l?void 0:l.name)?t:"Circle",p=(0,j.Xt)(l,u).url,f=(0,U.u)().isHideChromeOnScrollDisabled,m=e7((0,o.useState)(!1),2),b=m[0],y=m[1],h=e7((0,o.useState)(!1),2),g=h[0],P=h[1];return(0,r.jsxs)(O.j.Root,{hideChromeOnScroll:!f,children:[(0,r.jsx)(v.k,{}),(0,r.jsx)(w._s.Root,{open:b,onOpenChange:y,children:(0,r.jsx)(w._s.Content,{"aria-label":(0,S.t)("mobile_shell.switch_community"),children:(0,r.jsx)(q,{onClose:function(){return y(!1)}})})}),(0,r.jsx)(e8,{communityName:d,logoUrl:null!=p?p:void 0,avatarName:null!=(n=null==c?void 0:c.name)?n:"",avatarUrl:null!=(i=null==c?void 0:c.avatar_url)?i:void 0,onTitleClick:function(){return y(!0)},isNavOpen:g,setIsNavOpen:P,children:a})]})},tt=function(e){var t=e.children;return(0,r.jsx)(g,{children:(0,r.jsx)(te,{children:t})})}},2978(e,t,n){"use strict";var r=n(391426),o=n(534529);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e){if(Array.isArray(e))return e}
1function s(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}var c=(0,n(933578).forwardRef)(function(e,t){var n,i=a(n=[e,t])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||l(n)||s(),c=i[0],u=i.slice(1),d=c.href,p=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(c,["href"]),f=(a(u)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(u)||l(u,1)||s())[0];return(0,r.jsx)(o.N_,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:f,to:null!=d?d:""},p))});c.displayName="RouterLink",n.d(t,{W:()=>c})},725344(e,t,n){"use strict";var r=(0,n(933578).createContext)(null);r.displayName="BackLinkContext",n.d(t,{R:()=>r})},327627(e,t,n){"use strict";var r=(0,n(933578).createContext)(null);r.displayName="CreateActionContext",n.d(t,{M:()=>r})},51935(e,t,n){"use strict";var r=(0,n(933578).createContext)(null);r.displayName="MainClassNameContext",n.d(t,{c:()=>r})},907449(e,t,n){"use strict";var r=(0,n(933578).createContext)(null);r.displayName="SettingsHeaderOverrideContext",n.d(t,{I:()=>r})},217521(e,t,n){"use strict";var r=(0,n(933578).createContext)(null);r.displayName="TabsOverrideContext",n.d(t,{O:()=>r})},279093(e,t,n){"use strict";var r=(0,n(933578).createContext)(null);r.displayName="TitleOverrideContext",n.d(t,{_:()=>r})},716189(e,t,n){"use strict";var r=(0,n(933578).createContext)(null);r.displayName="TopBarOverrideContext",n.d(t,{q:()=>r})},842657(e,t,n){"use strict";var r=(0,n(933578).createContext)(null);r.displayName="TrailingOverrideContext",n.d(t,{m:()=>r})},986764(e,t,n){"use strict";n.d(t,{i:()=>y});var r=n(391426),o=n(233070),i=n(8570),a=n(61427),s=n(16643),l=n(230763),c=n(6418),u=n(678548),d=n(694812),p=n(933578),f=n(417980),m=n(978421);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var y=function(e){var t,n=e.open,y=e.onOpenChange,h=function(e){if(Array.isArray(e))return e}(t=(0,p.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return b(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return b(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),g=h[0],v=h[1],x=(0,a.MC)(),j=(0,u.G)().canCreatePost,_=(0,s.k)(),w=(0,i._J)({enabled:_}),O=w.isLoading,S=w.isMonthlyHourLimitReached,P=w.isStorageLimitReached,C=(0,l.Od)(),k=C.currentCommunityMember,I=C.isViewOnlyMasquerading||!(0,c.V8)(k)&&(O||S||P);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d._s.Root,{open:n,onOpenChange:y,children:(0,r.jsx)(d._s.Content,{"aria-label":(0,f.t)("mobile_shell.create"),children:(0,r.jsxs)("div",{className:"flex flex-col",children:[j&&(0,r.jsx)(m.g,{icon:"page-edit",label:(0,f.t)("mobile_shell.create_post"),onClick:function(){y(!1),x.show()}}),_&&(0,r.jsx)(m.g,{icon:"live",label:(0,f.t)("sidebar_footer_v3.go_live"),onClick:function(){y(!1),v(!0)},disabled:null!=I&&I})]})})}),_&&(0,r.jsx)(o.u,{open:g,onOpenChange:v,disabled:I})]})}},304946(e,t,n){"use strict";var r=n(391426),o=function(){return(0,r.jsx)("div",{className:"my-2 border-t border-primary"})};n.d(t,{l:()=>o})},978421(e,t,n){"use strict";var r=n(391426),o=n(694812),i=n(817751),a=n(892907),s=n(721346),l=function(e){var t,n=e.icon,l=e.label,c=e.onClick,u=e.danger,d=e.disabled,p=void 0!==d&&d,f=e.subtitle,m=e.trailing;p?t="tertiary":void 0!==u&&u&&(t="danger");var b=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.t,{name:n,size:"md",color:t}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsx)(a.o5,{variant:"body-md",color:t,children:l}),f&&(0,r.jsx)(a.o5,{variant:"label-sm",color:"tertiary",children:f})]}),m]});return p?(0,r.jsx)("button",{type:"button",className:s.A,disabled:!0,children:b}):(0,r.jsx)(o._s.Close,{children:(0,r.jsx)("button",{type:"button",className:s.A,onClick:c,children:b})})};n.d(t,{g:()=>l})},721346(e,t,n){"use strict";n.d(t,{A:()=>"flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left hover:bg-hover"})},119498(e,t,n){"use strict";var r=n(933578),o=n(51935),i=function(){},a={mainClassName:null,setMainClassName:i,clearMainClassName:i},s=function(){var e=(0,r.useContext)(o.c);return null!=e?e:a};n.d(t,{P:()=>s})},669880(e,t,n){"use strict";var r=n(933578),o=n(217521),i=function(){},a={tabsOverride:null,setTabsOverride:i,updateSelectedValue:i},s=function(){var e=(0,r.useContext)(o.O);return null!=e?e:a};n.d(t,{C:()=>s})},846320(e,t,n){"use strict";var r=n(933578),o=n(725344),i={backLink:null,setBackLink:function(){}},a=function(){var e=(0,r.useContext)(o.R);return null!=e?e:i};n.d(t,{$:()=>a})},314833(e,t,n){"use strict";var r=n(933578),o=n(327627),i={onCreateOpen:null,setOnCreateOpen:function(){}},a=function(){var e=(0,r.useContext)(o.M);return null!=e?e:i};n.d(t,{g:()=>a})},21281(e,t,n){"use strict";var r=n(933578),o=n(279093),i={titleOverride:null,setTitleOverride:function(){}},a=function(){var e=(0,r.useContext)(o._);return null!=e?e:i};n.d(t,{u:()=>a})},490503(e,t,n){"use strict";var r=n(933578),o=n(716189),i={topBarOverride:null,setTopBarOverride:function(){}},a=function(){var e=(0,r.useContext)(o.q);return null!=e?e:i};n.d(t,{W:()=>a})},260007(e,t,n){"use strict";var r=n(933578),o=n(842657),i={trailingOverride:null,setTrailingOverride:function(){}},a=function(){var e=(0,r.useContext)(o.m);return null!=e?e:i};n.d(t,{K:()=>a})},750640(e,t,n){"use strict";var r=n(933578),o=n(846320),i=n(490503);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var s=function(e,t,n){var s=(0,i.W)().setTopBarOverride,l=(0,o.$)().setBackLink;(0,r.useEffect)(function(){return s(e),l(t),function(){s(function(t){return t===e?null:t}),l(function(e){return e===t?null:e})}},((function(e){if(Array.isArray(e))return a(e)})(n)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e){if(e){if("string"==typeof e)return a(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,void 0)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([t,s,l]))};n.d(t,{b:()=>s})},692406(e,t,n){"use strict";var r=n(230763),o=function(){var e=(0,r.Od)().currentCommunity;return(null==e?void 0:e.home_page_enabled)?"/feed":"/spaces"};n.d(t,{g:()=>o})},842154(e,t,n){"use strict";var r=n(391426),o=n(119616),i=n(230763),a=n(765724),s=n(570310),l=n(68981),c=n(818185),u=n(739042),d=n(417980),p=function(){var e,t=(0,i.Od)(),n=t.currentUser,p=t.currentCommunity,f=(0,l.R)(),m=(0,c.a)().post_login_redirect||window.location.href,b=(null==p?void 0:p.private_sign_up_url)?p.private_sign_up_url:(0,a.T4)(p,m);return(0,r.jsxs)("div",{className:(0,s.x)("flex items-center gap-2",f&&o.bz),style:f?o.Bu:void 0,children:[!n&&(0,r.jsx)(u.$,{variant:"ghost",size:"sm",onClick:function(){var e=(0,a.fj)(p,{post_login_redirect:m});e&&(window.location.href=e)},children:(0,d.t)("log_in")}),b&&(0,r.jsx)(u.$,{variant:"branded",size:"sm",onClick:function(){window.location.href=b},children:(null==p?void 0:p.private_sign_up_url)&&null!=(e=p.private_sign_up_label)?e:(0,d.t)("join")})]})};n.d(t,{U:()=>p})},932624(e,t,n){"use strict";var r=n(391426),o=n(704500),i=n(933578),a=n(358255),s=n(771922);function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var c=function(e){var t,n,c=e.themeVars,u=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["themeVars"]),d=(0,a.u)().setIsTopBarUnbranded;return(0,i.useEffect)(function(){return d(!0),function(){return d(!1)}},[d]),(0,r.jsx)(o.z,(t=l({},u),n=n={themeVars:l({},c,s.w)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{z:()=>c})},771922(e,t,n){"use strict";var r={"--color-background-inverse":"var(--color-grey-900)","--color-text-inverse":"var(--color-grey-50)"};n.d(t,{w:()=>r})},513963(e,t,n){"use strict";n.d(t,{X:()=>H});var r=n(391426),o=n(974618),i=n(231127),a=n(927561),s=n(359641),l=n(258752),c=n(111582),u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.n_)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({mutationFn:function(e){var t=e.spaceGroupId,n=e.communityMembersId,r=e.shouldAddAllMembers;return c.K.addMembers({spaceGroupId:t,body:{community_member_ids:n,add_all_members:r}})}},e))},d=n(791009),p=n(933578),f=n(274685),m=n(417980),b=n(717526),y=n(648202),h=n(408461),g=n(722495),v=n(364473),x=n(323050),j=n(915779),_=n(955015),w=n(452825),O=n(892907),S=n(310860),P=n(534529),C=n(361971);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var I="community_member_ids",N="add_all_members",A=function(e){var t=e.onHasMembersAddedChange,n=(0,C.xW)(),o=n.watch,i=n.setValue,a=(0,S.z)().pathname,s=o(I,[]),l=(0,p.useMemo)(function(){return null!=s?s:[]},[s]),c=(0,p.useMemo)(function(){return{exclude_ids:l}},[l]),u=o(N,!1),d=l.length>0,f=(0,y.o)({memberIds:l,onMemberIdsChange:function(e){return i(I,e)}}),b=f.membersToAdd,A=f.handleSelectMember,E=f.removeMemberId,R=d||u;return(0,p.useEffect)(function(){null==t||t(R)},[R,t]),(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)(O.o5,{variant:"body-md",color:"primary",children:[(0,m.t)("space_groups.add_members_to_space_group_description_without_link")," ",(0,r.jsx)(P.N_,{className:"text-primary underline",to:j.ty.members.invite,search:(0,g.FC)({from:a}),children:(0,m.t)("space_groups.add_members_to_space_group_link")}),"."]}),(0,r.jsx)(v.q,{addable:!0,disabled:u,value:null,onChange:function(e){if(null!=e){var t=String(e);l.includes(t)||i(I,[t].concat(function(e){if(Array.isArray(e))return k(e)}(l)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e){if(e){if("string"==typeof e)return k(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return k(e,void 0)}}(l)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}},onSelectMember:A,filters:c,searchMode:"contains",placeholder:(0,m.t)("community_member_select.search_placeholder"),initialMessage:(0,m.t)("community_member_select.start_typing_a_name")}),(0,r.jsx)(h.C,{memberIds:l,members:b,onRemove:E}),!d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex w-full items-center gap-2",children:[(0,r.jsx)(w.c,{className:"flex-1"}),(0,r.jsx)(_.E,{variant:"secondary",label:(0,m.t)("or")}),(0,r.jsx)(w.c,{className:"flex-1"})]}),(0,r.jsx)(x.b,{name:N,label:(0,m.t)("space_groups.form.add_everyone_from_community")})]})]})},E="add-space-group-members-form",R={add_all_members:!1,community_member_ids:null};function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var D=function(e){var t,n=e.queryKey,i=e.spaceGroupId,l=function(e){if(Array.isArray(e))return e}(t=(0,p.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return L(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return L(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=l[0],y=l[1],h=(0,b.d)(),g=(0,f.jE)(),v=(0,o.hS)(),x=(0,s.R)(i).refetch,j=u({onError:function(e){h.error(e.message)},onSuccess:function(e){var t=e.message;n&&g.invalidateQueries({queryKey:n}),g.invalidateQueries({queryKey:["community-members"]}),null==x||x(),h.success(t,{duration:"short",shouldUseProgress:!1}),v.hide()}}),_=j.mutate,w=j.isPending,O=w?(0,m.t)("space_groups.invite.adding_to_space_group"):(0,m.t)("space_groups.invite.add_to_space_group");return(0,r.jsx)(d.a.Root,{open:v.visible,onOpenChange:function(e){!e&&v.visible&&v.hide()},size:"md",children:(0,r.jsxs)(d.a.Content,{children:[(0,r.jsx)(d.a.Header,{title:(0,m.t)("space_groups.form.edit.members.add_member"),showCloseButton:!0}),(0,r.jsx)(d.a.Body,{children:(0,r.jsx)(a.l,{id:E,mode:"onChange",onSubmit:function(e){var t;return _({spaceGroupId:i,communityMembersId:null!=(t=e.community_member_ids)?t:[],shouldAddAllMembers:e.add_all_members})},defaultValues:R,className:"flex flex-col",formClassName:"flex flex-col",children:(0,r.jsx)(A,{onHasMembersAddedChange:y})})}),(0,r.jsx)(d.a.Footer,{secondaryAction:{label:(0,m.t)("cancel")},primaryAction:{label:O,type:"submit",form:E,disabled:w||!c,loading:w}})]})})},T=n(737225),M=n(604892),F=n(748467),K=n(568316),B=n(570310),q=n(387099),U=function(e){var t=e.onClose,n=e.formId,o=e.isLoading,i=void 0!==o&&o,s=(0,C.xW)(),l=s.watch,c=s.setValue,u=s.formState.isDirty,d=l("community_member_ids",[])||[],p=l("add_all_members",!1),f=d.length>0,b=(0,T.X9)().contentPortalElement,y=(0,S.z)().pathname;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(T.aF.Header,{children:[(0,r.jsx)(T.aF.Title,{size:"sm",className:"text-center",children:(0,m.t)("space_groups.form.edit.members.add_member")}),(0,r.jsx)(T.aF.HeaderActions,{className:"absolute right-0 top-0 mr-6 mt-6",children:(0,r.jsx)(T.aF.CloseButton,{onClick:t})})]}),(0,r.jsxs)(T.aF.Body,{children:[(0,r.jsx)("div",{className:"mb-8",children:(0,r.jsxs)(K.o.LabelMd,{children:[(0,m.t)("space_groups.add_members_to_space_group_description_without_link")," ",(0,r.jsx)(P.N_,{to:j.ty.members.invite,search:(0,g.FC)({from:y}),children:(0,m.t)("space_groups.add_members_to_space_group_link")}),"."]})}),(0,r.jsx)(F.Y,{name:"community_member_ids",direction:"down",variant:"tags",hideSelectedItems:!0,hideIcon:!0,disabled:p,appendTo:b,popperOptions:{modifiers:[{name:"offset",options:{offset:[-10,0]}}]}}),(0,r.jsx)(h.C,{memberIds:d,onRemove:function(e){c("community_member_ids",d.filter(function(t){return t!==e}))}}),(0,r.jsxs)("div",{className:(0,B.x)({hidden:f,visible:!f}),children:[(0,r.jsx)(M.J,{}),(0,r.jsx)("div",{className:"flex items-baseline",children:(0,r.jsx)(a.l.Item,{hiddenField:!0,hideDescription:!0,label:(0,m.t)("space_groups.form.add_everyone_from_community"),id:"add_all_members",name:"add_all_members",className:"my-5 mr-2 flex shrink-0 flex-row-reverse items-center justify-end py-0 font-normal",labelClassName:"ml-4 mb-0 font-normal text-sm",shouldToggleValueOnLabelClick:!0,children:(0,r.jsx)(a.l.ToggleSwitch,{name:"add_all_members",variant:"small"})})})]})]}),(0,r.jsx)(T.aF.Footer,{className:"flex items-baseline justify-end",children:(0,r.jsx)(q.$,{variant:"primary",type:"submit",form:n,disabled:!u||i,children:i?(0,m.t)("space_groups.invite.adding_to_space_group"):(0,m.t)("space_groups.invite.add_to_space_group")})})]})},z=function(e){var t=e.queryKey,n=e.spaceGroupId,i=(0,b.d)(),l=(0,f.jE)(),c=(0,o.hS)(),d=(0,s.R)(n).refetch,p=u({onError:function(e){i.error(e.message)},onSuccess:function(e){var n=e.message;t&&l.invalidateQueries({queryKey:t}),l.invalidateQueries({queryKey:["community-members"]}),null==d||d(),i.success(n,{duration:"short",shouldUseProgress:!1}),c.hide()}}),y=p.mutate,h=p.isPending;return(0,r.jsxs)(T.aF,{isOpen:c.visible,onClose:c.hide,contentPortalId:"add-space-group-member-portal-content",title:(0,m.t)("space_groups.form.edit.members.add_member"),children:[(0,r.jsx)(T.aF.Overlay,{}),(0,r.jsx)(T.aF.Content,{size:"md",children:(0,r.jsx)(a.l,{id:E,mode:"onChange",onSubmit:function(e){return y({spaceGroupId:n,communityMembersId:e.community_member_ids,shouldAddAllMembers:e.add_all_members})},defaultValues:R,className:"flex flex-col overflow-y-auto",formClassName:"flex overflow-y-auto flex-col",children:(0,r.jsx)(U,{onClose:c.hide,isLoading:h,formId:E})})})]})};function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var $=function(e){return(0,i.T)("circle_v4_modals_enabled")?(0,r.jsx)(D,W({},e)):(0,r.jsx)(z,W({},e))},V=o.PT.create(function(e){return(0,r.jsx)($,W({},e))}),H=function(){return(0,o.hS)(V)}},408461(e,t,n){"use strict";n.d(t,{C:()=>_});var r=n(391426),o=n(231127),i=n(416146),a=n(933578),s=n(739042),l=n(417980),c=n(568316),u=n(734527),d=function(e){var t=e.row.original,n=t.name,o=t.email,i=t.avatarUrl;return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(u.J,{name:n,src:i,size:"6"}),(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)(c.o.LabelSm,{weight:"semibold",children:n}),o&&(0,r.jsx)(c.o.LabelXs,{weight:"regular",children:o})]})]})},p=function(e){var t=e.memberIds,n=void 0===t?[]:t,o=e.members,c=void 0===o?[]:o,u=e.onRemove,p=n.length>0,f=(0,a.useMemo)(function(){var e=new Map(c.map(function(e){return[String(e.id),e]}));return n.map(function(t){return e.get(String(t))}).filter(function(e){return!!e})},[n,c]),m=(0,a.useMemo)(function(){return[{field:"name",header:(0,l.t)("member"),width:"minmax(180px, 1fr)",enableSorting:!1,cell:d},{field:"actions",header:" ",width:"100px",enableSorting:!1,cell:function(e){var t=e.row;return(0,r.jsx)("div",{className:"invisible flex w-full justify-end group-hover:visible",children:(0,r.jsx)(s.$,{type:"button",variant:"outline",size:"sm",onClick:function(){return u(t.original.id)},children:(0,l.t)("remove")})})}}]},[u]);return p?(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(i.b,{className:"max-h-80",data:f,columns:m,getRowId:function(e){return String(e.id)},rowSize:"md",hideFooterOnSinglePage:!0,minHeight:0})}):null},f=n(257957),m=n(801113),b=n(583454),y=n(325335),h=n(143786),g=n(387099),v=function(e){var t=e.id,n=e.avatarUrl,o=e.name,i=e.email,a=e.onRemove;return(0,r.jsxs)(m.Hj,{className:"group h-12",children:[(0,r.jsx)(m.nA,{variant:"no-padding",children:(0,r.jsx)("div",{className:"mr-2 py-2",children:(0,r.jsx)(u.J,{name:h.X.test(""+o)?o.charAt(0):o,src:n,size:"8"})})}),(0,r.jsx)(m.nA,{variant:"no-padding",className:"w-full",children:(0,r.jsxs)("div",{className:"truncate flex flex-col gap-0 py-2",children:[(0,r.jsx)(c.o.LabelSm,{weight:"semibold",children:o}),(0,r.jsx)(c.o.LabelXs,{weight:"regular",children:i})]})}),(0,r.jsx)(m.nA,{variant:"no-padding",className:"w-24",children:(0,r.jsx)("div",{className:"text-dark invisible group-hover:visible",children:(0,r.jsx)(g.$,{type:"button",variant:"plain",onClick:function(){return a(t)},children:(0,l.t)("remove")})})})]},t)},x=function(e){var t=e.memberIds,n=void 0===t?[]:t,o=e.onRemove,i=n.length>0,a=(0,b.ms)({filters:{id:n},options:{enabled:i,keepPreviousData:i}}),s=a.hasNextPage,l=a.fetchNextPage,c=a.members;return i?(0,r.jsx)("div",{className:"mt-4 h-full max-h-80 overflow-y-auto",children:(0,r.jsx)(y.A,{loader:(0,r.jsx)(f.a,{}),dataLength:n.length,style:{overflow:"initial"},scrollThreshold:.5,next:l,hasMore:!!s,children:(0,r.jsx)(m.XI,{variant:"no-border",className:"w-full max-w-full",tableClassName:"w-full",children:(0,r.jsxs)(m.BF,{children:[n.map(function(e){return h.X.test(""+e)?(0,r.jsx)(v,{id:e,name:e,email:e,onRemove:o,avatarUrl:""},e):null}),c.map(function(e){var t=e.id,n=e.avatar_url,i=e.name,a=e.email;return(0,r.jsx)(v,{id:t,avatarUrl:n,name:i,email:a,onRemove:o},t)})]})})})}):null};function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var _=function(e){return(0,o.T)("circle_v4_data_table_enabled")?(0,r.jsx)(p,j({},e)):(0,r.jsx)(x,j({},e))}},648202(e,t,n){"use strict";var r=n(933578);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}}var a=function(e){var t,n=e.memberIds,a=e.onMemberIdsChange,s=function(e){if(Array.isArray(e))return e}(t=(0,r.useState)([]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}
1(t)||i(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1];return{membersToAdd:(0,r.useMemo)(function(){var e=new Map(l.map(function(e){return[String(e.id),e]}));return n.map(function(t){return e.get(String(t))}).filter(function(e){return!!e})},[n,l]),handleSelectMember:(0,r.useCallback)(function(e){c(function(t){return t.some(function(t){return String(t.id)===String(e.id)})?t:((function(e){if(Array.isArray(e))return o(e)})(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||i(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([{id:e.id,name:e.name,email:e.email,avatarUrl:e.avatarUrl}])})},[]),removeMemberId:(0,r.useCallback)(function(e){a(n.filter(function(t){return t!==String(e)})),c(function(t){return t.filter(function(t){return String(t.id)!==String(e)})})},[n,a])}};n.d(t,{o:()=>a})},839188(e,t,n){"use strict";n.d(t,{c:()=>tN});var r,o,i=n(391426),a=n(737225),s=n(974618),l=n(360650),c=n(337162),u=n(224444),d=n(927561),p=n(230763),f=n(451430),m=n(288513),b=n(417980),y=n(402642),h=n(361971),g=n(804939),v="create-space-form",x=["default_notification_setting","default_in_app_notification_setting","default_mobile_notification_setting"],j=["default_notification_setting","default_in_app_notification_setting","default_mobile_notification_setting","default_mention_mobile_notification_setting","default_mention_in_app_notification_setting"],_=n(817751),w=n(892907),O=function(e){var t=e.emphasis,n=e.iconName,r=e.text;return(0,i.jsxs)("div",{className:"flex items-start gap-x-2",children:[(0,i.jsx)(_.t,{name:n,size:"sm",className:"mt-0.5 shrink-0"}),(0,i.jsxs)(w.o5,{variant:"body-sm",color:"secondary",children:[(0,i.jsx)(w.o5,{variant:"label-sm",component:"span",color:"primary",children:t})," ",r]})]})},S=function(e){var t,n=(t=e.value,({open:{accessLabel:(0,b.t)("spaces.form.create.visibility_types.open"),accessText:(0,b.t)("spaces.form.create.visibility_types.open_info"),visibilityText:(0,b.t)("spaces.form.create.v4.visibility_summary.open")},private:{accessLabel:(0,b.t)("spaces.form.create.visibility_types.private"),accessText:(0,b.t)("spaces.form.create.visibility_types.private_info"),visibilityText:(0,b.t)("spaces.form.create.v4.visibility_summary.private")},secret:{accessLabel:(0,b.t)("spaces.form.create.visibility_types.secret"),accessText:(0,b.t)("spaces.form.create.visibility_types.secret_info"),visibilityText:(0,b.t)("spaces.form.create.v4.visibility_summary.secret")}})[t]);return(0,i.jsxs)("div",{className:"flex flex-col gap-y-2 pt-4",children:[(0,i.jsx)(O,{iconName:"lock",emphasis:(0,b.t)("spaces.form.create.v4.visibility_summary.access_label"),text:"".concat(n.accessLabel,". ").concat(n.accessText)}),(0,i.jsx)(O,{iconName:"eye-open",emphasis:(0,b.t)("spaces.form.create.v4.visibility_summary.visibility_label"),text:n.visibilityText})]})},P=function(){var e=(0,h.xW)().control,t=(0,g.P)();return(0,i.jsx)(h.xI,{control:e,name:"visibility",rules:{required:(0,b.t)("spaces.form.create.v4.errors.visibility_required")},render:function(e){var n=e.field,r=n.value,o=n.onChange,a="open"===r||"private"===r||"secret"===r?r
1:"open";return(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsx)(y.z,{legend:(0,b.t)("spaces.form.create.visibility_types.label"),legendProps:{className:"sr-only"},name:"visibility",variant:"option-cards",optionCardLayout:"horizontal",optionCardColumns:t?2:3,value:a,onValueChange:function(e){return o(e)},options:[{value:"open",icon:"earth",label:(0,b.t)("spaces.form.create.visibility_types.open")},{value:"private",icon:"lock",label:(0,b.t)("spaces.form.create.visibility_types.private")},{value:"secret",icon:"eye-slash",label:(0,b.t)("spaces.form.create.visibility_types.secret")}]}),(0,i.jsx)(S,{value:a})]})}})},C=n(723781),k=function(e){var t=e.children,n=e.title;return(0,i.jsxs)(C.a,{className:"flex flex-col",children:[(0,i.jsx)("div",{className:"pb-6",children:(0,i.jsx)(w.o5,{variant:"label-md",children:n})}),t]})},I=function(){return(0,i.jsx)(k,{title:(0,b.t)("spaces.form.create.sections.access"),children:(0,i.jsx)(P,{})})},N=n(933578),A=function(){var e=(0,h.xW)().setValue;return(0,N.useEffect)(function(){e("visibility","draft")},[e]),(0,i.jsx)(w.o5,{variant:"body-sm",color:"secondary",children:(0,b.t)("courses.access_description")})},E=function(){return(0,i.jsx)(k,{title:(0,b.t)("courses.access"),children:(0,i.jsx)(A,{})})},R=n(905001),L=n(341409),D=n(314054),T=n(517338),M=function(e){var t=e.chatSpaceMemberLimit,n=e.spaceGroupMemberCount,r=(0,c.t)().helpers.findBy,o=(0,h.xW)().setValue,a=(0,h.FH)({name:"space_group_id"}),s=(0,h.FH)({name:"post_type"}),l=r({id:a});(0,N.useEffect)(function(){l&&o("add_members_from_space_group",l.automatically_add_members_to_new_spaces)},[a,o,l]);var u=(0,L.$O)({post_type:s})&&n>t,p=(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[(0,i.jsx)(w.o5,{variant:"label-sm",children:(0,b.t)("settings.access_groups.admin.legacy_access.title")}),(0,i.jsx)(D.m,{content:(0,b.t)("settings.access_groups.admin.legacy_access.legacy_tooltip"),children:(0,i.jsx)(T.E,{square:!0,label:(0,b.t)("settings.access_groups.admin.legacy_access.legacy_badge")})})]}),f=(0,i.jsx)(d.l.Item,{name:"add_members_from_space_group",label:p,description:(0,b.t)("spaces.form.add_members_from_space_this_group"),hideBorder:!0,inline:!0,shouldToggleValueOnLabelClick:!0,isDisabled:u,children:(0,i.jsx)(d.l.ToggleSwitch,{name:"add_members_from_space_group",variant:"small",disabled:u})});return u?(0,i.jsx)(D.m,{content:(0,b.t)("members_in_space_group_limit_reached"),children:f}):f},F=function(e){return"chat"===e},K=function(e){return"course"===e},B=function(e){return"event"===e},q=function(e){return"members"===e},U=function(e){var t=e.mobileNotificationsEnabled,n=e.postType;return!(K(n)||q(n))&&(!F(n)||t)},z=function(e){return B(e.postType)?(0,i.jsx)(d.l.Item,{name:"event_auto_rsvp_enabled",label:(0,b.t)("spaces.form.event_auto_rsvp_enabled"),hideBorder:!0,hideDescription:!0,inline:!0,shouldToggleValueOnLabelClick:!0,children:(0,i.jsx)(d.l.ToggleSwitch,{name:"event_auto_rsvp_enabled",variant:"small"})}):null},W=n(500375),$=n(355104),V=function(){var e=(0,$.c)().isCircleV4;return(0,i.jsx)(d.l.Item,{name:"name",hideDescription:!0,layout:"horizontal",horizontalLayoutRatio:"30/70",translationRoot:"spaces.form.create.basic_info",rules:{required:(0,b.t)("spaces.form.create.v4.errors.name_required"),maxLength:{value:255,message:(0,b.t)("spaces.form.create.v4.errors.name_too_long")}},hideBorder:!0,fullWidth:!0,isFirstChild:!0,variant:"extra-bottom-margin",children:(0,i.jsx)(d.l.Input,{prefix:(0,i.jsx)(W.Q,{enableIcons:e})})})},H=n(863148),G=function(){var e=(0,c.t)().records,t=(0,a.X9)().contentPortalElement;return(0,i.jsx)(d.l.Item,{name:"space_group_id",translationRoot:"spaces.form.create.basic_info",hideDescription:!0,rules:{required:(0,b.t)("spaces.form.create.v4.errors.space_group_id_required")},hideBorder:!0,fullWidth:!0,layout:"horizontal",horizontalLayoutRatio:"30/70",variant:"extra-bottom-margin",children:(0,i.jsx)(H.s,{variant:"form-input",spaceGroups:e,name:"space_group_id",appendTo:t})})},Z=n(244174),Q=n(765350),Y=function(e){var t=e.onProcessing;return(0,i.jsx)(d.l.Item,{name:"thumbnail_image",hideDescription:!0,label:(0,b.t)("courses.create_modal.course_thumbnail"),hideBorder:!0,fullWidth:!0,variant:"extra-bottom-margin",className:"!flex flex-col items-stretch gap-2 md:!flex-row md:items-start md:gap-4",labelClassName:"!text-label-sm",labelWrapperClassName:"min-w-0 !w-full md:!w-[30%]",children:(0,i.jsx)(Q.p,{name:"thumbnail_image",alt:(0,b.t)("courses.create_modal.course_thumbnail"),aspectRatio:Z.nT.SPACE_THUMBNAIL,className:"md:!w-[70%]",customAspectRatioHelpText:(0,b.t)("image_upload.recommended_size_space_thumbnail"),emptyStateDescription:(0,b.t)("spaces.form.edit.customize.course_thumbnail_image_description"),emptyStateTitle:(0,b.t)("courses.create_modal.upload_image"),onProcessing:t,title:(0,b.t)("courses.create_modal.choose_image")})})},J=function(e){var t,n,r=e.currentSpaceGroupId,o=e.onImageProcessing,a=(0,p.Od)(),s=a.currentCommunity,l=a.currentCommunitySettings,u=(0,(0,c.t)().helpers.findBy)({id:r}),d=(0,h.FH)({name:"post_type"});return(0,i.jsxs)(k,{title:(0,b.t)("spaces.form.create.sections.general"),children:[(0,i.jsx)(V,{}),(0,i.jsx)(G,{}),"course"===d&&o&&(0,i.jsx)(Y,{onProcessing:o}),(0,i.jsx)(z,{postType:d}),(0,R.Gs)(l)&&(0,i.jsx)(M,{spaceGroupMemberCount:null!=(t=null==u?void 0:u.space_group_members_count)?t:0,chatSpaceMemberLimit:null!=(n=null==s?void 0:s.chat_space_members_limit)?n:0})]})},X=function(e){var t=e.currentSpaceGroupId,n=e.onImageProcessing;return(0,i.jsxs)("div",{className:"flex flex-col gap-y-4",children:[(0,i.jsx)(J,{currentSpaceGroupId:t,onImageProcessing:n}),(0,i.jsx)(E,{})]})},ee=n(3898),et=function(){var e=(0,h.xW)().control;return(0,i.jsx)(h.xI,{control:e,name:"notification_type",render:function(e){var t=e.field,n=t.value,r=t.onChange;return(0,i.jsx)(y.z,{legend:"",legendProps:{className:"sr-only"},name:"notification_type",value:"all"===n||"mentions"===n?n:"never",onValueChange:function(e){return r(e)},options:ee.E.map(function(e){return{value:e.value,label:e.label,description:e.description}})})}})},en=function(e){var t=e.postType;return(0,i.jsx)(d.l.Item,{name:"notification_type",hideLabel:!0,hideDescription:!0,hideBorder:!0,fullWidth:!0,isFirstChild:!0,children:(0,i.jsx)(d.l.CheckboxGroup,{name:"notification_type",options:[{label:(0,b.t)("spaces.form.create.notification_types.email"),description:(0,b.t)("spaces.form.create.notification_by_space_type.".concat(t,".email_description")),value:"default_notification_setting"},{label:(0,b.t)("spaces.form.create.notification_types.inapp"),description:(0,b.t)("spaces.form.create.notification_by_space_type.".concat(t,".inapp_description")),value:"default_in_app_notification_setting"},{label:(0,b.t)("spaces.form.create.notification_types.mobile"),description:(0,b.t)("spaces.form.create.notification_by_space_type.".concat(t,".mobile_description")),value:"default_mobile_notification_setting"}]})})},er=function(e){var t=e.postType,n=(0,p.Od)().currentCommunity,r=!!((null==n?void 0:n.ios_app_enabled)||(null==n?void 0:n.has_branded_app));return K(t)||q(t)?null:F(t)?r?(0,i.jsx)(et,{}):null:(0,i.jsx)(en,{postType:t})},eo=function(){var e=(0,h.FH)({name:"post_type"}),t=(0,p.Od)().currentCommunity;return U({mobileNotificationsEnabled:!!((null==t?void 0:t.ios_app_enabled)||(null==t?void 0:t.has_branded_app)),postType:e})?(0,i.jsx)(k,{title:(0,b.t)("spaces.form.create.sections.new_post_notifications"),children:(0,i.jsx)(er,{postType:e})}):null},ei=n(719265),ea=n(339551),es=n(915779),el=n(595260),ec=n(519104),eu=n(717526),ed=n(358954),ep=function(e){var t,n,r,o=F(e.post_type)?"all"===(t=e.notification_type)?["default_mobile_notification_setting","default_mention_mobile_notification_setting","default_mention_in_app_notification_setting"]:"mentions"===t?["default_mention_mobile_notification_setting","default_mention_in_app_notification_setting"]:[]:e.notification_type,i=(0,f.omit)(e,"notification_type","course_setting"),a=j.reduce(function(e,t){return e[t]=o.includes(t)?"all":"never",e},{}),s=K(e.post_type)?{course_setting:e.course_setting}:{},l=!!B(e.post_type)&&e.is_post_disabled;return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({}
1,i,a,s),r=r={is_post_disabled:l},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n};function ef(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function em(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){ef(i,r,o,a,s,"next",e)}function s(e){ef(i,r,o,a,s,"throw",e)}a(void 0)})}}function eb(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var ey=function(e){var t=e.onClose,n=e.setExternalLoadingState,r=(0,ec.Z)(),o=(0,eu.d)(),i=(0,ea.E)().actions.refresh,a=(0,el.G)(),s=a.createSpace,l=a.maxSpaceLimit,c=(0,ei.t)({onBeforeModal:function(){return n(!1)},onUpgradeSuccess:function(){t(),r({to:es.ty.content.spaces})}}),u=c.handleSpaceLimitError,d=c.isSpaceLimitModalAvailable,p=(0,N.useCallback)(function(e){return em(function(){return eb(this,function(t){switch(t.label){case 0:if(void 0===e)return[2];if(!d)return[3,2];return[4,l(e)];case 1:t.sent(),t.label=2;case 2:return[2]}})})()},[d,l]);return{handleSubmit:(0,N.useCallback)(function(e){return em(function(){var a,l,c,d;return eb(this,function(f){switch(f.label){case 0:n(!0),a=e.name.trim(),f.label=1;case 1:return f.trys.push([1,5,7,8]),[4,p(e.space_group_id)];case 2:return f.sent(),[4,s(ep(e))];case 3:return l=f.sent(),[4,i()];case 4:return f.sent(),o.success((0,b.t)("spaces.form.create.v4.toast.created",{spaceName:a||l.name})),t(),(0,L.yd)(l)&&(0,es.L1)()?r({to:"/settings/courses/$id/edit",params:{id:String(l.id)}}):r({to:"/c/$spaceSlug",params:{spaceSlug:l.slug}}),[3,8];case 5:return d=c=f.sent(),(0,ed.Vt)(c),console.error(d),[4,u(d)];case 6:return f.sent()||o.error((0,b.t)("spaces.form.create.v4.toast.error",{spaceName:a})),[3,8];case 7:return n(!1),[7];case 8:return[2]}})})()},[p,s,r,u,t,i,n,o])}},eh=n(278900),eg=n(826023),ev=n(560640),ex=function(e){var t=e.canCreateAllTypesOfSpaces,n=e.courseSetting,r=void 0===n?{course_type:ev.X}:n,o=e.currentSpaceGroupId,i=e.post_type,a=e.prefillData,s=(0,(0,c.t)().helpers.findBy)({id:o});return(0,N.useMemo)(function(){var e=F(i)?"never":x;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},{name:"",space_group_id:o,post_type:t?i:"basic",visibility:"open",course_setting:r,emoji:"#",custom_emoji:eh.i,notification_type:e,is_post_disabled:!0,event_auto_rsvp_enabled:!1,add_members_from_space_group:null==s?void 0:s.automatically_add_members_to_new_spaces,default_comment_sort:"oldest",default_member_sort:"latest",default_sort:"latest",hide_right_sidebar:"basic"===i},a?(0,eg.FU)(a,i):{})},[t,r,null==s?void 0:s.automatically_add_members_to_new_spaces,o,i,a])},ej=function(e){var t=e.onClose,n=e.currentSpaceGroupId,r=e.post_type,o=void 0===r?"basic":r,a=e.courseSetting,s=e.prefillData,l=e.setExternalDisabledState,b
1=void 0===l?f.noop:l,y=e.setExternalLoadingState,h=void 0===y?f.noop:y,g=(0,p.Od)().currentCommunityMember,x=!!(null==g?void 0:g.is_admin),j=(0,c.t)().helpers.isDataLoading,_=ex({canCreateAllTypesOfSpaces:x,courseSetting:a,currentSpaceGroupId:n,post_type:o,prefillData:s}),w=ey({onClose:t,setExternalLoadingState:h}).handleSubmit;if(j())return(0,i.jsx)(u.y,{});var O=K(o);return(0,i.jsx)(d.l,{id:v,onSubmit:w,defaultValues:_,className:(0,m._h)("create-space__form"),children:O?(0,i.jsx)(X,{currentSpaceGroupId:n,onImageProcessing:b}):(0,i.jsxs)("div",{className:"flex flex-col gap-y-4",children:[(0,i.jsx)(J,{currentSpaceGroupId:n}),(0,i.jsx)(I,{}),(0,i.jsx)(eo,{})]})})},e_=function(e){return(0,i.jsx)(ej,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))},ew=n(791009),eO="create-space-v4-type-form",eS="create-space-v4-course-type-form",eP="type",eC="course",ek="form",eI=[{value:"basic",icon:"notes",labelKey:"spaces.form.create.space_types.post_label",descriptionKey:"spaces.form.create.v4.space_types.post_description"},{value:"chat",icon:"message-dots",labelKey:"spaces.form.create.space_types.chat_label",descriptionKey:"spaces.form.create.v4.space_types.chat_description"},{value:"course",icon:"graduate-cap",labelKey:"spaces.form.create.space_types.course_label",descriptionKey:"spaces.form.create.v4.space_types.course_description"},{value:"image",icon:"image",labelKey:"spaces.form.create.space_types.image_label",descriptionKey:"spaces.form.create.v4.space_types.image_description"},{value:"event",icon:"calendar",labelKey:"spaces.form.create.space_types.event_label",descriptionKey:"spaces.form.create.v4.space_types.event_description"},{value:"members",icon:"people",labelKey:"spaces.form.create.space_types.members_label",descriptionKey:"spaces.form.create.v4.space_types.members_description"}];function eN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eA={course_type:ev.X},eE=function(e){return e?"course"===e?{id:eC}:{id:ek,postType:e,courseSetting:eA}:{id:eP}},eR=function(e,t){switch(t.type){case"selectType":if("course"===t.postType)return{id:eC};return{id:ek,postType:t.postType,courseSetting:eA};case"confirmCourse":return{id:ek,postType:"course",courseSetting:t.courseSetting};case"back":if(e.id===ek&&"course"===e.postType)return{id:eC};return{id:eP};case"reset":return eE(t.initialPostType)}},eL=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,N.useReducer)(eR,e,eE))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eN(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eN(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return{step:r,selectType:function(e){return o({type:"selectType",postType:e})},confirmCourse:function(e){return o({type:"confirmCourse",courseSetting:e})},back:function(){return o({type:"back"})},reset:function(){return o({type:"reset",initialPostType:e})}}},eD=n(972287),eT=function(e){var t=e.initialValue,n=e.onConfirm;return(0,i.jsx)(d.l,{id:eS,onSubmit:function(e){return n(e.course_setting)},defaultValues:{course_setting:null!=t?t:{course_type:ev.X}},children:(0,i.jsx)(eD.M,{hideLabel:!0})})},eM=n(605274);function eF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eK=(eF(r={},eP,"spaces.form.create.v4.step_titles.choose_space_type"),eF(r,eC,"spaces.form.create.v4.step_titles.choose_course_type"),r),eB=(eF(o={},eP,eO),eF(o,eC,eS),o),eq=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.id===ek?{label:t?(0,b.t)("creating"):(0,b.t)("create_space"),form:v,loading:t,disabled:t||n}:{label:(0,b.t)("spaces.form.create.space_types.next"),form:eB[e.id]}};function eU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ez=function(e){var t,n=e.initialValue,r=e.onSelect,o=(0,p.Od)().currentCommunity,a=(0,eM.Ab)(),s=function(e){if(Array.isArray(e))return e}(t=(0,N.useState)(n))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eU(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eU(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1],u=(0,g.P)(),d=(({isCoursesEnabled:!!(null==o?void 0:o.courses_feature_flag_enabled)}).isCoursesEnabled?eI:(0,f.reject)(eI,{value:"course"})).map(function(e){return{value:e.value,icon:e.icon,label:(0,b.t)(e.labelKey),descriptionKey:e.descriptionKey}}).map(function(e){return{value:e.value,icon:e.icon,label:e.label,description:(0,i.jsx)(w.o5,{variant:"body-sm",component:"span",color:"secondary",dangerouslySetInnerHTML:{__html:(0,b.t)(e.descriptionKey)}})}});return(0,i.jsx)("form",{id:eO,onSubmit:function(e){e.preventDefault(),r(l)},children:(0,i.jsx)(y.z,{legend:(0,b.t)("spaces.form.create.space_types.choose_type"),legendProps:{className:"sr-only"},name:"post_type",variant:"option-cards",optionCardLayout:u?"horizontal":"vertical",optionCardContentLayout:u?"horizontal":void 0,optionCardColumns:u?1:a?2:3,value:l,onValueChange:function(e){return c(e)},options:d})})};function eW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function e$(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eW(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eV=function(e){var t=e.open,n=e.onOpenChange,r=e.currentSpaceGroupId,o=e.initialPostType,a=e.prefillData,s=eL(o),l=s.step,c=s.selectType,u=s.confirmCourse,d=s.back,p=s.reset,f=e$((0,N.useState)(!1),2),m=f[0],y=f[1],h=e$((0,N.useState)(!1),2),g=h[0],v=h[1],x=(0,N.useRef)(t);(0,N.useEffect)(function(){!x.current&&t&&p(),x.current=t},[t,p]);var j=function(){return n(!1)},_=eq(l,g,m),w="course"!==o||l.id!==eC;return(0,i.jsx)(ew.a.Root,{size:"lg",open:t,onOpenChange:n,children:(0,i.jsxs)(ew.a.Content,{children:[(0,i.jsx)(ew.a.Header,{title:l.id===ek?(0,b.t)("spaces.form.create.space_titles.".concat(l.postType)):(0,b.t)(eK[l.id]),showBackButton:l.id!==eP&&w,onBackButtonClick:d}),(0,i.jsxs)(ew.a.Body,{children:[l.id===eP&&(0,i.jsx)(ez,{initialValue:null!=o?o:"basic",onSelect:c}
1),l.id===eC&&(0,i.jsx)(eT,{onConfirm:u}),l.id===ek&&(0,i.jsx)(e_,{onClose:j,post_type:l.postType,courseSetting:l.courseSetting,currentSpaceGroupId:r,prefillData:a,setExternalDisabledState:y,setExternalLoadingState:v})]}),(0,i.jsx)(ew.a.Footer,{secondaryAction:{label:(0,b.t)("cancel"),onClick:j,shouldCloseModal:!1},primaryAction:{label:_.label,type:"submit",form:_.form,loading:_.loading,disabled:_.disabled}})]})})},eH=function(e){return(0,i.jsx)(l.xZ,{children:(0,i.jsx)(c.X,{children:(0,i.jsx)(eV,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))})})},eG=n(915921),eZ=n(729824),eQ=n(765724),eY=n(689492),eJ=n(568316),eX=n(938372),e0=n.n(eX),e1=n(898666),e2=function(e){var t=e.spaceGroupMemberCount,n=e.chatSpaceMemberLimit,r=(0,c.t)().helpers.findBy,o=(0,h.xW)(),a=o.watch,s=o.setValue,l=a("space_group_id"),u=a("post_type"),p=r({id:l});(0,N.useEffect)(function(){p&&s("add_members_from_space_group",p.automatically_add_members_to_new_spaces)},[l]);var f=(0,L.$O)({post_type:u})&&t>n;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex gap-1 pt-4",children:[(0,i.jsx)("div",{children:(0,i.jsx)(eJ.o.LabelSm,{weight:"semibold",children:(0,b.t)("settings.access_groups.admin.legacy_access.title")})}),(0,i.jsx)("div",{children:(0,i.jsx)(e1.$,{role:"tooltip",content:(0,b.t)("settings.access_groups.admin.legacy_access.legacy_tooltip"),interactive:!1,children:(0,i.jsx)(T.E,{square:!0,label:(0,b.t)("settings.access_groups.admin.legacy_access.legacy_badge")})})})]}),(0,i.jsx)(e1.$,{content:(0,b.t)("members_in_space_group_limit_reached"),disabled:!f,children:(0,i.jsx)(d.l.Item,{name:"add_members_from_space_group",label:I18n.t("spaces.form.add_members_from_space_this_group"),hideBorder:!0,hideDescription:!0,className:"!mt-1 !pt-1",inline:!0,shouldToggleValueOnLabelClick:!0,isDisabled:f,children:(0,i.jsx)(d.l.ToggleSwitch,{variant:"small",disabled:f})})})]})};e2.propTypes={spaceGroupMemberCount:e0().number,chatSpaceMemberLimit:e0().number};var e3=n(208125);let e4=function(){var e=(0,e3.v)(),t=(0,c.t)().records,n=(0,a.X9)().contentPortalElement,r=(0,$.c)().isCircleV4;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.l.Item,{name:"name",hideDescription:!0,translationRoot:"spaces.form.create.basic_info",rules:{required:(0,b.t)("spaces.form.create.basic_info.name_required"),maxLength:255},hideBorder:!0,fullWidth:!0,isFirstChild:!0,variant:"extra-bottom-margin",children:(0,i.jsx)(d.l.Input,{ref:e,prefix:(0,i.jsx)(W.Q,{enableIcons:r})})}),(0,i.jsx)(d.l.Item,{name:"space_group_id",translationRoot:"spaces.form.create.basic_info",hideDescription:!0,rules:{required:(0,b.t)("spaces.form.create.basic_info.space_group_id_required"),maxLength:255},hideBorder:!0,fullWidth:!0,variant:"extra-bottom-margin",children:(0,i.jsx)(H.s,{variant:"form-input",spaceGroups:t,name:"space_group_id",appendTo:n})})]})};var e5=n(882596),e6=n(387099),e8=function(e){var t=e.isLoading,n=void 0!==t&&t;return(0,i.jsx)(e5._.Footer,{sticky:!0,children:(0,i.jsx)(e6.$,{type:"submit",variant:"circle",full:!0,disabled:n,form:td,children:n?(0,b.t)("creating"):(0,b.t)("create_space")})})},e9=n(973646),e7=function(e){var t=e.onClose;return(0,i.jsx)(e5._.Header,{addHeaderPadding:!0,title:(0,b.t)("spaces.form.create.title"),fixed:!0,Actions:(0,i.jsxs)("button",{type:"submit",className:(0,m.W2)("close-button"),onClick:t,children:[(0,i.jsx)(e9.In,{type:"close"}),(0,i.jsx)("span",{className:"sr-only",children:(0,b.t)("drawer.close_panel")})]})})};function te(){return"event"!==(0,(0,h.xW)().watch)("post_type")?null:(0,i.jsx)(d.l.Item,{name:"event_auto_rsvp_enabled",label:b.Ay.t("spaces.form.event_auto_rsvp_enabled"),hideBorder:!0,hideDescription:!0,inline:!0,shouldToggleValueOnLabelClick:!0,children:(0,i.jsx)(d.l.ToggleSwitch,{variant:"small"})})}var tt=n(619956),tn=function(e){var t,n;return null==(n=e.body)||null==(t=n.error_details)?void 0:t.max_space_limit},tr=n(778380);function to(e){var t=e.disabled,n=e.isCoursesEnabled,r=e.hideLabel,o=[{label:(0,b.t)("spaces.form.create.space_types.post_label"),icon:{type:"post-2",viewBox:"0 0 20 20"},value:"basic"},{label:(0,b.t)("spaces.form.create.space_types.event_label"),icon:{type:"event",viewBox:"0 0 20 20"},value:"event"},{label:(0,b.t)("spaces.form.create.space_types.chat_label"),icon:{type:"chat-2",viewBox:"0 0 20 20"},value:"chat"}];return void 0!==n&&n&&o.push({label:(0,b.t)("spaces.form.create.space_types.course_label"),icon:{type:"book",viewBox:"0 0 20 20"},value:"course"}),o.push({label:(0,b.t)("spaces.form.create.space_types.members_label"),icon:{type:"20-space-picker-members",viewBox:"0 0 20 20"},value:"members"}),o.push({label:(0,b.t)("spaces.form.create.space_types.image_label"),icon:{type:"20-images",viewBox:"0 0 20 20"},value:"image"}),(0,i.jsx)(d.l.Item,{name:"post_type",hideLabel:void 0!==r&&r,label:(0,b.t)("spaces.form.create.space_types.label"),hideDescription:!0,rules:{required:"Please choose an access type!",maxLength:255},hideBorder:!0,fullWidth:!0,variant:"extra-bottom-margin",children:(0,i.jsx)(d.l.RadioGroup,{className:(0,m._h)("create-space__form__grid-type"),disabled:void 0!==t&&t,variant:"box",fullWidth:!1,name:"space_type",options:o})})}let ti=function(){var e=[{label:b.Ay.t("spaces.form.create.visibility_types.open"),value:"open",info:b.Ay.t("spaces.form.create.visibility_types.open_info")},{label:b.Ay.t("spaces.form.create.visibility_types.private"),value:"private",info:b.Ay.t("spaces.form.create.visibility_types.private_info"),infoSubText:b.Ay.t("spaces.form.create.visibility_types.private_info_subtext")},{label:b.Ay.t("spaces.form.create.visibility_types.secret"),value:"secret",info:b.Ay.t("spaces.form.create.visibility_types.secret_info"),infoSubText:b.Ay.t("spaces.form.create.visibility_types.secret_info_subtext")}],t=(0,h.FH)({name:"post_type"}),n=(0,h.FH)({name:"visibility"}),r=(0,h.xW)().setValue;return(0,L.yd)({post_type:t})?("draft"!=n&&r("visibility","draft"),(0,i.jsx)(d.l.Item,{hideBorder:!0,name:"visibility",label:b.Ay.t("courses.access"),description:b.Ay.t("courses.access_description")})):(0,i.jsx)(d.l.Item,{name:"visibility",hideDescription:!0,label:b.Ay.t("spaces.form.create.visibility_types.label"),rules:{required:"Please choose a visibility!",maxLength:255},hideBorder:!0,fullWidth:!0,variant:"extra-bottom-margin",children:(0,i.jsx)(d.l.RadioGroup,{fullWidth:!1,variant:"box",name:"visibility",options:e})})};function ta(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ts(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function tl(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){ts(i,r,o,a,s,"next",e)}function s(e){ts(i,r,o,a,s,"throw",e)}a(void 0)})}}function tc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function tu(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var td="create-space-form",tp=function(e){var t,n=e.onClose,r=e.currentSpaceGroupId,o=e.post_type,a=void 0===o?"basic":o,s=e.courseSetting,l=void 0===s?{course_type:ev.X}:s,y=e.prefillData,h=e.renderHeader,g=e.renderFooter,v=e.hideSpaceTypePicker,x=e.setExternalLoadingState,j=void 0===x?f.noop:x,_=(0,ec.Z)(),w=(0,ea.E)().actions.refresh,O=function(e){if(Array.isArray(e))return e}(t=(0,N.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return ta(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ta(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),S=O[0],P=O[1],C=(0,el.G)(),k=C.createSpace,I=C.maxSpaceLimit,A=(0,p.Od)(),E=A.currentCommunity,L=A.currentCommunitySettings,D=A.currentCommunityMember,T=!!(null==D?void 0:D.is_admin),M=(0,eu.d)(),F=(0,eG.M)(),K=(0,tr.v)(),B=(0,c.t)().helpers,q=B.isDataLoading,U=B.findBy,z=(null==E?void 0:E.current_plan_tier)||"",W=U({id:r}),$={space_group_id:r,post_type:T?a:"basic",visibility:"open",course_setting:l,emoji:"#",custom_emoji:eh.i,notification_type:["default_notification_setting","default_in_app_notification_setting","default_mobile_notification_setting"],is_post_disabled:!0,event_auto_rsvp_enabled:!1,add_members_from_space_group:null==W?void 0:W.automatically_add_members_to_new_spaces,default_comment_sort:"oldest",default_member_sort:"latest",default_sort:"latest",hide_right_sidebar:"basic"===a};"chat"==a&&($.notification_type="never");var V=tc({},$,y?(0,eg.FU)(y,a):{});if(q())return(0,i.jsx)(u.y,{});var H=!(0,eY.Qf)(z)&&!(0,eY.PF)(z)&&!(0,eY.KL)(z)&&!!(null==D?void 0:D.is_admin),G=((0,eY.Qf)(z)||(0,eY.PF)(z))&&!(0,eQ.E1)(E)&&!!(null==D?void 0:D.is_admin),Z=function(){return tl(function(){return tu(this,function(e){switch(e.label){case 0:return n(),_({to:es.ty.content.spaces}),[4,F.hide()];case 1:return e.sent(),[2]}})})()},Q=function(e){var t,n,r,o;return r=tc({},(0,f.omit)(e,"notification_type","course_setting"),{default_notification_setting:(n="chat"===e.post_type?"all"==(t=e.notification_type)?["default_mobile_notification_setting","default_mention_mobile_notification_setting","default_mention_in_app_notification_setting"]:"mentions"==t?["default_mention_mobile_notification_setting","default_mention_in_app_notification_setting"]:[]:e.notification_type).includes("default_notification_setting")?"all":"never",default_in_app_notification_setting:n.includes("default_in_app_notification_setting")?"all":"never",default_mobile_notification_setting:n.includes("default_mobile_notification_setting")?"all":"never",default_mention_mobile_notification_setting:n.includes("default_mention_mobile_notification_setting")?"all":"never",default_mention_in_app_notification_setting:n.includes("default_mention_in_app_notification_setting")?"all":"never"},"course"===e.post_type?{course_setting:e.course_setting}:{}),o=o={is_post_disabled:"event"===e.post_type&&e.is_post_disabled},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r};return(0,i.jsxs)(d.l,{id:td,onSubmit:function(e){return tl(function(){var t,r,o,i,a;return tu(this,function(s){var l,c;switch(s.label){case 0:P(!0),j(!0),s.label=1;case 1:return s.trys.push([1,5,11,12]),[4,(l=e.space_group_id,tl(function(){return tu(this,function(e){switch(e.label){case 0:if(!(H||G))return[3,2];return[4,I(l)];case 1:e.sent(),e.label=2;case 2:return[2]}})})())];case 2:return s.sent(),[4,k(Q(e))];case 3:return t=s.sent(),[4,w()];case 4:return s.sent(),n(),_({to:"/c/$spaceSlug",params:{spaceSlug:t.slug}}),[3,12];case 5:if(r=s.sent(),(0,ed.Vt)(r),console.error(r),o=r.firstErrorDetail,i=r.errorDetails,a=o||i,!(tn(r)&&H))return[3,7];return[4,(c=r,tl(function(){return tu(this,function(e){switch(e.label){case 0:return P(!1),j(!1),[4,F.show({planTier:z&&(0,eY.ax)(z)||void 0,onSuccess:Z,subheading:c.body.message,successButtonLabel:(0,b.t)("pricing_plans.upgrade_modal.actions.go_to_spaces"),source:eZ.p6.SPACE_LIMIT_UPGRADE_MODAL,showPlanDetails:!0})];case 1:return e.sent(),[2]}})})())];case 6:case 8:return s.sent(),[3,10];case 7:if(!(tn(r)&&G))return[3,9];return[4,tl(function(){return tu(this,function(e){switch(e.label){case 0:return P(!1),j(!1),[4,K.show({})];case 1:return e.sent(),[2]}})})()];case 9:M.error(a),s.label=10;case 10:return[3,12];case 11:return j(!1),[7];case 12:return[2]}})})()},defaultValues:V,className:(0,m._h)("create-space__form"),children:[(void 0===h?e7:h)({onClose:n}),(0,i.jsxs)("div",{children:[(0,i.jsx)(e4,{}),(0,R.Gs)(L)&&(0,i.jsx)(e2,{spaceGroupMemberCount:(null==W?void 0:W.space_group_members_count)||0,chatSpaceMemberLimit:(null==E?void 0:E.
1chat_space_members_limit)||0}),T&&!(void 0!==v&&v)&&(0,i.jsx)(to,{isCoursesEnabled:null==E?void 0:E.courses_feature_flag_enabled}),(0,i.jsx)(ti,{}),(0,i.jsx)(tt.U,{}),(0,i.jsx)(te,{})]}),(void 0===g?e8:g)({isLoading:S})]})},tf=function(e){return(0,i.jsx)(l.xZ,{children:(0,i.jsx)(c.X,{children:(0,i.jsx)(tp,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))})})},tm=n(6418),tb=n(231127),ty=n(168090),th="course-type-form",tg=function(e){var t=e.onSubmit,n=e.courseSetting,r=void 0===n?{course_type:ev.X}:n;return(0,i.jsx)(d.l,{id:th,onSubmit:t,defaultValues:{course_setting:r},validationSchema:void 0,className:void 0,formClassName:void 0,children:(0,i.jsx)(ty.M,{hideLabel:!0})})},tv=n(428266),tx=function(e){var t=e.hideForm;return(0,i.jsx)(a.aF.HeaderActions,{children:(0,i.jsx)(tv.K,{ariaLabel:(0,b.t)("back"),name:"20-chevron-left",onClick:t,iconSize:20,buttonSize:28,iconClassName:"!text-dark",className:"mr-2",variant:"primary"})})};function tj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tj(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tw=function(e){var t=e.prefillData,n=e.selectedPostType,r=t&&"course_type"in t?t.course_type:null,o=!!r,i=t_((0,N.useState)(null!=n?n:"basic"),2),a=i[0],s=i[1],l=t_((0,N.useState)(n&&"course"!==n||o),2),c=l[0],u=l[1],d=t_((0,N.useState)(!1),2),p=d[0],f=d[1],m=t_((0,N.useState)("course"===n&&!o),2),b=m[0],y=m[1],h=t_((0,N.useState)(r?{course_type:r}:void 0),2);return{postType:a,hasSelectedSpaceType:c,isLoading:p,isCourseSpace:b,courseSetting:h[0],setPostType:s,setHasSelectedSpaceType:u,setIsLoading:f,setIsCourseSpace:y,setCourseSetting:h[1]}},tO="space_type_form",tS=function(e){var t=e.onSubmit,n=(0,p.Od)().currentCommunity;return(0,i.jsx)(d.l,{id:tO,onSubmit:t,defaultValues:{post_type:"basic"},children:(0,i.jsx)(to,{hideLabel:!0,isCoursesEnabled:null==n?void 0:n.courses_feature_flag_enabled})})},tP=function(e){var t=e.prefillData,n=e.spaceGroupId,r=e.selectedPostType,o=(0,s.hS)(),l=tw({prefillData:t,selectedPostType:r}),c=l.postType,u=l.hasSelectedSpaceType,d=l.isLoading,p=l.isCourseSpace,f=l.courseSetting,m=l.setPostType,y=l.setHasSelectedSpaceType,h=l.setIsLoading,g=l.setIsCourseSpace,v=l.setCourseSetting,x=p?(0,b.t)("spaces.form.create.course_types.choose_course_type"):u?(0,b.t)("spaces.form.create.space_titles.".concat(c)):(0,b.t)("spaces.form.create.space_types.choose_type"),j=function(){o.hide(),g(!1),v(void 0),y(!1),o.remove()};return(0,i.jsxs)(a.aF,{isOpen:o.visible,onClose:j,contentPortalId:"space-type-picker-modal",title:x,children:[(0,i.jsx)(a.aF.Overlay,{}),(0,i.jsxs)(a.aF.Content,{size:"md",children:[(0,i.jsxs)(a.aF.Header,{className:"!px-6 md:!px-8",children:[u&&(0,i.jsx)(tx,{hideForm:function(){y(!1),"course"===c&&g(!0)}}),p&&(0,i.jsx)(tx,{hideForm:function(){g(!1),y(!1)}}),(0,i.jsx)(a.aF.Title,{className:"w-auto",size:"sm",children:x}),(0,i.jsx)(a.aF.HeaderActions,{children:(0,i.jsx)(a.aF.CloseButton,{onClick:j})})]}),(0,i.jsxs)(a.aF.Body,{className:"!px-6 !py-1 md:!px-8",children:[!u&&!p&&(0,i.jsx)(tS,{onSubmit:function(e){var t=e.post_type;m(t),"course"===t?g(!0):y(!0)}}),p&&(0,i.jsx)(tg,{onSubmit:function(e){v(e.course_setting),g(!1),y(!0)},courseSetting:f}),u&&(0,i.jsx)(tf,{onClose:j,post_type:c,courseSetting:f,hideSpaceTypePicker:!0,currentSpaceGroupId:n,setExternalLoadingState:h,prefillData:t,renderHeader:function(){return(0,i.jsx)(i.Fragment,{})},renderFooter:function(){return(0,i.jsx)(i.Fragment,{})}})]}),(0,i.jsx)(a.aF.Footer,{children:(0,i.jsx)(e6.$,{form:u?td:p?th:tO,type:"submit","data-testid":"create-space-button",variant:"circle",full:!0,large:!0,disabled:d,children:u?d?(0,b.t)("creating"):(0,b.t)("create_space"):(0,b.t)("spaces.form.create.space_types.next")})})]})]})};function tC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tk=function(e){var t,n=e.spaceGroupId,r=e.prefillData,o=e.postType,l=(0,s.hS)(),c=function(e){if(Array.isArray(e))return e}(t=(0,N.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return tC(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tC(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=c[0],d=c[1];return(0,i.jsxs)(a.aF,{isOpen:l.visible,onClose:l.hide,contentPortalId:"create-space-content-portal",title:(0,b.t)("create_space"),children:[(0,i.jsx)(a.aF.Overlay,{}),(0,i.jsxs)(a.aF.Content,{size:"md",children:[(0,i.jsxs)(a.aF.Header,{className:"!px-6 md:!px-8",children:[(0,i.jsx)(a.aF.Title,{size:"sm",children:(0,b.t)("create_space")}),(0,i.jsx)(a.aF.HeaderActions,{children:(0,i.jsx)(a.aF.CloseButton,{onClick:l.hide})})]}),(0,i.jsx)(a.aF.Body,{className:"!px-6 !py-1 md:!px-8",children:(0,i.jsx)(tf,{onClose:l.hide,setExternalLoadingState:d,currentSpaceGroupId:n,post_type:o,prefillData:r,renderHeader:function(){return(0,i.jsx)(i.Fragment,{})},renderFooter:function(){return(0,i.jsx)(i.Fragment,{})}})}),(0,i.jsx)(a.aF.Footer,{children:(0,i.jsx)(e6.$,{disabled:u,type:"submit",form:td,full:!0,large:!0,children:(0,b.t)(u?"creating":"create_space")})})]})]})},tI=s.PT.create(function(e){var t=e.spaceGroupId,n=e.postType,r=e.prefillData,o=(0,s.hS)(),a=(0,p.Od)().currentCommunityMember;return(0,tb.T)("circle_v4_modals_enabled")&&(0,tm.V8)(a)?(0,i.jsx)(eH,{open:o.visible,onOpenChange:function(e){e||o.hide()},currentSpaceGroupId:t,initialPostType:n,prefillData:r}):(0,tm.V8)(a)?(0,i.jsx)(tP,{spaceGroupId:t,selectedPostType:n,prefillData:r}):(0,i.jsx)(tk,{spaceGroupId:t,postType:n,prefillData:r})}),tN=function(){return(0,s.hS)(tI)}},200647(e,t,n){"use strict";n.d(t,{h:()=>R});var r=n(391426),o=n(974618),i=n(355104),a=n(321803),s=n(34819),l=n(620529),c=n(892907),u=n(933578),d=n(417980),p=n(257957),f=n(399621),m=n(439094),b=n(570310),y=n(117636);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var g=function(e){var t,n,o,i=e.attachment,a=e.isActive,s=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return h(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return h(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1],d=m.T.isPDF(i.content_type),g=m.T.isImage(i.content_type),v=!!(null==(n=i.metadata)?void 0:n.voice_message),x=m.T.isNativelySupportedVideo(i.content_type);return(0,r.jsxs)("div",{className:"flex h-[calc(100vh-10rem)] w-full items-center justify-center",children:[d&&(0,r.jsx)(f.n,{className:"size-full px-8",src:i.url}),x&&!v&&(0,r.jsx)(y.u,{src:i.url,type:i.content_type,controlsList:"play",autoPlay:a,poster:null==(o=i.image_variants)?void 0:o.thumbnail}),g&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{loading:"eager",alt:"",className:(0,b.x)("max-h-full max-w-full object-contain",{hidden:!l}),src:i.url,onLoad:function(){return c(!0)},onError:function(){return c(!0)}}),!l&&(0,r.jsx)(p.a,{center:!0})]})]})};function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var x=function(e){var t,n=e.attachments,o=void 0===n?[]:n,i=e.startIndex,p=e.open,f=e.onOpenChange,m=(0,u.useRef)(null),b=Math.min(void 0===i?0:i,Math.max(o.length-1,0)),y=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(b))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return v(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return v(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),h=y[0],x=y[1],j=o.length>1;(0,u.useEffect)(function(){p&&o.length>0&&x(b)},[p,b,o.length]),(0,u.useEffect)(function(){if(p&&j){var e=requestAnimationFrame(function(){var e,t;null==(t=m.current)||null==(e=t.querySelector('[role="region"]'))||e.focus({preventScroll:!0})});return function(){return cancelAnimationFrame(e)}}},[p,j,b]);var _=o[h]||o[0];return _?(0,r.jsx)(l.w,{open:p,onOpenChange:f,children:(0,r.jsxs)("div",{className:"flex size-full flex-col",children:[(0,r.jsxs)("div",{className:"flex h-16 items-center justify-between border-b px-6",children:[(0,r.jsx)(c.o5,{variant:"heading-md",children:_.filename}),(0,r.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,r.jsx)(s.K,{"aria-label":(0,d.t)("download"),icon:"arrow-box-down",size:"md",variant:"ghost",renderLink:(0,r.jsx)("a",{"aria-label":(0,d.t)("download"),href:_.url,target:"_blank",rel:"noopener noreferrer",download:_.filename})}),(0,r.jsx)(s.K,{"aria-label":(0,d.t)("close"),icon:"cross",size:"md",onClick:function(){return f(!1)},variant:"ghost"})]})]}),(0,r.jsx)("div",{className:"flex min-h-0 flex-1 items-center justify-between",children:j?(0,r.jsx)(a.F.Root,{ref:m,activeIndex:h,onActiveIndexChange:x,"aria-label":(0,d.t)("tiptap.attachments"),align:"center",children:o.map(function(e,t){return(0,r.jsx)(a.F.Slide,{children:(0,r.jsx)(g,{attachment:e,isActive:t===h})},"".concat(e.url,"-").concat(e.filename))})}):(0,r.jsx)(g,{attachment:_,isActive:!0})})]})}):null},j=n(737225),_=n(684716),w=n(674251),O=n(428266),S=n(973646),P=function(e){var t=e.direction,n=e.onClick;return(0,r.jsx)("button",{type:"button",className:"bg-primary focus-visible:!outline-secondary flex size-12 items-center justify-center rounded-full shadow focus-visible:!outline focus-visible:!outline-2 focus-visible:!outline-offset-2",onClick:n,children:(0,r.jsx)(S.In,{size:20,type:"20-arrow-left",className:"right"==(void 0===t?"right":t)?"rotate-180":""})})};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var I=function(e){var t,n=e.attachments,i=void 0===n?[]:n,a=e.startIndex,s=void 0===a?0:a,l=k((0,u.useState)(s),2),c=l[0],h=l[1],g=k((0,u.useState)(!1),2),v=g[0],x=g[1],S=(0,o.hS)();(0,u.useEffect)(function(){S.visible&&0!==i.length&&h(Math.min(s,i.length-1))},[i.length,S.visible,s]);var C=c<i.length-1,I=c>0,N=function(){return C&&h(c+1)},A=function(){return I&&h(c-1)},E=i[c]||i[0],R=(null==E?void 0:E.image_variants)||{},L=(null==E?void 0:E.content_type)||"",D=m.T.isPDF(L),T=m.T.isImage(L),M=!!(null==(t=E.metadata)?void 0:t.voice_message),F=m.T.isNativelySupportedVideo(L);return((0,_.vC)("left",A,{enabled:I},[I,c,i]),(0,_.vC)("right",N,{enabled:C},[C,c,i]),(0,u.useEffect)(function(){T&&x(!1)},[E,T]),E)?(0,r.jsxs)(j.aF,{isOpen:S.visible,onClose:function(){return S.remove()},title:E.filename,children:[(0,r.jsx)(j.aF.Overlay,{}),(0,r.jsxs)(j.aF.Content,{size:"full",children:[(0,r.jsxs)(j.aF.Header,{children:[(0,r.jsx)(w.o.LabelMd,{weight:"medium",children:E.filename}),(0,r.jsxs)(j.aF.HeaderActions,{className:"items-center",children:[(0,r.jsx)(O.K,{ariaLabel:(0,d.t)("download"),name:"download",className:"ml-2 focus:outline-none",iconClassName:"!text-dark",buttonSize:28,iconSize:16,onClick:function(){window.open(E.url,"_blank")},variant:"primary"}),(0,r.jsx)(j.aF.CloseButton,{onClick:S.remove})]})]}),(0,r.jsxs)(j.aF.Body,{className:"flex items-center justify-between",children:[(0,r.jsx)("div",{className:"w-16",children:I&&(0,r.jsx)(P,{direction:"left",onClick:A})}),D&&(0,r.jsx)(f.n,{className:"size-full",src:E.url}),(0,r.jsxs)("div",{className:"flex max-h-full flex-1 select-none justify-center",children:[F&&!M&&(0,r.jsx)(y.u,{src:E.url,type:E.content_type,controlsList:"play",autoPlay:!0,poster:R.thumbnail}),T&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{loading:"eager",alt:"",className:(0,b.x)("object-contain",{hidden:!v}),src:E.url,onLoad:function(){return x(!0)},onError:function(){return x(!0)}}),!v&&(0,r.jsx)(p.a,{center:!0})]})]}),(0,r.jsx)("div",{className:"w-16",children:C&&(0,r.jsx)(P,{direction:"right",onClick:N})})]})]})]}):null};function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var A=o.PT.create(function(e){return(0,r.jsx)(I,N({},e))}),E=o.PT.create(function(e){var t,n,i=(0,o.hS)();return(0,r.jsx)(x,(t=N({},e),n=n={open:i.visible,onOpenChange:function(e){e||i.hide()}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}),R=function(){var e=(0,i.c)().isCircleV4;return(0,o.hS)(e?E:A)}},252761(e,t,n){"use strict";var r=n(391426),o=n(417980),i=n(66108),a=function(e){var t=e.isOpen,n=e.onClose,a=e.onConfirm,s=e.confirmText,l=e.disabled;return(0,r.jsx)(i.R,{isOpen:void 0!==t&&t,onClose:n,onConfirm:a,confirmText:s,confirmVariant:"danger",title:(0,o.t)("remove"),disabled:void 0!==l&&l,cancelText:(0,o.t)("cancel"),children:(0,r.jsx)("p",{children:(0,o.t)("remove_member_confirm")})})};n.d(t,{v:()=>a})},486338(e,t,n){"use strict";var r=n(391426),o=n(974618),i=n(355104),a=n(933578),s=n(620708),l=n(177631),c=n(652392),u=n(665667),d=(0,s.Z)(function(){return Promise.all([n.e(24014),n.e(69947),n.e(69870),n.e(41266),n.e(76810),n.e(45208),n.e(34029),n.e(60616),n.e(83312),n.e(74005)]).then(n.bind(n,782228)).then(function(e){return{default:e.EventsV3}})}),p=(0,s.Z)(function(){return Promise.all([n.e(24014),n.e(69947),n.e(69870),n.e(45208),n.e(34029),n.e(60616),n.e(83312),n.e(86168)]).then(n.bind(n,370603)).then(function(e){return{default:e.CompassEventModal}})}),f=function(e){var t=e.onSuccess,n=e.spaceId,s=(0,o.hS)(),f=s.visible,m=s.hide,b=s.remove;return(0,i.c)().isCircleV4?(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(u.K,{isOpen:f,onClose:m}),children:(0,r.jsx)(p,{isOpen:f,onClose:m,onSuccess:t,spaceId:n})}):(0,r.jsx)(c.V,{isOpen:f,shouldShowCloseButton:!1,contentPortalId:"events",onClose:b,children:(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(l.D,{}),children:(0,r.jsx)(d,{isOpen:f,onClose:m,onSuccess:t,spaceId:n,shouldClearEventStateOnHide:!0})})})},m=o.PT.create(function(e){var t=e.onSuccess,n=e.spaceId;return(0,r.jsx)(f,{onSuccess:t,spaceId:n})}),b=function(){return(0,o.hS)(m)};n.d(t,{N:()=>b})},454776(e,t,n){"use strict";n.d(t,{H:()=>m});var r=n(391426),o=n(974618),i=n(652392),a=n(933578),s=n(620708),l=n(177631),c=(0,s.Z)(function(){return Promise.all([n.e(76810),n.e(45208),n.e(45423)]).then(n.bind(n,293338)).then(function(e){return{default:e.LiveFormV3Content}})}),u=function(e){var t=e.isOpen,n=e.onClose;return(0,r.jsx)(i.V,{isOpen:t,onClose:n,shouldShowCloseButton:!0,contentPortalId:"live",children:(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(l.D,{}),children:(0,r.jsx)(c,{onClose:n})})})},d=n(387864),p=function(){var e=(0,o.hS)(),t=e.visible,n=e.hide;return(0,r.jsx)(d.t,{children:(0,r.jsx)(u,{isOpen:t,onClose:n})})},f=o.PT.create(function(){return(0,r.jsx)(p,{})}),m=function(){return(0,o.hS)(f)}},461795(e,t,n){"use strict";var r=n(391426),o=n(791009),i=n(892907),a=n(933578),s=n(417980),l=n(974618),c="discard_changes_modal",u=function(e){var t=e.onConfirm,n=e.onCancel,u=e.title,d=e.description,p=e.confirmLabel,f=e.cancelLabel,m=(0,l.hS)(),b=(0,a.useRef)(!1);return(0,r.jsx)(o.a.Root,{open:m.visible,onOpenChange:function(e){e||(b.current||(null==n||n(),m.hide()),b.current=!1)},size:"sm",children:(0,r.jsxs)(o.a.Content,{children:[(0,r.jsx)(o.a.Header,{title:null!=u?u:(0,s.t)([c,"title"]),showCloseButton:!0}),(0,r.jsx)(o.a.Body,{children:(0,r.jsx)(i.o5,{variant:"body-sm",children:null!=d?d:(0,s.t)([c,"description"])})}),(0,r.jsx)(o.a.Footer,{secondaryAction:{label:null!=f?f:(0,s.t)("cancel")},primaryAction:{label:null!=p?p:(0,s.t)([c,"confirm"]),variant:"destructive",onClick:function(){b.current=!0,t(),m.hide()}}})]})})},d=l.PT.create(function(e){return(0,r.jsx)(u,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))}),p=function(){return(0,l.hS)(d)};n.d(t,{u:()=>p})},19893(e,t,n){"use strict";n.d(t,{$:()=>I});var r=n(391426),o=n(974618),i=n(231127),a=n(927561),s=n(257957),l=n(568316),c=n(68176),u=n(451430),d=n(258752),p=n(417980),f=n(717526),m=function(e){var t=e.post,n=e.onSuccess,r=(0,f.d)(),o=r.success,i=r.error,a=(0,d.n_)({mutationFn:function(e){return(0,c.xi)({spaceId:t.space_id,postSlug:t.slug,payload:{post:{space_id:e.space_id,send_notifications:e.send_notifications}}})},onSuccess:function(e){o((0,p.t)("duplicated_successfully")),(0,u.isFunction)(n)&&n(e)},onError:function(){i((0,p.t)("duplication_failed"))}});return{duplicate:a.mutate,isDuplicating:a.isPending}},b=n(339551),y=n(328187),h=n(791009),g=n(471600),v="duplicate-image-post-modal-form",x=function(e){var t=e.open,n=e.onOpenChange,o=e.post,i=e.onSuccess,c=(0,b.E)(),d=c.isLoading,f
1=c.helpers,x=m({post:o,onSuccess:function(e){(0,u.isFunction)(i)&&i(e),n(!1)}}),j=x.duplicate,_=x.isDuplicating,w=f.imageSpacesWithPostCreationAllowed();return(0,r.jsx)(h.a.Root,{open:t,onOpenChange:n,size:"md",children:(0,r.jsxs)(h.a.Content,{children:[(0,r.jsx)(h.a.Header,{title:(0,p.t)("duplicate_post")}),(0,r.jsx)(h.a.Body,{children:(0,r.jsxs)(a.l,{id:v,defaultValues:{space_id:o.space_id,send_notifications:!1},onSubmit:function(e){j(e)},children:[(0,r.jsx)(a.l.Item,{name:"space_id",label:(0,p.t)("space"),description:(0,p.t)("duplicate_post_to_space"),rules:{required:(0,p.t)("events.create.form.space_required_error")},isFirstChild:!0,hideBorder:!0,fullWidth:!0,children:d?(0,r.jsx)("div",{className:"flex min-h-11 items-center py-2",children:(0,r.jsx)(s.a,{})}):(0,r.jsx)(g.$,{name:"space_id",spaces:w})}),(0,y.Rj)(o)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.o.LabelXs,{color:"text-light",children:(0,p.t)("comments_wont_be_duplicated")}),(0,r.jsx)(a.l.Item,{name:"send_notifications",label:(0,p.t)("duplicate_post_send_notifications"),hideDescription:!0,inlineReverse:!0,hideBorder:!0,fullWidth:!0,children:(0,r.jsx)(a.l.ToggleSwitch,{name:"send_notifications",variant:"small"})})]})]})}),(0,r.jsx)(h.a.Footer,{secondaryAction:{label:(0,p.t)("cancel"),onClick:function(){return n(!1)}},primaryAction:{label:_?(0,p.t)("duplicating"):(0,p.t)("duplicate"),type:"submit",form:v,disabled:d,loading:_}})]})})},j=n(251334),_=n(387099),w=n(429273),O=function(e){var t=e.post,n=e.spaces,o=e.isOpen,i=e.isLoading,s=e.isSubmitting,c=e.onSubmit,u=e.onClose;return i?null:(0,r.jsx)(j.a,{title:(0,p.t)("duplicate_post"),variant:"default",show:o,onClose:u,overflowVisible:!0,children:(0,r.jsxs)(a.l,{defaultValues:{space_id:t.space_id,send_notifications:!1},onSubmit:function(e){return c(e)},children:[(0,r.jsx)(a.l.Item,{name:"space_id",label:(0,p.t)("space"),description:(0,p.t)("duplicate_post_to_space"),rules:{required:(0,p.t)("events.create.form.space_required_error")},hideBorder:!0,fullWidth:!0,children:(0,r.jsx)(w.r,{name:"space_id",variant:"form-input",containerClassname:"mt-2",spaces:n})}),(0,y.Rj)(t)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.o.LabelXs,{color:"text-light",children:(0,p.t)("comments_wont_be_duplicated")}),(0,r.jsx)(a.l.Item,{name:"send_notifications",label:(0,p.t)("duplicate_post_send_notifications"),hideDescription:!0,inlineReverse:!0,hideBorder:!0,fullWidth:!0,children:(0,r.jsx)(a.l.ToggleSwitch,{name:"send_notifications",variant:"small"})})]}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(_.$,{type:"submit",variant:"primary",disabled:s,children:s?(0,p.t)("duplicating"):(0,p.t)("duplicate")})})]})})},S=function(e){var t=e.post,n=e.onSuccess,i=(0,o.hS)(),a=(0,b.E)(),s=a.isLoading,l=a.helpers,c=m({post:t,onSuccess:function(e){(0,u.isFunction)(n)&&n(e),i.remove()}}),d=c.duplicate,p=c.isDuplicating;return(0,r.jsx)(O,{post:t,spaces:l.imageSpacesWithPostCreationAllowed(),isOpen:i.visible,isLoading:s,isSubmitting:p,onSubmit:d,onClose:i.remove})};function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var C=o.PT.create(function(e){return(0,r.jsx)(S,P({},e))}),k=o.PT.create(function(e){var t,n,i=(0,o.hS)();return(0,r.jsx)(x,(t=P({},e),n=n={open:i.visible,onOpenChange:function(e){e||i.hide()}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}),I=function(){var e=(0,i.T)("circle_v4_modals_enabled");return(0,o.hS)(e?k:C)}},41558(e,t,n){"use strict";var r=n(391426),o=n(974618),i=n(355104),a=n(933578),s=n(620708),l=n(177631),c=n(652392),u=n(665667),d=(0,s.Z)(function(){return Promise.all([n.e(24014),n.e(69947),n.e(69870),n.e(41266),n.e(76810),n.e(45208),n.e(34029),n.e(60616),n.e(83312),n.e(74005)]).then(n.bind(n,782228)).then(function(e){return{default:e.EventsV3}})}),p=(0,s.Z)(function(){return Promise.all([n.e(24014),n.e(69947),n.e(69870),n.e(45208),n.e(34029),n.e(60616),n.e(83312),n.e(86168)]).then(n.bind(n,370603)).then(function(e){return{default:e.CompassEventModal}})}),f=function(e){var t=e.event,n=e.defaultSection,s=e.locationType,f=e.onSuccess,m=(0,o.hS)(),b=m.visible,y=m.hide,h=m.remove;return(0,i.c)().isCircleV4?(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(u.K,{isOpen:b,onClose:y}),children:(0,r.jsx)(p,{isOpen:b,onClose:y,event:t,defaultSection:n,onSuccess:f})}):(0,r.jsx)(c.V,{isOpen:b,shouldShowCloseButton:!1,contentPortalId:"events",onClose:h,children:(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(l.D,{}),children:(0,r.jsx)(d,{isOpen:b,onClose:y,event:t,locationType:s,initialSection:n})})})},m=o.PT.create(function(e){var t=e.event,n=e.defaultSection,o=e.locationType,i=e.onSuccess;return(0,r.jsx)(f,{event:t,defaultSection:n,locationType:o,onSuccess:i})}),b=function(){return(0,o.hS)(m)};n.d(t,{T:()=>b})}
1,953805(e,t,n){"use strict";n.d(t,{c:()=>eB});var r=n(809061),o=n(391426),i=n(927561),a=n(257957),s=n(334696),l=n(453602),c=n(526842),u=n(748467),d=n(634893),p=n(417980),f="space_groups.form.edit",m=function(){return(0,o.jsx)(d.y,{title:(0,p.t)("space_groups.form.moderators"),children:(0,o.jsx)(i.l.Item,{translationRoot:f,name:"moderator_community_member_ids",tooltipText:(0,p.t)("".concat(f,".moderator_community_member_ids_tooltip")),hideDescription:!0,hideBorder:!0,fullWidth:!0,isFirstChild:!0,children:(0,o.jsx)(u.Y,{name:"moderator_community_member_ids",variant:"tags",excludeAdmins:!0})})})},b=function(e){var t=e.formId,n=e.onSubmit,r=e.defaultValues,u=e.loading;return void 0!==u&&u?(0,o.jsx)(a.a,{}):(0,o.jsxs)(i.l,{id:t,onSubmit:n,defaultValues:r,formClassName:"flex flex-col gap-4",children:[(0,o.jsx)(s.h,{}),(0,o.jsx)(m,{}),(0,o.jsx)(l.x,{}),(0,o.jsx)(c.X,{})]})},y=n(913207),h=n(570310),g=n(605274),v=n(739042),x=n(791009),j=n(133626),_=n(933578),w="details",O="members",S=n(359641),P=n(519104),C=n(258752),k=n(111582),I=n(717526),N=function(e){var t,n,r=e.spaceGroup,o=e.onSuccess,i=(0,I.d)(),a=i.success,s=i.error,l=(0,P.Z)(),c=(0,S.R)(r.id).refetch;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},(0,C.n_)({mutationFn:function(e){var t=e.moderator_community_member_ids,n=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["moderator_community_member_ids"]);return k.K.update(r.id,{space_group:n,moderator_community_member_ids:t})},onSuccess:function(e){a((0,p.t)("space_groups.form.edit.saved_successfully")),c(),o(),l({to:"/s/$spaceGroupSlug",params:{spaceGroupSlug:e.slug}})},onError:function(){return s((0,p.t)("space_groups.form.create.save_error"))}})),n=n={spaceGroup:r},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t},A=n(337162),E=n(14930);function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function L(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var D=function(e){var t,n=e.spaceGroup,r=e.onClose,o=function(e){if(Array.isArray(e))return e}(t=(0,E.C)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return R(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return R(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1],s=(0,S.R)(null==n?void 0:n.id),l=s.data,c=s.isLoading,u=(0,A.t)(),d=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},n,void 0===l?{}:l),p=null==d?void 0:d.active_members_count,f=N({spaceGroup:d,onSuccess:r}),m=f.mutateAsync;return{activeSpaceGroupMembersCount:p,isEditing:f.isLoading,isLoadingSpaceGroupResource:c,onClose:r,onSubmit:function(e){var t;return(t=function(){var t,n;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:return[4,m(e)];case 1:return r.sent(),null==u||null==(n=u.actions)||null==(t=n.refresh)||t.call(n),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){L(i,r,o,a,s,"next",e)}function s(e){L(i,r,o,a,s,"throw",e)}a(void 0)})})()},shouldShowConfirmDeleteModal:i,spaceGroup:d,toggleShouldShowConfirmDeleteModal:a}},T=n(346286),M=n(44537),F=n(190569),K=n(915779),B=n(230763),q=n(6418),U=n(844842),z=n(955015),W=n(74175),$=function(e,t){var n,r,o,i=null!=(n=e.moderating_space_group_ids)?n:[];return(null==(r=e.roles)?void 0:r.admin)?"Admin":(null==(o=e.roles)?void 0:o.moderator)&&i.includes(t)?"Moderator":"Member"},V={Admin:function(){return(0,p.t)("spaces.form.edit.members.admin")},Moderator:function(){return(0,p.t)("spaces.form.edit.members.moderator")},Member:function(){return(0,p.t)("spaces.form.edit.members.member")}},H=function(e){var t,n=e.row,r=e.spaceGroupId,i=e.onRoleChange,a=$(n.original,r),s=(0,B.Od)().currentCommunityMember;if("Admin"===a||!(0,q.V8)(s))return(0,o.jsx)(z.E,{variant:"secondary",label:V[a]()});var l=[{label:(0,p.t)("spaces.form.edit.members.moderator"),value:"Moderator"},{label:(0,p.t)("spaces.form.edit.members.member"),value:"Member"}],c=null!=(t=l.find(function(e){return e.value===a}))?t:null;return(0,o.jsx)(W.t,{options:l,value:c,onValueChange:function(e){e&&e.value!==a&&i(String(n.original.id),e.value)},"aria-label":(0,p.t)(["space_groups.form.edit.members","role"])})},G=function(e){var t=e.onRoleChange,n=e.spaceGroupId;return[{field:"name",get header(){return(0,p.t)(["space_groups.form.edit.members","name"])},width:"minmax(180px, 2fr)",startContent:function(e){var t;return(0,o.jsx)(U.t,{src:null!=(t=e.avatar_url)?t:void 0,name:e.name,size:"sm"})},description:function(e){return e.email}},{field:"roles",get header(){return(0,p.t)(["space_groups.form.edit.members","role"])},width:"minmax(140px, 1.5fr)",cell:function(e){var r=e.row;return(0,o.jsx)(H,{row:r,spaceGroupId:n,onRoleChange:t})}}]},Z=n(474330),Q=n(974618),Y=n(513963),J=n(51730),X=function(e){var t,n;return(0,C.n_)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={mutationFn:function(e){var t=e.spaceGroupId,n=e.memberId;return(0,J.Dc)(K.iK.spaceGroups.deleteMember({spaceGroupId:t,memberId:n}))}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},ee=n(892907),et=n(274685),en=function(e){var t=e.spaceGroupId,n=e.memberId,r=e.queryKey,i=(0,Q.hS)(),a=(0,I.d)(),s=(0,et.jE)(),l=(0,S.R)(t).refetch,c=X({onError:function(e){a.error(e.message)},onSuccess:function(){r&&s.invalidateQueries({queryKey:r}),s.invalidateQueries({queryKey:["community-members"]}),null==l||l(),a.success((0,p.t)("space_groups.form.edit.members.members_removed")),i.hide()}}),u=c.mutate,d=c.isPending,f=d?(0,p.t)("space_groups.form.edit.members.removing"):(0,p.t)("space_groups.form.edit.members.remove_member");return(0,o.jsx)(x.a.Root,{open:i.visible,onOpenChange:function(e){e||d||i.hide()},size:"md",children:(0,o.jsxs)(x.a.Content,{children:[(0,o.jsx)(x.a.Header,{title:(0,p.t)("space_groups.form.edit.members.remove_from_space_group"),showCloseButton:!0}),(0,o.jsx)(x.a.Body,{children:(0,o.jsx)(ee.o5,{variant:"body-md",className:"whitespace-pre-line",children:(0,p.t)("space_groups.form.edit.members.remove_from_space_group_description")})}),(0,o.jsx)(x.a.Footer,{secondaryAction:{label:(0,p.t)("cancel")},primaryAction:{label:f,variant:"destructive",onClick:function(){u({spaceGroupId:t,memberId:n})},loading:d,disabled:d,shouldCloseModal:!1}})]})})},er=Q.PT.create(function(e){return(0,o.jsx)(en,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))}),eo=n(523411);function ei(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var ea=function(e){var t,n;return(0,C.n_)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={mutationFn:function(e){var t,n=e.spaceGroupId,r=e.memberId,o=e.isModerator;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){return[2,(0,J.kS)(K.iK.spaceGroups.updateMemberModerator({memberId:r,spaceGroupId:n}),{moderator:o})]})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){ei(i,r,o,a,s,"next",e)}function s(e){ei(i,r,o,a,s,"throw",e)}a(void 0)})})()}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},es=function(e){var t=e.queryKey,n=e.spaceGroupId,r=(0,I.d)(),o=(0,et.jE)(),i=(0,Q.hS)(),a=(0,B.Od)().currentCommunityMember,s=(0,eo.w)(),l=s.showOwnProfileEdit,c=s.showMemberProfileEdit,u=(0,Y.X)(),d=(0,Q.hS)(er),f=(0,q.V8)(a),m=ea({onError:function(e){r.error(e.message)},onSuccess:function(){o.invalidateQueries({queryKey:t}),r.success((0,p.t)("space_groups.form.edit.members.changed_role"))}}).mutate,b=(0,_.useCallback)(function(e){if(String(null==a?void 0:a.id)===String(e.id))l();else{var t,n;c({member:(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={id:Number(e.id),public_uid:e.public_uid},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)})}i.hide()},[null==a?void 0:a.id,i,l,c]),y=(0,_.useCallback)(function(){u.show({spaceGroupId:n,queryKey:t})},[u,t,n]),h=(0,_.useCallback)(function(e){d.show({spaceGroupId:n,memberId:Number(e),queryKey:t})},[t,d,n]),g=(0,_.useCallback)(function(e,t){t!==Z.g.ADMIN&&m({spaceGroupId:n,memberId:Number(e),isModerator:t===Z.g.MODERATOR})},[n,m]);return{addMemberButtonLabel:(0,p.t)("space_groups.form.edit.members.add_members"),handleChangeMemberRole:g,handleEditMember:b,handleOpenAddMemberModal:y,handleOpenRemoveConfirmation:h,isAdmin:f}},el=n(963652),ec=n(450225);function eu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ed=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,_.useState)(""))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eu(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eu(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=(0,_.useMemo)(function(){var t=[{key:"space_groups",value:e.slug}];return r&&t.push({key:"name_and_email",value:r,filter_type:"contains"}),t},[r,e.slug]),a=(0,ec.nR)("crm_clickhouse_space_members_search_enabled");return{infiniteQuery:(0,el.ms)({filters:i,sort:el.pC.ROLE,perPage:20,isClickHouseSearchEnabled:a,options:{keepPreviousData:!0}}),query:r,setQuery:o}};function ep(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ef=function(e){var t=e.isAdmin,n=e.onEditMember,r=e.onRemoveMember;return(0,_.useMemo)(function(){var e;return[{icon:"pencil",get label(){return(0,p.t)("spaces.form.edit.members.edit_member")},showInMenu:!0,hidden:function(){return!t},onClick:function(e){return n(e)}}].concat(function(e){if(Array.isArray(e))return ep(e)}(e=t?["divider"]:[])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return ep(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ep(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[{icon:"trash-can",get label(){return(0,p.t)(["space_groups.form.edit.members","remove_from_space_group"])},showInMenu:!0,danger:!0,hidden:function(){return!t},onClick:function(e){return r(String(e.id))}}])},[t,n,r])},em=function(e){var t=ed(e),n=t.infiniteQuery,r=t.query,o=t.setQuery,i=es({queryKey:n.queryKey,spaceGroupId:e.id}),a=i.addMemberButtonLabel,s=i.handleChangeMemberRole,l=i.handleEditMember,c=i.handleOpenAddMemberModal,u=i.handleOpenRemoveConfirmation,d=i.isAdmin,p=(0,_.useMemo)(function(){return G({onRoleChange:s,spaceGroupId:e.id})}
1,[s,e.id]),f=ef({isAdmin:d,onEditMember:l,onRemoveMember:u});return{addMemberButtonLabel:a,columns:p,handleOpenAddMemberModal:c,infiniteQuery:n,isAdmin:d,query:r,rowActions:f,setQuery:o}},eb=function(e){var t=e.addMemberButtonLabel,n=e.onAddMembers;return(0,o.jsxs)("div",{className:"flex flex-col items-center gap-6 py-12 text-center",children:[(0,o.jsxs)("div",{className:"flex max-w-sm flex-col items-center gap-3",children:[(0,o.jsx)(ee.o5,{variant:"heading-md",children:(0,p.t)(["space_groups.form.edit.members","no_members"])}),(0,o.jsx)(ee.o5,{variant:"body-sm",color:"secondary",children:(0,p.t)(["space_groups.form.edit.members","there_are_no_members"])})]}),(0,o.jsx)(v.$,{variant:"outline",onClick:n,children:t})]})},ey=function(e){var t=e.spaceGroup,n=em(t),r=n.addMemberButtonLabel,i=n.columns,a=n.handleOpenAddMemberModal,s=n.infiniteQuery,l=n.isAdmin,c=n.query,u=n.rowActions,d=n.setQuery,f=(0,F.W)().downloadMembersCSV,m=(0,g.nZ)(),b=!s.isLoading&&!s.isFetching&&!c&&0===s.totalQueryMembers,y=c?(0,p.t)("space_groups.form.edit.members.no_members_found_for_term",{member_search_term:c}):(0,p.t)("settings.manage_members.no_members_found");return(0,o.jsx)("div",{className:"flex w-full flex-col gap-4 pb-6",children:b?(0,o.jsx)(eb,{addMemberButtonLabel:r,onAddMembers:a}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center",children:[(0,o.jsx)(M.x,{placeholder:(0,p.t)("space_groups.search_members"),onChange:d}),(0,o.jsxs)("div",{className:(0,h.x)("grid w-full gap-3 md:flex md:w-auto",l?"grid-cols-2":"grid-cols-1"),children:[l&&(0,o.jsx)(v.$,{variant:"ghost",fullWidth:!m,onClick:function(){return f({downloadURL:K.iK.spaceGroups.exportMembers({id:t.id})})},children:(0,p.t)("download_csv")}),(0,o.jsx)(v.$,{variant:"primary",fullWidth:!m,onClick:a,children:r})]})]}),(0,o.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,o.jsx)(T.N,{infiniteQuery:s,columns:i,rowActions:u,getRowId:function(e){return String(e.id)},emptyOverlay:y,rowSize:"auto"},"".concat(t.id,":").concat(c))})]})})},eh="edit-space-group-form";function eg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ev=n(737225),ex=n(560651),ej=n(70899),e_=n(348413),ew=n(568316),eO=n(938372),eS=n.n(eO),eP=function(){var e=(0,ev.X9)().contentPortalElement;return(0,o.jsxs)("div",{className:"mt-8",children:[(0,o.jsx)(ew.o.TitleSm,{weight:"semibold",children:(0,p.t)("space_groups.form.moderators")}),(0,o.jsx)(i.l.Item,{translationRoot:"space_groups.form.edit",name:"moderator_community_member_ids",tooltipText:(0,p.t)("space_groups.form.edit.moderator_community_member_ids_tooltip"),hideDescription:!0,hideBorder:!0,fullWidth:!0,children:(0,o.jsx)(u.Y,{name:"moderator_community_member_ids",variant:"tags",excludeAdmins:!0,appendTo:e})})]})};eP.propTypes={moderators:eS().array};var eC=function(e){var t=e.formId,n=e.onSubmit,r=e.defaultValues,s=e.loading;return void 0!==s&&s?(0,o.jsx)(a.a,{}):(0,o.jsx)(i.l,{id:t,onSubmit:n,defaultValues:r,className:"mx-1 h-full",children:(0,o.jsxs)("div",{className:"flex-1",children:[(0,o.jsx)(e_.h,{}),(0,o.jsx)(eP,{}),(0,o.jsx)(ej.D,{})]})})},ek=n(517338),eI=n(387099),eN=n(175508),eA=n(983761),eE=n(252761),eR=n(544756),eL=n(583454);function eD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eD(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eM=function(e){var t=e.spaceGroup,n=(0,I.d)(),r=(0,et.jE)(),i=eT((0,_.useState)(!1),2),s=i[0],l=i[1],c=eT((0,_.useState)(!1),2),u=c[0],d=c[1],f=eT((0,_.useState)(""),2),m=f[0],b=f[1],y=eT((0,_.useState)(null),2),h=y[0],g=y[1],v=(0,Q.hS)(),x=(0,Y.X)(),j=(0,eo.w)().showMemberProfileEdit,w=(0,eL.ms)({filters:{space_groups:t.slug},sort:eL.pC.ROLE,query:m}
1),O=w.isLoading,S=w.hasNextPage,P=w.totalMembers,C=w.fetchNextPage,k=w.members,N=w.queryKey,A=X({onError:function(e){n.error(e.message)},onSuccess:function(){r.invalidateQueries({queryKey:N}),n.success((0,p.t)("space_groups.form.edit.members.members_removed"))},onSettled:function(){l(!1),d(!1),g(null)}}).mutate,E=ea({onError:function(e){n.error(e.message)},onSuccess:function(){r.invalidateQueries({queryKey:N}),n.success((0,p.t)("space_groups.form.edit.members.changed_role"))}}).mutate,R=u?(0,p.t)("space_groups.form.edit.members.removing"):(0,p.t)("space_groups.form.edit.members.remove_member");if(O)return(0,o.jsx)(a.a,{});var L=k.map(function(e){var n,r=e.id,o=e.avatar_url,i=e.name,a=e.email,s=e.roles,l=e.moderating_space_group_ids;return{id:r,avatarUrl:o,name:i,email:a,public_uid:e.public_uid,role:(n=t.id,s.admin?"Admin":s.moderator&&l.includes(n)?"Moderator":"Member")}});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"text-secondary flex justify-between border-b border-primary px-8 py-3",children:[(0,o.jsx)(eN.X,{onSearch:b,placeholder:(0,p.t)("space_groups.search_members")}),(0,o.jsx)(eA.w,{spaceGroupId:t.id})]}),(0,o.jsx)("div",{className:"h-full overflow-auto px-4 py-2",children:(0,o.jsx)(eR.Y,{searchTerm:m,members:L,dataLength:P,next:C,hasMore:S,onEdit:function(e){j({member:e}),v.hide()},onRemove:function(e){g(e),l(!0)},onAdd:function(){x.show({spaceGroupId:t.id})},onRoleChange:function(e,n){var r=n===Z.g.MODERATOR;E({spaceGroupId:t.id,memberId:e,isModerator:r})},variant:"space-group-members",scrollableTarget:"scrollable-content"})}),(0,o.jsx)(eE.v,{isOpen:s,onClose:function(){return l(!1)},onConfirm:function(){h&&s&&(d(!0),A({spaceGroupId:t.id,memberId:h}))},disabled:u,confirmText:R})]})};function eF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eK=["Details","Members"],eB=(0,r.F)(function(e){var t,n=e.spaceGroup,r=e.tab,i=e.open,a=e.onOpenChange,s=function(e){if(Array.isArray(e))return e}(t=(0,_.useState)((void 0===r?"Details":r)==="Members"?O:w))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eg(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eg(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1],u=(0,g.nZ)(),d=D({spaceGroup:n,onClose:function(){return a(!1)}}),f=d.activeSpaceGroupMembersCount,m=d.isEditing,S=d.isLoadingSpaceGroupResource,P=d.onSubmit,C=d.shouldShowConfirmDeleteModal,k=d.spaceGroup,I=d.toggleShouldShowConfirmDeleteModal,N=[{value:w,label:(0,p.t)("space_groups.details")},{value:O,label:(0,p.t)("space_groups.members"),badge:null!=f?String(f):void 0}];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.a.Root,{open:i,onOpenChange:a,size:"lg",position:"top",children:(0,o.jsxs)(x.a.Content,{children:[(0,o.jsx)(x.a.Header,{title:(0,p.t)("space_groups.form.edit.title")}),(0,o.jsx)(x.a.Body,{children:(0,o.jsx)("div",{id:"scrollable-content",className:(0,h.x)("h-full",{"px-0 py-0":l===O}),children:(0,o.jsx)(j.t.Root,{tabs:N,size:"md",selectedValue:l,onValueChange:function(e){return c(e)},children:(0,o.jsxs)("div",{className:"mt-4",children:[(0,o.jsx)(j.t.Panel,{value:w,children:(0,o.jsx)(b,{formId:eh,onSubmit:P,defaultValues:k,loading:S})}),(0,o.jsx)(j.t.Panel,{value:O,children:(0,o.jsx)(ey,{spaceGroup:k})})]})})})}),l===w&&(0,o.jsx)(x.a.Footer,{secondaryAction:{label:(0,p.t)("cancel"),onClick:function(){return a(!1)}},primaryAction:{label:m?(0,p.t)("space_groups.form.edit.submitting"):(0,p.t)("save_changes"),type:"submit",form:eh,loading:m},startContent:u?(0,o.jsx)(v.$,{type:"button",variant:"destructive",onClick:I,children:(0,p.t)("space_groups.delete_space_group")}):void 0})]})}),(0,o.jsx)(y.S,{spaceGroupId:k.id,show:C,onClose:I,onSuccess:function(){return a(!1)}})]})},function(e){var t,n=e.spaceGroup,r=e.tab,i=void 0===r?eK[0]:r,a=function(e){if(Array.isArray(e))return e}(t=(0,_.useState)(i))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eF(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eF(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=a[0],l=a[1],c=(0,Q.hS)(),u=(0,g.qI)(),d=D({spaceGroup:n,onClose:function(){c.hide()}}),f=d.activeSpaceGroupMembersCount,m=d.isEditing,b=d.isLoadingSpaceGroupResource,v=d.onSubmit,x=d.shouldShowConfirmDeleteModal,j=d.spaceGroup,w=d.toggleShouldShowConfirmDeleteModal;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(ev.aF,{isOpen:c.visible,onClose:c.hide,contentPortalId:"edit-space-group-content-portal",title:(0,p.t)("space_groups.form.edit.title"),children:[(0,o.jsx)(ev.aF.Overlay,{}),(0,o.jsxs)(ev.aF.Content,{size:"xl",children:[(0,o.jsxs)(ev.aF.Header,{children:[(0,o.jsx)(ev.aF.Title,{size:"md",children:(0,p.t)("space_groups.form.edit.title")}),(0,o.jsx)(ev.aF.HeaderActions,{children:(0,o.jsx)(ev.aF.CloseButton,{onClick:c.hide})})]}),(0,o.jsx)(ev.aF.Body,{id:"scrollable-content",className:(0,h.x)({"px-0 py-0":"Members"===s}),children:(0,o.jsxs)(ex.o.Group,{selectedIndex:eK.indexOf(s),onChange:function(e){return l(eK[e])},children:[(0,o.jsxs)(ex.o.List,{children:[(0,o.jsx)(ex.o,{children:(0,p.t)("space_groups.details")}),(0,o.jsx)(ex.o,{children:(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,p.t)("space_groups.members")," ",null!=f&&(0,o.jsx)(ek.E,{square:!0,label:String(f),variant:"secondary",inverted:!0})]})})]}),(0,o.jsxs)(ex.o.Panels,{className:"mt-4",children:[(0,o.jsx)(ex.o.Panel,{children:(0,o.jsx)(eC,{formId:eh,onSubmit:v,defaultValues:j,loading:b})}),(0,o.jsx)(ex.o.Panel,{children:(0,o.jsx)(eM,{spaceGroup:j})})]})]})}),"Details"===s&&(0,o.jsxs)(ev.aF.Footer,{className:"flex w-full justify-between gap-4 md:gap-0",children:[(0,o.jsx)(eI.$,{type:"button",variant:"danger-outline",className:"hidden md:inline-block",onClick:w,children:(0,p.t)("space_groups.delete_space_group")}),(0,o.jsx)(eI.$,{type:"button",full:!0,variant:"secondary",className:"inline-block text-center md:hidden",onClick:function(){c.hide()},children:(0,p.t)("cancel")}),(0,o.jsx)(eI.$,{full:u,type:"submit",variant:"circle",form:eh,disabled:m,children:m?(0,p.t)("space_groups.form.edit.submitting"):(0,p.t)("save_changes")})]})]})]}),(0,o.jsx)(y.S,{spaceGroupId:j.id,show:x,onClose:w,onSuccess:c.hide})]})},{removeOnClose:!0})},204908(e,t,n){"use strict";var r=n(391426),o=n(568316),i=n(974618),a=n(230763),s=n(519104),l=n(927139),c=n.n(l),u=n(417980),d=n(66108),p=n(427056),f=function(e){var t=e.onClose,n=(0,i.hS)(),l=(0,s.Z)(),f=(0,a.Od)().currentCommunity,m=(0,p.U)({onEnableFlagSuccess:function(){var e=null==f?void 0:f.home_page_enabled;(c()(t)&&t(),n.hide(),e)?l({to:"/home"}):window.location.href="/"}}).enableFlag;return(0,r.jsx)(d.R,{isOpen:n.visible,onClose:n.hide,title:(0,u.t)("remove_onboarding_confirmation_modal.title"),cancelText:(0,u.t)("remove_onboarding_confirmation_modal.cancel"),confirmText:(0,u.t)("remove_onboarding_confirmation_modal.confirm"),onConfirm:function(){m("getting_started_checklist_hidden")},children:(0,r.jsx)(o.o.BodyMd,{children:(0,u.t)("remove_onboarding_confirmation_modal.description")})})},m=i.PT.create(function(e){var t=e.onClose;return(0,r.jsx)(f,{onClose:t})}),b=function(){return(0,i.hS)(m)};n.d(t,{h:()=>b})},525005(e,t,n){"use strict";n.d(t,{I:()=>tS});var r,o=n(391426),i=n(974618),a=n(931639),s=n(398061),l=n(319143),c=n(451430),u=n(417980),d=n(737225),p=n(933578),f=n(387099);function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b="upload_images",y="adjust_images",h="create_post",g="square",v="landscape",x="portrait",j=(m(r={},g,1),m(r,v,16/9),m(r,x,.8),r),_=n(698804);function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function O(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return w(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return w(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
1var S=function(e){return e.selectedFiles.forEach(function(e){return URL.revokeObjectURL(e.preview)}),{selectedFiles:[]}},P=(0,_.vt)(function(e){return{currentStep:b,isSubmitting:!1,isFormDirty:!1,isImagesDirty:!1,isScheduledBarPortalRendered:!1,galleryAspectRatio:null,selectedFiles:[],uploadedImages:[],setCurrentStep:function(t){return e({currentStep:t})},setIsSubmitting:function(t){return e({isSubmitting:t})},setIsFormDirty:function(t){return e({isFormDirty:t})},setIsImagesDirty:function(t){return e({isImagesDirty:t})},setIsScheduledBarPortalRendered:function(t){return e({isScheduledBarPortalRendered:t})},updateImage:function(t){e(function(e){var n=e.selectedFiles.findIndex(function(e){return e.preview===t.preview});return e.selectedFiles[n]=t,{selectedFiles:O(e.selectedFiles)}})},addSelectedFiles:function(t){e(function(e){return{selectedFiles:O(e.selectedFiles).concat(O(t))}})},setSelectedFiles:function(t){e({selectedFiles:t})},addUploadedImages:function(t){e(function(e){return{uploadedImages:O(e.uploadedImages).concat(O(t))}})},setUploadedImages:function(t){e({uploadedImages:t})},setGalleryAspectRatio:function(t){t<(j.portrait+j.square)/2?e({galleryAspectRatio:j.portrait}):t>(j.landscape+j.square)/2?e({galleryAspectRatio:j.landscape}):e({galleryAspectRatio:j.square})},resetSelectedFiles:function(){e(S)},reset:function(){e(function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},S(e)),n=n={currentStep:null,uploadedImages:[],galleryAspectRatio:null,isSubmitting:!1,isFormDirty:!1,isImagesDirty:!1,isScheduledBarPortalRendered:!1},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t})}}}),C=n(361596),k=n(568316),I=n(497184),N=n.n(I),A=n(428266),E=n(898666);function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var L=[{format:g,iconType:"16-image-square"},{format:x,iconType:"16-image-portrait"},{format:v,iconType:"16-image-landscape"}],D=function(){var e,t=P(),n=t.galleryAspectRatio,r=t.setGalleryAspectRatio,i=null==(e=Object.entries(j).find(function(e){return(function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return R(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return R(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1]===n}))?void 0:e[0],a="image_space.post_modal.steps.adjust_images.cropping_options";return(0,o.jsx)("div",{className:"text-default flex justify-between",children:L.map(function(e){var t=e.format,n=e.iconType;return(0,o.jsx)(E.$,{content:(0,u.t)("".concat(a,".").concat(t)),children:(0,o.jsx)(A.K,{onClick:function(){r(j[t])},className:N()({"bg-tertiary":i===t}),name:n,iconSize:16,buttonSize:28,iconClassName:N()({"!text-dark":i===t}),ariaLabel:(0,u.t)("".concat(a,".").concat(t))})},t)})})},T=n(266090);function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function K(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var B=function(e){var t,n=e.currentImage,r=function(e){if(Array.isArray(e))return e}(t=(0,p.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return M(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return M(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],a=r[1],s=P(),l=s.updateImage,u=s.galleryAspectRatio,d=s.setGalleryAspectRatio;return((0,p.useEffect)(function(){var e=new Image;e.src=n.preview,e.onload=function(){a(e)}},[n.preview]),(0,p.useEffect)(function(){!u&&i&&d(i.width/i.height)},[u,i]),i&&u)?(0,o.jsx)("div",{className:"relative flex aspect-video max-w-full grow cursor-pointer",children:(0,o.jsx)(T.Ay,{image:n.preview,crop:n.crop,aspect:u,zoom:n.zoom,onCropChange:function(e){e!==n.crop&&l(K(F({},(0,c.cloneDeep)(n)),{crop:e}))},onZoomChange:function(e){e!==n.zoom&&l(K(F({},(0,c.cloneDeep)(n)),{zoom:e}))},onCropComplete:function(e,t){l(K(F({},(0,c.cloneDeep)(n)),{croppedAreaPixels:t}))}})}):null},q=n(973646),U=n(898467),z=n(695520),W=n(348197),$=n(795317),V=n(605274),H=function(e){var t=e.onClick,n=e.index,r=e.currentImageIndex,i=!!(0,U.EF)().activeItem,a=(0,V.A5)();return(0,o.jsx)(A.K,{onClick:t,className:N()("bg-tertiary border-secondary outline-tertiary absolute -right-0.5 -top-0.5 z-10 hidden size-4 rounded-full border !p-0 outline outline-2",{"group-hover:!flex":!i},{"!flex":!a&&!i&&n===r}),buttonSize:16,iconClassName:"!text-dark",name:"16-close",ariaLabel:(0,u.t)("delete_image")})},G=function(e){var t,n=e.direction,r=e.scrollableContainerRef;null==r||null==(t=r.current)||t.scroll({left:(null==r?void 0:r.current.scrollLeft)+("left"===n?-200:200),behavior:"smooth"})},Z=function(e){var t=e.direction,n=e.scrollableContainerRef,r="left"===t,i="right"===t;return(0,o.jsxs)("div",{className:N()("absolute z-30 flex h-full items-center",{"-left-px":r,"-right-px":i}),children:[i&&(0,o.jsx)("div",{className:"from-primary h-full w-8 bg-gradient-to-l to-transparent"}),(0,o.jsx)("button",{type:"button",onClick:function(){return G({direction:t,scrollableContainerRef:n})},className:"bg-primary group flex h-full cursor-pointer items-center px-2 py-1",children:(0,o.jsx)(q.In,{size:16,className:N()({"-rotate-90":i,"rotate-90":r},"text-light group-hover:text-darkest"),type:"caret-down-bold"})}),r&&(0,o.jsx)("div",{className:"from-primary h-full w-8 bg-gradient-to-r to-transparent"})]})},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.noop,t=P().addSelectedFiles;return{handleFileSelection:function(n){t(n=n.map(function(e){return{file:e,preview:URL.createObjectURL(e),crop:{x:0,y:0},zoom:1}})),e()}}},Y=n(562986),J=n(717526),X=function(e){var t=e.handleFileSelection,n=e.selectedFiles,r=e.uploadedFilesCount,o=(0,J.d)(),i="image_space.post_modal.steps.upload_images.errors",a=10-r,s=function(e){e.reduce(function(e,t){var n=t.errors[0].code;return e.includes(n)||e.push(n),e},[]).forEach(function(e){var t={shouldShowCloseButton:!0,shouldUseProgress:!1};switch(e){case"file-invalid-type":return o.error((0,u.t)("".concat(i,".file_invalid_type")),t);case"file-too-large":return o.error((0,u.t)("".concat(i,".file_too_large")),t);case"too-many-files":return o.error((0,u.t)("".concat(i,".too_many_files"),{max_images:10}),t);default:return o.error((0,u.t)("".concat(i,".something_went_wrong")),t)}})},l=(0,Y.VB)({onDrop:function(e,r){r.length>0?s(r):parseInt(n.length)+parseInt(e.length)>a?s([{errors:[{code:"too-many-files"}]}]):t(e)},noClick:!0,accept:{"image/*":[".jpg",".jpeg",".png"]},maxFiles:a,maxSize:2e7,multiple:!0}
1),c=l.getRootProps,d=l.getInputProps,p=l.isDragAccept,f=l.isDragReject;return{getRootProps:c,getInputProps:d,isDragActive:p||f,open:l.open}},ee=function(){var e=P(),t=e.setSelectedFiles,n=e.selectedFiles;return{removeImage:function(e){t(n.filter(function(t){return t!==e}))}}},et=function(e){var t=e.fileStates,n=e.index;return(0,o.jsx)("div",{className:"shrink-0 p-1",children:(0,o.jsxs)("div",{className:"bg-tertiary flex size-12 items-center justify-center rounded-md",children:["completed"===t[n].status&&(0,o.jsx)(q.In,{type:"20-checkmark-circle-fill",size:20,className:"text-default"}),"uploading"===t[n].status&&(0,o.jsx)(C.P,{percentage:t[n].progress,size:18,strokeWidth:1.5}),"error"===t[n].status&&(0,o.jsx)(k.o.LabelXs,{color:"text-default",children:(0,u.t)("image_space.post_modal.steps.adjust_images.file_error")})]})})},en=function(e){var t=e.image,n=e.index,r=e.setCurrentImageIndex,i=e.currentImageIndex;return(0,o.jsx)("button",{type:"button",onClick:function(){return r(n)},className:N()("shrink-0 cursor-pointer touch-none select-none rounded-md border-2 border-transparent p-0.5",{"border-secondary":n===i}),children:(0,o.jsx)("img",{loading:"eager",src:t.preview,className:"size-12 rounded-md object-cover",alt:t.file.name})},t.preview)},er=function(e){var t=e.isOverlay,n=(0,U.Gv)().item;return(0,o.jsx)("div",{className:N()("rounded-md border-2 border-transparent p-0.5 opacity-50",{"!opacity-100":void 0!==t&&t}),children:(0,o.jsx)("img",{loading:"eager",src:n.preview,className:"size-12 rounded-md object-cover",alt:n.file.name})})};function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ei(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function ea(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function es(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eo(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var el=function(e){var t=e.selectedFiles,n=e.setCurrentImageIndex,r=e.currentImageIndex,i=e.status,a=e.fileStates,s=e.editingImageSignedId,l=e.onDeleteAllImages,c=(0,p.useRef)(null),u=es((0,$.Z)(),2),f=u[0],m=u[1],b=es((0,$.Z)(),2),y=b[0],h=b[1],g=(0,d.X9)().contentPortalElement,v=P(),x=v.uploadedImages,j=v.setSelectedFiles,_=X({handleFileSelection:Q(function(){setTimeout(function(){return G({direction:"right",scrollableContainerRef:c})},200)}).handleFileSelection,selectedFiles:t,uploadedFilesCount:x.length}),w=_.getInputProps,O=_.open,S=ee().removeImage,C=t.map(function(e){return ea(ei({},e),{id:e.preview})}),k=C[r],I=!s&&t.length+x.length<10;return(0,o.jsxs)("div",{className:"relative mt-5 flex",children:[!m&&(0,o.jsx)(Z,{direction:"left",scrollableContainerRef:c}),(0,o.jsxs)(U.bH,{shouldUseKeyboardSensor:!1,distance:10,items:C,onSort:function(e){var t=e.indexOf(k);t!==r&&n(t),j(e.map(function(e){return ea(ei({},e),{id:void 0})}))},restrictToParentElement:!0,children:[(0,o.jsx)(U.gB,{children:(0,o.jsxs)("div",{className:"scrollbar-hide m-auto !flex items-center overflow-x-scroll px-1 pt-1",ref:c,"data-testid":"thumbnails-list",children:[(0,o.jsx)("div",{className:"size-px",ref:f}),t.map(function(e,s){return"uploading"===i||"completed"===i?(0,o.jsx)(et,{fileStates:a,index:s},e.preview):(0,o.jsxs)(W.q,{tabIndex:-1,item:C[s],disabled:1===x.length,placeholder:er,className:"group relative !w-auto 
1shrink-0",dataTestId:"thumbnail-item",children:[(0,o.jsx)(H,{onClick:function(){S(e),1===t.length&&l()},index:s,currentImageIndex:r}),(0,o.jsx)(en,{image:e,index:s,setCurrentImageIndex:n,currentImageIndex:r})]},e.preview)}),I&&(0,o.jsxs)("button",{type:"button",className:"hover:bg-secondary text-default ml-1 flex size-12 shrink-0 cursor-pointer items-center justify-center rounded-md border border-dashed",onClick:function(){return"uploading"!==i&&O()},children:[(0,o.jsx)("input",ea(ei({},w()),{"data-testid":"upload_more_images"})),(0,o.jsx)(q.In,{type:"20-add-lg",size:20})]}),(0,o.jsx)("div",{className:"size-px",ref:y})]})}),(0,o.jsx)(z.H,{portalTo:g,children:(0,o.jsx)(er,{isOverlay:!0})})]}),!h&&(0,o.jsx)(Z,{direction:"right",scrollableContainerRef:c})]})},ec=n(730703);function eu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ed(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function ep(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var ef=function(e){var t=e.currentImage,n=P().updateImage;return(0,o.jsxs)("div",{className:"text-light flex items-center justify-between",children:[(0,o.jsx)(A.K,{name:"16-zoom-out",onClick:function(){var e=ep(ed({},(0,c.cloneDeep)(t)),{zoom:t.zoom-.1});e.zoom>=1&&n(e)},className:"mr-3",iconSize:16,buttonSize:28,ariaLabel:(0,u.t)("zoom_out")}),(0,o.jsx)("div",{className:"flex h-4 w-32 items-center",children:(0,o.jsxs)(ec.A.Root,{value:[Math.round(10*t.zoom)/10],max:5,min:1,step:.1,onValueChange:function(e){var r=(function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return eu(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eu(e,1)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];r!==t.zoom&&n(ep(ed({},(0,c.cloneDeep)(t)),{zoom:r}))},children:[(0,o.jsx)(ec.A.Track,{children:(0,o.jsx)(ec.A.Range,{className:"!bg-badge"})}),(0,o.jsx)(ec.A.Thumb,{className:"before:!bg-badge"})]})}),(0,o.jsx)(A.K,{onClick:function(){var e=ep(ed({},(0,c.cloneDeep)(t)),{zoom:t.zoom+.1});e.zoom<=5&&n(e)},className:"ml-3",name:"16-zoom-in",iconSize:16,buttonSize:28,ariaLabel:(0,u.t)("zoom_in")})]})};function em(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eb=function(e){var t,n=e.status,r=e.overallProgress,i=e.fileStates,a=e.editingImageSignedId,s=e.onDeleteAllImages,l=function(e){if(Array.isArray(e))return e}(t=(0,p.useState)(0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return em(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return em(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=l[0],d=l[1],f=P(),m=f.selectedFiles,b=f.uploadedImages,y=m[c],h=(0,p.useRef)(m.length),g=h.current,v=m.length;return(v>0&&c>v-1?d(m.length-1):v>g&&d(g),h.current=v,y)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:N()("border-primary flex grow flex-col overflow-hidden rounded-md border",{"bg-tertiary":"uploading"===n}),children:["idle"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(B,{currentImage:y}),(0,o.jsxs)("div",{className:N()("border-primary flex border-t px-4 py-3",{"justify-between":0===c,"justify-end":c>0}),children:[0===b.length&&0===c&&(0,o.jsx)(D,{}),(0,o.jsx)(ef,{currentImage:y})]})]}),("uploading"===n||"completed"===n)&&(0,o.jsxs)("div",{className:"mb-12 mt-1 flex aspect-video flex-col items-center justify-center gap-4",children:[(0,o.jsx)(C.P,{percentage:r,size:22,strokeWidth:1.75}),(0,o.jsx)(k.o.LabelMd,{color:"text-default",children:(0,u.t)("image_space.post_modal.steps.adjust_images.uploading")})]}),"error"===n&&(0,o.jsx)("div",{className:"mb-12 mt-1 flex aspect-video flex-col items-center justify-center gap-4",children:(0,o.jsx)(k.o.LabelMd,{color:"text-default",children:(0,u.t)("image_space.post_modal.steps.adjust_images.files_error")})})]}),(0,o.jsx)(el,{currentImageIndex:c,selectedFiles:m,setCurrentImageIndex:d,fileStates:i,status:n,editingImageSignedId:a,onDeleteAllImages:s})]}):null},ey=n(172676);function eh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var eg=function(e,t){var n,r,o,i;return e.width/e.height>t?(o=Math.round(e.height*t),i=e.height,n=Math.round((e.width-o)/2),r=0):(o=e.width,i=Math.round(e.width/t),n=0,r=Math.round((e.height-i)/2)),{x:n,y:r,width:o,height:i}},ev=function(){var e=P(),t=e.selectedFiles,n=e.setSelectedFiles,r=e.galleryAspectRatio,o=e.setUploadedImages,i=e.addUploadedImages,a=e.uploadedImages,s=e.setIsImagesDirty,l=(0,ey.C)(),c=l.status,u=l.overallProgress,d=l.reset,p=l.fileStates,f=l.uploadFiles;return{uploadImages:function(){if(!r)throw Error("Gallery aspect ratio not set");Promise.all(t.map(function(e){return new Promise(function(t,n){var o=new Image,i=document.createElement("canvas"),a=i.getContext("2d");if(e.croppedAreaPixels){var s=e.croppedAreaPixels;parseFloat((s.width/s.height).toFixed(2))!==parseFloat(r.toFixed(2))&&(e.croppedAreaPixels=void 0)}o.src=URL.createObjectURL(e.file),o.onload=function(){var n=e.croppedAreaPixels||eg(o,r);i.width=n.width,i.height=n.height,null==a||a.drawImage(o,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.toBlob(function(r){r&&t({croppedImage:new File([r],e.file.name,{type:"image/jpeg",lastModified:new Date().getTime()}),croppedArea:n})},"image/jpeg")},o.onerror=function(e){n(e)}})})).then(function(e){n(t.map(function(t,n){var r,o;return r=eh({},t),o=o={croppedAreaPixels:e[n].croppedArea},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r})),f(e.map(function(e){return e.croppedImage}))}).catch(function(e){throw Error("Error processing images: ".concat(e))})},overallProgress:u,resetUploads:d,status:c,fileStates:p,updateStoredImages:function(e){if(e){var n=t[0],r={signed_id:p[0].response.signed_id,url:p[0].response.blob_url,original_url:p[0].response.blob_url,filename:p[0].response.filename,width:n.croppedAreaPixels.width,height:n.croppedAreaPixels.height};o(a.map(function(t){return t.signed_id===e?eh({},t,r):t}))}else i(p.map(function(e,n){return{signed_id:e.response.signed_id,url:e.response.blob_url,original_url:e.response.blob_url,filename:e.response.filename,width:t[n].croppedAreaPixels.width,height:t[n].croppedAreaPixels.height}}));s(!0)}}},ex=function(e){var t=e.onClose,n=e.onCompleted,r=void 0===n?c.noop:n,i=e.isOnTop,a=void 0!==i&&i,s=e.editingImageSignedId,l=P(),m=l.setCurrentStep,y=l.resetSelectedFiles,g=ev(),v=g.uploadImages,x=g.overallProgress,j=g.resetUploads,_=g.status,w=g.fileStates,O=g.updateStoredImages,S=function(){y(),a?t():m(b)};return(0,p.useEffect)(function(){"completed"===_?(O(s),j(),y(),m(h),r(),a&&t()):"error"===_&&j()},[a,_]),(0,o.jsxs)(d.aF,{isOpen:!0,onClose:function(){y(),t()},contentPortalId:"adjust-images-modal-portal",children:[(0,o.jsx)(d.aF.Overlay,{}),(0,o.jsxs)(d.aF.Content,{size:"xl",children:[(0,o.jsxs)(d.aF.Header,{children:[(0,o.jsx)(d.aF.Title,{size:"sm",children:(0,u.t)("image_space.post_modal.steps.adjust_images.title")}),(0,o.jsxs)(d.aF.HeaderActions,{className:"!gap-3",children:[(0,o.jsx)(f.$,{type:"button",variant:"secondary",onClick:S,children:(0,u.t)("cancel")}),(0,o.jsx)(f.$,{type:"submit",variant:"circle",disabled:"uploading"===_,onClick:function(){return v()},children:a?(0,u.t)("save"):(0,u.t)("next")})]})]}),(0,o.jsx)(d.aF.Body,{className:"flex flex-col pb-5 pt-4",children:(0,o.jsx)(eb,{status:_,fileStates:w,overallProgress:x,editingImageSignedId:s,onDeleteAllImages:S})})]})]})},ej=n(927561),e_=n(668345),ew=n(519104),eO=n(361287),eS=n(674251),eP=n(258752),eC=n(68176);function ek(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function eI(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var eN=function(e){var t=e.payload,n=e.space,r=e.uploadedImages;return{post:eI(ek({},(0,c.omit)(t,["gallery"])),{space_id:null==n?void 0:n.id,gallery_attributes:eI(ek({},t.gallery),{images_attributes:r.map(function(e){return{id:e.id,image:e.signed_id,width:e.width,height:e.height}})})})}},eA=function(e){var t=e.space,n=e.post,r=e.onSuccess,o=(0,J.d)(),i=P(),a=i.setIsSubmitting,s=i.uploadedImages,l=!!n.slug,c=(0,eP.n_)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({mutationFn:function(e){return n.slug?(0,eC.h7)({spaceId:t.id,postSlug:n.slug,payload:e}):(0,eC.Ql)({spaceId:t.id,payload:e})}},{onSuccess:function(e){a(!1),r(e),o.success((0,u.t)(l?"quick_post.toasts.changes_saved":"quick_post.toasts.".concat(e.status,"_saved")))},onError:function(e){a(!1),o.error(e.errorDetails,{shouldShowCloseButton:!0,shouldUseProgress:!1})}})).mutate;return{onSubmit:function(e){a(!0),c(eN({payload:e,space:t,uploadedImages:s}))}}},eE=n(328187),eR=n(561765),eL=n(306523),eD=n(569445),eT=n(341409),eM=n(361971),eF=n(632707);function eK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eB=function(e){var t,n=e.post,r=function(e){if(Array.isArray(e))return e}(t=(0,p.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eK(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eK(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],a=r[1],l=(0,V.J6)(),d=(0,eM.xW)(),f=d.watch,m=d.setValue,b=P(),y=b.isSubmitting,h=b.uploadedImages,g=b.isScheduledBarPortalRendered,v=(0,s.Ir)().data,x=f(),j=x.published_at,_=x.status,w=x.topics,O=(null==v?void 0:v.require_topic_selection)&&0>=Number(null==w?void 0:w.length),S=h.length>0&&!y&&!O,C=!!(null==n?void 0:n.id),k=(0,eE.Rj)(n),I="quick_post.scheduled_post_ui.".concat(y?"submitting_button":"submit_button"),N=[{icon:"16-download",label:(0,u.t)("".concat(I,".save_draft")),value:"draft"},{icon:"16-calendar",label:(0,u.t)("".concat(I,".schedule_post")),value:"scheduled"},{icon:"16-publish",label:(0,u.t)("".concat(I,".publish")),value:"published"}],A=(0,c.find)(N,{value:_||"published"}),R=function(e){"scheduled"===e.value?a(!0):(m("status",e.value),a(!1),L(null))},L=function(e){m("published_at",e)},D=function(){R(N[0])},T=v&&(0,eT.WY)(v)&&!k;return(0,o.jsxs)(o.Fragment,{children:[g&&(0,o.jsx)(eD.h,{publishedAt:j,revertToDraftState:D,status:_,updatePublishedAt:L,variant:l?"2-lines":"default"}),(0,o.jsx)(eR.l,{datePickerVisible:i,onCancel:function(e){e&&e.preventDefault(),a(!1),"scheduled"===_&&D()},value:j,onSave:function(e){L(e),m("status","scheduled"),a(!1)},placement:"bottom-end",saveButtonVariant:"circle",children:T?(0,o.jsx)(E.$,{disabled:!O,content:(0,u.t)("quick_post_v2.error_messages.no_topics"),trigger:"mouseenter click focus focusin",placement:"bottom",children:(0,o.jsx)(eF.u,{type:"submit",disabled:!S,selectedAction:A,setSelectedAction:R,options:N,variant:"circle"})}):(0,o.jsx)(E.$,{disabled:!O,content:(0,u.t)("quick_post_v2.error_messages.no_topics"),trigger:"mouseenter click focus focusin",placement:"bottom",children:(0,o.jsx)(eL.D,{isEdit:C,isDisabled:!S})})})]})},eq=n(896406),eU=n(257957);function ez(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function eW(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var e$=function(e){var t=e.isDragActive,n=e.getRootProps,r=e.getInputProps,i=e.open,a=e.className,s="image_space.post_modal.steps.upload_images";return(0,o.jsx)("div",eW(ez({},n()),{className:"group size-full",children:(0,o.jsxs)("button",{type:"button",className:N()("flex size-full flex-col items-center justify-center px-4 text-center",a),onClick:i,children:[(0,o.jsx)("input",eW(ez({},r()),{"data-testid":"upload_multi_image"})),(0,o.jsx)(q.In,{size:24,type:"24-circle-arrow-up",className:N()("text-default !h-6 !w-6",{"group-hover:text-messaging-info-blue":!t})}),(0,o.jsx)("div",{className:"mb-1 mt-3",children:(0,o.jsxs)(k.o.LabelMd,{weight:"semibold",color:N()("text-dark",{"group-hover:text-messaging-info-blue":!t}),children:[(0,u.t)("".concat(s,".drag_and_drop_up_to_n_images"),{max_images:10}),t&&" "+(0,u.t)("".concat(s,".here"))]})}),!t&&(0,o.jsx)(k.o.LabelSm,{color:"text-default group-hover:text-messaging-info-blue",children:(0,u.t)("".concat(s,".recommendation"))})]})}))};function eV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eH=function(){var e,t,n,r=function(e){if(Array.isArray(e))return e}(e=(0,p.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return eV(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eV(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],a=r[1],s=P(),l=s.selectedFiles,c=s.uploadedImages,u=X({handleFileSelection:Q(function(){return a(!0)}).handleFileSelection,selectedFiles:l,uploadedFilesCount:c.length}),d=u.isDragActive,f=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(u,["isDragActive"]);return(0,o.jsxs)("div",{className:N()("flex size-full flex-col items-center justify-center rounded-md px-4 text-center",{"!bg-light-blue":d}),children:[(0,o.jsx)(e$,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({isDragActive:d},f),n=n={className:"pb-0"},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)),i&&(0,o.jsx)(ex,{onClose:function(){return a(!1)},isOnTop:!0})]})},eG=n(529648),eZ=n(956816),eQ=function(){var e=P(),t=e.setUploadedImages,n=e.uploadedImages,r=e.setIsImagesDirty;return{removeImage:function(e){t(n.filter(function(t){return t!==e})),r(!0)}}};function eY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eJ(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function eX(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){eJ(i,r,o,a,s,"next",e)}function s(e){eJ(i,r,o,a,s,"throw",e)}a(void 0)})}}function e0(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var e1=function(e){var t=e.url,n=e.fileName,r=e.contentType;return eX(function(){return e0(this,function(e){switch(e.label){case 0:return[4,fetch(t,{cache:"no-store"})];case 1:return[4,e.sent().blob()];case 2:return[2,new File([e.sent()],n,{type:r,lastModified:new Date().getTime()})]}})})()},e2=function(e){var t,n=e.currentImage,r=function(e){if(Array.isArray(e))return e}(t=(0,p.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eY(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eY(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],a=r[1],s=eQ().removeImage,l=Q(function(){return a(!0)}).handleFileSelection,c="image_space.post_modal.steps.create_post.image_options",d=[{value:(0,u.t)("".concat(c,".crop_image")),label:(0,u.t)("".concat(c,".crop_image")),icon:"16-crop",onClick:function(){return eX(function(){return e0(this,function(e){switch(e.label){case 0:return[4,e1({url:n.original_url,fileName:n.filename,contentType:"image/jpeg"})];case 1:return l([e.sent()]),[2]}})})()}},{value:(0,u.t)("".concat(c,".remove")),label:(0,u.t)("".concat(c,".remove")),icon:"16-trash-bin",onClick:function(){s(n)}}];return(0,o.jsxs)(o.Fragment,{children:[i&&(0,o.jsx)(ex,{onClose:function(){return a(!1)},isOnTop:!0,editingImageSignedId:n.signed_id}),(0,o.jsx)(eG.ms,{direction:"bottom-end",className:"absolute right-4 top-4",button:(0,o.jsx)(A.K,{name:"16-menu-dots-horizontal",iconClassName:"!text-dark",className:"rounded-full border border-primary bg-primary",ariaLabel:(0,u.t)("".concat(c,".label"))}),children:(0,o.jsx)(eZ.d,{options:d,linkType:"button"})})]})};function e3(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function e4(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return e3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e3(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var e5=function(e){var t,n=e.currentImageIndex,r=(0,p.useRef)(null),i=(0,p.useRef)(null),a=e4((0,p.useState)(!0),2),s=a[0],l=a[1],c=e4((0,p.useState)(),2),u=c[0],d=c[1],f=P(),m=f.uploadedImages,b=f.galleryAspectRatio,y=f.setGalleryAspectRatio,h=m[n];return((0,p.useEffect)(function(){!b&&h&&y(h.width/h.height)},[b,h,y]),(0,p.useEffect)(function(){if(!s&&i.current){var e=i.current.getBoundingClientRect();d(e.width/e.height)}},[s,i]),h)?(b&&u&&(t=b>u?"w-full my-auto":b<u?"h-full":"h-full w-full"),(0,o.jsxs)("div",{className:"flex justify-center overflow-auto md:grow",ref:i,children:[s&&(0,o.jsx)(eU.a,{}),(0,o.jsxs)("div",{className:N()("relative",t),children:[(0,o.jsx)(e2,{currentImage:h}),(0,o.jsx)("img",{loading:"eager",ref:r,src:h.url,alt:h.filename,onLoad:function(){return l(!1)},className:N()("rounded-md",{hidden:s},t)})]})]})):(0,o.jsx)(eH,{})};function e6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var e8=function(e){var t,n=e.image,r=e.index,i=e.currentImageIndex,a=e.onClick,s=function(e){if(Array.isArray(e))return e}(t=(0,p.useState)(!0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return e6(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e6(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1];return(0,o.jsx)("button",{type:"button",onClick:function(){return a(r)},className:N()("cursor-pointer touch-none select-none rounded-md border-2 border-transparent p-0.5",{"border-secondary":r===i&&!l,"bg-tertiary mx-1 size-12 animate-pulse":l}),children:(0,o.jsx)("img",{loading:"eager",src:n.url,className:N()("size-12 rounded-md object-cover",{hidden:l}),onLoad:function(){return c(!1)},alt:n.filename})})},e9=function(e){var t=e.isOverlay,n=(0,U.Gv)().item;return(0,o.jsx)("div",{className:N()("rounded-md border-2 border-transparent p-0.5 opacity-50",{"!opacity-100":void 0!==t&&t}),children:(0,o.jsx)("img",{loading:"eager",src:n.url,className:"size-12 rounded-md object-cover",alt:n.filename})})};function e7(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function tt(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function tn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return e7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e7(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tr=function(e){var t=e.setCurrentImageIndex,n=e.currentImageIndex,r=tn((0,p.useState)(!1),2),i=r[0],a=r[1],s=(0,p.useRef)(null),l=tn((0,$.Z)(),2),c=l[0],u=l[1],f=tn((0,$.Z)(),2),m=f[0],b=f[1],y=(0,d.X9)().contentPortalElement,h=P(),g=h.uploadedImages,v=h.setUploadedImages,x=h.selectedFiles,j=h.resetSelectedFiles,_=h.setIsImagesDirty,w=X({handleFileSelection:Q(function(){return a(!0)}).handleFileSelection,selectedFiles:x,uploadedFilesCount:g.length}),O=w.getInputProps,S=w.open,C=eQ().removeImage,k=g.map(function(e){return tt(te({},e),{id:e.signed_id,originalId:e.id})}),I=k[n];return(0,o.jsxs)("div",{className:"relative mt-5 flex",children:[!u&&(0,o.jsx)(Z,{direction:"left",scrollableContainerRef:s}),(0,o.jsxs)(U.bH,{shouldUseKeyboardSensor:!1,distance:10,items:k,onSort:function(e){var r=e.indexOf(I);r!==n&&t(r),v(e.map(function(e){return tt(te({},e),{id:e.originalId})})),_(!0)},restrictToParentElement:!0,children:[(0,o.jsx)(U.gB,{children:(0,o.jsxs)("div",{className:"scrollbar-hide m-auto !flex items-center overflow-x-scroll px-1 pt-1",ref:s,children:[(0,o.jsx)("div",{className:"size-px",ref:c}),g.map(function(e,r){return(0,o.jsxs)(W.q,{tabIndex:-1,item:k[r],disabled:1===g.length,placeholder:e9,className:"group relative !w-auto shrink-0",dataTestId:"thumbnail-item",children:[(0,o.jsx)(H,{onClick:function(){return C(e)},index:r,currentImageIndex:n}),(0,o.jsx)(e8,{image:e,index:r,currentImageIndex:n,onClick:t})]},e.signed_id)}),g.length<10&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("button",{type:"button",className:"hover:bg-secondary text-default ml-1 flex size-12 shrink-0 cursor-pointer items-center justify-center rounded-md border border-dashed",onClick:function(){j(),S()},children:[(0,o.jsx)("input",te({},O())),(0,o.jsx)(q.In,{type:"20-add-lg",size:20})]}),i&&(0,o.jsx)(ex,{onClose:function(){return a(!1)},onCompleted:function(){return setTimeout(function(){return G({direction:"right",scrollableContainerRef:s})},200)},isOnTop:!0})]}),(0,o.jsx)("div",{className:"size-px",ref:m})]})}),(0,o.jsx)(z.H,{portalTo:y,children:(0,o.jsx)(e9,{isOverlay:!0})})]}),!b&&(0,o.jsx)(Z,{direction:"right",scrollableContainerRef:s})]})};function to(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ti=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,p.useState)(0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return to(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return to(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1],i=!(0,V.J6)(),a=P(),s=a.uploadedImages,l=a.setIsScheduledBarPortalRendered,c=(0,p.useRef)(s.length),u=c.current,d=s.length;return d>0&&n>d-1?r(s.length-1):d>u&&r(u),c.current=d,(0,p.useEffect)(function(){i&&l(!0)},[i,l]),(0,o.jsxs)("div",{className:"flex max-h-full w-full flex-col justify-center overflow-auto lg:h-full lg:w-3/4",children:[i&&(0,o.jsx)("div",{id:eq.I}
1),(0,o.jsxs)("div",{className:"flex max-h-full min-h-[20rem] w-full flex-col overflow-auto p-6",children:[(0,o.jsx)(e5,{currentImageIndex:n}),s.length>0&&(0,o.jsx)(tr,{currentImageIndex:n,setCurrentImageIndex:r})]})]})},ta=n(15809),ts=n(531404),tl=n(202142),tc=n(639113),tu=function(e){var t=e.editor,n=e.portalId;return t?(0,o.jsx)(tc.Z,{selectorQuery:"#".concat(n),children:(0,o.jsx)("div",{className:"flex items-center md:pt-2",children:(0,o.jsx)(tl.E,{popoverPanelClassName:"md:!w-[21rem]",onEmojiSelect:function(e){return t.chain().focus().insertContent(e.emoji).run()},targetWrapperClassName:"!flex",target:(0,o.jsx)(A.K,{iconSize:20,buttonSize:28,iconClassName:"!text-dark !w-6 !h-6",name:"20-emoji",ariaLabel:(0,u.t)("emoji_picker")})})})}):null},td=["blockquote","poll","embeds","slash_commands","file","image","horizontal_rule","code_block","headings","cta"],tp=function(e){var t,n=e.space,r=e.post,i=P().setIsFormDirty,a=(0,eM.xW)().formState.isDirty;return(0,p.useEffect)(function(){i(a)},[a,i]),(0,o.jsxs)("div",{className:"border-b-primary border-y p-6 pb-4 lg:border-t-0",children:[(0,o.jsx)(k.o.LabelMd,{weight:"semibold",children:(0,u.t)("image_space.post_modal.steps.create_post.caption_label")}),(0,o.jsx)(ts.P,{placeholder:(0,u.t)("image_space.post_modal.steps.create_post.caption_placeholder"),name:"tiptap_body.body",sgidToObjectMap:(null==r||null==(t=r.tiptap_body)?void 0:t.sgids_to_object_map)||{},spaceId:null==n?void 0:n.id,editorClassName:"min-w-full h-40 overflow-y-scroll mt-3",disabledExtensions:td,shouldShowTextModifiersMenu:!1,toolbars:[{portalId:"create-image-post-toolbar",component:tu}]}),(0,o.jsx)("div",{id:"create-image-post-toolbar"})]})},tf=n(748467),tm=function(e){var t=e.space,n=!!t&&(0,eT.WY)(t);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ej.l.Item,{variant:"extra-bottom-margin",className:"!pt-3",hideBorder:!0,name:"slug",fullWidth:!0,translationRoot:"post",hidePlaceholder:!0,hideDescription:!0,tooltipText:(0,u.t)("post.slug_description"),children:(0,o.jsx)(ej.l.Input,{name:"slug",autoComplete:"off"})}),n&&(0,o.jsx)(ej.l.Item,{variant:"extra-bottom-margin",className:"!pt-4",hideBorder:!0,name:"user_id",translationRoot:"post",fullWidth:!0,hideDescription:!0,tooltipText:(0,u.t)("post.user_id_description"),children:(0,o.jsx)(tf.Y,{name:"user_id",direction:"up",valueField:"user_id"})})]})},tb=function(e){var t=e.space,n=(0,eO.W)().post,r={hide_meta_info:!0,is_comments_disabled:!0,is_comments_closed:!(0,(0,eM.xW)().watch)("is_comments_disabled"),is_liking_disabled:!0,is_truncation_disabled:!0,pin_to_top:!!n.id&&(0,eE.Rj)(n),hide_from_featured_areas:!(null==t?void 0:t.hide_from_featured_areas),"gallery.downloadable_images":!0},i=Object.keys(r).filter(function(e){return r[e]});return(0,o.jsx)(o.Fragment,{children:i.map(function(e){return(0,o.jsx)(ej.l.Item,{id:"post_".concat(e),name:e,label:(0,u.t)("post.".concat(e)),labelClassName:"!font-normal !p-0",className:"mb-3 !p-0",hideBorder:!0,hideDescription:!0,inlineReverse:!0,children:(0,o.jsx)(ej.l.ToggleSwitch,{name:e,variant:"small"})},e)})})};function ty(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var th=function(e){var t,n=e.space,r=function(e){if(Array.isArray(e))return e}(t=(0,p.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return ty(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ty(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],a=r[1];return(0,o.jsxs)("div",{className:"border-primary border-b",children:[(0,o.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between px-6 py-5",onClick:function(){return a(!i)},"aria-expanded":i,children:[(0,o.jsx)(k.o.LabelMd,{weight:"semibold",children:(0,u.t)("image_space.post_modal.steps.create_post.more_options_label")}),(0,o.jsx)(q.In,{type:i?"cheveron-up":"cheveron-down",size:20})]}),i&&(0,o.jsxs)("div",{className:"mb-5 px-6",children:[(0,o.jsx)(tb,{space:n}),(0,o.jsx)(tm,{space:n})]})]})},tg=function(e){var t=e.post,n=e.space,r=n&&(0,eT.wp)(n),i=P().setIsScheduledBarPortalRendered,a=(0,V.J6)();return(0,p.useEffect)(function(){a&&i(!0)},[a,i]),(0,o.jsxs)("div",{className:"border-primary w-full lg:h-full lg:w-1/4 lg:overflow-scroll lg:border-l",children:[a&&(0,o.jsx)("div",{id:eq.I}
1),(0,o.jsx)(tp,{space:n,post:t}),(n.topics_count>0||r)&&(0,o.jsx)("div",{className:"border-primary border-b px-6 pb-2",children:(0,o.jsx)(ej.l.Item,{name:"topics",hideDescription:!0,hideBorder:!0,label:(0,u.t)("image_space.post_modal.steps.create_post.topics_label"),labelClassName:"!mb-3",children:(0,o.jsx)(ta.N,{containerClassName:"!p-0 -mx-1",name:"topics",spaceId:n.id,creatable:r})})}),(0,eT.wp)(n)&&(0,o.jsx)(th,{space:n})]})};function tv(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var tx=function(e){var t=e.onClose,n=e.onPostChange,r=e.shouldSkipRedirectAfterSubmit,i=(0,eO.W)().post,a=(0,s.Ir)().data,l=(0,e_.q)(),p=(0,ew.Z)(),m=eA({space:a,post:i,onSuccess:function(e){var o;return(o=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(o){switch(o.label){case 0:return n(i),[4,l(e.id)];case 1:return o.sent(),t(!0),r||p({href:(0,eE.Lo)({post:e})}),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,r){var i=o.apply(e,t);function a(e){tv(i,n,r,a,s,"next",e)}function s(e){tv(i,n,r,a,s,"throw",e)}a(void 0)})})()}}).onSubmit;return(0,o.jsx)(d.aF,{isOpen:!0,onClose:t,contentPortalId:"create-post-modal-portal",children:(0,o.jsxs)(ej.l,{onSubmit:m,defaultValues:(0,c.pick)(i,["tiptap_body","hide_meta_info","is_comments_disabled","is_comments_closed","is_liking_disabled","is_truncation_disabled","pin_to_top","pinned_at","hide_from_featured_areas","gallery.downloadable_images","slug","user_id","status","published_at","topics"]),formClassName:"fixed inset-0 z-[1060]",children:[(0,o.jsx)(d.aF.Overlay,{}),(0,o.jsxs)(d.aF.Content,{size:"full",className:"sm:!max-h-[836px] sm:!max-w-[1312px]",children:[(0,o.jsxs)(d.aF.Header,{className:"z-10 md:!py-4",children:[(0,o.jsx)(eS.o.TitleSm,{weight:"font-semibold",children:(0,u.t)("".concat("image_space.post_modal.steps.create_post",".").concat(i.id?"edit":"create","_title"))}),(0,o.jsxs)(d.aF.HeaderActions,{className:"!gap-3",children:[(0,o.jsx)(f.$,{type:"button",variant:"secondary",onClick:function(){return t(!1)},children:(0,u.t)("cancel")}),(0,o.jsx)(eB,{post:i})]})]}),(0,o.jsxs)(d.aF.Body,{className:"flex flex-wrap content-start !p-0 md:border-t md:border-primary",children:[(0,o.jsx)(ti,{}),(0,o.jsx)(tg,{post:i,space:a})]})]})]})})},tj=function(e){var t=P(),n=t.setCurrentStep,r=t.setUploadedImages;(0,p.useEffect)(function(){n((null==e?void 0:e.gallery)?h:b),(null==e?void 0:e.gallery)&&r(e.gallery.images)},[null==e?void 0:e.gallery,n,r])},t_=n(527374),tw=function(e){var t=(0,t_.C)({spaceId:null==e?void 0:e.space_id,postSlug:null==e?void 0:e.slug,disabled:e&&"gallery"in e}),n=t.post,r=t.isInitialLoading,o=(0,eE.AF)(n)?n:void 0,i=(0,eE.AF)(e)?e:void 0;return r?null:o||i||{id:null,gallery:null}},tO=function(e){var t,n,r=e.onClose,i=e.onSelection,a=P(),s=a.selectedFiles,l=a.uploadedImages,c=X({handleFileSelection:Q(i).handleFileSelection,selectedFiles:s,uploadedFilesCount:l.length}),u=c.isDragActive,p=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(c,["isDragActive"]);return(0,o.jsxs)(d.aF,{isOpen:!0,onClose:r,contentPortalId:"upload-images-modal-portal",children:[(0,o.jsx)(d.aF.Overlay,{}),(0,o.jsxs)(d.aF.Content,{size:"xl",className:N()("aspect-square",{"!bg-light-blue":u}),children:[(0,o.jsxs)(d.aF.Header,{children:[(0,o.jsx)(d.aF.Title,{size:"sm",children:" "}),(0,o.jsx)(d.aF.HeaderActions,{children:(0,o.jsx)(d.aF.CloseButton,{onClick:r,className:N()({"!bg-light-blue":u})})})]}),(0,o.jsx)(d.aF.Body,{className:"flex cursor-pointer flex-col items-center justify-center !p-0",children:(0,o.jsx)(e$,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({isDragActive:u},p),n=n={className:"pb-14"},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))})]})]})},tS=function(e){var t=e.spaceId,n=e.onClose,r=void 0===n?c.noop:n,d=e.currentPost,p=e.onPostChange,f=void 0===p?c.noop:p,m=e.shouldSkipRedirectAfterSubmit,h=(0,i.hS)(),g=P(),v=g.currentStep,x=g.setCurrentStep,j=g.reset,_=g.isFormDirty,w=g.isImagesDirty,O=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||!(_||w)||confirm((0,u.t)("quick_post_v2.accidental_leave_confirmation")))&&(j(),r())},S=tw(d);if(tj(S),!h||!h.visible||!S)return null;var C=S.id?[[S.id]]:[];return(0,o.jsx)(s.Yy,{spaceId:t,children:(0,o.jsx)(l.U,{perPagePostIds:C,children:(0,o.jsxs)(a.m,{post:S,children:[v===b&&(0,o.jsx)(tO,{onClose:O,onSelection:function(){return x(y)}}),v===y&&(0,o.jsx)(ex,{onClose:O}),v!==b&&v!==y&&(0,o.jsx)(tx,{onClose:O,onPostChange:f,shouldSkipRedirectAfterSubmit:void 0!==m&&m})]})})})}},48821(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(391426),o=n(194825),i=n(974618),a=n(231127),s=n(525005);function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var c=i.PT.create(function(e){return(0,r.jsx)(s.I,l({},e))}),u=i.PT.create(function(e){var t,n,a=(0,i.hS)();return(0,r.jsx)(o.U,(t=l({},e),n=n={open:a.visible,onOpenChange:function(e){e||a.remove()}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}),d=function(){var e=(0,a.T)("circle_v4_modals_enabled",{requireAdminArea:!1});return(0,i.hS)(e?u:c)}},974389(e,t,n){"use strict";var r=n(391426),o=n(504576),i=n(915779),a=function(e){var t=e.chat;return(0,r.jsx)(o.G,{chat:t,path:(0,i.tV)({id:t.id.toString()}),isUnread:t.has_unread_messages_for_member,isBotType:!0,shouldHightlightChat:!0},t.id)};n.d(t,{f:()=>a})},686805(e,t,n){"use strict";var r=n(391426),o=n(973646),i=function(e){var t=e.profile,n=e.className,i=void 0===n?"!h-[3rem] !w-[3rem]":n;return(0,r.jsx)(r.Fragment,{children:t.avatar_url?(0,r.jsx)("img",{src:t.avatar_url,alt:t.name,className:"rounded-full ".concat(i),loading:"lazy"}):(0,r.jsx)(o.In,{type:"120-ai-bot",size:120,className:i})})};n.d(t,{l:()=>i})},579092(e,t,n){"use strict";n.d(t,{s:()=>w});var r=n(391426),o=n(257957),i=n(201525),a=n(910423),s=n(504576),l=n(570310),c=n(808877),u=n(677123),d=n(325335),p=n(355104),f=n(495152),m=n(568316),b=n(442379),y=n(519104),h=n(417980),g=n(387099),v=n(686805),x=function(){var e=(0,b.j)({name:""}),t=e.botProfiles,n=e.isBotsLoading,i=(0,u.IH)().setCurrentBotProfile,a=(0,y.Z)(),s=function(e){i(e),a({to:"/messages/$uuid",params:{uuid:"new"},replace:!0})};if(n)return(0,r.jsx)(o.a,{variant:"fullscreen"});if(!t.length)return(0,r.jsx)("div",{className:"flex size-full flex-col items-center justify-start pt-12",children:(0,r.jsx)(m.o.LabelSm,{children:(0,h.t)("messaging.no_messages")})});if(1===t.length){var l=t[0];return(0,r.jsxs)("div",{className:"flex size-full flex-col items-center justify-center gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,r.jsx)(v.l,{profile:l}),(0,r.jsx)(m.o.TitleSm,{as:"h2",weight:"semibold",children:l.name}),(0,r.jsx)("div",{className:"text-center text-sm font-normal leading-5 tracking-tighter",children:(0,r.jsx)(f.s,{editable:!1,rich_text_body:l.bio})})]}),(0,r.jsx)(g.$,{variant:"circle",type:"button",onClick:function(){return s(l)},className:"text-sm font-semibold",children:(0,h.t)("community_inbox.new_conversation")})]})}return(0,r.jsxs)("div",{className:"flex size-full flex-col",children:[(0,r.jsx)("div",{className:"flex flex-col gap-3 px-5 py-3.5",children:(0,r.jsx)(m.o.BodySm,{color:"text-gray-500",children:(0,h.t)("community_inbox.start_conversation")})}),(0,r.jsx)("div",{className:"flex flex-col gap-1.5 px-5 pb-4",children:t.map(function(e){return(0,r.jsx)("button",{type:"button",onClick:function(){return s(e)},children:(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-md border px-5 py-4",children:[(0,r.jsx)("div",{className:"text-left",children:(0,r.jsx)(v.l,{profile:e,className:"!h-11 !w-11 rounded-full border-4"})}),(0,r.jsxs)("div",{className:"flex flex-1 flex-col text-left",children:[(0,r.jsx)(m.o.LabelSm,{weight:"semibold",children:e.name}),(0,r.jsx)("div",{className:"text-tertiary text-xs font-normal leading-5 tracking-tight",children:(0,r.jsx)(f.s,{editable:!1,rich_text_body:e.bio})})]})]})},e.id)})})]})},j=n(973646),_=function(){var e=(0,b.j)({name:""}),t=e.botProfiles,n=e.isBotsLoading,i=(0,u.IH)().setCurrentBotProfile,a=(0,y.Z)(),s=function(e){i(e),a({to:"/messages/$uuid",params:{uuid:"new"}})};if(n)return(0,r.jsx)(o.a,{variant:"fullscreen"});if(!t.length)return(0,r.jsx)("div",{className:"flex size-full flex-col items-center justify-start pt-12",children:(0,r.jsx)(m.o.LabelSm,{children:(0,h.t)("messaging.no_messages")})});if(1===t.length){var l=t[0];return(0,r.jsxs)("div",{className:"flex size-full flex-col items-center justify-center gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,r.jsx)(v.l,{profile:l}),(0,r.jsx)(m.o.TitleSm,{as:"h2",weight:"semibold",children:l.name}),(0,r.jsx)("div",{className:"text-center text-sm font-normal leading-5 tracking-tighter",children:(0,r.jsx)(f.s,{editable:!1,rich_text_body:l.bio})})]}),(0,r.jsx)(g.$,{variant:"circle",type:"button",onClick:function(){return s(l)},className:"text-sm font-semibold",children:(0,h.t)("community_inbox.new_conversation")})]})}return(0,r.jsxs)("div",{className:"flex size-full flex-col",children:[(0,r.jsx)("div",{className:"flex flex-col gap-3 px-5 py-3.5",children:(0,r.jsx)(m.o.BodySm,{color:"text-gray-500",children:(0,h.t)("community_inbox.start_conversation")})}),(0,r.jsx)("div",{className:"flex flex-col gap-1.5 px-5 pb-4",children:t.map(function(e){return(0,r.jsx)("button",{type:"button",onClick:function(){return s(e)},children:(0,r.jsxs)("div",{className:"flex gap-3 rounded-md border px-5 py-4",children:[(0,r.jsx)(v.l,{profile:e,className:"border-primary !h-11 !w-11 rounded-full border-4"}),(0,r.jsxs)("div",{className:"flex flex-1 flex-col text-left",children:[(0,r.jsx)(m.o.LabelSm,{weight:"semibold",children:e.name}),(0,r.jsx)("div",{className:"text-tertiary text-xs font-normal leading-5 tracking-tight",children:(0,r.jsx)(f.s,{editable:!1,rich_text_body:e.bio})})]}),(0,r.jsx)(j.In,{type:"20-chevron-right",className:"text-default ml-auto",width:20,height:20})]})},e.id)})})]})},w=function(e){var t=e.isRightActionBlock,n=(0,a.Q)({filter:"mine"}),f=n.isChatsLoading,m=n.hasNextPage,b=n.fetchNextPage,y=(0,u.IH)(),h=y.
1currentChatId,g=y.memberChats,v=(0,p.c)().isCircleV4,j=(0,c.uc)().chatBotPath;if(f)return(0,r.jsx)(o.a,{center:!0});if(0===g.length)return t?(0,r.jsx)(_,{}):(0,r.jsx)(x,{});var w=v?i.G:s.G;return(0,r.jsx)(d.A,{scrollThreshold:.8,next:b,hasMore:!!m,dataLength:g.length,scrollableTarget:"scrollable-dms-div",className:(0,l.x)("mt-2 h-full overflow-auto",{"flex flex-col gap-y-0.5":v}),loader:(0,r.jsx)(o.a,{center:!0}),children:g.map(function(e){var t=e.id==h;return(0,r.jsx)(w,{chat:e,path:j({id:e.id.toString()}),isUnread:!t&&e.has_unread_messages_for_member,isBotType:!0},e.id)})})}},980912(e,t,n){"use strict";n.d(t,{e:()=>c});var r=n(391426),o=n(734527),i=n(421434),a=n(570310),s=function(e){var t=e.user1,n=e.user2,o=e.className,s=[{name:(null==t?void 0:t.name)||"",src:(null==t?void 0:t.avatar_url)||""},{name:(null==n?void 0:n.name)||"",src:(null==n?void 0:n.avatar_url)||""}];return(0,r.jsx)("div",{className:(0,a.x)("border-tertiary max-h-10",void 0===o?"":o),children:(0,r.jsx)(i.E,{users:s,isFullRounded:!0})})};function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e){var t=e.isDirect,n=e.otherParticipants;if(t){var i=(function(e){if(Array.isArray(e))return e}(n)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(n)||function(e){if(e){if("string"==typeof e)return l(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,1)}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]||{},a=i.avatar_url,c=i.name,u=i.status;return(0,r.jsx)(o.J,{src:a,name:c,status:u,size:"9"})}return(0,r.jsx)(s,{user1:n[0],user2:n[1]})}},743021(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(570310),a=n(451430),s=n(417980),l=function(e){var t=e.onChange,n=e.searchValue,l=e.onKeyPress,c=e.onClickCancel,u=void 0===c?a.noop:c,d=e.placeholder,p=void 0===d?(0,s.t)("messaging.actions.search_name"):d,f=e.className,m=e.showCancelButton,b=e.shouldAutoFocus;return(0,r.jsx)("div",{className:(0,i.x)("bg-primary isolate z-10 mx-2 flex w-full items-center justify-between gap-4"),children:(0,r.jsxs)("div",{className:(0,i.x)("bg-secondary-dark active:border-very-dark focus-within:bg-primary focus-within:border-very-dark active:bg-primary hover:border-dark hover:focus-within:border-very-dark border-hover group flex h-8 w-full flex-1 items-center gap-2 overflow-hidden rounded-md border p-3 marker:mr-0 hover:bg-transparent md:p-1",void 0===f?"":f),children:[(0,r.jsx)(o.In,{type:"16-search-v3",className:"text-light group-focus-within:text-dark group-active:text-dark ml-2",size:16,useWithFillCurrentColor:!0}),(0,r.jsx)("input",{className:"text-darkest placeholder:text-light text-sm w-full rounded-sm bg-transparent font-medium outline-none placeholder:opacity-100 sm:rounded-none",placeholder:p,"data-name":"v2-search","data-testid":"v2-search","aria-autocomplete":"list",value:n,onChange:function(e){return t(e.target.value)},onKeyPress:l,autoFocus:void 0!==b&&b}),(n||void 0!==m&&m)&&(0,r.jsx)(o.In,{type:"20-close",className:"text-dark mr-2 !h-5 !w-5 cursor-pointer",size:20,useWithFillCurrentColor:!0,onClick:u})]})})};n.d(t,{D:()=>l})},201525(e,t,n){"use strict";n.d(t,{G:()=>m});var r=n(391426),o=n(881088),i=n(199563),a=n(570310),s=n(844842),l=n(817751),c=n(892907),u=n(534529),d=n(417980),p=n(804939),f=function(e){var t=e.isDirect,n=e.chatRoomName,o=e.timestamp,i=e.lastMessage,a=e.isUnread,s=e.isAiSnoozed,u=i.sender,d=i.body,p=t?"":"".concat(null==u?void 0:u.name,": "),f=(null==d?void 0:d.circle_ios_fallback_text)||"";return(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)(c.o5,{variant:"heading-sm",color:"primary",truncate:!0,className:"min-w-0",children:n}),(0,r.jsxs)("div",{className:"flex h-5 min-w-fit items-center justify-center gap-x-1.5",children:[s&&(0,r.jsx)(l.t,{name:"clock-snooze",size:"sm",color:"secondary"}),a&&(0,r.jsx)("span",{className:"bg-royal-blue-400 inline-block size-2 roun
1ded-full"})]})]}),(0,r.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,r.jsx)(c.o5,{variant:"body-sm",color:"tertiary",truncate:!0,className:"min-w-0 flex-1 text-left",children:"".concat(p).concat(f)}),(0,r.jsx)(c.o5,{variant:"caption",color:"tertiary",className:"shrink-0",children:o})]})]})},m=function(e){var t=e.chat,n=e.path,m=e.isBotType,b=void 0!==m&&m,y=e.shouldHighlightChat,h=void 0!==y&&y,g=e.isRenderedOnHeader,v=e.isUnread,x=t.community_bot_profile,j=t.community_member,_=t.last_message,w=t.id,O=t.ai_snoozed,S=(b?x:j)||{},P=S.avatar_url,C=S.name,k=S.status,I=b&&!P,N=(0,p.P)();return _?(0,r.jsxs)(u.N_,{className:(0,a.x)("hover:bg-hover dark:hover:bg-primary block cursor-pointer py-2",h?"px-6":"rounded-xl px-4",h&&!N&&"-mx-2",{"!bg-secondary hover:!bg-secondary-dark":void 0!==g&&g}),activeOptions:{exact:!1,includeSearch:!1},activeProps:{className:"!bg-active"},to:n,"data-testid":"chat-room-dm-list",children:[h&&(0,r.jsxs)("div",{className:"flex items-center gap-1 text-secondary hover:text-secondary mb-1",children:[(0,r.jsx)(l.t,{name:"sparkles",size:"sm"}),(0,r.jsx)(c.o5,{variant:"label-xs",color:"secondary",children:(0,d.t)("messaging.agents")})]}),(0,r.jsxs)("div",{className:"flex w-full items-center gap-3",children:[I?(0,r.jsx)("div",{className:"size-8 shrink-0",children:(0,r.jsx)(s.t,{src:o,alt:(0,d.t)("help_widget.home_page.circle_ai_bot_alt"),size:"md"})}):(0,r.jsx)(s.t,{src:P,name:C,status:k,size:"md"}),(0,r.jsx)(f,{isDirect:!0,chatRoomName:null!=C?C:"",timestamp:(0,i.z9)(_.created_at,{format:"short"}),lastMessage:_,isUnread:void 0!==v&&v,isAiSnoozed:O})]})]},w):null}},450125(e,t,n){"use strict";var r=n(391426),o=n(808877),i=n(201525),a=function(e){var t=e.chat,n=e.isRenderedOnHeader,a=(0,o.uc)().chatBotPath;return(0,r.jsx)(i.G,{chat:t,path:a({id:t.id.toString()}),isUnread:t.has_unread_messages_for_member,isRenderedOnHeader:n,isBotType:!0,shouldHighlightChat:!0},t.id)};n.d(t,{f:()=>a})},928382(e,t,n){"use strict";var r=n(391426),o=n(421434),i=n(844842),a=n(230763),s=n(985068);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e){var t=e.isDirect,n=e.otherParticipants,c=(0,a.Od)().currentCommunityMember;if(t){var u=(function(e){if(Array.isArray(e))return e}(n)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(n)||function(e){if(e){if("string"==typeof e)return l(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,1)}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]||{},d=u.avatar_url,p=u.name,f=u.status,m=(0,s.M)(f);return(0,r.jsx)(i.t,{src:d,name:p,status:m,size:"md"})}if(0===n.length){var b=null!=c?c:{},y=b.avatar_url,h=b.name;return(0,r.jsx)(i.t,{src:y,name:h,size:"md"})}if(1===n.length){var g=n[0],v=g.avatar_url,x=g.name;return(0,r.jsx)(i.t,{src:v,name:x,size:"md"})}var j=function(e){return{name:e.name,src:e.avatar_url}},_=[j(n[0]),j(n[1])];return(0,r.jsx)(o.E,{isFullRounded:!0,users:_})};n.d(t,{e:()=>c})},685037(e,t,n){"use strict";var r=n(391426),o=n(892907),i=n(417980),a=function(e){var t,n,a=e.isDirect,s=e.lastMessage,l=e.draftText,c=e.currentCommunityMember,u=s.body||(null==(n=s.rich_text_body)?void 0:n.circle_ios_fallback_text)||"";return(0,r.jsx)(o.o5,{variant:"body-sm",color:"tertiary",className:"line-clamp-1 overflow-hidden hyphens-auto break-all text-left",children:l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.o5,{variant:"body-sm",color:"danger",component:"span",children:"".concat((0,i.t)("messaging.draft"),":")})," ",l]}):"".concat((null==s||null==(t=s.sender)?void 0:t.community_member_id)===(null==c?void 0:c.id)?"".concat((0,i.t)("messaging.you"),": "):a?"":"".concat(s.sender.name,": ")).concat(u)})};n.d(t,{n:()=>a})},159824(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(817751),a=n(417980),s=function(e){var t=e.isPinned,n=e.currentParticipant,s=e.hasUnreadMessages,l=e.className;return(0,r.jsxs)("div",{className:(0,o.x)("flex h-5 flex-row items-center gap-1.5",l),children:[t&&(0,r.jsx)(i.t,{name:"pin","aria-label":(0,a.t)("messaging.pinned_message"),"aria-hidden":!1,size:"sm",color:"tertiary"}),(null==n?void 0:n.muted)?(0,r.jsx)(i.t,{name:"bell-mute","aria-label":(0,a.t)("header_v3.muted"),size:"sm",color:"tertiary"}):s&&(0,r.jsx)("span",{className:"bg-royal-blue-400 inline-block size-2 roun
1ded-full ml-1.5"})]})};n.d(t,{G:()=>s})},377211(e,t,n){"use strict";var r=n(391426),o=n(34819),i=n(314054),a=n(417980),s=n(700613),l=n(947331),c=function(){var e=(0,l.UF)().showMessagesTab,t=(0,s.v)(),n=t.markAllChatRoomAsRead,c=t.isLoading;return e?(0,r.jsx)(i.m,{content:(0,a.t)("header_v3.mark_all_as_read"),children:(0,r.jsx)(o.K,{icon:"checkmark-double",variant:"ghost",size:"md",onClick:function(){return n()},loading:c,"aria-label":(0,a.t)("header_v3.mark_all_as_read")})}):null};n.d(t,{W:()=>c})},228242(e,t,n){"use strict";n.d(t,{J:()=>y});var r=n(391426),o=n(737225),i=n(974618),a=n(417980),s=n(465274),l=n(568316),c=n(570310),u=n(906532),d=function(e){var t,n=e.logoUrl,o=e.iconUrl,i=e.bgColor,a=e.name,s=void 0===a?"":a,d=e.rootUrl,p=e.isActive,f=e.notificationCount,m=void 0===f?0:f,b=(0,u.sC)().backgroundColor,y=!!n,h=!!o;return(0,r.jsx)("a",{href:d,children:(0,r.jsxs)("div",{className:(0,c.x)("relative flex items-center justify-center p-3",{"bg-tertiary rounded-sm":void 0!==p&&p}),children:[(0,r.jsxs)("div",{className:"flex w-full items-center gap-6",children:[(0,r.jsx)("div",{className:"text-badge flex size-[40px] min-w-[40px] cursor-pointer items-center justify-center rounded-sm uppercase",style:y||h?{}:{backgroundColor:i},children:(t=s.charAt(0),y?(0,r.jsx)("img",{loading:"lazy",src:n,alt:""}):h?(0,r.jsx)("img",{loading:"lazy",src:o,style:{width:"40",height:"40"},alt:""}):t)}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,r.jsx)(l.o.LabelMd,{weight:"semibold",children:s})}),(0,r.jsx)(l.o.LabelSm,{color:"text-light",children:d})]})]}),m>0&&(0,r.jsx)("span",{className:"text-badge flex h-[20px] min-w-[20px] items-center justify-center rounded-full bg-red-500 font-bold",style:{borderColor:b},children:(0,r.jsx)(l.o.LabelSm,{color:"#fff",children:m})})]})})},p=n(674251),f=function(e){var t=e.onClickDone,n=(0,s.e)().communities;return(0,r.jsxs)("div",{className:"relative flex size-full flex-col gap-1 py-1.5",children:[(0,r.jsxs)("div",{className:"mb-3.5 flex w-full cursor-pointer items-center justify-end px-3",children:[(0,r.jsx)("div",{className:"w-full flex-1",children:(0,r.jsx)(p.o.LabelLg,{weight:"semibold",children:(0,a.t)("mobile_community_switcher.my_communities")})}),(0,r.jsx)("button",{type:"submit",onClick:t,children:(0,r.jsx)(p.o.LabelSm,{weight:"semibold",children:(0,a.t)("mobile_community_switcher.done")})})]}),n.map(function(e){var t,n,o;return(0,r.jsx)(d,{isActive:e.is_current_community,rootUrl:e.root_url,logoUrl:null!=(t=e.logo_attachment_url)?t:"",iconUrl:null!=(n=e.icon_attachment_url)?n:"",bgColor:null!=(o=e.brand_color)?o:"",name:e.name},e.id)})]})},m=function(){var e=(0,i.hS)();return(0,r.jsxs)(o.aF,{isOpen:e.visible,onClose:e.hide,contentPortalId:"mobile-community-switcher-modal",title:(0,a.t)("community_switcher_title"),children:[(0,r.jsx)(o.aF.Overlay,{}),(0,r.jsx)(o.aF.Content,{size:"xl",children:(0,r.jsx)(o.aF.Body,{className:"!px-3",children:(0,r.jsx)(f,{onClickDone:e.hide})})})]})},b=i.PT.create(function(){return(0,r.jsx)(m,{})}),y=function(){return(0,i.hS)(b)}},593703(e,t,n){"use strict";n.d(t,{A:()=>I});var r=n(809061),o=n(391426),i=n(337162),a=n(519104),s=n(258752),l=n(417980),c=n(111582),u=n(717526),d=function(e){var t=e.position,n=e.onSuccess,r=(0,a.Z)(),o=(0,u.d)(),d=o.success,p=o.error,f=(0,i.t)().actions;return(0,s.n_)({mutationFn:function(e){var n,r;return c.K.create({space_group:(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),r=r={position:t},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n)})},onSuccess:function(e){d((0,l.t)("space_groups.form.create.saved_successfully")),f.refresh(),n(),r({to:"/s/$spaceGroupSlug",params:{spaceGroupSlug:e.slug}})},onError:function(e){p("string"==typeof e.errorDetails?e.errorDetails:(0,l.t)("space_groups.form.create.save_error"))}})},p=n(927561),f=n(334696),m=n(453602),b=n(526842),y={name:"",slug:"",hide_members_count:!1,is_hidden_from_non_members:!1,hide_non_member_spaces_from_sidebar:!1,allow_members_to_create_space
1s:!1,automatically_add_members_to_new_spaces:!1,add_members_to_space_group_on_space_join:!1},h=function(e){var t=e.formId,n=e.onSubmit,r=e.prefillData;return(0,o.jsxs)(p.l,{id:t,onSubmit:n,defaultValues:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},y,r),formClassName:"flex flex-col gap-4",children:[(0,o.jsx)(f.h,{}),(0,o.jsx)(m.x,{}),(0,o.jsx)(b.X,{})]})},g=n(791009),v="new-space-group-form",x=n(737225),j=n(974618),_=n(938372),w=n.n(_),O=n(70899),S=n(348413),P=function(e){var t=e.onSubmit,n=e.formId,r=e.prefillData;return(0,o.jsx)(p.l,{id:n,onSubmit:t,defaultValues:r||{},className:"h-full",children:(0,o.jsxs)("div",{className:"flex-1",children:[(0,o.jsx)(S.h,{}),(0,o.jsx)(O.D,{})]})})};P.propTypes={onSubmit:w().func,formId:w().string,prefillData:w().object};var C=n(387099),k="new-space-group-form",I=(0,r.F)(function(e){var t=e.open,n=e.onOpenChange,r=e.position,i=e.prefillData,a=d({position:r,onSuccess:function(){return n(!1)}}),s=a.mutate,c=a.isPending;return(0,o.jsx)(g.a.Root,{open:t,onOpenChange:n,size:"lg",children:(0,o.jsxs)(g.a.Content,{children:[(0,o.jsx)(g.a.Header,{title:(0,l.t)("space_groups.form.create.title")}),(0,o.jsx)(g.a.Body,{children:(0,o.jsx)(h,{formId:v,onSubmit:s,prefillData:i})}),(0,o.jsx)(g.a.Footer,{secondaryAction:{label:(0,l.t)("cancel"),onClick:function(){return n(!1)}},primaryAction:{label:c?(0,l.t)("space_groups.form.create.submitting"):(0,l.t)("space_groups.form.create.submit"),type:"submit",form:v,loading:c}})]})})},function(e){var t=e.position,n=e.prefillData,r=(0,j.hS)(),i=d({position:t,onSuccess:function(){r.hide()}}),a=i.mutate,s=i.isPending;return(0,o.jsxs)(x.aF,{title:(0,l.t)("space_groups.form.create.title"),isOpen:r.visible,onClose:r.hide,children:[(0,o.jsx)(x.aF.Overlay,{}),(0,o.jsxs)(x.aF.Content,{size:"md",children:[(0,o.jsxs)(x.aF.Header,{className:"!px-6 md:!px-8",children:[(0,o.jsx)(x.aF.Title,{size:"md",children:(0,l.t)("space_groups.form.create.title")}),(0,o.jsx)(x.aF.HeaderActions,{children:(0,o.jsx)(x.aF.CloseButton,{onClick:r.hide})})]}),(0,o.jsx)(x.aF.Body,{className:"!px-6 md:!px-8",children:(0,o.jsx)(P,{formId:k,onSubmit:a,prefillData:n})}),(0,o.jsx)(x.aF.Footer,{className:"flex justify-end",children:(0,o.jsx)(C.$,{type:"submit",variant:"circle",form:k,disabled:s,full:!0,large:!0,children:s?(0,l.t)("space_groups.form.create.submitting"):(0,l.t)("space_groups.form.create.submit")})})]})]})})},95427(e,t,n){"use strict";var r=n(391426),o=n(933578);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a=(0,o.createContext)({filters:{},setFilters:function(){},resetFilters:function(){}}),s=function(e){var t,n=e.children,s=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)({}))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return i(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1];return(0,r.jsx)(a.Provider,{value:{filters:l,setFilters:c,resetFilters:function(){return c({})}},children:n})},l=function(){return(0,o.useContext)(a)};a.displayName="FilterContext",n.d(t,{b:()=>l,d:()=>s})},560457(e,t,n){"use strict";var r=n(391426),o=n(230763),i=n(933578);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l={Latest:"latest",Oldest:"oldest",Popular:"popular",Likes:"likes",Alphabetical:"alphabetical",NewActivity:"new_activity",Relevance:"relevance"}
1,c=(0,i.createContext)({sort:{posts:l.Relevance,comments:l.Relevance,events:l.Relevance,lessons:l.Relevance,members:l.Relevance},setSort:function(){}});c.displayName="SortContext";var u=function(e){var t,n=e.children,u=(0,o.Od)().currentCommunity,d=null==u?void 0:u.default_search_sorting,p=d&&Object.values(l).includes(d)?d:l.Relevance,f=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)({posts:p,comments:p,events:p,lessons:p,members:p}))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return a(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=f[0],b=f[1];return(0,r.jsx)(c.Provider,{value:{sort:m,setSort:function(e,t){b(function(n){var r,o;return r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){s(e,t,n[t])})}return e}({},n),o=null!=(o=s({},e,t))?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r})}},children:n})},d=function(){return(0,i.useContext)(c)};n.d(t,{DY:()=>d,nR:()=>u,py:()=>l})},208690(e,t,n){"use strict";n.d(t,{w:()=>x});var r=n(391426),o=n(737225),i=n(974618),a=n(95427),s=n(560457),l=n(620708),c=n(570310),u=n(933578),d=n(417980),p=n(492302),f=n(231127),m=n(617593),b=["skeleton-1","skeleton-2","skeleton-3"],y=function(){return(0,r.jsxs)("div",{className:"bg-primary",children:[(0,r.jsxs)("div",{className:"border-primary flex w-full items-center gap-3 border-b p-4 md:px-6",children:[(0,r.jsx)(m.E,{shape:"rounded",className:"size-5 shrink-0"}),(0,r.jsx)(m.E,{shape:"rounded",className:"h-5 w-1/2"})]}),(0,r.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-4",children:b.map(function(e){return(0,r.jsxs)("li",{className:"flex list-none items-center gap-3 px-2 py-1",children:[(0,r.jsx)(m.E,{shape:"pill",className:"size-6 shrink-0"}),(0,r.jsx)(m.E,{shape:"rounded",className:"h-4 w-1/2"})]},e)})})]})},h=(0,l.Z)(function(){return Promise.all([n.e(31040),n.e(25266),n.e(53767),n.e(71317)]).then(n.bind(n,950772)).then(function(e){return{default:e.SpotlightSearchInput}})}),g=function(){var e=(0,i.hS)();return(0,f.T)("circle_v4_modals_enabled")?(0,r.jsx)(p.H,{isOpen:e.visible,onClose:e.hide}):(0,r.jsxs)(o.aF,{title:(0,d.t)("search_v2.search_community_quick"),isOpen:e.visible,onClose:e.remove,children:[(0,r.jsx)(o.aF.Overlay,{}),(0,r.jsx)(o.aF.Content,{position:"top",className:(0,c.x)("border-primary w-full rounded-[0px] sm:rounded-md sm:border md:w-[620px]"),size:"xl",children:(0,r.jsx)(a.d,{children:(0,r.jsx)(s.nR,{children:(0,r.jsx)(u.Suspense,{fallback:(0,r.jsx)(y,{}),children:(0,r.jsx)(h,{onClose:e.hide})})})})})]})},v=i.PT.create(function(){return(0,r.jsx)(g,{})}),x=function(){return(0,i.hS)(v)}},665667(e,t,n){"use strict";var r=n(391426),o=n(257957),i=n(620529),a=function(e){var t=e.isOpen,n=e.onClose;return(0,r.jsx)(i.w,{open:t,onOpenChange:n,children:(0,r.jsx)("div",{className:"flex size-full items-center justify-center bg-secondary",children:(0,r.jsx)(o.a,{})})})};n.d(t,{K:()=>a})},99443(e,t,n){"use strict";n.d(t,{v:()=>B});var r=n(391426),o=n(974618),i=n(231127),a=n(791009),s=n(642400),l=n(933578),c=n(417980),u=n(168330),d=n(617373),p=n(477593),f=n(870969),m=n(824847),b=n(285834),y=n(146917),h=n(274685),g=n(258752),v=n(545923),x=n(244174),j=n(717526),_=n(51730),w=n(915779),O="settings.moderation.review_flagged_content_modal",S=function(e,t){var n,r,o=(0,j.d)(),i=o.success,a=o.error,s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};
1return(0,_.kS)(w.iK.flaggedContent.approve({id:e}),{flag_member:t.flagMember,flag_for_connect:t.flagForConnect})},l=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,_.kS)(w.iK.flaggedContent.reject({id:e}),{action_reason_body:t,flag_member:n.flagMember,flag_for_connect:n.flagForConnect,flag_for_chat:n.flagForChat,disable_direct_messaging:n.disableDirectMessaging,disable_connections:n.disableConnections})},u=(0,h.jE)(),d=(0,g.IT)((n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},b.oq.byContentable(e,t)),r=r={enabled:!!e},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n)),S=d.data,P=d.isInitialLoading,C=null==S?void 0:S.id,k=function(n){if(t===p.M$){var r,o=null==S||null==(r=S.flagged_contentable)?void 0:r.id;o&&(y.w.allPosts(),y.w.postDetails(o))}else if(t===p.lr){var i,a=null==S?void 0:S.flagged_contentable,s=null==a?void 0:a.post_id,l=null==a?void 0:a.id;u.refetchQueries({queryKey:(0,v._)({postId:s,parentCommentId:null==a?void 0:a.parent_comment_id})}),u.refetchQueries({queryKey:(0,f.A)({postId:s,id:e})}),s&&l&&("approved"===n?m.S0.moderationApprove({postId:s,id:l}):m.S0.moderationReject({postId:s,id:l,parentCommentId:null!=(i=null==a?void 0:a.parent_comment_id)?i:null}))}else t===p.Sk&&u.invalidateQueries({queryKey:[x.Ub]})},I=(0,g.n_)({mutationFn:function(e){var t=e.options;if(!C)throw Error("Flagged content not found");return s(String(C),t)},onSuccess:function(){k("approved"),i((0,c.t)([O,"success_approving"]))},onError:function(){return a((0,c.t)([O,"error_approving"]))}}),N=I.mutate,A=I.isPending,E=(0,g.n_)({mutationFn:function(e){var t=e.reason,n=e.options;if(!C)throw Error("Flagged content not found");return l(String(C),t,n)},onSuccess:function(){k("rejected"),i((0,c.t)([O,"success_rejecting"]))},onError:function(){return a((0,c.t)([O,"error_rejecting"]))}});return{approveFlaggedContent:N,isApproving:A,rejectFlaggedContent:E.mutate,isRejecting:E.isPending,isLoading:P,flaggedContent:S}},P=n(148131),C="settings.moderation.review_flagged_content_modal",k=function(e){var t=e.flaggedContentId,n=e.flaggedContentType,o=e.open,i=e.onOpenChange,f=S(t,n),m=f.approveFlaggedContent,b=f.rejectFlaggedContent,y=f.flaggedContent,h=f.isApproving,g=f.isRejecting,v=null!=y?y:{},x=v.author_is_flagged,j=v.flagged_contentable,_=v.initiator_is_flagged_for_connect,w=v.reports,O=void 0===w?[]:w,k=v.status,I=null==j?void 0:j.type,N=O.length,A=I===p.Sk&&!!(null==j?void 0:j.is_embedded),E=(0,P.G)(y),R=(0,l.useCallback)(function(e){m({options:e}),i(!1)},[m,i]),L=(0,l.useCallback)(function(e,t){b({reason:e,options:t}),i(!1)},[b,i]),D=(0,d.W)({flaggedContentId:t,isAuthorFlagged:x,isFlaggedForConnect:_,isEmbeddedChat:A,status:null!=k?k:void 0,type:I,onApprove:R,onReject:L}),T=D.rejectState,M=D.setRejectState,F=D.handleRejectWithOptions,K=D.handleRejectWithReason,B=D.rejectMenuOptions,q=D.approveMenuOptions,U=D.rejectLabel,z=D.resetRejectState,W=(0,l.useCallback)(function(e){e||z(),i(e)},[i,z]);if(void 0===k||!I)return null;var $=!k,V=$||"approved"===k,H={label:(0,c.t)([C,"reject"]),variant:"primary",onClick:function(){return F()},menuOptions:B.length>0?B:void 0},G={label:(0,c.t)([C,"approve"]),disabled:h,onClick:function(){return R()},menuOptions:q.length>0?q:void 0},Z=($||"rejected"===k)&&V?{label:(0,c.t)([C,"approve"]),onClick:function(){return R()}}:void 0;return(0,r.jsx)(a.a.Root,{open:o,onOpenChange:W,size:"lg",children:(0,r.jsxs)(a.a.Content,{children:[(0,r.jsx)(a.a.Header,{title:(0,c.t)("flagged_contents.moderation_info.reports_title",{count:N}),description:E}),(0,r.jsxs)(a.a.Body,{children:[(0,r.jsx)(u.U,{reports:O}),T.isActive&&(0,r.jsx)("div",{className:"pt-4",children:(0,r.jsx)(s.f,{rows:3,placeholder:(0,c.t)([C,"rejection_note_placeholder"]),value:T.reason,onChange:function(e){return M(function(t){var n,r;return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t),r=r={reason:e.target.value},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n})},label:(0,c.t)([C,"moderation_note"])})})]}),T.isActive?(0,r.jsx)(a.a.Footer,{primaryAction:{label:U,variant:"primary",disabled:g,onClick:K}}):(0,r.jsx)(a.a.Footer,{secondaryAction:Z,primaryAction:V?H:G})]})})},I=n(737225),N=n(200673),A=n(519970),E=n(518757);function R(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function L(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){R(i,r,o,a,s,"next",e)}function s(e){R(i,r,o,a,s,"throw",e)}a(void 0)})}}function D(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var T=function(e){var t=e.flaggedContentId,n=e.flaggedContentType,i=(0,o.hS)(),a=S(t,n),s=a.approveFlaggedContent,l=a.rejectFlaggedContent,u=a.flaggedContent,d=a.isApproving,f=a.isRejecting,m=null!=u?u:{},b=m.author_is_flagged,y=m.flagged_contentable,h=m.initiator_is_flagged_for_connect,g=m.reports,v=void 0===g?[]:g,x=m.status,j=null==y?void 0:y.type,_=v.length;return void 0!==x&&j?(0,r.jsxs)(I.aF,{isOpen:i.visible,onClose:i.hide,contentPortalId:"review-modal-content",children:[(0,r.jsx)(I.aF.Overlay,{}),(0,r.jsxs)(I.aF.Content,{size:"lg",children:[(0,r.jsxs)(I.aF.Header,{children:[(0,r.jsx)(I.aF.Title,{size:"sm",children:(0,c.t)("flagged_contents.moderation_info.reports_title",{count:_})}),(0,r.jsx)(I.aF.HeaderActions,{className:"absolute right-0 top-0 mr-6 mt-6",children:(0,r.jsx)(I.aF.CloseButton,{onClick:i.hide})})]}),(0,r.jsxs)(I.aF.Body,{className:"flex flex-col !p-0",children:[(0,r.jsx)(A.T,{content:u}),(0,r.jsx)(N.U,{reports:v})]}),(0,r.jsx)(I.aF.Footer,{className:"!p-0",children:(0,r.jsx)(E.V,{i18nRoot:"settings.moderation.review_flagged_content_modal",status:x,isApproving:d,isRejecting:f,isAuthorFlagged:b,isEmbeddedChat:j===p.Sk&&!!(null==y?void 0:y.is_embedded),isFlaggedForConnect:h,onApprove:function(e){return L(function(){return D(this,function(t){switch(t.label){case 0:return s({options:e}),[4,i.hide()];case 1:return t.sent(),[2]}})})()},onReject:function(e,t){return L(function(){return D(this,function(n){switch(n.label){case 0:return l({reason:e,options:t}),[4,i.hide()];case 1:return n.sent(),[2]}})})()},type:j})})]})]}):null};function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var F=o.PT.create(function(e){return(0,r.jsx)(T,M({},e))}),K=o.PT.create(function(e){var t,n,i=(0,o.hS)();return(0,r.jsx)(k,(t=M({},e),n=n={open:i.visible,onOpenChange:function(e){e||i.hide()}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}),B=function(){var e=(0,i.T)("circle_v4_modals_enabled");return(0,o.hS)(e?K:F)}},148131(e,t,n){"use strict";var r=n(417980),o=n(477593),i="settings.moderation.review_flagged_content_modal.visibility_info",a=function(e){var t=null==e?void 0:e.flagged_contentable,n=null==t?void 0:t.type;if(t&&n!==o.fE&&n!==o.Sk){var a=t.flagged_for_approval_at,s=t.removed_at;return a||s?(0,r.t)([i,"hidden_until_approved"]):(0,r.t)([i,"visible_to_all_members"])}};n.d(t,{G:()=>a})},551172(e,t,n){"use strict";var r=n(876823),o=n.n(r),i=n(417980),a=function(e){return(0,i.t)("flagged_contents.moderation_info.".concat(o()(e)))},s=function(e){return!!e.unresolved_flagged_reports_count};n.d(t,{F:()=>a,b:()=>s})},385335(e,t,n){"use strict";n.d(t,{l:()=>d});var r=n(391426),o=n(973646),i=n(777323),a=n(568316),s=n(125665),l=n(417980),c=n(99443),u=n(551172),d={Regular:function(e){var t=e.record,n=e.contentType,d=(0,c.v)();if(!(0,u.b)(t))return null;var p=(0,u.F)(n);return(0,r.jsx)(i.H,{className:"!py-2",iconEl:(0,r.jsx)(o.In,{className:"text-v2-warning",type:"20-info",size:20}),children:(0,r.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,r.jsxs)(a.o.LabelSm,{children:[(0,l.t)("flagged_contents.moderation_info.flagged_report_content",{content:p}),(0,r.jsx)(s.E,{content:(0,l.t)("flagged_contents.moderation_info.flagged_report_count",{count:t.unresolved_flagged_reports_count}),as:"span"})]}),(0,r.jsx)("button",{type:"button",onClick:function(){return d.show({flaggedContentId:String(t.id),flaggedContentType:n})},className:"hover:bg-v2-warning-100 dark:hover:bg-primary rounded-full border border-black bg-transparent px-4 py-1 transition dark:border-white",children:(0,r.jsx)(a.o.LabelSm,{weight:"semibold",children:(0,l.t)("flagged_contents.moderation_info.review_button")})})]})})},Short:function(e){var t=e.record,n=e.contentType,s=(0,c.v)();if(!(0,u.b)(t))return null;var d=(0,u.F)(n),p=(0,l.t)("flagged_contents.moderation_info.short_content",{content:d});return(0,r.jsx)("button",{type:"button",onClick:function(){return s.show({flaggedContentId:String(t.id),flaggedContentType:n})},className:"dark:bg-primary cursor-pointer rounded-md bg-amber-50",children:(0,r.jsx)(i.H,{className:"!py-2",iconEl:(0,r.jsx)(o.In,{className:"text-v2-warning",type:"20-info",size:20}),children:(0,r.jsx)(a.o.LabelSm,{children:p})})})}}},595023(e,t,n){"use strict";var r=n(391426),o=n(125665),i=n(974618),a=n(791009),s=n(892907),l=n(933578),c=n(417980),u=n(288800);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var p=function(){var e,t=(0,i.hS)(),n=function(e){if(Array.isArray(e))return e}(e=(0,l.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return d(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=n[0],f=n[1],m=function(){t.hide(),t.remove()},b=(0,u.K)({showSuccessModal:!0,redirectTo:"/ai",onError:function(){return f(!1)}}).mutate;return(0,r.jsx)(a.a.Root,{open:t.visible,onOpenChange:function(e){e||p||m()},size:"md",children:(0,r.jsxs)(a.a.Content,{children:[(0,r.jsx)(a.a.Header,{title:(0,c.t)("activation_confirmation_modal.title")}),(0,r.jsx)(a.a.Body,{children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(s.o5,{variant:"body-md",color:"primary",children:(0,c.t)("activation_confirmation_modal.body_paragraph_1")}),(0,r.jsx)(s.o5,{variant:"body-md",color:"primary",component:"div",children:(0,r.jsx)(o.E,{content:(0,c.t)("activation_confirmation_modal.body_paragraph_2"),className:"[&_strong]:font-semibold"})})]})}),(0,r.jsx)(a.a.Footer,{secondaryAction:{label:(0,c.t)("activation_confirmation_modal.cancel_text")},primaryAction:{label:(0,c.t)("activation_confirmation_modal.cta_text"),onClick:function(){f(!0),b()},loading:p,disabled:p}})]})})},f=i.PT.create(function(){return(0,r.jsx)(p,{})}),m=function(){return(0,i.hS)(f)};n.d(t,{K:()=>m})},288800(e,t,n){"use strict";var r=n(258752),o=n(179594),i=n(51730),a=n(915779),s=n(417980),l=n(71
17526),c=n(112493);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.minimumLoadingDurationMs,n=e.onSuccess,u=e.onError,f=e.redirectTo,m=void 0===f?"/feed":f,b=e.showPreviewModal,y=void 0!==b&&b,h=e.showSuccessModal,g=void 0!==h&&h,v=e.showActivationLoadingScreen,x=void 0!==v&&v,j=(0,l.d)(),_=(0,o.Fo)(o.JR).set,w=(0,o.Fo)(o.pw).set,O=(0,c.V)(),S=O.clear,P=O.start,C=(0,r.n_)({mutationFn:function(){var e;return(e=function(){var e;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:if(e=(0,i.oK)(a.iK.settings.v4_ui_preference.activate()),!t)return[2,e];return[4,Promise.all([e,new Promise(function(e){return setTimeout(e,t)})])];case 1:return[2,p.apply(void 0,[n.sent(),1])[0]]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,s,"next",e)}function s(e){d(i,r,o,a,s,"throw",e)}a(void 0)})})()},onMutate:function(){x&&P()},onSuccess:function(){g&&_(!0),y&&w(!0),null==n||n(),window.location.href=m},onError:function(){x&&S(),j.error((0,s.t)("failed_to_save_changes")),null==u||u()}});return{mutate:C.mutate,isActivating:C.isPending}};n.d(t,{K:()=>f})},325930(e,t,n){"use strict";var r=n(179594),o=n(698804),i=n(244405),a=function(){try{var e=i.Q.getItem(r.uT);if(!e)return!1;return!0===JSON.parse(e)}catch(e){return!1}},s=function(e){try{if(e)return void i.Q.setItem(r.uT,JSON.stringify(!0));i.Q.removeItem(r.uT)}catch(e){console.warn('Unable to access session storage for key "'.concat(r.uT,'".'))}},l=(0,o.vt)(function(e){return{isVisible:a(),start:function(){s(!0),e({isVisible:!0})},clear:function(){s(!1),e({isVisible:!1})}}});n.d(t,{H:()=>l})},529293(e,t,n){"use strict";var r=n(391426),o=n(617593),i=n(574795),a=n(417980),s=n(325930),l=n(80421),c=function(){return(0,s.H)(function(e){return e.isVisible})?(0,i.createPortal)((0,r.jsxs)("div",{className:"bg-secondary fixed inset-0 z-[9999] flex flex-col p-4","aria-live":"polite","aria-busy":"true",children:[(0,r.jsx)("span",{className:"sr-only",children:(0,a.t)("version_activation_loading_screen.message")}),(0,r.jsx)("div",{className:"relative flex flex-1 rounded-t-2xl",children:(0,r.jsxs)("div",{className:"relative flex flex-1 rounded-xl shadow-[0px_1px_2px_0px_rgba(0,0,0,0.05)]",children:[(0,r.jsx)("div",{className:l.A.gradientBorderGlow,"aria-hidden":!0}),(0,r.jsx)("div",{className:l.A.gradientBorderRing,"aria-hidden":!0}),(0,r.jsx)("div",{className:"bg-primary relative z-[1] m-px flex flex-1 items-center justify-center overflow-hidden rounded-[11px]",children:(0,r.jsxs)("div",{className:"flex w-full max-w-[612px] flex-col items-center gap-4 px-4 py-3",children:[(0,r.jsx)(o.E,{shape:"pill",className:"size-10"}),(0,r.jsxs)("div",{className:"flex w-full flex-col items-center gap-2",children:[(0,r.jsx)(o.E,{shape:"square",className:"h-[29px] w-full"}),(0,r.jsx)(o.E,{shape:"square",className:"h-36 w-full"})]}),(0,r.jsx)(o.E,{shape:"pill",className:"h-[34px] w-[174px]"})]})})]})})]}),document.body):null};n.d(t,{D:()=>c})},112493(e,t,n){"use strict";var r=n(933578),o=n(325930),i=function(){var e=(0,o.H)(function(e){return e.isVisible}),t=(0,o.H)(function(e){return e.start});return{clear:(0,o.H)(function(e){return e.clear}),isVisible:e,start:t}},a=function(){var e=(0,o.H)(function(e){return e.isVisible}),t=(0,o.H)(function(e){return e.clear});(0,r.useLayoutEffect)(function(){e&&t()},[t,e])};n.d(t,{S:()=>a,V:()=>i})},179594(e,t,n){"use strict";var r=n(244405),o=function(e){return{get:function(t){var n,o=t.onErrorValue;try{return JSON.parse(null!=(n=r.Q.getItem(e))?n:"null")}catch(t){return console.warn('Unable to access session storage for key "'.concat(e,'".')),o}},set:function(t){try{r.Q.setItem(e,JSON.stringify(t))}catch(t){console.warn('Unable to access session storage for key "'.concat(e,'".'))}},remove:function(){try{r.Q.removeItem(e)}catch(t){console.warn('Unable to access session storage for key "'.concat(e,'".'))}}}};n.d(t,{Fo:()=>o,JR:()=>"showActivationModal",VM:()=>"showActivationConfirmationModal",pw:()=>"showPreviewModal",uT:()=>"showActivationLoadingScreen"})}
1,638317(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(258752),a=n(417980),s=n(717526),l=function(){var e=(0,s.d)().error;return(0,i.n_)({mutationFn:function(){return(0,r.oK)(o.iK.settings.v4_ui_preference.rollback())},onSuccess:function(){window.location.href="/"},onError:function(){e((0,a.t)("failed_to_save_changes"))}})};n.d(t,{q:()=>l})},849205(e,t,n){"use strict";var r=new Date("2026-06-16T04:00:00.000Z"),o=new Date("2026-06-16T16:55:00.000Z"),i=new Date("2026-06-16T18:00:00.000Z"),a=function(){var e=new Date;return e>=o&&e<i},s=function(){var e=new Date;return e>=r&&e<o},l=function(){return new Date>=i},c=function(){return!a()},u="https://circle.so",d="".concat(u,"/eclipse"),p="".concat(u,"/eclipse-release"),f="".concat(d,"?").concat(new URLSearchParams({utm_source:"marketing",utm_medium:"product",utm_campaign:"eclipse-pmm-reveal",utm_content:"in-app-banner-2"}).toString());n.d(t,{$T:()=>3,A6:()=>s,AE:()=>c,CT:()=>f,D$:()=>"#08091A",Eg:()=>"eclipse:cta_clicked",J4:()=>u,Q3:()=>"https://vz-da4db2af-583.b-cdn.net/dc69fda8-cba1-4ca1-93ad-bcf3095cde02/playlist.m3u8",Vz:()=>r,aA:()=>"/eclipse",eF:()=>a,fM:()=>d,ix:()=>p,qT:()=>l,t1:()=>3500,wL:()=>"#1e1e20",wr:()=>"circle-v4-opt-in-bar-dismissed-at"})},49763(e,t,n){"use strict";var r=function(e){var t=e.action;return"notifications__row--".concat((null==t?void 0:t.includes("flagged"))?"flagged":t)};n.d(t,{C:()=>r})},839491(e,t,n){"use strict";var r=n(230763),o=function(){var e,t=(0,r.Od)().currentCommunity;return!!(null==t||null==(e=t.policies)?void 0:e.is_paywall_payment_settings_available)};n.d(t,{Y:()=>o})},296732(e,t,n){"use strict";var r=n(230763),o=function(){var e,t=(0,r.Od)().currentCommunity;return null==t||null==(e=t.policies)?void 0:e.is_paywall_tax_available};n.d(t,{u:()=>o})},160870(e,t,n){"use strict";var r=n(391426),o=n(717136),i=n(914829),a=function(e){var t=e.value,n=void 0===t?"":t;return(0,r.jsx)(i.k,{readOnly:!0,readonly:!0,value:n,endContent:(0,r.jsx)(o.z,{value:n})})};n.d(t,{Y:()=>a})},603229(e,t,n){"use strict";var r=n(933578),o=n(417980);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a=function(e){var t,n=e.isSubmitting,a=e.onSelectAction,s=e.status,l="quick_post.scheduled_post_ui.".concat(void 0!==n&&n?"submitting_button":"submit_button"),c=(0,r.useMemo)(function(){return[{label:(0,o.t)("".concat(l,".save_draft")),value:"draft"},{label:(0,o.t)("".concat(l,".schedule_post")),value:"scheduled"},{label:(0,o.t)("".concat(l,".publish")),value:"published"}]},[l]),u=s||"published",d=null!=(t=c.find(function(e){return e.value===u}))?t:c[2],p=(0,r.useMemo)(function(){return c.filter(function(e){return e.value!==d.value}).map(function(e){return{label:e.label,onClick:function(){return a(e)}}})},[a,c,d]),f=(0,r.useCallback)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.isEdit;return(0,o.t)("".concat(l,".").concat(void 0!==t&&t?"save":"publish"))},[l]);return{getModalPrimaryAction:(0,r.useCallback)(function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,o=(function(e){if(Array.isArray(e))return e}(e=[r])||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return i(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,1)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],a=void 0===o?{}:o,s=a.isEdit,l=a.shouldShowActionSelector,c=void 0===l||l;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(a,["isEdit","shouldShowActionSelector"])),n=n={label:c?d.label:f({isEdit:void 0!==s&&s}),menuOptions:c?p:void 0},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t},[f,p,d.label]),getSubmitLabel:f,menuOptions:p,options:c,selectedAction:d,translationKey:l}};n.d(t,{P:()=>a})},735815(e,t,n){"use strict";var r=n(391426),o=n(739042),i=n(914781),a=n(790389),s=n(242934),l=n(713864),c=n(933578),u=n(417980);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var p=function(e){var t,n=e.align,p=e.anchor,f=e.disabledDays,m=e.endMonth,b=void 0===m?(0,s.Q)((0,l.e)(new Date,10)):m,y=e.onOpenChange,h=e.onSave,g=e.open,v=e.side,x=e.trigger,j=e.value,_=function(e){if(Array.isArray(e))return e}(t=(0,c.useState)(j))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return d(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),w=_[0],O=_[1];return(0,c.useEffect)(function(){g&&O(j)},[g,j]),(0,r.jsxs)(a.A,{align:void 0===n?"end":n,anchor:p,className:"w-[18rem] p-0",closeOnContentClick:!1,onOpenChange:y,open:g,side:void 0===v?"bottom":v,sideOffset:8,trigger:x,children:[(0,r.jsx)(i.K,{disabledDays:f,endMonth:b,onChange:O,value:w,timeFormat:"12h"}),(0,r.jsxs)("div",{className:"border-primary grid grid-cols-2 gap-3 border-t p-3",children:[(0,r.jsx)(o.$,{fullWidth:!0,onClick:function(){return y(!1)},type:"button",variant:"outline",children:(0,u.t)("cancel")}),(0,r.jsx)(o.$,{disabled:!w,fullWidth:!0,onClick:function(){w&&(h(w),y(!1))},type:"button",children:(0,u.t)("save")})]})]})};n.d(t,{s:()=>p})},794435(e,t,n){"use strict";var r=n(391426),o=n(200999),i=n(289693),a=n(933578),s=n(417980),l=n(231584),c=n(489994);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var p=function(e){var t=e.post,n=d((0,a.useState)(null),2),u=n[0],p=n[1],f=d((0,a.useState)(!1),2),m=f[0],b=f[1],y=(0,c.X)().mutate;return(0,r.jsxs)("div",{className:"mx-auto w-full pt-4",children:[(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(i.aw,{weight:"semibold",children:(0,s.t)("help_widget.was_this_article_helpful")})}),(0,r.jsx)("div",{className:"mb-6 flex justify-center gap-4",children:(0,r.jsx)(l.p,{value:u,handleFeedback:function(e){m||(p(e),y({postId:t.id,helpful:e}),b(!0))},isFeedbackGiven:m})}),(0,r.jsx)("div",{children:(u||!1===u)&&(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsx)(o.o,{children:(0,s.t)("help_widget.thank_you_for_article_feedback")})})})]})};n.d(t,{U:()=>p})},746364(e,t,n){"use strict";var r=n(915779),o=n(519104),i=n(451430),a=n(933578),s=n(305553),l=function(){var e=(0,o.Z)(),t=(0,s.h)();return{navigateToPost:(0,a.useCallback)(function(n){var o,a,s=n.newPost,l=n.postModal,c=n.params,u=n.hasNextPage,d=n.hash,p=n.shouldFocusOnCommentsSection,f=n.shouldDisableNavigation,m=n.isWithinProfileContext,b=n.profileContextMember,y=n.startingImageIndex,h=n.replace,g=null==d?void 0:d.replace(/^#/,""),v=null!=(o=null==l?void 0:l.spaceSlug)?o:null==s?void 0:s.space_slug,x=null!=(a=null==l?void 0:l.postSlug)?a:null==s?void 0:s.slug;if(v&&x){var j=(0,i.pickBy)({postModal:{spaceSlug:v,postSlug:x},params:c,hasNextPage:u,shouldFocusOnCommentsSection:void 0!==p&&p,shouldDisableNavigation:void 0!==f&&f,isWithinProfileContext:m,profileContextMember:b,startingImageIndex:y},function(e){return void 0!==e});if(t)return void window.open((0,r.sY)({spaceSlug:v,slug:x}),"_blank","noreferrer");e({to:".",unsafeRelative:"path",search:!0,state:j,replace:void 0!==h&&h,mask:{to:"/c/$spaceSlug/$postSlug",params:{spaceSlug:v,postSlug:x},hash:g,unmaskOnReload:!0}})}},[e,t])}};n.d(t,{w:()=>l})},568715(e,t,n){"use strict";n.d(t,{s:()=>ej});var r=n(391426),o=n(931639),i=n(230763),a=n(214986),s=n(497184),l=n.n(s),c=n(933578),u=n(493327),d=n(288513),p=function(){var e=(0,o.a)().record,t=(0,c.useRef)(null),n=(0,c.useRef)(null),s=(0,i.Od)().currentCommunityMember;return((0,c.useEffect)(function(){if(t.current&&(null==e?void 0:e.is_comments_enabled)){var n=new a.tb(function(){var e=document.documentElement.scrollHeight;window.parent.postMessage(["setHeight",e],"*")});return n.observe(t.current),function(){return n.disconnect()}}},[null==e?void 0:e.is_comments_enabled]),null==e?void 0:e.is_comments_enabled)?(0,r.jsx)("div",{ref:t,className:l()((0,d.W2)("post"),"bg-primary border-primary border md:mb-6 md:rounded-md",{"pb-1 pt-2.5":!!s}
1),children:(0,r.jsx)(u.C,{commentsFormRef:n,autofocusReplyForm:!1})}):null},f=n(570310),m=n(988269),b=n(757264),y=n(585529),h=n(361287),g=n(498772),v=n(328187),x=function(){var e=(0,o.a)(),t=e.record,n=e.helpers,i=t.body_trix_content,a=t.tiptap_body,s=!!(null==n?void 0:n.isTiptapPost),l=!!(null==n?void 0:n.isTrixPost),c=(0,h.W)().isPostBodyEmpty;return(0,r.jsxs)(r.Fragment,{children:[!c&&(0,r.jsx)(b.W,{seeMoreClassName:"text-default hover:text-dark",children:(0,r.jsxs)("div",{children:[l&&i&&(0,r.jsx)(m.X,{content:i}),s&&a&&(0,r.jsx)(y.H,{readOnly:!0,value:a.body,sgidToObjectMap:a.sgids_to_object_map,inlineAttachments:a.inline_attachments})]})}),(0,v.AF)(t)&&(0,r.jsx)(g.F,{className:"!py-2"})]})},j=n(983979),_=n(697109),w=n(973646),O=n(41907),S=n(451430),P=n(417980),C=n(617492),k=n(898666),I=function(e){var t=e.shouldOpenInNewTab,n=(0,i.Od)().isViewOnlyMasquerading,a=(0,C.g)().hide,s=(0,o.a)(),c=s.record,u=s.onLikeToggle,p=c.comments_count,f=c.is_comments_enabled,m=c.is_liked_by_current_user,b=c.is_liking_enabled,y=c.user_likes_count,h=c.post_details_loaded,g=(0,i.PM)();return f||b?(0,r.jsxs)("div",{className:l()("flex items-center",{"justify-between":b,"justify-end":!b}),children:[b&&(0,r.jsx)(k.$,{interactive:!1,content:m?(0,P.t)("profile_tabs.post.unlike_description"):(0,P.t)("profile_tabs.post.like_description"),placement:"bottom",disabled:!g||!h,children:(0,r.jsx)("button",{type:"button",onClick:n?S.noop:u,className:l()((0,d.W2)({liked:m}),"focus-visible:outline-secondary hover:bg-tertiary active:text-default flex space-x-1 rounded-md p-1 text-sm focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",{"text-default focus:text-default":!m,"text-brand focus:text-brand":m,disabled:!g||!h}),children:h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.In,{type:"like"}),(0,r.jsx)("span",{children:(0,O.Rt)(y)})]}):(0,r.jsx)(j.f,{lg:!0,short:!0})})}),f&&(0,r.jsx)(k.$,{interactive:!1,content:(0,P.t)("profile_tabs.post.comment_description"),placement:"bottom",disabled:!h,children:(0,r.jsxs)(_.p,{post:c,allComments:!0,className:"text-default focus-visible:outline-secondary focus-visible:text-dark hover:text-dark inline-block rounded-md p-1 text-sm focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",onClick:a,target:t&&"_blank",children:[h&&(0,P.t)("post.comments",{count:p,formatted_count:(0,O.Rt)(p)}),!h&&(0,r.jsx)(j.f,{lg:!0,long:!0})]})})]}):null},N=n(228185),A=n(340479),E=n(199563),R=n(915779),L=function(e){var t=e.shouldOpenInNewTab,n=void 0!==t&&t,i=(0,C.g)().hide,a=(0,o.a)().record,s=function(e){return!(0,A.s6)(e)&&i()},l=a.name,c=a.created_at,u=a.space_name,d=a.space_slug;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N.Z,{onClick:s,post:a,className:"!rounded-md",wrapperClassName:"!p-0"}),(0,r.jsxs)("div",{className:"w-full space-x-2",children:[(0,r.jsxs)("span",{className:"text-default text-sm",children:[(0,P.t)("profile_tabs.post.posted_in")," ",(0,r.jsx)("a",{className:"focus-visible:outline-secondary focus-visible:text-dark text-dark hover:text-darkest font-medium focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",href:R.qj.show({spaceSlug:d}),children:u})]}),(0,r.jsx)("span",{className:"bg-badge inline-block size-1 rounded-full align-middle"}),(0,r.jsx)(k.$,{interactive:!1,content:(0,v.VG)(c),children:(0,r.jsx)(_.p,{onClick:s,post:a,target:n?"_blank":"_self",className:"text-dark focus-visible:outline-secondary focus-visible:text-dark group inline-flex focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",children:(0,r.jsx)("span",{className:"text-default group-hover:text-dark text-sm",children:(0,E.z9)(c,{format:E.Or.short})})})})]}),!!l&&(0,r.jsx)(_.p,{onClick:s,post:a,target:n?"_blank":"_self",className:"text-dark focus-visible:outline-secondary focus-visible:text-dark focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",children:(0,r.jsx)("div",{className:"text-darkest break-all text-lg font-semibold leading-7",children:l})})]})},D=function(e){var t=e.onPostChange,n=e.shouldOpenInNewTab,i=(0,o.a)().record;if(!i||!i.id)return null;var a=i.updated_at;return(0,r.jsxs)("div",{className:(0,f.x)((0,d.W2)("profile-posts__post"),"bg-primary flex flex-col space-y-3 p-5 md:px-6"),children:[(0,r.jsx)(L,{}),(0,r.jsx)(x,{}),(0,r.jsx)(I,{onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},i,e))},shouldOpenInNewTab:n})]},a)};function T(e){var t=e.post,n=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["post"]);return(0,r.jsx)(D,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({post:t},n))}var M=n(568316),F=n(398061),K=n(488441),B=n(930260),q=function(e){var t=e.post,n=e.comments_count,o=e.className,i=e.showCount,a=e.onCommentsClick,s=e.iconClassName;return(0,r.jsx)("div",{className:l()("col-span-1",o),children:(0,r.jsx)(k.$,{placement:"bottom",content:(0,P.t)("post.comment_description"),interactive:!1,children:(0,r.jsxs)(_.p,{post:t,allComments:!0,ariaLabel:(0,P.t)("post.comment_description"),shouldOpenPostModal:!0,className:l()((0,d.W2)("action-item action-comment"),"text-default focus-visible:outline-secondary group flex items-center justify-center rounded-md text-center transition-colors focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",{"hover:text-dark p-1":!(0,v.AF)(t)}),onClick:a,children:[(0,r.jsx)("span",{className:l()((0,d.W2)("action__icon"),"inline-flex align-text-top"),children:(0,r.jsx)(w.In,{"aria-hidden":!0,type:"24-comment",className:l()("group-hover:text-dark mr-1",void 0===s?"text-default":s),useWithFillCurrentColor:!0})}),(void 0===i||i)&&(0,r.jsx)("span",{className:l()((0,d.W2)("count"),"text-default group-hover:text-dark text-md font-medium tracking-tight"),children:(0,O.$t)(n)})]})})})},U=function(e){var t=e.name,n=e.onLikeToggle,a=e.is_liked_by_current_user,s=e.user_likes_count,c=e.isOrCanBeCommunityMember,u=e.className,p=e.iconClassName,f=e.likedSpanClassName,m=e.showCount,b=(0,i.Od)().isViewOnl
1yMasquerading,y=(0,o.a)().record;return(0,r.jsx)("div",{className:l()("col-span-1",u),children:(0,r.jsx)(k.$,{placement:"bottom",content:(0,P.t)(a?"post.unlike_description":"post.like_description",{name:null!=t?t:""}),interactive:!1,children:(0,r.jsxs)("button",{type:"button",onClick:n,"aria-label":(0,P.t)("like_post_aria_label",{name:null!=t?t:""}),className:l()((0,d.W2)("action-item action-link action-like post__actions--like",{liked:a}),"text-default focus-visible:outline-secondary group flex items-center justify-center rounded-md text-center transition-colors focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",{disabled:!c||b,"hover:text-dark":!a,"hover:text-dark min-w-[2.5rem] p-1":!(0,v.AF)(y)}),children:[(0,r.jsx)("span",{className:l()((0,d.W2)("action__icon"),"inline-flex align-text-top",a&&f),children:(0,r.jsx)(w.In,{className:l()("mr-1",void 0===p?"":p),type:a?"24-heart-red-fill":"24-heart-outline"})}),(void 0===m||m)&&(0,r.jsx)("span",{className:l()((0,d.W2)("count"),"text-md font-medium tracking-tight",{"!text-v2-danger":a}),children:(0,O.$t)(s)})]})})})},z=function(e){var t=e.type,n=void 0===t?"list":t,o=e.wrapperClassName,a=e.commentButtonClassName,s=e.commentIconClassName,c=e.likeButtonClassName,u=e.likeIconClassName,p=e.likedSpanClassName,f=e.showCommentsCount,m=e.showLikesCount,b=e.onCommentsClick,y=void 0===b?S.noop:b,g=(0,h.W)(),v=g.post,x=g.showEngagementActions,_=g.onLikeToggle,w=v.user_likes_count,O=v.is_liking_enabled,P=v.is_comments_enabled,C=v.is_liked_by_current_user,k=v.comments_count,I=v.post_details_loaded,N=v.display_title,A=(0,i.PM)();return x&&(O||P)?I?(0,r.jsxs)("div",{className:l()((0,d.W2)("post--".concat(n,"__actions post--").concat(n,"__actions-visible")),{"grid grid-cols-2 items-center text-sm md:w-40":"list"===n},{"absolute bottom-4 left-4 flex items-center gap-2":"card"===n},{"flex items-center gap-2 text-sm":"image-card"===n},o),children:[(0,r.jsx)(B.F,{children:O&&(0,r.jsx)(U,{name:N,onLikeToggle:function(e){null==_||_(e)},isOrCanBeCommunityMember:A,user_likes_count:w,is_liked_by_current_user:C,className:c,iconClassName:u,likedSpanClassName:p,showCount:void 0===m||m})}),P&&(0,r.jsx)(q,{comments_count:k,post:v,className:a,iconClassName:s,showCount:void 0===f||f,onCommentsClick:y})]}):(0,r.jsxs)("div",{className:l()((0,d.W2)("post--".concat(n,"__actions post--").concat(n,"__actions-visible")),{"flex items-center":"list"===n},{"absolute bottom-4 left-4 flex items-center gap-2":"card"===n},o),children:[(0,r.jsx)("div",{className:l()((0,d.W2)("action-item action-link action-like post__actions--like"),"p-1",c),children:(0,r.jsx)("span",{className:(0,d.W2)("action__icon"),children:(0,r.jsx)(j.f,{lg:!0,short:!0})})}),(0,r.jsx)("div",{className:l()((0,d.W2)("action-item action-comment"),"p-1",a),children:(0,r.jsx)("span",{className:(0,d.W2)("action__icon"),children:(0,r.jsx)(j.f,{lg:!0,short:!0})})})]}):null},W=n(734527),$=n(754539),V=n(605274),H=n(202090);function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){G(e,t,n[t])})}return e}var Q=function(e){var t,n,o,i=e.post,a=e.onPostChange,s=e.onPostDestroy,c=(0,K.l)({public_uid:null!=(o=i.community_member.public_uid)?o:"",params:{show_back_link:!0}}),u=(0,H.wR)().isDarkAppearance,d=(0,V.A5)(),p=(0,$.k)(),f=(0,F.Ir)().data,m=u?"bg-[#2B2E33CC] backdrop-blur-[1px]":"bg-[#FFFFFFCC] backdrop-blur-[1px]";return(0,r.jsxs)("div",{className:l()("mt-2 flex w-full flex-row-reverse items-center justify-between gap-2",{"absolute bottom-2 mt-0 hidden px-2 focus:flex focus-visible:flex group-hover:flex peer-hover:flex peer-focus-visible:flex":d}),children:[(0,r.jsx)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:(0,r.jsx)(z,Z({type:"image-card",wrapperClassName:"!mr-0",commentButtonClassName:l()("rounded-md p-1",G({}
1,m,d)),commentIconClassName:"text-selector-active md:!mr-0",likeButtonClassName:l()("rounded-md p-1",G({},m,d)),likeIconClassName:"text-selector-active md:!mr-0",likedSpanClassName:"text-brand",showLikesCount:!d,showCommentsCount:!d},d&&{onCommentsClick:function(e){e.preventDefault(),p.show({post:i,spaceId:null==f?void 0:f.id,onPostChange:a,onPostDestroy:s,autofocusReplyForm:!0})}}))}),!(0,v.g)(i)&&(0,r.jsxs)("a",(t=Z({},c),n=n={className:l()("flex items-center justify-start gap-2 overflow-hidden rounded-md py-1 pl-1 pr-2",G({},m,d)),children:[(0,r.jsx)(W.J,{src:i.community_member.avatar_url||"",name:i.community_member.name||"",size:"5"}),(0,r.jsx)(M.o.LabelSm,{weight:"medium",truncate:!0,children:i.community_member.name})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))]})},Y=function(e){var t=e.isSquareGrid,n=void 0===t||t;return(0,r.jsx)("div",{className:(0,f.x)("bg-secondary flex items-center justify-center rounded-md md:rounded-none",{"aspect-square":n,"min-h-48":!n}),children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center p-6 text-center",children:[(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsx)(w.In,{type:"16-trash-bin-2",size:20})}),(0,r.jsx)(M.o.BodyXs,{color:"light",children:(0,P.t)("image_space.file_not_found")})]})})},J=function(e){var t=e.post,n=e.children,o=e.onPostChange,i=e.onPostDestroy,a=(0,$.k)(),s=(0,F.Ir)().data;return(0,r.jsx)("button",{type:"button",className:"focus-visible:outline-secondary peer w-full focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","aria-label":(0,P.t)("image_space.grid_view.open_full_post"),onClick:function(){return a.show({post:t,spaceId:null==s?void 0:s.id,onPostChange:o,onPostDestroy:i})},children:n})},X=function(e){var t=e.post,n=e.children;return(0,r.jsx)(_.p,{post:t,className:"focus-visible:outline-secondary peer inline-block focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",children:n})},ee=function(e){var t=e.post,n=e.isSquareGrid,o=void 0===n||n,i=e.onPostChange,a=e.onPostDestroy,s=(0,V.wf)()?J:X;return(0,r.jsxs)("div",{className:"group relative",children:[(0,r.jsxs)("div",{className:"absolute right-2 top-2 flex",children:[t.gallery.images.length>1&&(0,r.jsx)(w.In,{type:"16-multiple-images",size:16}),t.pinned_at_top_of_space&&(0,r.jsx)(w.In,{type:"16-pin-sm-white",size:16})]}),(0,r.jsx)(s,{post:t,onPostChange:i,onPostDestroy:a,children:t.gallery.images.length>0?(0,r.jsx)("img",{loading:"lazy",src:t.gallery.images[0].url,alt:t.truncated_content,className:(0,f.x)("pointer-events-none inline-block w-full rounded-md md:rounded-none",{"aspect-square object-cover":o})}):(0,r.jsx)(Y,{isSquareGrid:o})}),(0,r.jsx)(Q,{post:t,onPostChange:i,onPostDestroy:a})]})},et=function(e){var t=e.post,n=e.onPostChange,o=e.onPostDestroy;return(0,r.jsx)(ee,{post:t,onPostChange:n,onPostDestroy:o,isSquareGrid:!1})},en=n(341409),er=n(257957),eo=n(385335),ei=n(551172),ea=n(272528),es=n(643407),el=n(517338),ec=n(477593),eu=function(e){var t=e.post,n=t.last_replied_or_posted,o=t.post_details_loaded,i=(null==n?void 0:n.type)==="replied";if(!o)return(0,r.jsx)(j.f,{lg:!0,almostFull:!0});if(!n)return null;var a=(0,P.t)(n.type);return(0,r.jsxs)(_.p,{post:t,className:"!text-default focus-visible:outline-secondary focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",shouldOpenPostModal:!0,children:[i&&(0,r.jsx)(w.In,{type:"arrow-solid-bottom-right",useWithFillCurrentColor:!0,className:"mr-1 !w-3.5",size:14}),(0,r.jsxs)(k.$,{interactive:!1,content:(0,v.VG)(n.created_at),className:"inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:(0,f.x)((0,d.W2)("meta-person-action"),"text-sm"),children:"".concat(n.user_name," ").concat(a," ")}),(0,r.jsx)("span",{className:(0,f.x)((0,d.W2)("ago post--card__timestamp"),"text-sm"),children:(0,E.z9)(n.created_at)})]})]})},ed=function(){return(0,r.jsx)(z,{type:"card"})};function ep(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var ef=function(e){var t,n,i=e.onPostChange,a=e.onPostDestroy,s=e.refetchPosts,l=(0,o.a)(),c=l.record,u=l.isUpdatingCardViewThumbnail,p=l.updatePostDetailsQueryCache,m=(0,H.wR)().isDarkAppearance;if(!c)return null;var b=c.flagged_for_approval_at,y=c.community_member,h=c.hide_meta_info,g=c.display_title,v=c.is_liking_enabled,x=c.is_comments_enabled,j=c.cardview_image_url,w=c.cardview_thumbnail_url,O=c.cover_image_url,C=v||x,k=(0,F.Ir)().data,I=j||w||O,N=(0,K.l)({public_uid:y.public_uid,params:{show_back_link:!0}}
1),A=(0,f.x)((0,d.W2)("post--card post--parent",{"has-engagement":C}),"border-primary bg-primary border relative overflow-hidden rounded-lg",{"pb-10":C});return(0,r.jsxs)("div",{className:A,children:[(0,r.jsxs)("div",{className:(0,f.x)((0,d.W2)("post--card__post"),"text-dark"),children:[(0,r.jsx)(_.p,{post:c,className:(0,f.x)((0,d.W2)("post--card__cover"),"text-dark bg-primary focus-visible:outline-secondary focus-visible:text-dark relative block aspect-[2] rounded-t-md bg-cover bg-center bg-no-repeat focus-visible:rounded-t-md focus-visible:outline focus-visible:outline-2"),style:function(){if(I)return{backgroundImage:'url("'.concat(I,'")')};var e=m?(0,ea.u9)("dark-mode-cover-thumbnail-2x.png"):(0,ea.u9)("light-mode-cover-thumbnail-2x.png");return{backgroundImage:'url("'.concat(e,'")')}}(),shouldOpenPostModal:!0,children:u&&(0,r.jsx)("div",{className:"bg-primary absolute inset-0 flex items-center justify-center rounded-t-md",children:(0,r.jsx)(er.a,{})})}),!h&&(0,r.jsx)("div",{className:(0,f.x)((0,d.W2)("post--card__user has-cover"),"-mt-5 px-5"),children:(0,r.jsx)("div",{className:(0,d.W2)("post__avatar"),children:(0,r.jsx)("a",(t=ep({className:(0,f.x)((0,d.W2)("user__avatar"),"focus-visible:outline-secondary focus-visible:text-dark focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2")},N),n=n={children:(0,r.jsx)(W.J,{src:y.avatar_url,name:y.name,size:"10"})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))})}),(0,r.jsx)("div",{className:(0,f.x)((0,d.W2)("post--card__body",{"post-meta--hidden":h}),"p-5"),children:(0,r.jsxs)("div",{className:(0,d.W2)("post--card__content"),children:[(0,r.jsx)("div",{className:(0,d.W2)("post--card__header"),children:(0,r.jsxs)("h2",{className:"space-x-2 text-md font-semibold",children:[(0,r.jsx)(_.p,{post:c,className:"!text-darkest overflow-anywhere focus-visible:outline-secondary focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",shouldOpenPostModal:!0,children:(0,S.truncate)(g,{length:60})}),!!b&&(0,r.jsx)(el.E,{className:(0,f.x)((0,d.W2)("post--card__headline-tag"),"!bg-author-in-review border-0 align-text-top uppercase text-white"),textClassName:"uppercase",label:(0,P.t)("in_review"),variant:"secondary"})]})}),!h&&(0,r.jsx)("div",{className:(0,d.W2)("post--card__meta"),children:(0,r.jsx)(eu,{post:c})})]})})]}),(0,r.jsx)(ed,{}),(0,r.jsxs)("div",{className:"absolute inset-x-4 top-4 z-[5] flex items-center justify-between",children:[(0,r.jsx)("div",{className:"grow",children:(0,en.wp)(k)&&(0,ei.b)(c)&&(0,r.jsx)(eo.l.Short,{record:c,contentType:ec.M$})}),(0,r.jsx)("div",{className:"ml-2 shrink-0",children:(0,r.jsx)(es.o,{onPostDestroy:a,refetchPosts:s,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=ep({},c,e);i(n,t),null==p||p(n)}})})]})]})},em=function(e){return(0,r.jsx)(ef,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))},eb=function(e){var t=e.post,n=t.last_replied_or_posted;return t.post_details_loaded?n?(0,r.jsxs)(_.p,{post:t,className:"!text-default focus-visible:outline-secondary inline-flex items-center gap-1 focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",shouldOpenPostModal:!0,children:["replied"===n.type&&(0,r.jsx)(w.In,{useWithFillCurrentColor:!0,type:"arrow-solid-bottom-right",className:"text-default !w-3.5",size:14}
1),(0,r.jsxs)(k.$,{interactive:!1,content:(0,v.VG)(n.created_at),className:"inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:(0,f.x)((0,d.W2)("meta-person-action"),"text-xs"),children:"".concat(n.user_name," ").concat(n.type," ")}),(0,r.jsx)("span",{className:(0,f.x)((0,d.W2)("ago post--list__timestamp"),"text-xs"),children:(0,E.z9)(n.created_at)})]})]}):null:(0,r.jsx)(j.f,{lg:!0,half:!0})};function ey(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function eh(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var eg=function(e){var t=e.onPostChange,n=e.onPostDestroy,i=e.refetchPosts,a=e.hideTitle,s=void 0!==a&&a,c=(0,F.Ir)().data,u=(0,o.a)().record,p=(0,V.qI)(),f=u.flagged_for_approval_at,m=u.community_member,b=u.hide_meta_info,y=u.display_title,h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(ey({},u,e),n)},g=(0,en.wp)(c)&&(0,ei.b)(u),v=(0,K.l)({public_uid:m.public_uid,params:{show_back_link:!0}}),x=l()((0,d.W2)("post--list post--parent"),(0,d._h)("border-b-none"),"border-t border-primary px-5 py-3 md:py-4 bg-primary last:border-b md:border-x first:md:rounded-t-lg last:md:rounded-b-lg");return p?(0,r.jsxs)("div",{className:x,children:[(0,r.jsx)("div",{className:l()((0,d.W2)("post--list__post"),"text-dark flex gap-3"),children:(0,r.jsxs)("div",{className:l()((0,d.W2)("post--list__body"),"flex w-full flex-col gap-2"),children:[(0,r.jsx)("div",{className:l()((0,d.W2)("post--list__content"),"w-full gap-2 !pr-0 md:gap-0"),children:!s&&(0,r.jsxs)("div",{className:l()((0,d.W2)("post--list__header",{"post-meta--hidden":b}),"flex w-full items-start justify-between"),children:[(0,r.jsxs)("h2",{className:"mr-4 space-x-2 text-md font-medium leading-5",children:[(0,r.jsx)(_.p,{post:u,className:"!text-dark overflow-anywhere focus-visible:outline-secondary focus-visible:text-dark focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",shouldOpenPostModal:!0,children:(0,S.truncate)(y,{length:110})}),!!f&&(0,r.jsx)(el.E,{className:l()((0,d.W2)("post--list__headline-tag"),"!bg-author-in-review w-full max-w-fit border-0 align-text-top uppercase text-white"),textClassName:"uppercase",label:(0,P.t)("in_review"),variant:"secondary"})]}),(0,r.jsx)(es.o,{onPostDestroy:n,refetchPosts:i,onChange:h})]})}),!b&&(0,r.jsxs)("div",{className:"flex items-start justify-start space-x-2",children:[(0,r.jsx)("div",{className:(0,d.W2)("post--list__user"),children:(0,r.jsx)("a",eh(ey({},v),{className:"focus-visible:outline-secondary focus-visible:text-dark focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",children:(0,r.jsx)(W.J,{src:m.avatar_url,name:m.name,size:"6"})}))}),(0,r.jsxs)("div",{className:l()((0,d.W2)("post--list__meta"),"flex w-full items-center justify-between"),children:[(0,r.jsx)(eb,{post:u}),(0,r.jsx)("div",{className:l()((0,d.W2)("post--list__actions-wrapper"),"gap-2 self-start md:gap-0"),children:(0,r.jsx)(z,{})})]})]})]})}),g&&(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(eo.l.Regular,{record:u,contentType:ec.M$})})]}):(0,r.jsxs)("div",{className:x,children:[(0,r.jsxs)("div",{className:l()((0,d.W2)("post--list__post"),"text-dark flex gap-3"),children:[!b&&(0,r.jsx)("div",{className:(0,d.W2)("post--list__user"),children:(0,r.jsx)("a",eh(ey({},v),{className:"focus-visible:outline-secondary focus-visible:text-dark focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",children:(0,r.jsx)(W.J,{src:m.avatar_url,name:m.name,size:"10"})}))}),(0,r.jsxs)("div",{className:l()((0,d.W2)("post--list__body"),"flex w-full items-center justify-between"),children:[(0,r.jsxs)("div",{className:l()((0,d.W2)("post--list__content"),"flex flex-col",{"justify-center":b,"justify-start gap-1":!b}),children:[!s&&(0,r.jsx)("div",{className:(0,d.W2)("post--list__header",{"post-meta--hidden":b}),children:(0,r.jsxs)("h2",{className:"mr-4 flex space-x-2 text-md font-medium leading-5",children:[(0,r.jsx)(_.p,{post:u,className:"!text-dark overflow-anywhere focus-visible:outline-secondary focus-visible:text-dark line-clamp-1 focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",shouldOpenPostModal:!0,children:y}),!!f&&(0,r.jsx)(el.E,{className:l()((0,d.W2)("post--list__headline-tag"),"!bg-author-in-review w-full max-w-fit shrink-0 border-0 align-text-top uppercase text-white"),textClassName:"uppercase",label:(0,P.t)("in_review"),variant:"secondary"})]})}),!b&&(0,r.jsx)("div",{className:l()((0,d.W2)("post--list__meta"),"inline-flex"),children:(0,r.jsx)(eb,{post:u})})]}),(0,r.jsxs)("div",{className:l()((0,d.W2)("post--list__actions-wrapper"),"flex shrink-0 items-baseline gap-1"),children:[(0,r.jsx)(z,{likeButtonClassName:"!inline-flex",commentButtonClassName:"!inline-flex"}),(0,r.jsx)(es.o,{onPostDestroy:n,refetchPosts:i,onChange:h})]})]})]}),g&&(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(eo.l.Regular,{record:u,contentType:ec.M$})})]})},ev=function(e){return(0,r.jsx)(eg,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))},ex=n(540795),ej=function(e){var t=e.space,n=void 0===t?{}:t,i=e.post,a=e.isFirst,s=e.forcePostView,l=e.forceSimplifiedView,c=e.forceIframeView,u=e.usedIn,d=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["space","post","isFirst","forcePostView","forceSimplifiedView","forceIframeView","usedIn"]),f=!!i.pinned_at_top_of_space,m=(0,en._0)(n),b=(0,en.O9)(n),y=ex.T;return(0,en.fN)(n)?y=ex.T:(0,en.m2)(n)?y=et:(0,en.ps)(n)?y=ee:void 0!==l&&l?y=T:void 0!==c&&c?y=p:void 0!==s&&s||f&&void 0!==a&&a?y=ex.T:m?y=em:b&&(y=ev),(0,r.jsx)(o.m,{post:i,usedIn:u,children:(0,r.jsx)(y,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({post:i},d))})}},607239(e,t,n){"use strict";var r=n(391426),o=n(933578),i=(0,o.createContext)({params:{},hasNextPage:!1});i.displayName="PostNavigationContext";var a=function(e){var t=e.children,n=e.params,o=e.hasNextPage;return(0,r.jsx)(i.Provider,{value:{params:void 0===n?{}:n,hasNextPage:void 0!==o&&o},children:t})},s=function(){var e=(0,o.useContext)(i);if(!e)throw Error("usePostNavigationContext must be used within a PostNavigationProvider");return e};n.d(t,{Tu:()=>s,k5:()=>a})},206611(e,t,n){"use strict";n.d(t,{B:()=>f});var r=n(391426),o=n(983979),i=n(667907),a=n(41907),s=n(417980),l=n(931639),c=n(570310),u=n(746364),d=n(607239),p=n(361287),f=function(e){var t,n,f=e.anchorProps,m=e.count,b=e.toggleComment,y=e.hasPostDetailsLoaded,h=e.shouldForceSamePageInteractions,g=void 0!==h&&h,v=(0,p.W)().post,x=(0,l.a)().usedIn,j=(0,u.w)().navigateToPost,_=(0,d.Tu)(),w=_.params,O=_.hasNextPage,S=!(0,i.S)()||"profile-modal"===x;return y?(0,r.jsx)("button",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}
1({type:"button",className:(0,c.x)("p-0 text-sm font-medium text-default transition-colors duration-150 ease-in-out hover:!text-dark focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary"),"data-testid":"post-comment-count",onClick:function(){S&&!g?j({newPost:v,params:w,hasNextPage:O,shouldFocusOnCommentsSection:!0}):b()}},f),n=n={children:(0,s.t)("post.comments",{count:m,formatted_count:(0,a.Rt)(m)})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)):(0,r.jsx)(o.f,{lg:!0,long:!0})}},493327(e,t,n){"use strict";n.d(t,{C:()=>na});var r=n(391426),o=n(973646),i=n(224444),a=n(933578),s=n(417980),l=n(385335),c=n(551172),u=n(931639),d=n(230763),p=n(570310),f=n(451430),m=n(66108),b=n(288513),y=n(341409),h=n(477593),g=n(927561),v=n(531404),x=n(859615),j=n(383711),_=n(504531),w=n(168293),O=n(361971),S=n(387099),P=n(942852),C=n(684716),k=n(859214),I=function(e,t,n,r){(0,a.useEffect)(function(){if(e&&e.id!==(null==t?void 0:t.id)&&"CommunityMember"===e.type){var o,i;r((o={},i=e.rich_text_field_sgid,i in o?Object.defineProperty(o,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):o[i]=e,o)),(0,f.defer)(function(){var t,r;null==n||null==(r=n.current)||null==(t=r.chain)||t.call(r).focus("start").insertContent([(0,k.wO)({sgid:e.rich_text_field_sgid}),(0,k.fI)({text:" "})]).run()})}},[e,t,n])},N=function(e,t,n){(0,a.useEffect)(function(){(0,f.defer)(function(){if(t&&!e){var r,o,i;null==n||null==(i=n.current)||null==(o=i.commands)||null==(r=o.focus)||r.call(o,"end")}})},[t,e,n])},A=n(363834);function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var L=function(e){var t=R((0,a.useState)(!1),2),n=t[0],r=t[1],o=R((0,a.useState)(0),2),i=o[0],s=o[1],l=(0,a.useRef)(null),c=(0,a.useRef)(null),u=(0,O.xW)(),d=u.watch,p=u.reset,m=u.formState,b=m.isSubmitting,y=m.isSubmitSuccessful,h=d("tiptap_body"),g=!(0,A.l3)(h),v=g||b,x=(0,a.useCallback)(function(t){e&&(t||!g?r(!0):r(!1))},[e,g]),j=(0,a.useCallback)(function(){e&&r(!0)},[e]);return(0,a.useEffect)(function(){!g&&e&&r(!0)},[g,e]),(0,a.useEffect)(function(){y&&(e&&r(!1),(0,f.defer)(function(){p(),s(function(e){return e+1})}))},[y,p,e]),{isEditorExpanded:n,setIsEditorExpanded:r,editorKey:i,commentBoxRef:l,toolbarRef:c,formContext:u,isSubmitting:b,isEditorEmpty:g,isSubmitDisabled:v,handleFocusChange:x,handleEditorFocus:j}},D=function(e,t,n){(0,a.useEffect)(function(){if(e){var r=function(){setTimeout(function(){var e,r=document.activeElement,o=null==(e=t.current)?void 0:e.contains(r),i=document.querySelector(".post__reply:not(.reply-to-parent)"),a=null==i?void 0:i.contains(r);o||a?n(!0):n(!1)},0)};return document.addEventListener("focusin",r),document.addEventListener("focusout",r),function(){document.removeEventListener("focusin",r),document.removeEventListener("focusout",r)}}},[e,t,n])},T=function(e){var t=e.editorRef,n=e.autoFocus,r=e.parentCommentId,o=e.communityMemberForReply,i=e.currentCommunityMember,s=e.addToLocalSgidToObjectMap,l=e.usedIn,c=e.toolbarPortalId,u="minimal-post-modal"===l,d=u&&!r,p=L(u),f=p.isEditorExpanded,m=p.editorKey,b=p.commentBoxRef,y=p.toolbarRef,h=p.formContext,g=p.isSubmitting,v=p.isSubmitDisabled,x=p.handleFocusChange,j=p.handleEditorFocus,_=d?f&&!v:!v;return N(d,n,t),(0,a.useEffect)(function(){y.current=document.getElementById(c)},[c,y]),D(u,y,x),I(o,i,t,s),(0,C.vC)("meta+enter, ctrl+enter",function(){(0,P.N)(
1h)&&h.triggerFormSubmit()},{enableOnContentEditable:!0,enabled:_},[h,_]),{isEditorExpanded:f,commentBoxRef:b,handleEditorFocus:j,editorKey:m,isSubmitDisabled:v,isSubmitting:g,isUsedInMinimalPostModal:u,isPostCommentFormInMinimalPostModal:d}};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return M(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return M(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var K=function(e){var t=e.autoFocus,n=e.className,o=e.communityMemberForReply,i=e.authorType,a=e.editorRef,l=e.isEdit,c=void 0!==l&&l,u=e.parentCommentId,f=e.placeholder,m=void 0===f?(0,s.t)("comments.form.fields.body_placeholder"):f,b=e.postId,y=e.spaceId,h=e.usedIn,g=e.persistCacheKey,P=(0,d.Od)().currentCommunityMember,C=(0,_.b)(),k=(0,j.D)(),I=(0,O.xW)(),N=I.formState,A=N.isDirty,E=N.isSubmitting,R=I.setValue,L=I.watch;(0,w.Bp)({cacheKey:g,fields:["tiptap_body"],enabled:!c&&!!g&&A&&!E});var D="tiptap_body.sgids_to_object_map",M=L(D)||{},K=function(e){R(D,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},M,e))},B="tiptap_body.inline_attachments",q=L(B)||[],U=["post",b,c?"edit":"create",u,"comment-form-toolbar",h].filter(Boolean).join("-"),z=T({editorRef:a,autoFocus:void 0!==t&&t,usedIn:h,parentCommentId:u,communityMemberForReply:o,currentCommunityMember:P,addToLocalSgidToObjectMap:K,toolbarPortalId:U}),W=z.isEditorExpanded,$=z.commentBoxRef,V=z.handleEditorFocus,H=z.editorKey,G=z.isSubmitDisabled,Z=z.isSubmitting,Q=z.isUsedInMinimalPostModal,Y=z.isPostCommentFormInMinimalPostModal;return(0,r.jsxs)("div",{ref:$,className:(0,p.x)("border-primary focus-within:border-light active:border-light rounded-md border transition-all duration-300 ease-in-out",{"pointer-events-none opacity-50":Z,"px-4 py-3":!Y,"max-h-[40px] px-4 py-1.5":Y&&!W,"max-h-[440px] px-4 py-3":Y&&W}),children:[(0,r.jsx)("div",{className:(0,p.x)("transition-all duration-300 ease-in-out",{"max-h-[40px] overflow-hidden":Q&&!W,"max-h-[400px]":Q&&W}),children:(0,r.jsx)(v.P,{editorRef:a,placeholder:m,name:"tiptap_body.body",toolbars:[{portalId:U,component:x.M}],className:(0,p.x)("max-h-[400px] overflow-y-auto",n),editorClassName:"min-h-[30px]",spaceId:y,sgidToObjectMap:M,inlineAttachments:q,onLocalSgidToObjectMapChange:K,onLocalAttachmentsChange:function(e){R(B,Array.from(new Set(F(q).concat(F(e)))))},disabledExtensions:["poll","ai_copilot","cta"],onFocusChange:function(e){e&&V()},isVideoClipAllowed:!0,isVoiceMessageAllowed:k,isMediaUploadAllowed:C,allowBubbleMenuOverflow:!1,shouldSupportTables:"CommunityAiAgent"===i})}),(0,r.jsxs)("div",{className:(0,p.x)("flex items-end justify-between transition-all duration-300 ease-in-out",{"invisible max-h-0 overflow-hidden opacity-0":Y&&!W,"visible max-h-[32px] opacity-100":Y&&W,"h-0":Y&&!W,"h-[32px]":Y&&W}),children:[(0,r.jsx)("div",{id:U,className:"transition-opacity duration-300 ease-in-out"}),(0,r.jsx)(S.$,{variant:"primary",type:"submit",disabled:G,className:"!px-4 transition-opacity duration-300 ease-in-out",children:c?Z?(0,s.t)("comments.create.actions.saving"):(0,s.t)("comments.create.actions.save"):Z?(0,s.t)("comments.create.actions.submitting"):(0,s.t)("comments.create.actions.submit")})]})]},H)},B=n(607370),q=n(734527),U=n(51730),z=n(915779),W=n(258752),$=n(717526),V=function(e){var t=e.postId,n=e.parentCommentId,r=e.onCreate,o=(0,$.d)().error;return{createComment:(0,W.n_)({mutationFn:function(e){return(0,U.oK)(z.iK.comments.create({postId:t}),{comment:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({parent_comment_id:n},e)})},onSuccess:r,onError:function(){return o((0,s.t)("comments.create.alerts.failure"))}}).mutateAsync}},H=function(e){var t=e.spaceId,n=e.postId,o=e.parentCommentId,i=e.communityMemberForReply,a=e.autoFocus,l=e.onCreate,c=e.bodyInputRef,f=e.className,m=e.persistCacheKey,y=(0,B.q)(!!o),h=(0,d.Od)().currentCommunityMember,v=(0,u.a)(),x=v.usedIn,j=v.isUsedInMinimalTipTapViewModal,_=(0,(0,w.bE)({cacheKey:m}).getPersistedFormFieldValues)(),O=i?(0,s.t)("comments.form.fields.body_reply_placeholder",{name:i.name}):(0,s.t)("comments.form.fields.body_placeholder"),S=V({postId:n,parentCommentId:o,onCreate:l}).createComment;return(0,r.jsxs)("div",{className:(0,p.x)((0,b.W2)("post__reply",{"reply-to-parent":!!o,"reply-to-post":!o}),"flex items-start gap-3 py-2.5 md:py-5",{"md:px-6":"minimal-post-modal"!==x,"-ml-8 py-2.5 md:ml-0":o&&"full-post-modal"!==x,"-ml-8 md:ml-[-3.125rem]":o&&"full-post-modal"===x,"bg-primary sticky bottom-0":!o,"md:rounded-b-xl":!j,"px-5":!o&&!j}),ref:y,children:["full-post-modal"!==x&&(0,r.jsx)(q.J,{src:null==h?void 0:h.avatar_url,name:(null==h?void 0:h.name)||"",size:"10"}),(0,r.jsx)(g.l,{className:"relative w-full",defaultValues:{tiptap_body:null==_?void 0:_.tiptap_body},onSubmit:function(e){return S(e)},children:(0,r.jsx)(K,{autoFocus:void 0!==a&&a,className:f,communityMemberForReply:i,editorRef:c,isEdit:!1,parentCommentId:o,placeholder:O,postId:n,spaceId:t,usedIn:x,persist
1CacheKey:m})})]})},G=n(661116),Z=n(424390),Q=n(310860),Y=n(998597),J=n(472385),X=function(){var e=(0,Y.zf)(),t=(0,Q.z)({select:function(e){var t;return null==(t=e.maskedLocation)?void 0:t.hash}}),n=(0,Q.z)({select:function(e){return e.hash}}),r=(0,J.f)(e?t:n).split(Z.r)[1];return{commentId:r&&Number.parseInt(r,10)||null}};function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var et=function(e){var t,n=e.enabled,r=void 0===n||n,o=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return ee(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ee(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],s=o[1],l=(0,G.W)().isElectron,c=X().commentId;(0,a.useEffect)(function(){if(!l&&r&&c&&!i){var e=setTimeout(function(){s(!0);var e=document.querySelector("".concat(Z.r).concat(c));e&&e.scrollIntoView()},500);return function(){return clearTimeout(e)}}},[r,c,i,l])},en=n(39927),er=n.n(en),eo=n(545923),ei=function(e){var t=e.postId,n=e.parentCommentId,r=e.usedIn,o=e.preloaded,i=void 0!==o&&o,a=e.preloadedComments,s=void 0===a?[]:a,l=e.preloadedCommentsTotalCount,c=void 0===l?0:l,u=e.onCommentsUpdate;return(0,W.qu)({initialPageParam:1,queryKey:(0,eo._)({postId:t,parentCommentId:n,usedIn:r}),queryFn:function(e){var r=e.pageParam,o={per_page:15,page:void 0===r?1:r},i=n?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({parent_comment_id:n},o):o;return(0,U.i_)(z.iK.comments.index({postId:t,params:i}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},onSuccess:function(e){var t=e.pages;u(er()((0,f.flatMap)(t,function(e){return e.records}),"id"))},initialData:function(){if(i)return{pages:[{records:s,page:0,has_next_page:c>s.length}],pageParams:[]}},gcTime:0,staleTime:1/0})},ea=n(584236),es=n.n(ea);function el(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ec(e,t){if(e){if("string"==typeof e)return el(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return el(e,t)}}var eu=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.initialComments,r=function(e){if(Array.isArray(e))return e}(e=(0,a.useState)(void 0===n?[]:n))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||ec(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1];return{comments:o,setComments:i,addCommentToList:function(e){return i(function(t){return((function(e){if(Array.isArray(e))return el(e)})(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||ec(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])})},updateCommentInList:function(e){return i(function(t){return t.map(function(t){return t.id===e.id?e:t})})}
1,removeCommentFromList:function(e){var t=e.id;return i(function(e){return es()(e,["id",t])})}}},ed=n(697652),ep=function(e){var t=e.postId,n=e.parentCommentId,r=n?"post-".concat(t,"-comment-").concat(n,"-reply-form-values"):"post-".concat(t,"-comment-form-values"),o=(0,ed.M)(r).resetValue;return{persistCacheKey:r,resetPersistedFormValues:o}},ef=n(674453),em=function(){var e=(0,ef.is)();return{shouldFocusOnCommentsSection:(0,Q.z)({select:function(e){var t;return null==(t=e.state)?void 0:t.shouldFocusOnCommentsSection}}),setShouldFocusOnCommentsSection:function(t){e({shouldFocusOnCommentsSection:t})}}};function eb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ey(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eb(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eh=function(e){var t=e.postId,n=e.parentCommentId,r=e.preloaded,o=void 0!==r&&r,i=e.preloadedComments,s=void 0===i?[]:i,l=e.preloadedCommentsTotalCount,c=e.postCommentsClosed,p=e.postLikingDisabled,f=e.usedIn,m=e.isUsedInMinimalTipTapViewModal,b=e.onCommentCreate,y=e.onCommentDelete,h=e.resetCommunityMemberForReply,g=e.space,v=e.showReplyForm,x=e.commentsSectionRef,j=(0,d.Il)(),_=(0,u.a)(),w=_.usedIn,O=void 0===w?void 0===f?"post":f:w,S=_.isUsedInMinimalTipTapViewModal,P=eu({initialComments:s||[]}),C=P.comments,k=P.setComments,I=P.addCommentToList,N=P.updateCommentInList,A=P.removeCommentFromList,E=ey((0,a.useState)(c),2),R=E[0],L=E[1],D=ey((0,a.useState)(p),2),T=D[0],M=D[1],F=ey((0,a.useState)(0),2),K=F[0],B=F[1],q=em(),U=q.shouldFocusOnCommentsSection,z=q.setShouldFocusOnCommentsSection,W=ep({postId:t,parentCommentId:n}),$=W.persistCacheKey,V=W.resetPersistedFormValues,H=ei({postId:t,parentCommentId:n,usedIn:O,preloaded:o,preloadedComments:s,preloadedCommentsTotalCount:void 0===l?0:l,onCommentsUpdate:k}),G=H.isLoading,Z=H.isFetchingNextPage,Q=H.hasNextPage,Y=H.fetchNextPage,J=H.remove,X=c!==R||p!==T;(0,a.useEffect)(function(){!o&&X&&(L(c),M(p),k([]),J())},[o,X,c,p,J,k]);var ee=G&&0===C.length,en=G||Z;(0,a.useEffect)(function(){if(!en&&U){var e;null==x||null==(e=x.current)||e.scrollIntoView({behavior:"smooth"}),z(!1)}},[en,U,z,null==x?void 0:x.current]);var er=j&&g&&void 0!==v&&v&&(!en||C.length>0);return et({enabled:!G}),{comments:C,isFetchingNextPage:Z,hasNextPage:Q,fetchNextPage:Y,addCommentToList:I,updateCommentInList:N,removeCommentFromList:A,handleCommentCreate:function(e){null==h||h(),I(e),null==b||b(e);var t=document.getElementById("comment_wrapper_".concat(e.id));t&&t.scrollIntoView({behavior:"smooth",block:"center"}),V(),B(function(e){return e+1})},handleCommentDelete:function(e){A(e),null==y||y(e)},formKey:K,persistCacheKey:$,isFirstLoading:ee,isAnyLoading:en,shouldShowForm:er,usedIn:O,isUsedInMinimalTipTapViewModal:void 0===S?void 0!==m&&m:S}},eg=function(e){var t=e.space,n=e.post,o=e.parentCommentId,a=e.preloadedComments,l=e.preloadedCommentsTotalCount,c=e.showReplyForm,u=e.autofocusReplyForm,d=e.communityMemberForReply,f=e.onCommentReplyClick,m=e.onCommentCreate,b=e.onCommentDelete,y=e.resetCommunityMemberForReply,h=e.formRef,g=eh({postId:n.id,parentCommentId:o,preloaded:!0,preloadedComments:void 0===a?[]:a,preloadedCommentsTotalCount:void 0===l?0:l,postCommentsClosed:n.is_comments_closed,postLikingDisabled:n.is_liking_disabled,space:t,showReplyForm:void 0!==c&&c,onCommentCreate:m,onCommentDelete:b,resetCommunityMemberForReply:y}),v=g.comments,x=g.hasNextPage,j=g.fetchNextPage,_=g.updateCommentInList,w=g.handleCommentCreate,O=g.handleCommentDelete,S=g.formKey,P=g.persistCacheKey,
1C=g.isAnyLoading,k=g.shouldShowForm,I=g.isUsedInMinimalTipTapViewModal;return(0,r.jsxs)("div",{className:(0,p.x)({"my-3":!k}),children:[v.map(function(e){return(0,r.jsx)(tD,{space:t,post:n,comment:e,autofocusReplyForm:!0,onReplyClick:f,onUpdate:_,onDelete:O,onReplyCreate:m,onReplyDelete:b},e.id)}),C&&(0,r.jsx)(i.y,{}),!C&&x&&(0,r.jsx)("div",{className:"mb-4 mt-2 pl-5 text-left text-sm font-medium md:pl-6",children:(0,r.jsx)("button",{type:"button",onClick:function(e){e.preventDefault(),j()},className:"focus-visible:outline-secondary text-link focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",children:(0,s.t)("comments.list.show_more_replies")})}),C&&I&&(0,r.jsx)("div",{className:"bg-primary absolute bottom-0 left-0 w-full !px-5 !py-4 md:!px-8",children:(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"bg-tertiary size-10 animate-pulse rounded-full"}),(0,r.jsx)("div",{className:"border-primary h-10 w-full rounded-md border p-px"})]})}),k&&(0,r.jsx)(H,{spaceId:t.id,postId:n.id,parentCommentId:o,communityMemberForReply:d,autoFocus:void 0!==u&&u,className:(0,p.x)(I&&"!max-h-[360px]"),onCreate:w,bodyInputRef:h,persistCacheKey:P},S)]})},ev=n(941392),ex=n(428266),ej=n(529648),e_=n(506493),ew=n(316172),eO=n.n(ew);function eS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function eP(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var eC=function(e){var t=e.comment,n=e.canReport,o=e.canReview,i=e.canEdit,a=e.canDestroy,l=e.canBookmark,c=e.isReply,u=e.onReportClick,d=e.onEditClick,f=e.onDeleteClick,m=e.onUpdate,y=(0,e_.B)(),h=[],g=(0,$.d)().success;n&&h.push({key:"report",label:(0,s.t)("comments.action_menu.report.label"),href:"#",onClick:function(){u()}}),o&&h.push(eS({key:"review",label:(0,s.t)("comments.action_menu.review.label"),to:z.cO.index()},y?{target:"_blank",rel:"noreferrer"}:{})),i&&h.push({key:"edit",label:(0,s.t)("comments.action_menu.edit.label"),onClick:function(){d()}});var v=t.show_url;return(v&&h.push({key:"Copy link",label:(0,s.t)("comments.action_menu.copy_url.label"),href:"#",onClick:function(){eO()(v),g((0,s.t)("comments.action_menu.copy_url.url_copied"))}}),a&&h.push({key:"delete",label:(0,s.t)("comments.action_menu.delete.label"),hasDanger:!0,onClick:function(){f()}}),0!==h.length||l)?(0,r.jsx)("div",{className:(0,p.x)((0,b.W2)("post__actions--comment",{"post__actions--reply":c}),"ml-2 md:ml-4"),"data-testid":"post-comment-actions",children:(0,r.jsxs)(ej.ms,{menuButtonEl:"div",button:(0,r.jsx)(ex.K,{name:"20-menu-dots-horizontal",iconClassName:"!text-default group-hover:!text-dark !w-5 !h-5",className:"group",variant:"secondary",iconSize:20,buttonSize:28,dataTestId:"action-more",ariaLabel:(0,s.t)("comments.actions")}),children:[(0,r.jsx)(ev.T,{variant:"dropdown",bookmarkType:"comment",record:t,onSuccess:function(e){m(eP(eS({},t),{bookmark_id:e}))}}),h.map(function(e){var t=e.key,n=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["key"]);return(0,r.jsx)(ej.ms.ItemWithLink,eP(eS({}
1,n),{children:e.label}),t)})]})}):null},ek=n(988269),eI=n(757264),eN=n(786158),eA=function(e){var t=e.comment,n=t.body_trix_content,o=t.editor,i=t.tiptap_body,a=t.updated_at;return(0,r.jsx)("div",{className:(0,p.x)((0,b.W2)("post__body"),"text-md"),"data-testid":"comment-body",children:(0,r.jsx)("div",{className:(0,p.x)((0,b.W2)("post__inside"),"text-dark"),"data-testid":"comment-body-inside",children:(0,r.jsx)(eI.W,{lines:8,children:"tiptap"===o?(0,r.jsx)(eN._,{tiptapBody:i}):(0,r.jsx)(ek.X,{content:n})})},a)})},eE=n(737225),eR=n(316540),eL=function(e){var t,n=e.comment,o=e.space,i=e.updateComment;return(0,r.jsx)("div",{className:"text-dark mb-1 whitespace-pre-line text-sm font-normal",children:(0,r.jsx)(eR.l,{onSubmit:i,defaultValues:{tiptap_body:n.tiptap_body},children:(0,r.jsx)(K,{isEdit:!0,postId:n.post_id,spaceId:o.id,autoFocus:!0,authorType:null==(t=n.community_member)?void 0:t.type})})})},eD=n(974618),eT=function(e){var t=e.comment,n=e.space,o=e.updateComment,i=(0,eD.hS)();return(0,C.vC)("esc",function(){return i.remove()},{enableOnContentEditable:!0},[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eE.aF.Overlay,{}),(0,r.jsxs)(eE.aF.Content,{size:"lg",className:"!overflow-visible",children:[(0,r.jsxs)(eE.aF.Header,{children:[(0,r.jsx)(eE.aF.Title,{size:"sm",children:(0,s.t)("comments.edit.form.title")}),(0,r.jsx)(eE.aF.HeaderActions,{children:(0,r.jsx)(eE.aF.CloseButton,{onClick:i.remove})})]}),(0,r.jsx)(eE.aF.Body,{className:"!overflow-y-visible pb-6",children:(0,r.jsx)(eL,{comment:t,space:n,updateComment:o})})]})]})},eM=n(914104),eF=n(750127),eK=n(938372),eB=n.n(eK),eq=function(e){var t=e.spaceId,n=e.spaceIsPrivate,o=e.onClose,i=(0,O.xW)(),a=i.watch,l=i.formState,c=l.isDirty,u=l.isSubmitting,d=l.isSubmitSuccessful,f
1=a().body,m=u||d,y=!!f&&!m;(0,eF.B)({enabled:y});var h=function(){(!c||confirm((0,s.t)("prevent_accidental_leave_message")))&&o()};return(0,r.jsxs)(eE.aF.Content,{size:"lg",wrapperClassName:"!h-full",className:"!transform-none !overflow-visible",children:[(0,r.jsxs)(eE.aF.Header,{children:[(0,r.jsx)(eE.aF.Title,{children:(0,s.t)("comments.edit.form.title")}),(0,r.jsx)(eE.aF.HeaderActions,{children:(0,r.jsx)(eE.aF.CloseButton,{onClick:h})})]}),(0,r.jsx)(eE.aF.Body,{className:(0,p.x)((0,b.W2)("trix-v2"),"max-h-[calc(100dvh-82px-65px)] !overflow-visible md:max-h-none"),children:(0,r.jsx)(eM.k,{id:"comment-edit-body",name:"body",placeholder:(0,s.t)("comments.form.fields.body_placeholder"),className:"h-full",editorContainerClassName:"flex flex-col h-full",textboxClassName:"overflow-auto rounded-md py-4 sm:max-h-[40vh]",space_id:t,is_private_space:n})}),(0,r.jsxs)(eE.aF.Footer,{className:"bottom-0 flex justify-end space-x-4",children:[(0,r.jsx)(S.$,{type:"button",variant:"secondary",onClick:h,children:(0,s.t)("cancel")}),(0,r.jsx)(S.$,{type:"submit",variant:"primary",disabled:!y,children:m?(0,s.t)("saving_changes"):(0,s.t)("save_changes")})]})]})};eq.propTypes={spaceId:eB().number.isRequired,spaceIsPrivate:eB().bool.isRequired,onClose:eB().func.isRequired};var eU=function(e){var t=e.comment,n=e.onUpdate,r=t.id,o=t.post_id,i=t.body_for_editor,a=(0,$.d)(),l=a.success,c=a.error;return{defaultValues:{body:i},updateComment:(0,W.n_)({mutationFn:function(e){return(0,U.kS)(z.iK.comments.update({postId:o,id:r}),{comment:e})},onSuccess:function(e){n(e),l((0,s.t)("comments.edit.alerts.success"))},onError:function(){return c((0,s.t)("comments.edit.alerts.failure"))}}).mutateAsync}},ez=function(e){var t=e.space,n=e.comment,o=e.onUpdate,i=t.id,a=t.is_private,l=(0,eD.hS)(),c="tiptap"===n.editor,u=eU({comment:n,onUpdate:function(e){o(e),l.hide()}}),d=u.defaultValues,p=u.updateComment;return(0,r.jsx)(eE.aF,{title:(0,s.t)("comments.edit.form.title"),isOpen:l.visible,onClose:f.noop,children:c?(0,r.jsx)(eT,{comment:n,space:t,updateComment:p}):(0,r.jsxs)(g.l,{defaultValues:d,onSubmit:p,className:"h-full",formClassName:"h-full",children:[(0,r.jsx)(eE.aF.Overlay,{}),(0,r.jsx)(eq,{spaceId:i,spaceIsPrivate:a,onClose:l.hide})]})})},eW=eD.PT.create(function(e){var t=e.space,n=e.comment,o=e.onUpdate;return(0,r.jsx)(ez,{space:t,comment:n,onUpdate:o})}),e$=function(e){var t,n,o=e.label,i=e.onClick,a=e.disabled,s=void 0!==a&&a,l=e.isLiked,c=void 0!==l&&l,u=e.className,d=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["label","onClick","disabled","isLiked","className"]);return(0,r.jsx)("button",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({type:"button",className:(0,p.x)("focus-visible:outline-secondary focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",u),onClick:function(e){e.preventDefault(),s||i()},"aria-disabled":s},d),n=n={children:(0,r.jsx)("span",{"aria-checked":c,className:(0,p.x)("hover:text-dark text-sm",{"text-brand font-semibold":c,"text-default font-medium":!c}),children:o})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};e$.propTypes={label:eB().string.isRequired,onClick:eB().func.isRequired,disabled:eB().bool,isLiked:eB().bool,className:eB().string};var eV=n(41907),eH=function(e){var t=e.likesCount,n=e.onClick;return(0,r.jsx)("button",{type:"submit",className:"text-default hover:text-dark group ml-auto mr-0 text-sm font-medium","data-testid":"like-count",onClick:n,children:(0,r.jsx)("span",{className:"group-focus-visible:outline-secondary group-focus-visible:rounded-sm group-focus-visible:outline group-focus-visible:outline-2 group-focus-visible:outline-offset-2",children:(0,s.t)("comments.likes",{count:t,formatted_count:(0,eV.Rt)(t)})})})},eG=function(e){var t=e.canLike,n=e.canReply,o=e.canSeeLikes,i=e.isLiked,a=e.isLikeDisabled,l=e.likesCount,c=e.onLikeClick,u=e.onLikesCountClick,f=e.onReplyClick,m=(0,d.Od)().currentUser,y=o&&l>0&&(m||t&&n);return(0,r.jsxs)("div",{className:(0,p.x)((0,b.W2)("post__actions post__actions-visible"),"mt-1 flex pl-[3.25rem]"),children:[t&&(0,r.jsx)(e$,{className:(0,p.x)((0,b.W2)("post__actions--like",{liked:i}),"mr-2"),label:(0,s.t)("comments.engagement_actions.".concat(i?"liked":"like")),onClick:c,disabled:a,isLiked:i}),n&&(0,r.jsx)(e$,{className:(0,b.W2)("post__actions--reply"),label:(0,s.t)("comments.engagement_actions.reply"),onClick:f}),y&&(0,r.jsx)(eH,{likesCount:l,onClick:u})]})};eG.propTypes={canLike:eB().bool.isRequired,canReply:eB().bool.isRequired,canSeeLikes:eB().bool.isRequired,isLiked:eB().bool.isRequired,isLikeDisabled:eB().bool.isRequired,likesCount:eB().number.isRequired,onLikeClick:eB().func.isRequired,onLikesCountClick:eB().func.isRequired,onReplyClick:eB().func.isRequired};var eZ=n(809061),eQ=n(791009),eY=n(325335),eJ=n(451251),eX=n(340479),e0=n(488441),e1=n(674251),e2=function(e){var t,n,o=e.communityMember,i=e.onNavigate,a=(0,e0.l)({public_uid:o.public_uid}),s=a.onClick,l=a.href,c=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(a,["onClick","href"]);return(0,r.jsxs)("a",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:"flex items-center gap-3",href:l,onClick:function(e){(0,eX.s6)(e)||i(),null==s||s(e)}},c),n=n={children:[(0,r.jsx)(eJ.C,{communityMemberId:o.id,name:o.name,publicUid:o.public_uid,headline:o.headline,avatarURL:o.avatar_url,children:(0,r.jsx)(q.J,{name:o.name,src:o.avatar_url,size:"10"})}),(0,r.jsx)(e1.o.LabelSm,{weight:"medium",truncate:!0,children:o.name})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},e3=n(466330),e4=function(e){var t,n=e.comment,r=(0,W.qu)(e3.R.list(n.id)),o=r.data,i=r.isInitialLoading,s=r.fetchNextPage,l=r.hasNextPage;return{members:(0,a.useMemo)(function(){var e;return null!=(e=null==o?void 0:o.pages.flatMap(function(e){return e.records}))?e:[]},[o]),totalCount:null==o||null==(t=o.pages.at(-1))?void 0:t.count,isInitialLoading:i,fetchNextPage:s,hasNextPage:l}},e5=n(257957),e6=(0,eZ.F)(function(e){var t=e.comment,n=e.open,o=e.onOpenChange,a=e4({comment:t}),l=a.members,c=a.totalCount,u=a.isInitialLoading,d=a.hasNextPage,p=a.fetchNextPage,f=null!=c?c:t.likes_count,m=(0,s.t)("comments.likes",{count:f,formatted_count:(0,eV.Rt)(f)}),b="comment-likes-modal-".concat(t.id);return(0,r.jsx)(eQ.a.Root,{open:n,onOpenChange:o,size:"md",children:(0,r.jsxs)(eQ.a.Content,{children:[(0,r.jsx)(eQ.a.Header,{title:m}),(0,r.jsx)(eQ.a.Body,{customLayout:!0,children:u?(0,r.jsx)(i.y,{}):(0,r.jsx)("div",{id:b,className:"overflow-y-auto sm:max-h-80",children:(0,r.jsx)(eY.A,{dataLength:l.length,next:p,hasMore:null!=d&&d,loader:(0,r.jsx)(i.y,{}),scrollableTarget:b,scrollThreshold:.75,className:"flex flex-col space-y-4",children:l.map(function(e){return(0,r.jsx)(e2,{communityMember:e,onNavigate:function(){return o(!1)}},e.id)})})})})]})})},function(e){var t=e.comment,n=(0,eD.hS)(),o=e4({comment:t}),a=o.members,l=o.totalCount,c=o.isInitialLoading,u=o.hasNextPage,d=o.fetchNextPage,p=null!=l?l:t.likes_count,f=(0,s.t)("comments.likes",{count:p,formatted_count:(0,eV.Rt)(p)});return(0,r.jsxs)(eE.aF,{title:f,isOpen:n.visible,onClose:n.hide,children:[(0,r.jsx)(eE.aF.Overlay,{}),(0,r.jsxs)(eE.aF.Content,{children:[(0,r.jsxs)(eE.aF.Header,{children:[(0,r.jsx)(eE.aF.Title,{size:"sm",children:(0,r.jsx)(e1.o.LabelLg,{weight:"semibold",children:f})}),(0,r.jsx)(eE.aF.HeaderActions,{children:(0,r.jsx)(eE.aF.CloseButton,{onClick:n.hide})})]}),(0,r.jsx)(eE.aF.Body,{className:"pb-6 pt-4",children:c?(0,r.jsx)(i.y,{}):(0,r.jsx)("div",{id:"comment-likes-modal-".concat(t.id),className:"max-h-[calc(100dvh-62px-44px-24px)] overflow-auto sm:max-h-80",children:(0,r.jsx)(eY.A,{scrollThreshold:.75,next:d,hasMore:null!=u&&u,loader:(0,r.jsx)(e5.a,{}),scrollableTarget:"comment-likes-modal-".concat(t.id),dataLength:a.length,className:"flex flex-col space-y-4",children:a.map(function(e){return(0,r.jsx)(e2,{communityMember:e,onNavigate:n.hide},e.id)})})})})]})]})}),e8=n(116047),e9=n(275603),e7=function(e){var t,n,o,i,a,s,l,c=e.comment,u=c.community_member,d=c.author_type,f=(0,e0.l)({public_uid:null!=(o=u.public_uid)?o:"",params:{show_back_link:!0}}),m=(0,e9.w)({id:u.id,params:{show_back_link:!0}});return(0,r.jsx)("div",{className:(0,p.x)((0,b.W2)("post__user"),"flex items-start"),children:(0,r.jsx)("div",{className:(0,p.x)((0,b.W2)("post__avatar"),"mr-3"),children:(0,r.jsx)("a",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,p.x)((0,b.W2)("user__avatar"),"focus-visible:outline-secondary focus-visible:text-dark block size-10 focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2")},"CommunityAiAgent"===d?m:f),n=n={children:"CommunityAiAgent"===d?(0,r.jsx)(e8.b,{c
1ommunityMemberId:u.id,name:u.name,publicUid:u.public_uid,avatarURL:u.avatar_url,children:(0,r.jsx)(q.J,{src:null!=(i=u.avatar_url)?i:"",name:null!=(a=u.name)?a:"",size:"10"})}):(0,r.jsx)(eJ.C,{communityMemberId:u.id,name:u.name,publicUid:u.public_uid,headline:u.headline,avatarURL:u.avatar_url,children:(0,r.jsx)(q.J,{src:null!=(s=u.avatar_url)?s:"",name:null!=(l=u.name)?l:"",size:"10"})})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))})})},te=n(535183),tt=n(852661),tn=n(6418),tr=n(199563),to=n(328187),ti=n(605274),ta=n(517338),ts=n(898666),tl=function(e){var t,n,o=e.comment,i=e.commentLinkProps,a=o.community_member,l=o.created_at,c=(0,ti.qI)(),d="full-post-modal"===(0,u.a)().usedIn,m=c||d?(0,f.truncate)(a.headline,{length:60}):a.headline;return m||c||d?(0,r.jsx)("div",{className:(0,p.x)((0,b.W2)("post__meta"),"inline-flex"),children:(0,r.jsx)(ts.$,{content:a.headline,shouldUseSpanWrapper:!1,interactive:!1,disabled:!m,children:(0,r.jsx)("button",{type:"button",className:(0,p.x)((0,b.W2)("author__credentials"),"text-default focus-visible:outline-secondary focus-visible:text-dark mt-1 w-full text-left text-xs leading-4 focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"),children:(0,r.jsxs)("span",{children:[m&&(0,r.jsx)("span",{className:(0,p.x)("overflow-anywhere mr-2",{"md:line-clamp-1":!d}),children:m}),(c||d)&&!!m&&(0,r.jsx)("span",{className:"bg-badge mr-2 inline-block size-[0.15rem] rounded-full align-middle"}),(c||d)&&(0,r.jsx)("a",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,p.x)("text-default hover:text-dark text-xs leading-5","focus-visible:outline-secondary focus-visible:text-dark mr-2 focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2")},i),n=n={children:(0,r.jsx)(ts.$,{content:(0,to.VG)(l),className:"inline-flex",interactive:!1,children:(0,tr.z9)(l,{format:tr.Or.short})})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)),(c||d)&&o.flagged_for_approval_at&&(0,r.jsx)(ta.E,{className:(0,p.x)((0,b.W2)("authour__in-review"),"!bg
1-author-in-review border-0 uppercase text-white"),textClassName:"uppercase",label:(0,s.t)("comments.in_review"),variant:"secondary"})]})})})}):null};function tc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function tu(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var td=function(e){var t,n=e.post,o=e.comment,i=o.id,a=o.community_member,l=o.member_tags,c=o.flagged_for_approval_at,f=o.created_at,m=o.parent_comment_id,y=o.author_type,h=(0,d.Od)().currentCommunityMember,g="full-post-modal"===(0,u.a)().usedIn,v=!!a.admin,x=null==l?void 0:l.filter(function(e){var t;return(null==e?void 0:e.is_public)&&(null==e||null==(t=e.display_locations)?void 0:t.post_bio)}),j=(0,e_.B)(),_=(0,tn.V8)(h),w=(null==x?void 0:x.length)>0||v,O=(0,ti.qI)(),S=O?_:w,P=(0,e0.l)({public_uid:null!=(t=a.public_uid)?t:"",params:{show_back_link:!0}}),C=(0,e9.w)({id:a.id,params:{show_back_link:!0}}),k=tc({href:(0,z.sY)({spaceSlug:n.space_slug,slug:n.slug,hash:"".concat(Z.r).concat(i)})},j?{target:"_blank",rel:"noreferrer"}:{});return(0,r.jsxs)("div",{className:(0,p.x)((0,b.W2)("post__bio"),"mb-1.5 w-full"),children:[(0,r.jsxs)("div",{className:(0,p.x)((0,b.W2)("author"),"text-darkest flex flex-wrap items-center gap-x-2"),children:[(0,r.jsx)("div",{className:(0,p.x)((0,b.W2)("author__name"),"flex"),children:(0,r.jsx)("a",tu(tc({className:"text-dark hover:text-darkest focus-visible:outline-secondary focus-visible:text-dark overflow-anywhere text-sm font-semibold focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"},"CommunityAiAgent"===y?C:P),{children:a.name}))}),"CommunityAiAgent"===y&&(0,r.jsx)(te.N,{}),w&&S&&(0,r.jsx)("div",{className:(0,b.W2)("author__tags member-tags"),children:(0,r.jsx)(tt.e,{memberTags:x,isAdmin:v,limit:O||g||m?1:2,showMoreLabelVariant:"numbers"})}),!O&&!g&&(0,r.jsx)("div",{className:(0,p.x)((0,b.W2)("author__time"),"flex"),children:(0,r.jsx)("a",tu(tc({className:(0,p.x)("text-default hover:text-dark text-xs","focus-visible:outline-secondary focus-visible:text-dark focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2")},k),{children:(0,r.jsx)(ts.$,{content:(0,to.VG)(f),className:"inline-flex",interactive:!1,children:(0,tr.z9)(f,{format:tr.Or.short})})}))}),!O&&!g&&c&&(0,r.jsx)(ta.E,{className:(0,p.x)((0,b.W2)("authour__in-review"),"!bg
1-author-in-review border-0 uppercase text-white"),textClassName:"uppercase",label:(0,s.t)("comments.in_review"),variant:"secondary"})]}),(0,r.jsx)(tl,{comment:o,commentLinkProps:k})]})};function tp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tf=function(e){var t,n=e.comment,r=e.onDelete,o=n.id,i=n.post_id,l=(0,$.d)(),c=l.success,u=l.error,d=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return tp(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tp(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=d[0],f=d[1],m=function(){return f(!1)},b=(0,W.n_)({mutationFn:function(){return(0,U.Dc)(z.iK.comments.destroy({postId:i,id:o}))},onSuccess:function(){c((0,s.t)("comments.delete.alerts.success"),{duration:"short",shouldUseProgress:!1}),m(),r({id:o})},onError:function(){u((0,s.t)("comments.delete.alerts.failure")),m()}});return{isDeleteConfirmModalOpen:p,openDeleteConfirmModal:function(){return f(!0)},closeDeleteConfirmModal:m,deleteComment:b.mutate,isDeletingComment:b.isPending}},tm=n(58661);function tb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ty(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tb(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var th="Comment",tg=function(e){var t=e.comment,n=t.id,r=t.is_liking_enabled,o=t.is_liked,i=t.likes_count,l=(0,d.iZ)(),c=(0,d.PM)(),u=(0,e_.B)(),p=ty((0,a.useState)(o),2),f=p[0],m=p[1],b=ty((0,a.useState)(i),2),y=b[0],h=b[1],g=(0,W.n_)({mutationFn:function(){return tm.p.create({userLikeableId:n,userLikableType:th,forReactQuery:!0})},onSettled:function(){return e3.e.list(n)}}),v=g.mutate,x=g.isPending,j=(0,W.n_)({mutationFn:function(){return tm.p.destroy({userLikeableId:n,userLikableType:th,forReactQuery:!0})},onSettled:function(){return e3.e.list(n)}}),_=j.mutate,w=j.isPending;return{toggleLike:function(){if(!l){var e=(0,z.Qd)({params:{notice:(0,s.t)("comments.log_in_to_like_comments"),post_login_redirect:window.location.href}});u?window.open(e,"_blank","noreferrer"):window.location.href=e;return}x||w||(f?(m(!1),h(function(e){return e-1}),_()):(m(!0),h(function(e){return e+1}),v()))},isLiked:f,likesCount:y,canLike:r&&c,canSeeLikes:r,isLoading:x||w}};function tv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tv(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tj=function(e){var t=e.comment,n=e.showReplyForm,r=e.replyFormRef,o=t.is_replying_enabled,i=(0,d.iZ)(),l=(0,d.PM)(),c=(0,e_.B)(),u=tx((0,a.useState)(n),2),p=u[0],f=u[1],m=tx((0,a.useState)(null),2),b=m[0],y=m[1];return{openReplyForm:function(e){var t,n,o=e.communityMember;if(!i){var a=(0,z.Qd)({params:{notice:(0,s.t)("comments.log_in_to_add_a_comment"),post_login_redirect:window.location.href}});c?window.open(a,"_blank","noreferrer"):window.location.href=a;return}y(o),f(!0),r.current&&(null==(n=r.current.commands)||null==(t=n.focus)||t.call(n,"end"))},shouldShowReplyForm:p,communityMemberForReply:b,canReply:o&&l,resetCommunityMemberForReply:function(){return y(null)}}},t_=n(894723),tw=n(231127),tO=function(e){var t=e.commentId,n=e.onSuccess,r=(0,$.d)(),o=r.success,i=r.error,a=(0,d.Od)().currentCommunityMember;return(0,W.n_)({mutationFn:function(e){var n,r;return(0,U.oK)(z.iK.flaggedContent.create(),{flagged_content:(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),r=r={flagged_contentable_id:t,flagged_contentable_type:"Comment"},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n)})},onSuccess:function(){o((0,s.t)("comments.report.alerts.success"),{duration:"short",shouldUseProgress:!1}),(0,tn.V8)(a)&&eD.PT.show(t_.A,{templateKey:"ai_moderate_new_comments"}),n()},onError:function(){i((0,s.t)("comments.report.alerts.failure"))}})},tS="report-comment-modal-form",tP=["harassment","spam","incorrect_location","against_guidelines","other"],tC=function(e){var t=e.commentId,n=e.open,o=e.onOpenChange,i=tO({commentId:t,onSuccess:function(){return o(!1)}}),a=i.mutate,l=i.isPending,c=tP.map(function(e){return{value:e,label:(0,s.t)("flagged_contents.report_reasons.".concat(e))}});return(0,r.jsx)(eQ.a.Root,{open:n,onOpenChange:o,size:"md",children:(0,r.jsxs)(eQ.a.Content,{children:[(0,r.jsx)(eQ.a.Header,{title:(0,s.t)("comments.report.form.title")}),(0,r.jsx)(eQ.a.Body,{children:(0,r.jsxs)(g.l,{id:tS,defaultValues:{reported_reason_body:"",reported_reason_type:""},onSubmit:function(e){a(e)},children:[(0,r.jsx)(g.l.Item,{description:(0,s.t)("flagged_contents.form.reported_reason_type_description"),hideBorder:!0,isFirstChild:!0,label:(0,s.t)("flagged_contents.form.reported_reason_type"),name:"reported_reason_type",rules:{required:(0,s.t)("settings.validation.this_field_is_required")},children:(0,r.jsx)(g.l.SelectNative,{name:"reported_reason_type",options:c,prompt:(0,s.t)("flagged_contents.form.reported_reason_type_select")})}),(0,r.jsx)(g.l.Item,{description:(0,s.t)("flagged_contents.form.reported_reason_body_description"),fullWidth:!0,hideBorder:!0,label:(0,s.t)("flagged_contents.form.reported_reason_body"),name:"reported_reason_body",placeholder:(0,s.t)("flagged_contents.form.reported_reason_body_placeholder"),children:(0,r.jsx)(g.l.TextArea,{name:"reported_reason_body"})})]})}),(0,r.jsx)(eQ.a.Footer,{secondaryAction:{label:(0,s.t)("cancel"),onClick:function(){return o(!1)}},primaryAction:{label:(0,s.t)("report"),type:"submit",form:tS,loading:l,disabled:l}})]})})},tk=["harassment","spam","incorrect_location","against_guidelines","other"],tI=function(e){var t=e.onReportSubmit,n=(0,eD.hS)(),o=function(){n.hide().then(function(){return n.remove()})},i=tk.map(function(e){return{value:e,label:(0,s.t)("flagged_contents.report_reasons.".concat(e))}});return(0,r.jsxs)(eE.aF,{isOpen:n.visible,onClose:o,title:(0,s.t)("comments.report.form.title"),children:[(0,r.jsx)(eE.aF.Overlay,{}),(0,r.jsxs)(eE.aF.Content,{children:[(0,r.jsxs)(eE.aF.Header,{children:[(0,r.jsx)(eE.aF.Title,{size:"sm",children:(0,s.t)("comments.report.form.title")}),(0,r.jsx)(eE.aF.HeaderActions,{children:(0,r.jsx)(eE.aF.CloseButton,{onClick:o})})]}),(0,r.jsx)(eE.aF.Body,{children:(0,r.jsxs)(g.l,{onSubmit:function(e){return t(e)},children:[(0,r.jsx)(g.l.Item,{name:"reported_reason_type",label:(0,s.t)("flagged_contents.form.reported_reason_type"),description:(0,s.t)("flagged_contents.form.reported_reason_type_description"),className:"!pt-0",hideBorder:!0,children:(0,r.jsx)(g.l.SelectNative,{name:"reported_reason_type",options:i})}),(0,r.jsx)(g.l.Item,{name:"reported_reason_body",label:(0,s.t)("flagged_contents.form.reported_reason_body"),description:(0,s.t)("flagged_contents.form.reported_reason_body_description"),hideBorder:!0,fullWidth:!0,children:(0,r.jsx)(g.l.TextArea,{name:"reported_reason_body"})}),(0,r.jsx)("div",{className:"flex justify-end py-4",children:(0,r.jsx)(S.$,{type:"submit",variant:"primary",children:(0,s.t)("report")})})]})})]})]})};function tN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var tA=eD.PT.create(function(e){return(0,r.jsx)(tI,tN({},e))}),tE=eD.PT.create(function(e){var t,n,o=(0,eD.hS)();return(0,r.jsx)(tC,(t=tN({},e),n=n={open:o.visible,onOpenChange:function(e){e||o.hide().then(function(){return o.remove()})}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}),tR=function(){var e=(0,tw.T)("circle_v4_modals_enabled");return(0,eD.hS)(e?tE:tA)},tL=function(e){var t=e.comment.id,n=(0,$.d)(),r=n.success,o=n.error,i=tR(),a=(0,d.Od)().currentCommunityMember,l=(0,tw.T)("circle_v4_modals_enabled"),c=(0,W.n_)({mutationFn:function(e){var n,r;return(0,U.oK)(z.iK.flaggedContent.create(),{flagged_content:(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),r=r={flagged_contentable_id:t,flagged_contentable_type:"Comment"},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n)})},onSuccess:function(){r((0,s.t)("comments.report.alerts.success"),{duration:"short",shouldUseProgress:!1}),i.hide().then(function(){return i.remove()}),(0,tn.V8)(a)&&eD.PT.show(t_.A,{templateKey:"ai_moderate_new_comments"})},onError:function(){o((0,s.t)("comments.report.alerts.failure"))}}).mutate;return{openReportModal:function(){l?i.show({commentId:t}):i.show({onReportSubmit:c})}}},tD=function(e){var t=e.space,n=e.post,o=e.comment,i=e.showReplyForm,g=e.autofocusReplyForm,v=e.onReplyClick,x=e.onUpdate,j=void 0===x?f.noop:x,_=e.onDelete,w=void 0===_?f.noop:_,O=e.onReplyCreate,S=void 0===O?f.noop:O,P=e.onReplyDelete,C=void 0===P?f.noop:P,k=(0,d.Od)().isViewOnlyMasquerading,I=(0,u.a)().isUsedInMinimalTipTapViewModal,N=o.id,A=o.parent_comment_id,E=o.community_member,R=o.replies,L=o.replies_count,D=o.flagged_for_approval_at,T=o.policies,M=!!D,F=!!A,K=T.can_report&&!M,B=T.can_manage&&M,q=T.can_edit,U=T.can_destroy,z=T.can_bookmark,W=(0,a.useRef)(null),$=tj({comment:o,showReplyForm:void 0!==i&&i,replyFormRef:W}),V=$.openReplyForm,H=$.shouldShowReplyForm,G=$.communityMemberForReply,Z=$.canReply,Q=$.resetCommunityMemberForReply,Y=tg({comment:o}),J=Y.toggleLike,X=Y.isLiked,ee=Y.likesCount,et=Y.canLike,en=Y.canSeeLikes,er=Y.isLoading,eo=e6(),ei=(0,eD.hS)(eW),ea=tL({comment:o}).openReportModal,es=tf({comment:o,onDelete:w}),el=es.isDeleteConfirmModalOpen,ec=es.openDeleteConfirmModal,eu=es.closeDeleteConfirmModal,ed=es.deleteComment,ep=es.isDeletingComment,ef=v||V;return(0,r.jsxs)("div",{className:(0,p.x)((0,b.W2)("post--comment"),"text-dark md:px-0",{"px-5":!F&&!I,"pl-5":F&&!I}),id:"comment_wrapper_".concat(N),children:[(0,r.jsxs)("div",{className:(0,p.x)((0,b.W2)("post__content"),"py-2.5",{"md:px-6":!I}),children:[(0,r.jsxs)("div",{className:"flex w-full justify-between",children:[(0,r.jsxs)("div",{className:"flex w-full pt-1",children:[(0,r.jsx)(e7,{comment:o}),(0,r.jsxs)("div",{className:"flex w-full flex-col",children:[(0,r.jsx)(td,{post:n,comment:o}),(0,r.jsx)(eA,{comment:o})]})]}),(0,r.jsx)(eC,{comment:o,canReport:K,canReview:B,canEdit:q,canDestroy:U,canBookmark:z,isReply:F,onReportClick:k?f.noop:ea,onEditClick:k?f.noop:function(){return ei.show({space:t,comment:o,onUpdate:j})},onDeleteClick:k?f.noop:ec,onUpdate:j})]}),(0,y.wp)(t)&&(0,c.b)(o)&&(0,r.jsx)("div",{className:"my-2 pl-[3.25rem]",children:(0,r.jsx)(l.l.Regular,{record:o,contentType:h.lr})}),(0,r.jsx)(eG,{canReply:Z,canLike:et,canSeeLikes:en,isLiked:X,likesCount:ee,isLikeDisabled:er,onReplyClick:k?f.noop:function(){return ef({communityMember:E})},onLikeClick:k?f.noop:J,onLikesCountClick:k?f.noop:function(){return eo.show({comment:o})}}),U&&(0,r.jsx)(m.R,{isOpen:el,onClose:eu,onConfirm:ed,confirmText:ep?(0,s.t)("deleting"):(0,s.t)("delete"),confirmVariant:"danger",title:(0,s.t)("comments.delete.confirm.title"),disabled:ep,children:(0,s.t)("comments.delete.confirm.description")})]}),!F&&(0,r.jsx)("div",{className:(0,p.x)("md:ml-[3.125rem]",{"ml-8":!I,"ml-12":I}),children:(0,r.jsx)(eg,{space:t,post:n,parentCommentId:N,preloadedComments:R||[],preloadedCommentsTotalCount:L,showReplyForm:H,autofocusReplyForm:void 0!==g&&g,communityMemberForReply:G,resetCommunityMemberForReply:Q,onCommentReplyClick:V,onCommentCreate:S,onCommentDelete:C,formRef:W})})]})},tT=n(870969),tM=function(e){var t,n=e.space,o=e.post,l=e.id,c=e.showReplyForm,u=e.autofocusReplyForm,d=e.onCommentDelete,p=e.onReplyCreate,f=e.onReplyDelete,m=(0,tT.w)({postId:o.id,id:l,postCommentsClosed:null!=(t=o.is_comments_closed)&&t,postLikingDisabled:o.is_liking_disabled}),b=m.comment,y=m.isLoading,h=m.updateQueryData;return((0,a.useEffect)(function(){if(!y){var e,t;null==(e=(t=window).initialiseTippy)||e.call(t)}},[y]),et({enabled:!y}),y)?(0,r.jsx)(i.y,{}):b?(0,r.jsx)(tD,{space:n,post:o,comment:b,showReplyForm:void 0!==c&&c,autofocusReplyForm:void 0!==u&&u,onUpdate:h,onDelete:d,onReplyCreate:p,onReplyDelete:f}):(0,r.jsx)("div",{className:"border-primary text-dark dark:text-lightest bg-v2-warning-100 rounded-b-md border-t p-2.5 py-4 text-md md:p-5",children:(0,s.t)("comments.hierarchy.not_found")})},tF=n(361287),tK=n(398061),tB=n(715208);function tq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tU=function(e){var t,n=e.space,o=e.post,l=e.preloaded,c=e.preloadedComments,u=e.preloadedCommentsTotalCount,d=e.showReplyForm,f=e.autofocusReplyForm,m=e.onCommentCreate,y=e.onCommentDelete,h=e.formRef,g=e.scrollableTarget,v=e.commentsSectionRef,x=eh({parentCommentId:null,postId:o.id,preloaded:void 0!==l&&l,preloadedComments:void 0===c?[]:c,preloadedCommentsTotalCount:void 0===u?0:u,postCommentsClosed:o.is_comments_closed,postLikingDisabled:o.is_liking_disabled,space:n,showReplyForm:void 0!==d&&d,onCommentCreate:m,onCommentDelete:y,commentsSectionRef:v}),j=x.comments,_=x.hasNextPage,w=x.fetchNextPage,O=x.updateCommentInList,S=x.handleCommentCreate,P=x.handleCommentDelete,C=x.formKey,k=x.persist
1CacheKey,I=x.isFirstLoading,N=x.isAnyLoading,A=x.isUsedInMinimalTipTapViewModal,E=x.shouldShowForm,R=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return tq(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tq(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),L=R[0],D=R[1],T=(0,tB.u)();return(0,a.useEffect)(function(){var e=null==g?void 0:g.current;e&&D(e)},[null==g?void 0:g.current]),(0,r.jsxs)("div",{className:(0,p.x)({"my-3":!E}),children:[(0,r.jsx)(eY.A,{style:{overflow:"initial"},scrollThreshold:.8,next:w,hasMore:null!=_&&_,loader:(0,r.jsx)(i.y,{}),dataLength:(null==j?void 0:j.length)||0,scrollableTarget:null!=L?L:T,children:j.map(function(e){return(0,r.jsx)(tD,{space:n,post:o,comment:e,autofocusReplyForm:!0,onUpdate:O,onDelete:P,onReplyCreate:m,onReplyDelete:y},e.id)})},L?"elementTarget":"idTarget"),_&&!N&&(0,r.jsx)("div",{className:"py-5 text-center",children:(0,r.jsx)("button",{type:"button",onClick:function(e){e.preventDefault(),w()},className:(0,p.x)((0,b.W2)("load-more__comments"),"focus-visible:outline-secondary border-hover bg-primary text-dark hover:text-darkest focus-visible:text-darkest inline-block rounded-md border px-6 py-2 text-sm font-semibold leading-normal transition-colors duration-150 focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"),children:(0,s.t)("comments.list.show_more_comments")})}),I&&(0,r.jsx)(i.y,{className:(0,p.x)({"mb-16":A})}),N&&A&&(0,r.jsx)("div",{className:"bg-primary absolute bottom-0 left-0 w-full !px-5 !py-4 md:!px-8",children:(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"bg-tertiary size-10 animate-pulse rounded-full"}),(0,r.jsx)("div",{className:"border-primary h-10 w-full rounded-md border p-px"})]})}),E&&(0,r.jsx)(H,{spaceId:n.id,postId:o.id,autoFocus:void 0!==f&&f,className:(0,p.x)(A&&"!max-h-[360px]"),onCreate:S,bodyInputRef:h,persistCacheKey:k},C)]})},tz=n(802215),tW=n(355104),t$=n(684245),tV=n(899276),tH="post.conversation_summary",tG=function(e){var t=e.onUndo,n=e.disabled;return(0,r.jsxs)("div",{className:"bg-tertiary group flex items-center justify-between rounded-md p-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(o.In,{type:"20-stardust",size:20,className:"text-default !h-5 !w-5"}),(0,r.jsx)("span",{className:"text-dark text-sm font-normal normal-case leading-5 tracking-tight",children:(0,s.t)([tH,"disabled_notice"])})]}),(0,r.jsx)(ex.K,{name:"20-undo",ariaLabel:(0,s.t)([tH,"actions","undo"]),tooltipText:(0,s.t)([tH,"actions","undo"]),onClick:t,className:"text-dark",iconSize:20,buttonSize:24,disabled:n})]})};function tZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tQ(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function tY(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){tQ(i,r,o,a,s,"next",e)}function s(e){tQ(i,r,o,a,s,"throw",e)}a(void 0)})}}function tJ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tZ(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tX(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var t0="post.conversation_summary",t1=function(e){var t=e.post,n=e.className;return(0,tW.c)().isCircleV4?(0,r.jsx)(tV.Y,{post:t,className:n}):(0,r.jsx)(t2,{post:t,className:n})},t2=function(e){var t=e.post,n=e.className,o=(0,d.Od)().currentCommunityMember,i=(0,tn.V8)(o),l=(0,tz.l)({post:t}),c=l.conversationSummary,u=l.refetchConversationSummary,f=l.clearConversationSummary,m=l.updateConversationSummary,b=l.isSaving,y=tJ((0,a.useState)(!1),2),h=y[0],g=y[1],v=tJ((0,a.useState)(!1),2),x=v[0],j=v[1],_=(0,a.useCallback)(function(){g(!1)},[]),w=!h&&!c,O=!h&&!!c;return t.conversation_summary_overview?x&&i?(0,r.jsx)("div",{className:(0,p.x)("py-5 md:px-6",n),children:(0,r.jsx)(tG,{onUndo:function(){return tY(function(){return tX(this,function(e){switch(e.label){case 0:return[4,m({disabled:!1})];case 1:return e.sent(),j(!1),[2]}})})()},disabled:b})}):(0,r.jsx)("div",{className:(0,p.x)("flex py-5 md:px-6",n),children:(0,r.jsxs)(t$.B,{isCollapsed:w,onCollapseClick:function(){g(!1),f()},onExpandClick:function(){g(!0),u()},className:"pb-4",children:[(0,r.jsxs)(t$.B.Content,{closeButtonPosition:"sidebar",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(t$.B.Header,{animate:h,isHidden:O,children:(0,s.t)([t0,w?"title":"loading"])}),i&&w&&(0,r.jsx)(ej.ms,{direction:"bottom-end",menuButtonEl:"div",button:(0,r.jsx)(ex.K,{name:"20-dot-menu",iconClassName:"!text-default group-hover:!text-dark",className:"group",variant:"secondary",iconSize:20,buttonSize:24,ariaLabel:(0,s.t)([t0,"actions","title"]),disabled:b}),className:"z-10",transitionWrapperClassName:"z-50",size:"large",buttonLabel:(0,s.t)([t0,"actions","title"]),children:(0,r.jsx)(ej.ms.ItemLink,{onClick:function(){return tY(function(){return tX(this,function(e){switch(e.label){case 0:return[4,m({disabled:!0})];case 1:return e.sent(),j(!0),[2]}})})()},hasDanger:!0,children:(0,s.t)([t0,"actions","disable"])})})]}),w&&(0,r.jsx)(t$.B.BodyText,{children:t.conversation_summary_overview}),(null==c?void 0:c.content)&&(0,r.jsx)(t$.B.BodyText,{animation:"fade-in",onAnimationComplete:_,children:c.content})]}),t.comments_count>0&&O&&(0,r.jsx)(t$.B.Footer,{children:(0,r.jsx)(t$.B.FooterNote,{children:(0,s.t)([t0,"comments_summarized"],{count:t.comments_count,formatted_count:(0,eV.Rt)(t.comments_count)})})})]})}):null},t3=n(568316),t4=function(e){var t=e.className;return(0,r.jsx)("div",{className:t,children:(0,r.jsxs)("div",{className:"bg-tertiary flex items-center justify-center gap-2 rounded-md p-3 text-center",children:[(0,r.jsx)(o.In,{size:16,type:"lock-v2",className:"text-dark"}),(0,r.jsx)(t3.o.LabelSm,{children:(0,s.t)("post.comments_section.comments_closed")})]})})},t5=n(765724);function t6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function t8(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var t9=function(e){var t=e.isIframeEmbed,n=e.containerClassNames,o=e.currentCommunity,i=t?{target:"_blank",rel:"noreferrer"}:{},a=!!(null==o?void 0:o.private_sign_up_url),l=(0,t5.Xy)(o)||a,c=a?o.private_sign_up_url:(0,t5.T4)(o);return(0,r.jsxs)("div",{className:n,children:[(0,r.jsx)("div",{className:"mb-3 text-center",children:(0,r.jsx)(t3.o.LabelLg,{weight:"semibold",children:(0,s.t)("login_to_comment")})}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-4",children:[(0,r.jsx)("a",t8(t6({className:"focus-visible:outline-secondary border-hover bg-primary text-dark hover:text-darkest focus-visible:text-darkest rounded-md border px-[18px] py-[6px] text-sm font-semibold transition-colors duration-150 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",href:(0,z.Qd)({params:{post_login_redirect:window.location.href}})},i),{children:(0,s.t)("log_in")})),l&&(0,r.jsx)("a",t8(t6({className:(0,p.x)((0,b.W2)("btn btn-primary"),"focus-visible:!outline-secondary !bg-brand !text-brand-button !h-auto !rounded-md !px-[18px] !py-[6px] !text-sm !font-bold !leading-5 !transition-colors !duration-150 hover:!opacity-90 focus-visible:!outline focus-visible:!outline-2 focus-visible:!outline-offset-2"),href:c},i),{children:a?o.private_sign_up_label:(0,s.t)("sign_up")}))]})]})},t7=n(89267),ne=function(e){var t=e.lockedPostCtaContent,n=e.containerClassNames,o=(0,d.iZ)();return(0,r.jsxs)("div",{className:n,children:[(0,r.jsx)("div",{children:(0,r.jsx)(t3.o.TitleSm,{weight:"semibold",children:t.heading})}),(0,r.jsx)("div",{className:"mt-4",children:t.body&&(0,r.jsx)(t3.o.BodyMd,{
1children:(0,r.jsx)(t7.A,{html:t.body})})}),(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsx)(S.$,{onClick:function(){window.location.href=t.buttonLink},children:t.buttonLabel})}),!o&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)(t3.o.LabelSm,{children:(0,s.t)("already_a_member")}),(0,r.jsx)("a",{className:"ml-1 text-sm font-medium text-link",href:(0,z.Qd)({params:{post_login_redirect:window.location.href}}),children:(0,s.t)("log_in")})]})]})},nt=function(e){var t=e.post,n=e.space,o=(0,d.Od)(),i=o.currentCommunity,a=o.currentUser,l=(0,tF.W)(),c=l.showGatedCommentSectionAtBottom,u=l.showGatedCommentSectionAtTop,f=l.isSharedPostViewWithMinimalLayout,m=(0,e_.B)(),h=(0,t5.fz)(i),g={heading:i.locked_post_cta_heading||(0,s.t)("login_to_comment"),body:i.locked_post_cta_body,buttonLabel:i.locked_post_cta_button_text||(0,s.t)("log_in"),buttonLink:i.locked_post_cta_button_url||(0,z.Qd)({params:{post_login_redirect:window.location.href}})},v=(0,p.x)((0,b.W2)({"gated-post--standard-layout":!t.minimal_layout,post__logged_out_comments:!h}),"py-10 px-7 text-center",{"border-t border-primary":f||c,"border-b border-primary":!f&&u});return(h||!n||(0,y._J)(n))&&i.custom_cta_for_share_links?(0,r.jsx)(ne,{containerClassNames:v,lockedPostCtaContent:g}):t.is_comments_enabled&&!a?(0,r.jsx)(t9,{containerClassNames:v,isIframeEmbed:m,currentCommunity:i}):null},nn=function(e){var t=e.post||{},n=t.slug,o=t.space_slug;return(0,r.jsx)("div",{className:"border-primary flex items-center justify-center gap-4 border-t p-12",children:(0,r.jsx)("a",{className:(0,b.W2)("btn btn-secondary"),href:(0,z.sY)({spaceSlug:o,slug:n}),children:(0,s.t)("leave_a_comment")})})};function nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function no(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return nr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nr(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ni=Z.L.replace(/^#/,""),na=function(e){var t=e.autofocusReplyForm,n=e.commentsFormRef,i=e.className,l=e.scrollableTarget,c=(0,tF.W)(),d=c.post,f=c.showGatedCommentSectionAtBottom,m=c.showGatedCommentSectionAtTop,y=c.shouldShowLeaveCommentButton,h=c.shouldHideCommentsListForSpace,g=c.refetchPostDetails,v=c.updatePostDetailsQueryCache,x=X().commentId,j=no((0,a.useState)(x),2),_=j[0],w=j[1],O=no((0,a.useState)(x&&d.comments_count>4),2),S=O[0],P=O[1],C=(0,ef.te)();(0,a.useEffect)(function(){(null==d?void 0:d.comments_count)&&P(x&&d.comments_count>4)},[x,d]);var k=(0,tK.Ir)().data,I=(0,u.a)().isUsedInMinimalTipTapViewModal,N=d.is_comments_closed,A=(0,ef.is)(),E=function(){g&&g()},R=function(){v&&v({comments_count:d.comments_count+1})},L=(0,a.useCallback)(function(){P(!1),w(null),A(C?{__commentsAllView:Date.now()}:{},{hash:ni})},[C,A]),D=h({space:k});(0,a.useEffect)(function(){w(x)},[x]);var T=(0,a.useRef)(null),M=!(y||(0,to.bZ)(d));return(0,r.jsxs)(r.Fragment,{children:[!D&&(0,r.jsx)(t1,{post:d}),(0,r.jsxs)("div",{ref:T,className:(0,p.x)((0,b.W2)("post__comments trix-v2"),{"transition-[margin] duration-150 ease-in-out":I&&!N},void 0===i?"":i),id:"all_comments","data-post-id":d.id,children:[N&&(0,r.jsx)(t4,{className:"m-4"}),y&&(0,r.jsx)(nn,{post:d}),M&&m&&(0,r.jsx)(nt,{post:d,space:k}),!D&&S&&_&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"px-2.5 py-4 md:p-6",children:(0,r.jsxs)("a",{className:"focus-visible:outline-secondary border-hover bg-primary text-dark hover:text-darkest focus-visible:text-darkest inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-semibold leading-normal transition-colors duration-150 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",href:"#all_comments",onClick:function(e){e.preventDefault(),L()},children:[(0,r.jsx)(o.In,{type:"arrow-solid-top-left"}),(0,s.t)("post.comments_section.show_all_count_comments",{count:d.comments_count,formatted_count:(0,eV.Rt)(d.comments_count)})]})}),(0,r.jsx)(tM,{space:k,post:d,id:_,showReplyForm:!N,autofocusReplyForm:t,onCommentDelete:function(){E(),L()},onReplyCreate:R,onReplyDelete:E})]}),!D&&!S&&(0,r.jsx)(tU,{space:k,post:d,showReplyForm:!N,autofocusReplyForm:t,formRef:n,onCommentCreate:R,onCommentDelete:E,scrollableTarget:l,commentsSectionRef:T}),M&&f&&(0,r.jsx)(nt,{post:d,space:k})]})]})}},899276(e,t,n){"use strict";n.d(t,{Y:()=>k});var r=n(391426),o=n(643363),i=n(973646),a=n(931639),s=n(230763),l=n(6418),c=n(41907),u=n(570310),d=n(802215),p=n(739042),f=n(817751),m=n(34819),b=n(70719),y=n(892907),h=n(933578),g=n(417980),v=n(369749),x=n(173700),j="post.conversation_summary",_=function(e){var t=e.onUndo;return(0,r.jsx)(x.Z.Root,{children:(0,r.jsx)(x.Z.Body,{className:"p-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)(f.t,{name:"sparkle-filled",size:"sm",color:"secondary"}),(0,r.jsx)(y.o5,{variant:"label-sm",color:"secondary",children:(0,g.t)([j,"disabled_notice"])})]}),(0,r.jsx)(m.K,{icon:"arrow-undo",size:"sm",variant:"ghost","aria-label":(0,g.t)([j,"actions","undo"]),onClick:t})]})})})};function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var P="post.conversation_summary",C=new Set(["full-post-modal","mobile-full-carousel-modal","minimal-post-modal","profile-modal"]),k=function(e){var t,n=e.post,x=e.className,j=(0,s.Od)().currentCommunityMember,w=(0,l.V8)(j),k=(0,a.a)().usedIn,I=C.has(null!=k?k:"")?"py-5":"py-5 md:px-6",N=(0,d.l)({post:n}),A=N.conversationSummary,E=N.refetchConversationSummary,R=N.clearConversationSummary,L=N.updateConversationSummary,D=S((0,h.useState)(!1),2),T=D[0],M=D[1],F=S((0,h.useState)(!1),2),K=F[0],B=F[1],q=S((0,h.useState)(!1),2),U=q[0],z=q[1],W=function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:B(e),e&&M(!1),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,L({disabled:e})];case 2:return t.sent(),[3,4];case 3:return t.sent(),B(!e),[3,4];case 4:return[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){O(i,r,o,a,s,"next",e)}function s(e){O(i,r,o,a,s,"throw",e)}a(void 0)})})()};if(!n.conversation_summary_overview)return null;if(K&&w)return(0,r.jsx)("div",{className:(0,u.x)(I,x),children:(0,r.jsx)(_,{onUndo:function(){W(!1)}})});var $=!!(null==A?void 0:A.content),V=T&&$&&!U,H=T&&$&&U,G=T&&!U;return(0,r.jsx)("div",{className:(0,u.x)(I,x),children:(0,r.jsxs)("div",{className:"group relative",children:[(0,r.jsxs)("div",{className:(0,u.x)("border-primary bg-primary rounded-xl border px-5 py-[18px]","transition-all delay-200 duration-300 ease-in-out",T?"shadow-[0px_1px_3px_0px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]":"shadow-[0px_1px_2px_0px_rgba(0,0,0,0.05)]",!T&&"group-hover:pb-14 group-hover:delay-0 ".concat("group-hover:shadow-[0px_1px_3px_0px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]"),T&&$&&"pr-12"),children:[G&&(0,r.jsxs)("div",{className:"flex min-h-8 items-center gap-1.5",children:[(0,r.jsx)(o.C,{}),(0,r.jsx)("span",{className:(0,u.x)("text-sm font-medium leading-5","bg-gradient-to-r from-[#3C53E7] to-[#8994DC] bg-clip-text text-transparent"),children:(0,g.t)([P,"loading"])})]}),$&&T&&(0,r.jsxs)("div",{className:(0,u.x)(G&&"mt-2"),children:[(0,r.jsx)(y.o5,{component:"div",variant:"body-sm",color:"primary",className:"[&_ol]:list-decimal [&_ol]:pl-5 [&_p+ol]:py-4 [&_p+ul]:py-4 [&_ul]:list-outside [&_ul]:list-disc [&_ul]:space-y-2 [&_ul]:pl-5",children:(0,r.jsx)(v.o,{text:null!=(t=null==A?void 0:A.content)?t:"",active:V,onComplete:function(){return z(!0)},containerClassName:"whitespace-pre-wrap"})}),n.comments_count>0&&H&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"bg-tertiary mt-4 h-px w-full"}),(0,r.jsxs)("div",{className:"mt-4 flex items-center gap-1.5",children:[(0,r.jsx)(f.t,{name:"sparkle",size:"sm",color:"tertiary"}),(0,r.jsx)(y.o5,{variant:"caption",color:"tertiary",children:(0,g.t)([P,"comments_summarized"],{count:n.comments_count,formatted_count:(0,c.Rt)(n.comments_count)})})]})]})]}),!T&&(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex min-h-8 items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsxs)("span",{className:"relative inline-flex size-5 items-center justify-center",children:[(0,r.jsx)(i.In,{type:"20-stardust",size:20,className:"text-dark absolute inset-0 transition-opacity duration-300 group-hover:opacity-0"}),(0,r.jsx)(i.In,{type:"20-stardust-gradient",size:20,className:"absolute inset-0 scale-[0.875] opacity-0 transition-opacity duration-300 group-hover:opacity-100"})]}),(0,r.jsx)(y.o5,{variant:"label-sm",color:"primary",children:(0,g.t)([P,"title"])})]}),w&&(0,r.jsx)(b.t,{align:"end",options:[{label:(0,g.t)([P,"actions","disable"]),danger:!0,onClick:function(){W(!0)}}],trigger:(0,r.jsx)(m.K,{icon:"dot-menu",size:"sm",variant:"ghost","aria-label":(0,g.t)([P,"actions","title"])})})]}),(0,r.jsx)(y.o5,{variant:"body-sm",color:"primary",children:n.conversation_summary_overview})]})]}),!T&&(0,r.jsx)("div",{className:"pointer-events-none absolute bottom-[
118px] left-5 opacity-0 transition-opacity delay-0 duration-300 ease-in-out group-hover:pointer-events-auto group-hover:opacity-100 group-hover:delay-200",children:(0,r.jsx)(p.$,{variant:"outline",size:"sm",onClick:function(){M(!0),A||E()},children:(0,g.t)([P,"expand"])})}),T&&$&&(0,r.jsx)("div",{className:(0,u.x)("absolute right-2 top-2 transition-opacity duration-300",H?"opacity-100":"pointer-events-none opacity-0"),children:(0,r.jsx)(m.K,{icon:"cross",size:"sm",variant:"ghost","aria-label":(0,g.t)([P,"actions","collapse"]),onClick:function(){M(!1),z(!1),R()}})})]})})}},673775(e,t,n){"use strict";n.d(t,{F:()=>S});var r=n(391426),o=n(361287),i=n(930260),a=n(570310),s=n(804939),l=n(288513),c=n(973646),u=n(230763),d=n(667907),p=n(417980),f=n(746364),m=n(607239),b=n(206611),y=n(500557),h=function(e){var t,n=e.shouldOpenCommentPage,i=e.showCommentAndFocusCommentForm,s=e.toggleComment,h=e.shouldForceSamePageInteractions,g=(0,u.PM)(),v=(0,f.w)().navigateToPost,x=(0,m.Tu)(),j=x.params,_=x.hasNextPage,w=(0,o.W)().post,O=w.is_comments_closed,S=w.is_comments_enabled,P=w.comments_count,C=w.post_details_loaded,k=!(0,d.S)();return S&&!n?(0,r.jsxs)(r.Fragment,{children:[!O&&g&&(0,r.jsx)("button",{type:"button",onClick:function(){k?v({newPost:w,params:j,hasNextPage:_}):i()},"aria-label":(0,p.t)("cap_comment_aria_label",{title:null!=(t=null==w?void 0:w.name)?t:(0,p.t)("this_post")}),className:(0,a.x)((0,l.W2)("action-comment"),"flex items-center px-1 py-0.5 text-sm font-medium text-default transition-colors duration-150 ease-in-out hover:!text-dark focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary"),"data-testid":"post-comment-button",children:(0,r.jsx)("span",{className:(0,l.W2)("action__icon"),children:(0,r.jsx)(c.In,{type:"24-comment",size:24})})}),(0,r.jsxs)("div",{className:(0,a.x)((0,l.W2)("engagement__comments"),"ml-auto mr-0 flex items-center gap-2"),"data-testid":"engagement-comments",children:[(0,r.jsx)(y.S,{}),(0,r.jsx)(b.B,{count:void 0===P?0:P,toggleComment:s,hasPostDetailsLoaded:C,shouldForceSamePageInteractions:void 0!==h&&h})]})]}):(0,r.jsx)("div",{className:(0,a.x)((0,l.W2)("engagement__comments"),"ml-auto mr-0 flex items-center gap-2"),children:(0,r.jsx)(y.S,{shouldDisplayVerticalDivider:!1})})},g=n(697109),v=function(e){var t=e.shouldOpenCommentPage,n=e.toggleComment,i=e.shouldForceSamePageInteractions,s=(0,o.W)().post,u=s.is_comments_enabled,d=s.comments_count,f=s.post_details_loaded;return u&&t?(0,r.jsxs)(g.p,{post:s,allComments:!0,className:"flex w-full !items-center !justify-between",shouldOpenPostModal:!1,children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:(0,l.W2)("action__icon"),children:(0,r.jsx)(c.In,{type:"message",className:"!text-dark",useWithFillCurrentColor:!0})}),(0,r.jsx)("span",{className:(0,a.x)((0,l.W2)("count"),"!text-dark"),children:(0,p.t)("cap_comment")})]}),(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)(b.B,{count:void 0===d?0:d,toggleComment:n,hasPostDetailsLoaded:f,shouldForceSamePageInteractions:void 0!==i&&i})})]}):null},x=n(497184),j=n.n(x),_=n(933578);function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var O=function(){var e,t,n=function(e){if(Array.isArray(e))return e}(e=(0,_.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return w(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return w(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],a=n[1],s=(0,u.PM)(),d=(0,o.W)(),f=d.post,m=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(d,["post"]),b=f.is_liking_enabled,y=f.is_liked_by_current_user,h=f.post_details_loaded;return b&&s?(0,r.jsx)("button",{type:"button","aria-label":(0,p.t)("like_post_aria_label",{name:null!=(t=null==f?void 0:f.name)?t:""}),onClick:function(e){var t;a(!0),setTimeout(function(){a(!1)},200),null==(t=m.onLikeToggle)||t.call(m,e)},className:j()((0,l.W2)("action-link post__actions--like",{liked:y}),"hover:!text-dark focus-visible:outline-secondary flex items-center px-1 py-0.5 text-sm transition-all duration-200 ease-in-out focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",{"text-brand font-semibold":y,"text-default font-medium":!y,"cursor-not-allowed":!h},i?"scale-110":"scale-100"),children:(0,r.jsx)(c.In,{type:y?"24-heart-red-fill":"24-heart-outline",size:24})}):null},S=function(e){var t=e.toggleComment,n=e.showCommentAndFocusCommentForm,c=e.shouldOpenCommentPage,u=void 0!==c&&c,d=e.shouldForceSamePageInteractions,p=e.className,f=(0,o.W)().showEngagementActions,m=(0,s.P)();return f?(0,r.jsxs)("div",{className:(0,a.x)((0,l.W2)("post__actions post__actions-visible"),m?"border-primary flex items-center gap-1 border-0 md:border-t px-3 pt-0 md:py-2.5 md:px-4":"border-primary flex items-center gap-1 border-t px-3 py-2.5 md:px-4",void 0===p?"":p),"data-testid":"post-engagement-actions",children:[(0,r.jsx)(i.F,{children:(0,r.jsx)(O,{})}),(0,r.jsx)(h,{shouldOpenCommentPage:u,showCommentAndFocusCommentForm:n,toggleComment:t,shouldForceSamePageInteractions:void 0!==d&&d}),(0,r.jsx)(v,{shouldOpenCommentPage:u,toggleComment:t})]}):null}},222360(e,t,n){"use strict";n.d(t,{d:()=>b});var r=n(391426),o=n(585529),i=n(92406),a=n(89267),s=n(417980),l=n(607239),c=n(361287),u=n(933578),d=n(746364),p=n(350954),f=n(791851),m=function(e){var t,n,r=e.params,o=void 0===r?{}:r,i=e.hasNextPage,a=void 0!==i&&i,s=(0,c.W)().post,l=(0,d.w)().navigateToPost,m=(0,u.useMemo)(function(){var e,t;return(0,f.d)(null==s||null==(t=s.tiptap_body)||null==(e=t.body)?void 0:e.content)},[null==s||null==(n=s.tiptap_body)||null==(t=n.body)?void 0:t.content]),b=m.truncatedContent,y=m.mediaContent,h=m.hasTruncatedContent,g=m.hasMediaAttachmentsBeforeTruncation,v=(0,u.useMemo)(function(){return{type:"doc",content:b}},[b]),x=(0,u.useMemo)(function(){return y?{type:"doc",content:[y]}:null},[y]),j=(0,u.useMemo)(function(){return(0,p.ZB)(x)},[x]),_=(0,u.useMemo)(function(){return(0,p.ZB)(v)},[v]),w=h&&b&&!_,O=b&&!_,S=!g&&!!y&&!j;return{truncatedContent:v,mediaContent:x,redirectToPostModal:(0,u.useCallback)(function(){l({newPost:s,params:o,hasNextPage:a})},[s,o,a,l]),tiptapBody:null==s?void 0:s.tiptap_body,shouldShowSeeMoreButton:w,shouldRenderTruncatedContent:O,shouldRenderMediaContent:S}},b=function(e){var t=e.hideSeeMoreButton,n=(0,i.i)().minimal_layout,u=(0,c.W)().post,d=(0,l.Tu)(),p=d.params,f=d.hasNextPage,b=u.internal_custom_html,y=m({params:p,hasNextPage:f}),h=y.mediaContent,g=y.truncatedContent,v=y.shouldRenderTruncatedContent,x=y.shouldRenderMediaContent,j=y.tiptapBody,_=y.redirectToPostModal,w=y.shouldShowSeeMoreButton;return(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2",children:[v&&(0,r.jsx)(o.H,{readOnly:!0,disableMentionClicks:n,value:g,shouldRefetch:!0,sgidToObjectMap:j.sgids_to_object_map,inlineAttachments:j.inline_attachments}),b&&(0,r.jsx)(a.A,{html:b},"internal_custom_html"),w&&!(void 0!==t&&t)&&(0,r.jsx)("button",{type:"button",className:"text-light hover:text-dark focus-visible:text-dark inline-flex text-md","data-testid":"see-more-post",onClick:_,children:(0,s.t)("see_more")}),x&&(0,r.jsx)(o.H,{readOnly:!0,disableMentionClicks:n,sgidToObjectMap:j.sgids_to_object_map,inlineAttachments:j.inline_attachments,value:h,shouldRefetch:!0,className:"w-full"})]})}},756528(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(568316),a=n(605274),s=n(497184),l=n.n(s),c=n(417980),u=n(288513),d=function(e){var t=e.post,n=e.mobileWrapperClassName,s=(0,a.qI)();return t.pinned_at_top_of_space?s?(0,r.jsxs)("div",{className:l()("mx-5 mt-5 flex items-center gap-2",void 0===n?"":n),children:[(0,r.jsx)(o.In,{size:20,type:"20-pinned-post",className:"text-dark"}),(0,r.jsx)(i.o.LabelXxs,{children:(0,c.t)("post.pinned_post")})]}):(0,r.jsx)("div",{className:l()((0,u.W2)("post__pin post__pin--pinned"),"inline-flex p-1"),children:(0,r.jsx)(o.In,{type:"20-pin-post",className:"text-default !h-5 !w-5",size:20,useWithStrokeCurrentColor:!0})}):null};n.d(t,{a:()=>d})},389268(e,t,n){"use strict";n.d(t,{t:()=>S});var r=n(391426),o=n(231127),i=n(927561),a=n(339551),s=n(51730),l=n(328187),c=n(915779),u=n(791009),d=n(519104),p=n(258752),f=n(417980),m=n(717526),b=n(674251),y=n(471600),h="duplicate-post-form",g=function(e){var t=e.spaceId,n=e.postId,o=e.postSlug,g=e.postTitle,v=e.hasNoteAboutExceptions,x=e.open,j=e.onOpenChange,_=e.onDuplicateSuccess,w=(0,d.Z)(),O=(0,m.d)(),S=O.success,P=O.error,C=(0,a.E)(),k=C.isLoading,I=(0,C.helpers.basicSpacesWithPostCreationAllowed)(),N=(0,p.n_)({mutationFn:function(e){return(0,s.$H)(c.iK.posts.duplicate({spaceId:t,postSlug:o}),{post:{post_id:n,space_id:e.space_id,send_notifications:e.send_notifications}})}
1,onSuccess:function(e){S((0,f.t)("duplicated_successfully")),j(!1),w({href:(0,l.Lo)({post:e,editMode:!0})}),null==_||_(e)},onError:function(){P((0,f.t)("duplication_failed"))}}),A=N.mutate,E=N.isPending;return(0,r.jsx)(u.a.Root,{open:x,onOpenChange:j,size:"md",children:(0,r.jsxs)(u.a.Content,{children:[(0,r.jsx)(u.a.Header,{title:(0,f.t)("duplicate_post_title",{post_title:g||(0,f.t)("duplicate_post_title_untitled")})}),(0,r.jsx)(u.a.Body,{children:(0,r.jsxs)(i.l,{onSubmit:function(e){return A(e)},defaultValues:{space_id:t,send_notifications:!1},id:h,children:[(0,r.jsx)(i.l.Item,{name:"space_id",isFirstChild:!0,hideBorder:!0,fullWidth:!0,label:(0,f.t)("space"),description:(0,f.t)("duplicate_post_to_space"),rules:{required:(0,f.t)("events.create.form.space_required_error")},children:(0,r.jsx)(y.$,{spaces:I,name:"space_id",defaultValue:t,isLoading:k,disabled:k})}),(void 0===v||v)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.o.LabelXs,{color:"text-light",children:(0,f.t)("comments_wont_be_duplicated")}),(0,r.jsx)(i.l.Item,{name:"send_notifications",hideBorder:!0,fullWidth:!0,label:(0,f.t)("duplicate_post_send_notifications"),hideDescription:!0,inlineReverse:!0,children:(0,r.jsx)(i.l.ToggleSwitch,{variant:"small",name:"send_notifications"})})]})]})}),(0,r.jsx)(u.a.Footer,{secondaryAction:{label:(0,f.t)("cancel")},primaryAction:{label:E?(0,f.t)("duplicating"):(0,f.t)("duplicate"),type:"submit",form:h,disabled:k,loading:E}})]})})},v=n(737225),x=n(568316),j=n(387099),_=n(429273),w=function(e){var t=e.spaceId,n=e.postId,o=e.postSlug,u=e.postTitle,b=e.hasNoteAboutExceptions,y=e.isOpen,h=e.onClose,g=e.onDuplicateSuccess,w=(0,d.Z)(),O=(0,m.d)(),S=O.success,P=O.error,C=(0,a.E)(),k=C.isLoading,I=(0,C.helpers.basicSpacesWithPostCreationAllowed)(),N=(0,p.n_)({mutationFn:function(e){return(0,s.$H)(c.iK.posts.duplicate({spaceId:t,postSlug:o}),{post:{post_id:n,space_id:e.space_id,send_notifications:e.send_notifications}})},onSuccess:function(e){S((0,f.t)("duplicated_successfully")),h(),w({href:(0,l.Lo)({post:e,editMode:!0})}),g&&g(e)},onError:function(){P((0,f.t)("duplication_failed"))}}),A=N.mutate,E=N.isPending;return k?null:(0,r.jsxs)(v.aF,{isOpen:void 0!==y&&y,onClose:h,children:[(0,r.jsx)(v.aF.Overlay,{}),(0,r.jsxs)(v.aF.Content,{className:"!overflow-visible",children:[(0,r.jsxs)(v.aF.Header,{children:[(0,r.jsx)(v.aF.Title,{children:(0,f.t)("duplicate_post_title",{post_title:u||(0,f.t)("duplicate_post_title_untitled")})}),(0,r.jsx)(v.aF.CloseButton,{onClick:h})]}),(0,r.jsx)(v.aF.Body,{className:"!overflow-visible",children:(0,r.jsxs)(i.l,{onSubmit:function(e){return A(e)},defaultValues:{space_id:t,send_notifications:!1},id:"duplicate-post-form",children:[(0,r.jsx)(i.l.Item,{name:"space_id",hideBorder:!0,fullWidth:!0,label:(0,f.t)("space"),description:(0,f.t)("duplicate_post_to_space"),rules:{required:(0,f.t)("events.create.form.space_required_error")},children:(0,r.jsx)(_.r,{spaces:I,name:"space_id",variant:"form-input",defaultValue:t,containerClassname:"mt-2"})}),(void 0===b||b)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.o.LabelXs,{color:"text-light",children:(0,f.t)("comments_wont_be_duplicated")}),(0,r.jsx)(i.l.Item,{name:"send_notifications",hideBorder:!0,fullWidth:!0,label:(0,f.t)("duplicate_post_send_notifications"),hideDescription:!0,inlineReverse:!0,children:(0,r.jsx)(i.l.ToggleSwitch,{variant:"small",name:"send_notifications"})})]})]})}),(0,r.jsx)(v.aF.Footer,{children:(0,r.jsx)(j.$,{type:"submit",variant:"primary",disabled:E,form:"duplicate-post-form",children:E?(0,f.t)("duplicating"):(0,f.t)("duplicate")})})]})]})};function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var S=function(e){if((0,o.T)("circle_v4_modals_enabled")){var t,n,i=e.isOpen,a=e.onClose,s=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["isOpen","onClose"]);return(0,r.jsx)(g,(t=O({},s),n=n={open:void 0!==i&&i,onOpenChange:function(e){e||a()}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}return(0,r.jsx)(w,O({},e))}},608743(e,t,n){"use strict";n.d(t,{J:()=>m});var r=n(391426),o=n(316540),i=n(339950),a=n(931639),s=n(417980),l=n(51730),c=n(915779),u=n(451430),d=n(258752),p=n(717526),f=function(e){var t=e.post,n=e.onSuccess,r=e.onError,o=(0,p.d)(),i=o.success,a=o.error;return(0,d.n_)({mutationFn:function(e){return(0,l.kS)(c.iK.posts.update({spaceId:t.space_id,postSlug:t.slug}),{post:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({space_id:t.space_id},e)})},onSuccess:function(e){(0,u.isFunction)(n)&&n(e),i((0,s.t)("changes_saved"))},onError:function(){(0,u.isFunction)(r)&&r(),a((0,s.t)("failed_to_save_changes"))}})}
1,m=function(e){var t=e.post,n=e.isOpen,l=e.onClose,c=e.onChange,u=(0,a.a)().setIsUpdatingCardViewThumbnail,d=f({post:t,onSuccess:function(e){c(e,{refetch:!1}),null==u||u(!1)},onError:function(){null==u||u(!1)}});return(0,r.jsx)(o.l,{defaultValues:{cardview_thumbnail:t.cardview_thumbnail},onSubmit:function(e){d.mutate(e)},className:"hidden",children:function(e){var t=e.triggerFormSubmit;return(0,r.jsx)(i.M,{isOpen:n,name:"cardview_thumbnail",onClose:function(){l()},aspectRatio:2,title:(0,s.t)("upload_a_cardview_thumbnail"),renderer:function(){return(0,r.jsx)(r.Fragment,{})},onImageAttachSuccess:t,onProcessing:function(e){return e&&(null==u?void 0:u(e))}})}})}},63489(e,t,n){"use strict";n.d(t,{R:()=>L});var r=n(391426),o=n(718391),i=n(451430),a=n(231127),s=n(941392),l=n(973646),c=n(428266),u=n(737225),d=n(529648),p=n(172271),f=n(647894),m=n(408861),b=n(22123),y=n(360093),h=n(626538),g=n(41558),v=n(361287),x=n(398061),j=n(230763),_=n(605274),w=n(14930),O=n(258752),S=n(417980),P=n(410924),C=n(955321),k=n(517338),I=n(66108),N=n(717526),A=n(6418);function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var R=function(e){var t,n=e.onChange,o=e.onPostDestroy,i=(0,v.W)(),a=i.post,R=i.canUpdatePost,L=i.canDuplicatePost,D=i.canDestroyPost,T=i.canManagePost,M=i.refetchPostDetails,F=(0,g.T)(),K=(0,N.d)(),B=K.success,q=K.error,U=(0,x.Ir)().refetch,z=(0,_.qI)(),W=function(e){if(Array.isArray(e))return e}(t=(0,w.C)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return E(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return E(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),$=W[0],V=W[1],H=(0,m.F)({event:a}),G=H.onDeleteClickHandler,Z=H.isConfirmationModalOpen,Q=H.toggleConfirmationModal,Y=H.isRecurringModalOpen,J=H.toggleRecurringModal,X=(0,j.Od)(),ee=X.isViewOnlyMasquerading,et=X.currentCommunityMember,en=(0,A.V8)(et)&&"draft"!==a.status,er=(0,C.l)(),eo=er.onSendAnnouncement,ei=er.isLoading,ea=(0,u.X9)().contentPortalElement,es=(0,O.n_)({mutationFn:function(e){return P.v.destroy({event:a,params:{delete_mode:e}})},onSuccess:function(){o(a.id),B((0,h.aS)(a),{duration:"short",shouldUseProgress:!1}),null==U||U()},onError:function(){return q((0,S.t)("event_dropdown_actions.delete_failed"))}});return R||L||D?ee?(0,r.jsx)(l.In,{type:"menu-dots","aria-label":(0,S.t)("events.event_actions"),className:"cursor-not-allowed"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(d.ms,{direction:"bottom-end",menuButtonEl:"div",button:(0,r.jsx)(c.K,{name:"20-menu-dots-horizontal",iconClassName:"!text-default group-hover:!text-dark !w-5 !h-5",className:"group",variant:"secondary",iconSize:20,buttonSize:28,ariaLabel:(0,S.t)("events.event_actions"),dataTestId:"action-more"}),className:"z-10",transitionWrapperClassName:"z-50",size:"large",appendTo:null!=ea?ea:document.body,children:[(0,r.jsx)(s.T,{variant:"dropdown",bookmarkType:"event",record:a,onSuccess:M}),z&&(0,r.jsx)(y.q,{onChange:function(){return n()},button:(0,r.jsx)(d.ms.ItemLink,{children:(0,S.t)("events.event_actions_dropdown.share_event")})}),R&&(0,r.jsx)(d.ms.ItemLink,{onClick:function(){return F.show({event:a})},forceClose:!0,children:(0,S.t)("edit_event")}),L&&(0,r.jsx)(d.ms.ItemLink,{forceClose:!0,onClick:V,children:(0,S.t)("duplicate_event")}),D&&(0,r.jsx)(d.ms.ItemLink,{onClick:G,forceClose:!0,children:(0,r.jsx)("span",{className:"text-v2-danger",children:(0,S.t)("delete_event")})}),en&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.ms.Separator,{}),(0,r.jsx)(d.ms.ItemLink,{"data-testid":"send-announcement-event-action",disabled:ei,onClick:function(){return eo({eventId:a.id})},children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,S.t)("share_via_broadcast"),(0,r.jsx)(k.E,{label:(0,S.t)("new"),square:!0,variant:"secondary"})]})})]}),T&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.ms.Separator,{}),(0,r.jsx)(b.a,{event:a,canEdit:R})]})]}),(0,r.jsx)(I.R,{isOpen:Z,title:(0,S.t)("event_delete_modal.confirm.title"),onClose:Q,onCancel:Q,onConfirm:function(){return es.mutate("")},confirmVariant:"danger",loading:es.isPending,confirmText:(0,S.t)("delete_event"),children:(0,S.t)("event_delete_modal.confirm.description")}),(0,r.jsx)(f.L,{event:a,show:$,onClose:V}),!(0,h.vF)(a)&&(0,r.jsx)(p.K,{show:Y,isDeleting:es.isPending,onConfirm:function(e){return es.mutate(e)},onCloseModal:J})]}):null},L=function(e){var t=e.onChange,n=e.onPostDestroy,s=void 0===n?i.noop:n;return(0,a.T)("circle_v4_dropdown_enabled")?(0,r.jsx)(o.I,{onChange:t,onPostDestroy:s}):(0,r.jsx)(R,{onChange:t,onPostDestroy:s})}},926192(e,t,n){"use strict";n.d(t,{$:()=>w});var r=n(809061),o=n(391426),i=n(927561),a=n(974618),s=n(51730),l=n(915779),c=n(146917),u=n(258752),d=n(417980),p=n(717526),f=n(894723),m=n(230763),b=n(6418),y=function(e){var t=e.postId,n=e.onSuccess,r=(0,p.d)(),o=(0,m.Od)().currentCommunityMember;return(0,u.n_)({mutationFn:function(e){var n,r;return(0,s.oK)(l.iK.flaggedContent.create(),{flagged_content:(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),r=r={flagged_contentable_id:t,flagged_contentable_type:"Post"},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n)})},onSuccess:function(){c.w.allPosts(),c.w.postDetails(t),r.success((0,d.t)("report_post_success")),(0,b.V8)(o)&&a.PT.show(f.A,{templateKey:"ai_moderate_new_posts"}),n()},onError:function(){r.error((0,d.t)("something_went_wrong"))}})},h=n(791009),g="report-post-modal-form",v=["harassment","spam","incorrect_location","against_guidelines","other"],x=n(737225),j=n(387099),_=["harassment","spam","incorrect_location","against_guidelines","other"],w=(0,r.F)(function(e){var t=e.onOpenChange,n=e.open,r=y({postId:e.post.id,onSuccess:function(){return t(!1)}}),a=r.mutate,s=r.isPending,l=v.map(function(e){return{value:e,label:(0,d.t)("flagged_contents.report_reasons.".concat(e))}});return(0,o.jsx)(h.a.Root,{open:n,onOpenChange:t,size:"md",children:(0,o.jsxs)(h.a.Content,{children:[(0,o.jsx)(h.a.Header,{title:(0,d.t)("flagged_contents.form.report_post")}),(0,o.jsx)(h.a.Body,{children:(0,o.jsxs)(i.l,{id:g,defaultValues:{reported_reason_body:"",reported_reason_type:""},onSubmit:function(e){return a(e)},children:[(0,o.jsx)(i.l.Item,{description:(0,d.t)("flagged_contents.form.reported_reason_type_description"),hideBorder:!0,isFirstChild:!0,label:(0,d.t)("flagged_contents.form.reported_reason_type"),name:"reported_reason_type",rules:{required:(0,d.t)("settings.validation.this_field_is_required")},children:(0,o.jsx)(i.l.SelectNative,{name:"reported_reason_type",options:l,prompt:(0,d.t)("flagged_contents.form.reported_reason_type_select"),"data-testid":"report-reason-type-select"})}),(0,o.jsx)(i.l.Item,{description:(0,d.t)("flagged_contents.form.reported_reason_body_description"),fullWidth:!0,hideBorder:!0,label:(0,d.t)("flagged_contents.form.reported_reason_body"),name:"reported_reason_body",placeholder:(0,d.t)("flagged_contents.form.reported_reason_body_placeholder"),children:(0,o.jsx)(i.l.TextArea,{name:"reported_reason_body"})})]})}),(0,o.jsx)(h.a.Footer,{secondaryAction:{label:(0,d.t)("cancel"),onClick:function(){return t(!1)}},primaryAction:{label:(0,d.t)("report"),type:"submit",form:g,loading:s,disabled:s,"data-testid":"report_post_submit"}})]})})},function(e){var t=e.post,n=(0,a.hS)(),r=(0,p.d)(),y=(0,m.Od)().currentCommunityMember,h=function(){n.hide().then(function(){return n.remove()})},g=(0,u.n_)({mutationFn:function(e){return(0,s.Ez)(l.iK.flaggedContent.create(),{method:"POST",forReactQuery:!0,body:JSON.stringify({flagged_content:e})})},onSuccess:function(){c.w.allPosts(),c.w.postDetails(t.id),r.success((0,d.t)("report_post_success")),(0,b.V8)(y)&&a.PT.show(f.A,{templateKey:"ai_moderate_new_posts"}),h()},onError:function(){r.error((0,d.t)("something_went_wrong"))}}),v=_.map(function(e){return{value:e,label:(0,d.t)("flagged_contents.report_reasons.".concat(e))}});return(0,o.jsxs)(x.aF,{isOpen:n.visible,onClose:h,title:(0,d.t)("flagged_contents.form.report_post"),children:[(0,o.jsx)(x.aF.Overlay,{}),(0,o.jsx)(x.aF.Content,{children:(0,o.jsxs)(i.l,{defaultValues:{flagged_contentable_id:t.id,flagged_contentable_type:"Post"},onSubmit:function(e){return g.mutate(e)},children:[(0,o.jsxs)(x.aF.Header,{children:[(0,o.jsx)(x.aF.Title,{size:"sm",children:(0,d.t)("flagged_contents.form.report_post")}),(0,o.jsx)(x.aF.HeaderActions,{children:(0,o.jsx)(x.aF.CloseButton,{onClick:h})})]}),(0,o.jsxs)(x.aF.Body,{children:[(0,o.jsx)(i.l.Item,{name:"reported_reason_type",label:(0,d.t)("flagged_contents.form.reported_reason_type"),description:(0,d.t)("flagged_contents.form.reported_reason_type_description"),hideBorder:!0,children:(0,o.jsx)(i.l.SelectNative,{name:"reported_reason_type",options:v})}),(0,o.jsx)(i.l.Item,{name:"reported_reason_body",label:(0,d.t)("flagged_contents.form.reported_reason_body"),description:(0,d.t)("flagged_contents.form.reported_reason_body_description"),hideBorder:!0,fullWidth:!0,children:(0,o.jsx)(i.l.TextArea,{name:"reported_reason_body"})})]}),(0,o.jsxs)(x.aF.Footer,{className:"flex justify-end",children:[(0,o.jsx)(j.$,{type:"button",variant:"secondary",onClick:h,className:"mr-2",disabled:g.isPending,children:(0,d.t)("cancel")}),(0,o.jsx)(j.$,{type:"submit",variant:"circle",disabled:g.isPending,"data-testid":"report_post_submit",children:(0,d.t)("report")})]})]})})]})})}
1,643407(e,t,n){"use strict";n.d(t,{o:()=>ei});var r=n(391426),o=n(361287),i=n(230763),a=n(63489),s=n(941392),l=n(428266),c=n(529648),u=n(737225),d=n(475323),p=n(19893),f=n(157199),m=n(931639),b=n(398061),y=n(765724),h=n(6418),g=n(570310),v=n(915779),x=n(451430),j=n(258752),_=n(417980),w=n(48821),O=n(414121),S=n(517338),P=n(66108),C=n(717526),k=n(328187),I=n(16638),N=n(339043),A=n(51730),E=function(e){var t=e.post,n=e.handleClose,i=void 0===n?x.noop:n,a=(0,C.d)(),s=a.success,l=a.error,u=!!t.post_follower_id,d=(0,o.W)().onPostFollow,p=(0,j.n_)({mutationFn:u?function(){return(0,A.Dc)(v.iK.postFollowers.destroy({postId:t.id,postFollowerId:t.post_follower_id}))}:function(){return(0,A.oK)(v.iK.postFollowers.create({postId:t.id}))},onSuccess:function(e){var t;d({post_follower_id:u?null:null==e||null==(t=e.post_follower)?void 0:t.id}),i(),s(I18n.t(u?"post_unfollow.success":"post_follow.success"))},onError:function(){return l(I18n.t(u?"post_unfollow.error":"post_follow.error"))}});return(0,r.jsx)(c.ms.ItemLink,{onClick:function(){p.mutate()},children:(0,r.jsx)(N.Pf,{label:(0,_.t)("follow_post"),field:"follow_post",value:u,variant:"small"})})};function R(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var L=function(e){var t=e.post,n=e.onChange,o=e.refetchPosts,i=e.handleClose,a=void 0===i?x.noop:i,s=(0,C.d)(),l=s.success,u=s.error,p=t.pinned_at_top_of_space,f=(0,j.n_)({mutationFn:function(){return d.d.pin({post:t,formData:{is_pinned:!p,pin_to_top:!0}})},onSuccess:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:if(n(e,{refetch:!1}),!(0,x.isFunction)(o))return[3,2];return[4,o()];case 1:t.sent(),t.label=2;case 2:return l(I18n.t(p?"post_unpinned":"post_pinned")),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){R(i,r,o,a,s,"next",e)}function s(e){R(i,r,o,a,s,"throw",e)}a(void 0)})})()},onError:function(){u(I18n.t(p?"post_unpinned_error":"post_pinned_error"))},onSettled:a});return(0,r.jsx)(c.ms.ItemLink,{onClick:f.mutate,children:(0,r.jsx)(N.Pf,{label:(0,_.t)("pin_to_top"),field:"pin_to_top",value:p,variant:"small"})})},D=n(704752),T=n(146917);function M(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var F=function(e){var t=e.post,n=e.handleClose,o=e.onChange,i=!!(null==t?void 0:t.pinned_at),a=(0,C.d)(),s=a.success,l=a.error,u=(0,D.B)().refetch,p=(0,j.n_)({mutationFn:function(){var e,n;return d.d.pin({post:t,formData:(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t),n=n={is_pinned:!i,pin_to_top:!1},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}),e)})},onSuccess:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return null==o||o(e,{refetch:!1}),[4,u()];case 1:return t.sent(),T.w.spacePosts(e.space_id),s((0,_.t)(i?"post_unpinned_from_sidebar":"post_pinned_to_sidebar")),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){M(i,r,o,a,s,"next",e)}function s(e){M(i,r,o,a,s,"throw",e)}a(void 0)})})()},onError:function(){l((0,_.t)(i?"post_unpinned_error":"post_pinned_error"))},onSettled:n});return(0,r.jsx)(c.ms.ItemLink,{onClick:function(){return p.mutate()},children:(0,r.jsx)(N.Pf,{label:(0,_.t)("pin_post"),field:"pin_post",value:i,variant:"small"})})},K=function(e){var t=e.post,n=e.handleClose,o=e.onChange,i=!!(null==t?void 0:t.is_comments_disabled),a=i?"post.enable_comments":"post.disable_comments",s=(0,C.d)(),l=s.success,u=s.error,d=(0,m.a)().refetchPostDetails,p=(0,j.n_)({mutationFn:function(){return(0,A.kS)(v.iK.posts.update({spaceId:null==t?void 0:t.space_id,postSlug:null==t?void 0:t.slug}),{post:{space_id:null==t?void 0:t.space_id,is_comments_disabled:!i}})},onSuccess:function(e){null==o||o(e,{refetch:!1}),null==d||d(),l((0,_.t)("".concat(a,".alerts.success")))},onError:function(){u((0,_.t)("".concat(a,".alerts.failure")))},onSettled:n}).mutate;return(0,r.jsx)(c.ms.ItemLink,{onClick:function(){return p()},children:(0,r.jsx)(N.Pf,{label:(0,_.t)("post.action_menu.disable_comments"),field:"disable_comments",value:i,variant:"small"})})},B=function(e){var t=e.post,n=e.handleClose,o=e.onChange,i=!!(null==t?void 0:t.is_comments_closed),a=i?"post.open_comments":"post.close_comments",s=(0,C.d)(),l=s.success,u=s.error,d=(0,j.n_)({mutationFn:function(){return(0,A.kS)(v.iK.posts.update({spaceId:null==t?void 0:t.space_id,postSlug:null==t?void 0:t.slug}),{post:{space_id:null==t?void 0:t.space_id,is_comments_closed:!i}})},onSuccess:function(e){null==o||o(e,{refetch:!1}),l((0,_.t)("".concat(a,".alerts.success")))},onError:function(){u((0,_.t)("".concat(a,".alerts.failure")))},onSettled:n}).mutate;return(0,r.jsx)(c.ms.ItemLink,{onClick:function(){return d()},children:(0,r.jsx)(N.Pf,{label:(0,_.t)("post.action_menu.close_comments"),field:"close_comments",value:i,variant:"small"})})},q=n(974618),U=n(894723);function z(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var W=function(e){var t=e.post,n=e.handleClose,o=void 0===n?x.noop:n,a=e.onChange,s=e.refetchPosts,l=t.hide_from_featured_areas,u=(0,C.d)(),p=u.success,f=u.error,m=(0,i.Od)().currentCommunityMember,b=(0,j.n_)({mutationFn:function(){return l?d.d.showInFeaturedAreas({post:t}):d.d.hideFromFeaturedAreas({post:t})},onSuccess:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:if(a(e,{refetch:!1}),!(0,x.isFunction)(s))return[3,2];return[4,s()];case 1:t.sent(),t.label=2;case 2:return p(I18n.t(l?"post.marked_unhidden":"post.marked_hidden")),!l&&(0,h.V8)(m)&&q.PT.show(U.A,{templateKey:"ai_curate_home_feed"}),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){z(i,r,o,a,s,"next",e)}function s(e){z(i,r,o,a,s,"throw",e)}a(void 0)})})()},onError:function(){f(I18n.t("something_went_wrong"))}});return(0,r.jsx)(c.ms.ItemLink,{onClick:function(){o(),b.mutate()},children:(0,r.jsx)(N.Pf,{label:(0,_.t)("post.hide_from_featured_areas"),field:"hide_from_featured_areas",value:l,variant:"small"})})}
1,$=function(e){var t=e.post,n=e.onChange,o=t.is_liking_disabled,i=o?"post.enable_liking":"post.disable_liking",a=(0,C.d)(),s=a.success,l=a.error,u=(0,j.n_)({mutationFn:function(){return(0,A.kS)(v.iK.posts.update({spaceId:t.space_id,postSlug:t.slug}),{post:{space_id:t.space_id,is_liking_disabled:!o}})},onSuccess:function(e){n(e,{refetch:!1}),s((0,_.t)("".concat(i,".alerts.success")))},onError:function(){l((0,_.t)("".concat(i,".alerts.failure")))}}).mutate;return(0,r.jsx)(c.ms.ItemLink,{onClick:function(){return u()},children:(0,r.jsx)(N.Pf,{label:(0,_.t)("post.action_menu.disable_liking"),field:"disable_liking",value:o,variant:"small"})})},V=n(389268),H=n(926192),G=n(608743),Z=n(605274),Q=n(14930),Y=n(519104),J=n(341409),X=n(693546);function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function et(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var en=function(e){var t=e.onPostDestroy,n=(0,b.Ir)(),r=n.data,i=n.refetch,a=(0,o.W)(),s=a.post,l=a.showShareOnWebOptions,c=(0,m.a)().usedIn,u=(0,Y.Z)(),p=et((0,Q.C)(!1),2),f=p[0],y=p[1],h=et((0,Q.C)(!1),2),g=h[0],v=h[1],x=et((0,Q.C)(!1),2),w=x[0],O=x[1],S=(0,k.V1)(s),P=(0,Z.qI)(),I=(0,C.d)(),N=I.success,A=I.error,E=S&&!(null==r?void 0:r.hide_right_sidebar)&&!(0,J._0)(r),R=(0,J._0)(r)||(0,J.O9)(r),L=(0,X.a)().isPostDetailPage,D=s.pinned_at_top_of_space,T=!L&&!D&&R,M=P||"full-post-modal"===c,F=M?l(r):T&&l(r),K=(0,J._0)(r)&&!D&&(0,J.wp)(r);return{shouldShowPinToSidebar:E,isPostCardOrListView:R,isPostDetailsPage:L,isCurrentPostPinnedAtTopOfSpace:D,isEligibleForSharing:T,isRenderedOnSmallScreensOrFullPostModal:M,shouldShowShareOnWebOptions:F,shouldShowSetThumbnailOptionForPosts:K,shouldShowDuplicatePostModal:f,toggleDuplicatePostModal:y,shouldShowConfirmationModal:g,toggleConfirmationModal:v,deleteMutation:(0,j.n_)({mutationFn:function(){return d.d.destroy({post:s})},onSuccess:function(){null==t||t(s.id),N((0,_.t)("post_dropdown_actions.delete_successful")),i()},onError:function(){return A((0,_.t)("post_dropdown_actions.delete_failed"))}}),redirectToPost:function(e){u({to:(0,k.Lo)({post:e})})},shouldShowSetThumbnailModal:w,toggleSetThumbnailModal:O}},er=function(e){var t=e.refetchPosts,n=e.currentCommunity,a=e.onPostDestroy,N=e.onChange,A=(0,o.W)(),R=A.post,D=A.showModerationInActionsDropdown,T=A.canManagePost,M=A.canUpdatePost,q=A.canDestroyPost,U=A.canDuplicatePost,z=A.canReportPost,Z=A.refetchPostDetails,Q=A.isTiptapPost,Y=(0,m.a)(),J=Y.usedIn,X=Y.isUsedInMinimalTipTapViewModal,ee=(0,i.Od)(),et=ee.currentCommunitySettings,er=ee.isViewOnlyMasquerading,eo=ee.currentCommunityMember,ei=(0,f.x)().show,ea=(0,w.A)(),es=(0,p.$)(),el=(0,H.$)(),ec=(0,k.AF)(R),eu=(0,k.V1)(R),ed=(0,u.X9)(),ep=ed.contentPortalElement,ef=ed.onClose,em=(0,b.Ir)().data,eb=(0,h.V8)(eo),ey=(null==et?void 0:et.kb_post_action_enabled)&&eb,eh=(0,O.j)(),eg=eh.onShareViaBroadcast,ev=eh.isLoading,ex=(0,C.d)(),ej=ex.success,e_=ex.error,ew=(0,j.n_)({mutationFn:function(){return d.d.updateKnowledgeBasePost({post:R})},onSuccess:function(){ej((0,_.t)("post_dropdown_actions.update_knowledge_base_post_successful"))},onError:function(){return e_((0,_.t)("post_dropdown_actions.update_knowledge_base_post_failed"))}}),eO=en({onPostDestroy:a}),eS=eO.shouldShowPinToSidebar,eP=eO.shouldShowShareOnWebOptions,eC=eO.shouldShowSetThumbnailOptionForPosts,ek=eO.shouldShowDupl
1icatePostModal,eI=eO.toggleDuplicatePostModal,eN=eO.shouldShowConfirmationModal,eA=eO.toggleConfirmationModal,eE=eO.deleteMutation,eR=eO.redirectToPost,eL=eO.shouldShowSetThumbnailModal,eD=eO.toggleSetThumbnailModal;return er?(0,r.jsx)(l.K,{name:"16-menu-dots-horizontal",iconClassName:"!text-dark cursor-not-allowed",ariaLabel:(0,_.t)("post_actions"),dataTestId:"action-more",disabled:!0}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(c.ms,{direction:"bottom-end",menuButtonEl:"div",button:(0,r.jsx)(l.K,{name:"20-dot-menu",iconClassName:"!text-default group-hover:!text-dark",className:"group",variant:"secondary",iconSize:20,buttonSize:X?32:28,ariaLabel:(0,_.t)("post_actions"),dataTestId:"action-more"}),className:(0,g.x)("z-10",{"inline-flex h-8 w-8":X}),transitionWrapperClassName:"z-50",size:"large",buttonLabel:(0,_.t)("post_actions"),appendTo:null!=ep?ep:document.body,children:[(0,r.jsx)(s.T,{variant:"dropdown",bookmarkType:"post",record:R,onSuccess:Z}),eP&&(0,r.jsx)(I.q,{onChange:N,button:(0,r.jsx)(c.ms.ItemLink,{children:(0,_.t)("post.share.share_post_actions_label")}),shouldRenderCustomMenuButton:!0}),M&&eu&&(0,r.jsx)(c.ms.ItemLink,{onClick:function(){er?(0,x.noop)():ei({post:R,onPostChange:N,shouldSkipRedirectAfterSubmit:X})},children:(0,_.t)("edit_post")}),M&&ec&&(0,r.jsx)(c.ms.ItemLink,{onClick:function(){ea.show({spaceId:null==em?void 0:em.id,onClose:function(){return ea.remove()},onPostChange:N,currentPost:R,shouldSkipRedirectAfterSubmit:"full-post-modal"===J})},children:(0,_.t)("edit_post")}),eu&&U&&(0,r.jsx)(c.ms.ItemLink,{forceClose:!0,onClick:eI,children:(0,_.t)("duplicate_post")}),ec&&U&&(0,r.jsx)(c.ms.ItemLink,{onClick:function(){"full-post-modal"===J&&ef(),es.show({post:R,onSuccess:eR})},children:(0,_.t)("duplicate_post")}),eC&&(0,r.jsx)(c.ms.ItemLink,{onClick:function(){eD()},children:(0,_.t)("set_thumbnail")}),z&&(0,r.jsx)(c.ms.ItemLink,{onClick:er?x.noop:function(){el.show({post:R})},children:(0,_.t)("report_post")}),D&&(0,r.jsx)(c.ms.ItemWithLink,{to:v.cO.index(),children:(0,_.t)("flagged_contents.review")}),q&&(0,r.jsx)(c.ms.ItemLink,{onClick:er?x.noop:eA,children:(0,r.jsx)("span",{className:"text-v2-danger",children:(0,_.t)("delete_post")})}),ey&&(0,r.jsx)(c.ms.ItemLink,{onClick:function(){ew.mutate()},children:(0,_.t)("post_dropdown_actions.update_knowledge_base_post_dropdown_label")}),eb&&eu&&Q&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.ms.Separator,{}),(0,r.jsx)(c.ms.ItemLink,{"data-testid":"send-announcement-post-action",disabled:ev,onClick:function(){return eg({postId:R.id})},children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,_.t)("post_dropdown_actions.share_via_broadcast"),(0,r.jsx)(S.E,{label:(0,_.t)("new"),square:!0,variant:"secondary"})]})})]}),(M||U||z||D||q)&&(0,r.jsx)(c.ms.Separator,{}),(0,r.jsx)(E,{post:R}),T&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L,{post:R,onChange:N,refetchPosts:t}),eS&&(0,r.jsx)(F,{post:R,onChange:N}),(0,r.jsx)($,{post:R,onChange:N}),(0,r.jsx)(K,{post:R,onChange:N}),R.is_comments_enabled&&(0,r.jsx)(B,{post:R,onChange:N}),!!n&&(0,y.xo)(n)&&(0,r.jsx)(W,{post:R,onChange:N,refetchPosts:t})]})]}),(0,r.jsx)(G.J,{post:R,onChange:N,onClose:eD,isOpen:eL}),(0,r.jsx)(V.t,{spaceId:R.space_id,postId:R.id,postSlug:R.slug,postTitle:R.name,isOpen:ek,onClose:eI}),(0,r.jsx)(P.R,{isOpen:eN,title:(0,_.t)("delete_post_confirmation"),onClose:eA,onCancel:eA,onConfirm:eE.mutate,confirmVariant:"danger",disabled:eE.isPending,confirmText:eE.isPending?(0,_.t)("deleting"):(0,_.t)("confirm"),children:(0,_.t)("delete_post_descriptor")})]})},eo=function(e){var t=e.onChange,n=e.onPostDestroy,i=e.refetchPosts,s=e.currentCommunity,l=(0,o.W)(),c=l.isBasicPost,u=l.isEventPost,d=l.isImagePost;return(0,r.jsxs)(r.Fragment,{children:[(c||d)&&(0,r.jsx)(er,{onChange:t,onPostDestroy:n,refetchPosts:i,currentCommunity:s}),u&&(0,r.jsx)(a.R,{onChange:t,onPostDestroy:n})]})},ei=function(e){var t=e.onChange,n=e.onPostDestroy,a=e.refetchPosts,s=(0,o.W)(),l=s.showPostActions,c=s.canUpdatePost,u=s.canDestroyPost,d=s.isEventPost,p=(0,i.Od)().currentCommunity;return l&&(!d||c||u)?(0,r.jsx)(eo,{onChange:t,onPostDestroy:n,refetchPosts:a,currentCommunity:p}):null}},680393(e,t,n){"use strict";n.d(t,{N:()=>_});
1var r=n(391426),o=n(988269),i=n(757264),a=n(585529),s=n(361287),l=n(931639),c=n(605274),u=n(92406),d=n(89267),p=n(417980),f=n(804939),m=n(288513),b=n(328187),y=n(570310),h=n(915779),g=n(794435),v=n(746364),x=n(607239),j=n(222360),_=function(e){var t,n,_=e.enableTruncation,w=e.noPadding,O=(0,s.W)(),S=O.post,P=O.isSharedPostWithTeaserLayout,C=O.isSharedPostViewWithMinimalLayout,k=O.isTiptapPost,I=O.isTrixPost,N=O.isBasicPost,A=O.isPostBodyEmpty,E=(0,c.qI)(),R=(0,v.w)().navigateToPost,L=(0,x.Tu)(),D=L.params,T=L.hasNextPage,M=(0,u.i)().minimal_layout,F=(0,l.a)(),K=F.usedIn,B=F.isUsedInMinimalTipTapViewModal,q=(0,f.P)(),U=["help","help-en"].includes(S.community_slug)&&N,z=!(void 0!==_&&_),W=C&&P,$=!B&&(0,b.bZ)(S)&&!z,V=S.body_trix_content,H=S.tiptap_body,G=S.internal_custom_html,Z=S.pinned_at_top_of_space,Q=S.updated_at,Y=P&&k&&!!(null==H||null==(n=H.body)||null==(t=n.content)?void 0:t.length);if(A)return null;var J=8;return Z?J=2:W&&(J=4),(0,r.jsx)("div",{className:(0,y.x)((0,m.W2)("post__body"),{"!p-0":void 0!==w&&w,"px-5 pb-5 md:px-6":(0,b.AF)(S)&&!B,"mt-5":"minimal-post-modal"===K&&(!S.hide_meta_info||E&&S.name)}),"data-testid":"post-body",children:(0,r.jsxs)("div",{className:(0,y.x)((0,m.W2)("post__inside trix-v2"),"w-full",{"overflow-x-scroll":q}),"data-testid":"post-body-inside",children:[Y?(0,r.jsx)(j.d,{hideSeeMoreButton:!0}):(0,r.jsxs)(i.W,{lines:J,disabled:z,hideToggle:P||$,children:[I&&V&&(0,r.jsx)(o.X,{content:V,contentParentPath:h.Yl.show({slug:S.slug,spaceSlug:S.space_slug})}),k&&H&&(0,r.jsx)(a.H,{readOnly:!0,disableMentionClicks:M,value:H.body,sgidToObjectMap:H.sgids_to_object_map,inlineAttachments:H.inline_attachments}),G&&(0,r.jsx)(d.A,{html:G},"internal_custom_html"),U&&(0,r.jsx)(g.U,{post:S})]}),$&&(0,r.jsx)("button",{type:"button",className:"mt-2 text-md text-default hover:text-dark",onClick:function(){R({newPost:S,params:D,hasNextPage:T})},children:(0,p.t)("see_more")})]})},Q)}},228185(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(391426),o=n(636709),i=n(328187),a=n(417980),s=n(804939),l=n(288513),c=n(570310),u=n(697109),d=function(e){var t,n,d,p,f,m,b=e.post,y=e.className,h=e.wrapperClassName,g=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["post","className","wrapperClassName"]),v=(0,s.P)(),x=(0,i.bZ)(b);return(null!=(d=null==(m=b.cover_image_variants)?void 0:m.large)?d:b.cover_image_url)?(0,r.jsx)("div",{className:(0,c.x)(v?"px-4 pt-0 md:p-0":"px-5 pt-5 md:p-0",void 0===h?"":h),children:(0,r.jsx)(u.p,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({shouldOpenPostModal:!0,post:b,className:(0,c.x)((0,l.W2)("post__cover"),"block focus-visible:rounded-md focus-visible:text-dark focus-visible:outline focus-visible:outline-2 focus-visible:outline-secondary focus-visible:md:rounded-b-none")},g),n=n={children:b.cover_image_variants&&(0,r.jsx)(o.v,{src:null!=(p=b.cover_image_url)?p:"",srcVariants:b.cover_image_variants,alt:(0,a.t)("post.cover_image_alt"),className:(0,c.x)("w-full object-cover",void 0===y?"":y,v?{"rounded-md":!0,"md:rounded-b-none":!x}:{"md:rounded-b-none":!x,"rounded-md":x})},null!=(f=b.cover_image_url)?f:"")},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}):null}},405880(e,t,n){"use strict";n.d(t,{I:()=>N});var r=n(391426),o=n(385335),i=n(551172),a=n(931639),s=n(398061),l=n(328187),c=n(605274),u=n(417980),d=n(804939),p=n(517338),f=n(288513),m=n(341409),b=n(570310),y=n(693546),h=n(477593),g=n(941392),v=n(361287),x=n(612974),j=n(497184),_=n.n(j),w=n(756528),O=n(643407),S=n(16638),P=n(586800),C=function(e){var t=e.post,n=e.onChange,o=e.onPostDestroy,i=e.refetchPosts,s=e.hideShareLink,u=e.hidePinnedToTopIcon,d=e.hideBookmarkButton,p=e.hideSummarizeButton,m=(0,v.W)(),b=m.refetchPostDetails,y=m.isSharedPostView,h=(0,c.qI)(),j=(0,l.AF)(t),C=(0,l.V1)(t),k=(0,a.a)().isUsedInMinimalTipTapViewModal,I=(0,x.w)({post:t}).toggleSummary,N=!d&&!y&&!h,A=!s&&!h,E=!u&&!y&&!h,R=!k;return N||R||A||E?(0,r.jsxs)("div",{className:_()((0,f.W2)("post__actions-container"),"text-dark flex items-center gap-0.5"),"data-testid":"post-header-actions",children:[t.has_summary&&!p&&(0,r.jsx)(P._,{onClick:I}),N&&(0,r.jsx)(g.T,{bookmarkType:j||C?"post":"event",record:t,onSuccess:b,className:_()("!text-default",{"group-hover:!text-dark":!t.bookmark_id})}),A&&(0,r.jsx)(S.q,{onChange:n}),R&&(0,r.jsx)(O.o,{onChange:n,onPostDestroy:o,refetchPosts:i}),E&&(0,r.jsx)(w.a,{post:t})]}):null},k=n(676348),I=n(207839),N=function(e){var t=e.hideAuthorHeadline,n=void 0!==t&&t,g=e.hideBookmarkButton,v=e.hideSummarizeButton,x=e.hidePinnedToTopIcon,j=e.hideShareLink,_=e.isRenderedOutsideTheSpace,w=void 0!==_&&_,O=e.metaInfoWrapperClassName,S=e.onChange,P=e.onPostDestroy,N=e.post,A=e.refetchPosts,E=e.tagsLimit,R=e.tagsShowMoreLabelVariant,L=(0,s.Ir)().data,D=(0,a.a)(),T=D.usedIn,M=D.isUsedInMinimalTipTapViewModal,F=(0,d.P)(),K=null==N?void 0:N.cover_image_url,B=(0,c.qI)(),q=(0,y.a)().isFeedRoute,U=w||q||B||"minimal-post-modal"===T;return(0,r.jsxs)(r.Fragment,{children:[(0,m.wp)(L)&&(0,i.b)(N)&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(o.l.Regular,{record:N,contentType:h.M$})}),(0,r.jsxs)("div",{className:(0,b.x)("flex items-start justify-between gap-3",{"mb-5":M&&(0,l.AF)(N)&&!F,"mb-3":F}),children:[(0,r.jsxs)("div",{className:"flex grow flex-col items-start justify-between space-y-4 md:space-y-5",children:[(null==N?void 0:N.flagged_for_approval_at)&&(0,r.jsx)(p.E,{className:(0,b.x)((0,f.W2)("post__headline-tag"),(0,f._h)("align"),"!bg-author-in-review mt-1 border-0 align-middle uppercase text-white"),textClassName:"uppercase",label:(0,u.t)("in_review"),variant:"secondary"}),U?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(k.i,{isRenderedOutsideTheSpace:w,doesPostHaveCoverImage:K,space:L,tagsLimit:E,tagsShowMoreLabelVariant:R,wrapperClassName:(0,b.x)("mt-1",O),hideAuthorHeadline:n}),(0,r.jsx)(I.E,{})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(I.E,{}),(0,r.jsx)(k.i,{isRenderedOutsideTheSpace:w,doesPostHaveCoverImage:K,space:L,tagsLimit:E,tagsShowMoreLabelVariant:R,wrapperClassName:(0,b.x)("mt-1",O),hideAuthorHeadline:n})]})]}),(0,r.jsx)(C,{post:N,onChange:S,refetchPosts:A,onPostDestroy:P,hideShareLink:void 0!==j&&j,hidePinnedToTopIcon:void 0!==x&&x,hideBookmarkButton:void 0!==g&&g,hideSummarizeButton:void 0!==v&&v})]})]})}},500557(e,t,n){"use strict";n.d(t,{S:()=>h});var r=n(391426),o=n(430262),i=n(667744),a=n(361287),s=n(931639),l=n(328187),c=n(497184),u=n.n(c),d=n(288513),p=n(983979),f=n(41907),m=n(417980),b=function(e){var t,n,o=e.anchorProps,i=e.likesCount;return e.isLoading?(0,r.jsx)(p.f,{lg:!0,extraLong:!0}):0===i?null:(0,r.jsx)("span",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:"overflow-anywhere text-default group-hover:text-dark text-sm font-medium"},o),n=n={children:(0,m.t)("likes_count",{localeCount:(0,f.Rt)(i),count:i})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},y=n(535664),h=function(e){var t=e.anchorProps,n=e.shouldDisplayVerticalDivider,c=(0,a.W)(),p=c.post,f=c.isPostBodyEmpty,m=(0,s.a)().usedIn,h=p.user_likes_count,g=p.is_liking_enabled,v=p.sample_user_likes_community_members,x=void 0===v?[]:v,j=p.post_details_loaded,_=(0,y.X)();return j?g&&h&&x.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:function(){return _.show({post:p})},className:u()((0,d.W2)("post__engagement"),"focus-visible:outline-secondary group focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"),"data-testid":"post-liked-by",children:(0,r.jsx)("div",{className:u()((0,d.W2)("engagement__likes"),"flex items-center"),children:(0,r.jsxs)("div",{className:u()((0,d.W2)("engagement__members"),"border-tertiary flex items-center space-x-2"),children:[(0,r.jsx)(i.s,{users:x.slice(0,3).map(function(e){return{src:e.avatar_url,name:e.name}}),isFullRounded:!0,size:"5"}),(0,r.jsx)(b,{likesCount:h,isLoading:!j,anchorProps:t})]})})}),(void 0===n||n)&&(0,r.jsx)("div",{className:"bg-badge size-0.5 rounded-full"})]}):null:(0,r.jsx)("div",{className:u()((0,d.W2)("post__engagement"),{"!pt-5":(0,l.AF)(p)&&f,"mx-2":"minimal-post-modal"!==m}),children:(0,r.jsx)(o.g,{})})}},277449(e,t,n){"use strict";n.d(t,{J:()=>d});var r=n(391426),o=n(451251),i=n(928160),a=n(340479),s=n(570310),l=n(488441),c=n(844842),u=n(674251),d=function(e){var t,n,d=e.member,p=e.avatarSize,f=void 0===p?"md":p,m=e.className,b=e.onNavigate,y=e.showHeadline,h=e.showReactionBadge,g=(0,l.l)({public_uid:d.public_uid}),v=g.onClick,x=g.href,j=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(g,["onClick","href"]),_=void 0!==h&&h&&d.reaction_type?i.t7[d.reaction_type].sentiment:null;return(0,r.jsxs)("a",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,s.x)("flex items-center gap-3",m),href:x,onClick:function(e){(0,a.s6)(e)||b(),null==v||v(e)}},j),n=n={children:[(0,r.jsx)("div",{className:"shrink-0",children:(0,r.jsx)(o.C,{communityMemberId:d.id,name:d.name,publicUid:d.public_uid,headline:d.headline,avatarURL:d.avatar_url,children:_?(0,r.jsx)(c.t,{name:d.name,src:d.avatar_url,size:f,sentiment:_}):(0,r.jsx)(c.t,{name:d.name,src:d.avatar_url,size:f})})}),void 0!==y&&y?(0,r.jsxs)("div",{className:(0,s.x)("flex min-h-10 min-w-0 flex-1 flex-col",!d.headline&&"justify-center"),children:[(0,r.jsx)(u.o.LabelSm,{weight:"medium",truncate:!0,children:d.name}),d.headline&&(0,r.jsx)(u.o.BodySm,{color:"text-default",truncate:!0,children:d.headline})]}):(0,r.jsx)(u.o.LabelSm,{weight:"medium",truncate:!0,children:d.name})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}},535664(e,t,n){"use strict";n.d(t,{X:()=>U});var r=n(391426),o=n(974618),i=n(231127),a=n(356140),s=n(804939),l=n(123124),c=n(831610),u=n(491720),d=n(41907),p=n(570310),f=n(902e3),m=n(411718),b=n(694812),y=n(791009),h=n(881220),g=n(933578),v=n(417980),x=n(277449),j=n(228464),_=n(617593),w=function(e){var t=e.className;return(0,r.jsxs)("div",{className:(0,p.x)("flex items-center gap-3",t),children:[(0,r.jsx)(j.L,{size:"lg"}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,r.jsx)(_.E,{shape:"pill",className:"h-4 w-32"}),(0,r.jsx)(_.E,{shape:"pill",className:"h-3 w-48"})]})]})},O=function(e){var t=e.className,n=e.count,o=e.rowClassName,i=Math.min(null!=n?n:8,8);return(0,r.jsx)("div",{className:(0,p.x)("flex flex-col",null!=t?t:"gap-4"),children:Array.from({length:i},function(e,t){return(0,r.jsx)(w,{className:o},t)})})},S=n(146917),P=n(258752),C=function(e,t){var n,r,o=(0,P.qu)(S.x.postLikes({postId:e.id,reactionType:t})),i=o.data,a=o.isInitialLoading,s=o.fetchNextPage,l=o.hasNextPage;return{members:(0,g.useMemo)(function(){var e;return null!=(e=null==i?void 0:i.pages.flatMap(function(e){return e.records}))?e:[]},[i]),totalCount:null!=(n=null==i||null==(r=i.pages[0])?void 0:r.count)?n:e.user_likes_count,isInitialLoading:a,fetchNextPage:s,hasNextPage:l}};function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var N=function(e){var t,n,o,i,j,_=e.post,S=e.open,P=e.onOpenChange,k=e.onOpenChangeComplete,N=(0,s.P)(),A=(0,f.c)(),E=I((0,g.useState)(null),2),R=E[0],L=E[1],D=I((0,g.useState)(null!=(t=_.user_likes_count)?t:0),2),T=D[0],M=D[1],F=I((0,g.useState)(null),2),K=F[0],B=F[1],q=C(_,R),U=q.members,z=q.totalCount,W=q.isInitialLoading,$=q.fetchNextPage,V=q.hasNextPage,H=null!=z?z:0,G=A?(0,v.t)("reactions.title"):(0,v.t)("post.likes",{count:H,formatted_count:(0,d.Rt)(H)}),Z=(0,l.l)({allReactionsCount:T,selectedReaction:R,totalCount:z}),Q=function(e){M(Z),L(e)},Y=function(e){e||L(null),P(e)},J=(0,r.jsxs)("div",{className:(0,p.x)("flex flex-col",N?"divide-primary -mx-4 divide-y":"gap-4"),children:[U.map(function(e){return(0,r.jsx)(x.J,{member:e,avatarSize:"lg",className:N?"px-4 py-3":void 0,showHeadline:!0,showReactionBadge:A,onNavigate:function(){return Y(!1)}},e.id)}),K&&(0,r.jsx)(a.A,{dataLength:U.length,hasMore:V,onLoadMore:$,scrollContainer:K,loader:(0,r.jsx)(w,{className:N?"px-4 py-3":void 0})})]});return N?(0,r.jsx)(b._s.Root,{open:S,onOpenChange:Y,onOpenChangeComplete:k,snapTo:"half",children:(0,r.jsxs)(b._s.Content,{ref:B,"aria-label":G,children:[(0,r.jsx)(c.s,{title:G}),A&&(0,r.jsx)(u.I,{className:"px-0 py-2",counts:null!=(i=null==(j=_.reaction_summary)?void 0:j.counts)?i:m.l,selectedReaction:R,totalCount:Z,onChange:Q}),W?(0,r.jsx)(O,{className:"divide-primary -mx-4 divide-y",count:z,rowClassName:"px-4 py-3"}):J]})}):(0,r.jsx)(y.a.Root,{open:S,onOpenChange:Y,onOpenChangeComplete:k,size:"lg",children:(0,r.jsxs)(y.a.Content,{children:[(0,r.jsx)(y.a.Header,{title:G,showCloseButton:!0}),A&&(0,r.jsx)(u.I,{counts:null!=(n=null==(o=_.reaction_summary)?void 0:o.counts)?n:m.l,selectedReaction:R,totalCount:Z,onChange:Q}),(0,r.jsx)(y.a.Body,{customLayout:!0,children:(0,r.jsx)(h.t,{viewportRef:B,scrollFades:!1,className:(0,p.x)({"h-96":A,"max-h-96":!A}),children:W?(0,r.jsx)(O,{count:z}):J})})]})})},A=n(737225),E=n(224444),R=n(915779),L=n(866959),D=n(558613),T=n.n(D),M=n(325335),F=function(e){var t,n=e.post,i=(0,o.hS)(),a=(0,L.p)(R.iK.posts.userLikesList({postId:n.id,params:{per_page:15}}),{enabled:!!(null==n?void 0:n.id)},["post-likes-modal",null==n?void 0:n.id]),s=a.data,l=a.isLoading,c=a.fetchNextPage,u=a.hasNextPage,p=a.mapPages,f=(0,g.useMemo)(function(){return T()(p(function(e){return e.records}))},[p]),m=null==s||null==(t=s.pages[0])?void 0:t.count;return(0,r.jsxs)(A.aF,{title:(0,v.t)("like_modal_title"),isOpen:i.visible,onClose:i.hide,children:[(0,r.jsx)(A.aF.Overlay,{}),(0,r.jsxs)(A.aF.Content,{children:[(0,r.jsxs)(A.aF.Header,{children:[(0,r.jsx)(A.aF.Title,{size:"sm",children:m?(0,r.jsxs)(r.Fragment,{children:[(0,d.Rt)(m)," ",1===m?(0,v.t)("like"):(0,v.t)("likes")]}):(0,v.t)("likes")}),(0,r.jsx)(A.aF.HeaderActions,{children:(0,r.jsx)(A.aF.CloseButton,{onClick:i.hide})})]}),(0,r.jsx)(A.aF.Body,{className:"pb-6 pt-4",children:l?(0,r.jsx)(E.y,{}):(0,r.jsx)("div",{id:"post-likes-modal-".concat(n.id),className:"max-h-[calc(100dvh-62px-44px-24px)] overflow-auto sm:max-h-80",children:(0,r.jsx)(M.A,{scrollThreshold:.75,next:c,hasMore:u||!1,loader:(0,r.jsx)(E.y,{}),scrollableTarget:"post-likes-modal-".concat(n.id),dataLength:f.length,className:"flex flex-col space-y-4",children:f.map(function(e){return(0,r.jsx)(x.J,{member:e,onNavigate:i.hide},e.id)})})})})]})]})};function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var B=o.PT.create(function(e){return(0,r.jsx)(F,K({},e))}),q=o.PT.create(function(e){var t,n,i=(0,o.hS)();return(0,r.jsx)(N,(t=K({},e),n=n={open:i.visible,onOpenChange:function(e){e||i.hide()},onOpenChangeComplete:function(e){e||i.remove()}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}),U=function(){var e=(0,i.T)("circle_v4_modals_enabled");return(0,o.hS)(e?q:B)}},676348(e,t,n){"use strict";n.d(t,{i:()=>L});var r=n(391426),o=n(361287),i=n(931639),a=n(605274),s=n(933578),l=n(417980),c=n(852661),u=n(697109),d=n(340479),p=n(199563),f=n(328187),m=n(497184),b=n.n(m),y=n(898666),h=n(288513),g=n(451430),v=(0,s.forwardRef)(function(e,t){var n=e.headline,o=e.post,s=o.community_member,l=o.created_at,c=(0,a.qI)(),d=(0,i.a)().usedIn,f=c||"full-post-modal"===d,m=f?(0,g.truncate)(n,{length:60}):n;return n||f?(0,r.jsx)("div",{className:b()((0,h.W2)("post__meta"),"inline-flex flex-wrap items-center gap-x-2"),children:(0,r.jsx)(y.$,{content:n,shouldUseSpanWrapper:!1,interactive:!1,disabled:!n,children:(0,r.jsx)("button",{type:"button",className:b()((0,h.W2)("author__credentials",{"is-admin":!!s.is_admin}),"text-default focus-visible:outline-secondary focus-visible:text-dark mt-1 text-left text-xs focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"),children:(0,r.jsxs)("span",{className:"space-x-2",children:[n&&(0,r.jsx)("span",{className:b()("overflow-anywhere",{"md:line-clamp-1":"full-post-modal"!==d}),children:m}),f&&!!n&&(0,r.jsx)("span",{className:"bg-badge inline-block size-[0.15rem] rounded-full align-middle"}),f&&(0,r.jsx)("span",{className:(0,h.W2)("author__time"),children:(0,r.jsx)(u.p,{post:o,className:b()((0,h.W2)("ago"),"text-default hover:text-dark focus-visible:outline-secondary focus-visible:text-dark text-xs focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"),forwardedRef:t,children:(0,p.z9)(l,{format:p.Or.short})})})]})})})}):null});v.displayName="AuthorHeadline";var x=n(488441),j=n(92406),_=function(e){var t,n,o,i=e.children,a=e.post,s=e.className,l=void 0===s?"":s,c=a.community_member,u=(0,j.i)().minimal_layout,d=(0,x.l)({public_uid:null!=(o=c.public_uid)?o:"",params:{show_back_link:!0},name:c.name});return u?(0,r.jsx)("div",{className:l,children:i}):(0,r.jsx)("a",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},d),n=n={className:b()("focus-visible:outline-secondary hover:text-dark inline-block focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",l),"data-testid":"post-avatar",children:i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},w=n(451251),O=n(506782),S=n(734527),P=function(e){var t,n,o=e.post,i=o.community_member,a=(0,O.K)().member;return(0,r.jsx)("div",{className:(0,h.W2)("post__avatar"),children:(0,r.jsx)(w.C,{communityMemberId:i.id,publicUid:i.public_uid,avatarURL:i.avatar_url,name:null!=(t=i.name)?t:"",headline:i.headline,disabled:!!a,children:(0,r.jsx)(_,{post:o,className:"mr-3",children:(0,r.jsx)(S.J,{src:i.avatar_url,name:null!=(n=i.name)?n:"",size:"10"})})})})};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function k(e){if(Array.isArray(e))return e}function I(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}}var A=(0,s.forwardRef)(function(e,t){var n,o,i,s=k(n=[e,t])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||N(n)||I(),l=s[0],c=s.slice(1),u=l.doesPostHaveCoverImage,d=l.className,p=l.children,f=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(l,["doesPostHaveCoverImage","className","children"]),m=(k(c)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(c)||N(c,1)||I())[0],y=(0,a.qI)();return(0,r.jsx)("div",(o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:b()((0,h.W2)("post__user"),"flex items-stretch",{"md:!mb-2 md:!mt-1":y&&void 0!==u&&u},d),ref:m},f),i=i={children:p}
1,Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(i)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))}),o))});A.displayName="PostViewListItemWrapper";var E=function(e){var t=e.communityMember,n=e.containerRef,o=e.doesPostHaveCoverImage,i=e.headline,a=e.hideAuthorHeadline,s=void 0!==a&&a,m=e.isAdmin,g=e.isSmScreen,x=e.pageLinkRef,j=e.post,w=e.posterJoinedDate,O=e.shouldDisplayMemberTags,S=e.tagsShowMoreLabelVariant,C=e.visibleMemberTags,k=e.wrapperClassName,I=!!i;return(0,r.jsxs)(A,{doesPostHaveCoverImage:void 0!==o&&o,ref:n,className:k,"data-testid":"post-meta-info-regular",children:[(0,r.jsx)(P,{post:j}),(0,r.jsxs)("button",{type:"button",className:b()((0,h.W2)("post__bio"),"focus-visible:outline-secondary flex flex-col justify-between self-center text-left focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"),onClick:function(e){var t,n;if(t=e.target,(null!=(n=HTMLAnchorElement)&&"u">typeof Symbol&&n[Symbol.hasInstance]?!n[Symbol.hasInstance](t):!(t instanceof n))&&x.current)if((0,d.s6)(e)){var r=x.current.href;window.open(r,"_blank","noreferrer"),e.preventDefault()}else x.current.click()},children:[(0,r.jsxs)("div",{className:b()((0,h.W2)("author"),"flex flex-wrap items-baseline gap-x-2 gap-y-px"),children:[(0,r.jsx)("div",{className:b()((0,h.W2)("author__name"),"inline-flex"),children:(0,r.jsx)(_,{post:j,className:"!text-dark overflow-anywhere text-sm font-semibold leading-5",children:null==t?void 0:t.name})}),void 0!==O&&O&&(0,r.jsx)("div",{className:b()((0,h.W2)("author__tags member-tags"),"self-center"),children:(0,r.jsx)(c.e,{memberTags:C,isAdmin:void 0!==m&&m,limit:void 0!==g&&g||(0,f.AF)(j)?1:2,showMoreLabelVariant:S})}),(0,r.jsx)("div",{className:b()((0,h.W2)("author__time"),"inline-flex"),children:(0,r.jsx)(u.p,{post:j,className:b()((0,h.W2)("ago"),"text-default hover:text-dark focus-visible:outline-secondary focus-visible:text-dark flex items-baseline text-xs focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"),forwardedRef:x,children:(0,r.jsx)(y.$,{interactive:!1,content:(0,f.VG)(j.created_at),children:(0,p.z9)(j.created_at,{format:p.Or.short})})})})]}),!s&&(0,r.jsx)(v,{headline:i,post:j}),!(I&&!s)&&!!w&&(0,r.jsx)("div",{className:"text-light mt-1 flex text-xs",children:(0,l.t)("post.member_since",{date:w})})]})]})},R=function(e){var t=e.communityMember,n=e.containerRef,o=e.doesPostHaveCoverImage,i=e.headline,a=e.hideAuthorHeadline,s=e.isAdmin,l=e.pageLinkRef,u=e.post,d=e.shouldDisplayMemberTags,p=e.tagsLimit,f=e.tagsShowMoreLabelVariant,m=e.visibleMemberTags,y=e.wrapperClassName;return(0,r.jsxs)(A,{doesPostHaveCoverImage:void 0!==o&&o,ref:n,className:y,"data-testid":"post-meta-info-small",children:[(0,r.jsx)(P,{post:u}),(0,r.jsxs)("button",{type:"button",className:b()((0,h.W2)("post__bio"),"focus-visible:outline-secondary flex flex-col justify-between gap-1 self-center text-left focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"),onClick:function(e){var t,n;t=e.target,(null!=(n=HTMLAnchorElement)&&"u">typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):t instanceof n)||!l.current||l.current.click()},children:[(0,r.jsxs)("div",{className:b()((0,h.W2)("author"),"flex flex-wrap items-center gap-x-2 gap-y-1"),children:[(0,r.jsx)("div",{className:b()((0,h.W2)("author__name"),"inline-flex"),children:(0,r.jsx)(_,{post:u,className:"!text-dark text-sm font-semibold leading-5",children:null==t?void 0:t.name})}),void 0!==d&&d&&(0,r.jsx)("div",{className:b()((0,h.W2)("author__tags member-tags"),"!m-0"),children:(0,r.jsx)(c.e,{memberTags:m,isAdmin:void 0!==s&&s,limit:p,showMoreLabelVariant:f})})]}),!(void 0!==a&&a)&&(0,r.jsx)(v,{headline:i,post:u,ref:l})]})]})},L=function(e){var t=e.doesPostHaveCoverImage,n=void 0!==t&&t,c=e.hideAuthorHeadline,u=void 0!==c&&c,d=e.isRenderedOutsideTheSpace,p=e.space,f=e.tagsLimit,m=e.tagsShowMoreLabelVariant,b=void 0===m?"numbers":m,y=e.wrapperClassName,h=(0,o.W)(),g=h.post,v=h.isSharedPostView,x=h.posterJoinedDate,j=(0,i.a)().usedIn,_=!!(null==g?void 0:g.hide_meta_info),w=null==g?void 0:g.community_member,O=(null==g?void 0:g.member_tags)||[],S=null==w?void 0:w.id,P=null==O?void 0:O.filter(function(e){var t;return!!((null==e?void 0:e.is_public)&&(null==e||null==(t=e.display_locations)?void 0:t.post_bio))}),C=(0,s.useMemo)(function(){return!!(S&&(null==P?void 0:P.length)>0)},[S,P]),k=(0,a.qI)(),I=(0,s.useRef)(null),N=(0,s.useRef)(null);if(_||!p)return null;var A=void 0!==d&&d?"".concat((0,l.t)("post.posted_in")," ").concat(p.name):null==w?void 0:w.headline,L=!!(null==w?void 0:w.admin),D=!v&&(C||L);return k||"full-post-modal"===j?(0,r.jsx)(R,{communityMember:w,containerRef:I,doesPostHaveCoverImage:n,headline:A,hideAuthorHeadline:u,isAdmin:L,pageLinkRef:N,post:g,shouldDisplayMemberTags:D,tagsLimit:f,tagsShowMoreLabelVariant:b,visibleMemberTags:P,wrapperClassName:y}):(0,r.jsx)(E,{communityMember:w,containerRef:I,doesPostHaveCoverImage:n,headline:A,hideAuthorHeadline:u,isAdmin:L,isSmScreen:k,pageLinkRef:N,post:g,posterJoinedDate:x,shouldDisplayMemberTags:D,tagsShowMoreLabelVariant:b,visibleMemberTags:P,wrapperClassName:y})}},207839(e,t,n){"use strict";n.d(t,{E:()=>g});var r=n(391426),o=n(568316),i=n(794713),a=n(199563),s=n(570310),l=n(417980),c=n(288513),u=n(824622),d=function(e){var t=e.startsAt,n=e.endsAt,o=e.status,d=(void 0===o?null:o
1)===u.XQ.DRAFT,p=(0,i.PJ)(n),f=(0,i.PJ)(t),m=null;return m=!f||p||d?d?(0,l.t)("events.details.draft"):p?(0,l.t)("events.details.finished",{time_string:(0,a.z9)(n)}):(0,l.t)("events.details.starts",{time_string:(0,a.z9)(t)}):(0,l.t)("events.details.in_progress"),(0,r.jsx)("div",{className:(0,s.x)((0,c.W2)("event-counter-badge",{"event-counter-badge--finished":p}),d&&(0,c._h)("event-counter-badge--draft")),children:"".concat(m)})},p=n(697109),f=n(361287),m=n(931639),b=n(605274),y=n(497184),h=n.n(y),g=function(){var e=(0,f.W)(),t=e.post,n=e.canManagePost,i=(0,m.a)().usedIn,a=(0,b.qI)();if(!t.name||"minimal-post-modal"===i&&!a)return null;if("minimal-post-modal"===i&&a)return(0,r.jsx)("div",{className:"overflow-anywhere",children:(0,r.jsx)(o.o.TitleMd,{children:t.name})});var s=(t||{}).event_setting_attributes||{},l=s.starts_at,u=s.ends_at;return(0,r.jsxs)("div",{className:(0,c.W2)("post__header",{"post-meta--hidden":t.hide_meta_info}),"data-testid":"post-header",children:[l&&u&&(0,r.jsx)(d,{startsAt:l,endsAt:u,status:null==t?void 0:t.status}),(0,r.jsx)("h1",{className:h()((0,c.W2)("post__title",{"with-admin-actions":n}),"text-xl font-bold leading-7"),"data-testid":"post-title",children:(0,r.jsx)(p.p,{post:t,className:"!text-darkest overflow-anywhere focus-visible:outline-secondary focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",shouldOpenPostModal:!0,children:t.name})})]})}},16638(e,t,n){"use strict";n.d(t,{q:()=>g});var r=n(391426),o=n(973646),i=n(529648),a=n(568316),s=n(398061),l=n(497184),c=n.n(l),u=n(417980),d=n(339043),p=n(230763),f=n(809179),m=n(387099),b=n(181459),y=function(e){var t=e.getSharePostLink,n=e.post,s=e.sharePostData,l=(0,b.x)({post:n,getSharePostLink:t,sharePostData:s}),y=l.onClickCopyLink,h=l.onChange,g=l.formData,v=l.currentCommunity,x=l.currentSpace,j=(0,p.Od)().isViewOnlyMasquerading;return v.is_private||(null==x?void 0:x.is_private)?(0,r.jsxs)("div",{children:[(0,r.jsx)(i.ms.ItemLink,{disabled:j,onClick:function(){h({share_to_web:!g.post.share_to_web})},children:(0,r.jsx)(d.Pf,{label:(0,u.t)("post.share.share_to_web"),tooltipText:(0,u.t)("post.share.share_to_web_on_description"),field:"share_to_web",value:g.post.share_to_web,variant:"small",disabled:j,className:c()({"cursor-not-allowed":j})})}),g.post.share_to_web&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex flex-row items-center",children:(0,r.jsx)("div",{className:"mb-4 mt-1 flex-1 px-5",children:(0,r.jsx)(f.p,{disabled:!0,value:null==s?void 0:s.share_post_link,rightAddon:(0,r.jsx)("button",{type:"submit",onClick:function(){return y(null==s?void 0:s.share_post_link)},children:(0,r.jsx)(o.In,{type:"20-copy"})})})})}),(0,r.jsx)(i.ms.ItemLink,{onClick:function(){h({show_post_teaser:!g.post.show_post_teaser})},children:(0,r.jsx)(d.Pf,{label:(0,u.t)("post.share.show_teaser"),tooltipText:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:(0,u.t)("post.share.show_teaser_description_title")}),(0,r.jsx)("a",{href:"/settings#field-custom_cta_for_share_links",children:(0,u.t)("post.share.show_teaser_description_link")})]}),field:"show_post_teaser",value:g.post.show_post_teaser,variant:"small"})}),!(null==v?void 0:v.is_private)&&(0,r.jsx)(i.ms.ItemLink,{onClick:function(){return h({minimal_layout:!g.post.minimal_layout})},children:(0,r.jsx)(d.Pf,{label:(0,u.t)("post.share.minimal_layout"),tooltipText:(0,u.t)("post.share.minimal_layout_description"),field:"minimal_layout",value:g.post.minimal_layout,variant:"small"})})]})]}):(0,r.jsxs)("div",{className:"flex flex-row items-center px-4 py-2",children:[(0,r.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,r.jsx)(a.o.LabelMd,{weight:"bold",children:(0,u.t)("post.share.share_to_web")}),(0,r.jsx)(a.o.LabelSm,{children:(0,u.t)("post.share.post_is_public")})]}),(0,r.jsx)("div",{children:(0,r.jsx)(m.$,{variant:"secondary",onClick:function(){return y()},children:(0,u.t)("copy_link")})})]})},h=n(361287),g=function(e){var t=e.onChange,n=e.button,l=e.shouldRenderCustomMenuButton,d=e.menuButtonEl,p=e.appendTo,f=(0,h.W)({onChangeSharePost:t}),m=f.showShareOnWebOptions,b=f.post,g=f.getSharePostLink,v=f.sharePostData,x=(0,s.Ir)().data,j=null!=n?n:(0,r.jsx)(o.In,{type:"20-arrow-box-up",
1size:20});return m(x)?(0,r.jsx)(i.ms,{size:"extra-large",direction:"bottom-end",menuButtonEl:void 0===d?"button":d,className:"w-full",appendTo:p,buttonClassName:c()("w-full focus-visible:outline-secondary focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1",{"p-1 hover:bg-tertiary rounded group flex items-center":!l}),button:l?j:(0,r.jsx)(a.o.LabelSm,{weight:"medium",color:"text-default group-hover:text-dark",children:(0,u.t)("post.share.title")}),children:(0,r.jsx)(y,{post:b,getSharePostLink:g,sharePostData:v})}):null}},370881(e,t,n){"use strict";n.d(t,{x:()=>p});var r=n(391426),o=n(684245),i=n(568316),a=n(570310),s=n(612974),l=n(933578),c=n(417980);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var d="post.summary",p=function(e){var t,n=e.post,p=e.className,f=e.shouldScrollIntoView,m=void 0!==f&&f,b=(0,s.w)({post:n}),y=b.summary,h=b.isLoadingSummary,g=b.clearSummary,v=(0,l.useRef)(null),x=function(e){if(Array.isArray(e))return e}(t=(0,l.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return u(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),j=x[0],_=x[1],w=!!y||h,O=!j&&!!y;(0,l.useEffect)(function(){h&&_(!0)},[h]),(0,l.useEffect)(function(){m&&v.current&&w&&v.current.scrollIntoView({behavior:"smooth"})},[w,m]);var S=(0,l.useCallback)(function(){_(!1)},[]);return n.has_summary?(0,r.jsx)("div",{className:(0,a.x)("bg-ai-summary flex px-5 transition-all duration-500 ease-in-out md:px-6",{"h-0 py-0 opacity-0 md:py-0":!w,"h-auto py-4 opacity-100":w},p),ref:v,children:w&&(0,r.jsx)(o.B,{onCollapseClick:function(){_(!1),g()},children:(0,r.jsxs)(o.B.Content,{className:"gap-4",children:[(0,r.jsx)(o.B.Header,{animate:j,isHidden:O,children:(0,c.t)([d,"loading"])}),(0,r.jsxs)("div",{className:"flex flex-col gap-1 break-words",children:[(0,r.jsx)(i.o.LabelSm,{color:"text-default",leading:"leading-tight",children:(0,c.t)([d,"title"])}),(0,r.jsx)(i.o.TitleMd,{children:n.name})]}),(null==y?void 0:y.content)&&(0,r.jsx)(o.B.BodyText,{animation:"fade-in",onAnimationComplete:S,children:y.content})]})})}):null}},697109(e,t,n){"use strict";n.d(t,{p:()=>x});var r=n(391426),o=n(737225),i=n(424390),a=n(804939),s=n(506782),l=n(667907),c=n(328187),u=n(915779),d=n(355104),p=n(506493),f=n(16876),m=n(534529),b=n(998597),y=n(607239);function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function g(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var v="/c/$spaceSlug/$postSlug",x=function(e){var t=e.post,n=e.ariaLabel,x=e.allComments,j=void 0!==x&&x,_=e.forwardedRef,w=e.onClick,O=e.children,S=e.shouldOpenPostModal,P=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["post","ariaLabel","allComments","forwardedRef","onClick","children","shouldOpenPostModal"]),C=(0,s.K)().member,k=(0,b.HH)().postSlug,I=(0,p.B)(),N=(0,o.X9)(),A=N.isInsideModal,E=N.onClose,R=(0,y.Tu)(),L=R.params,D=R.hasNextPage,T=(0,d.c)().isCircleV4,M=(0,f._f)(),F=T&&!!M({to:"/events",fuzzy:!0}),K=(0,a.P)(),B=!(0,l.S)()&&!K,q={spaceSlug:t.space_slug,postSlug:t.slug},U=(0,u.sY)({spaceSlug:t.space_slug,slug:t.slug,hash:j?i.L:""});return I?(0,r.jsx)("a",g(h({href:U,target:"_blank",rel:"noreferrer","aria-label":n},P,_&&{ref:_}),{children:O})):(0,c.pn)(t,{postSlugInUrl:k})?(0,r.jsx)("a",g(h({href:U,"aria-label":n},P,_&&{ref:_}),{children:O})):void 0!==S&&S&&B?(0,r.jsx)(m.N_,g(h({to:".",unsafeRelative:"path",search:!0,state:{postModal:q,params:L,hasNextPage:D,isWithinProfileContext:!!C,profileContextMember:C,shouldFocusOnCommentsSection:j},mask:{to:v,params:q,unmaskOnReload:!0},"aria-label":n},P,_&&{ref:_}),{children:O})):(0,r.jsx)(m.N_,g(h({to:v,params:q,search:!0,hash:j?i.L.replace(/^#/,""):void 0,state:F?{from:{path:"/events",query:window.location.search}}:void 0,"aria-label":n},P,_&&{ref:_}),{onClick:A?E:w,children:O}))}},586800(e,t,n){"use strict";var r=n(391426),o=n(428266),i=n(202090),a=n(417980),s=n(898666),l=function(e){var t=e.onClick,n=e.buttonSize,l=(0,i.wR)().isDarkAppearance;return(0,r.jsx)(s.$,{content:(0,a.t)("post.summarize"),interactive:!1,children:(0,r.jsx)(o.K,{name:l?"20-stardust":"20-stardust-gradient",iconSize:20,className:"group",iconClassName:"group-hover:animate-spin-pause-reverse",onClick:t,buttonSize:void 0===n?28:n,ariaLabel:(0,a.t)("post.summarize")})})};n.d(t,{_:()=>l})},665888(e,t,n){"use strict";var r=["image","file","embed","poll","video"];n.d(t,{E8:()=>r,LW:()=>3,h7:()=>250})},540795(e,t,n){"use strict";n.d(t,{T:()=>q});var r=n(391426),o=n(825277),i=n(493327),a=n(673775),s=n(756528),l=n(361287),c=n(931639),u=n(328187),d=n(570310),p=n(605274),f=n(933578),m=n(804939),b=n(498772),y=n(288513),h=n(693546),g=n(497184),v=n.n(g),x=n(222360),j=n(7572
164),_=n(988269),w=n(89267),O=n(417980),S=n(915779),P=n(794435),C=n(746364),k=n(607239),I=function(){var e=(0,l.W)(),t=e.post,n=e.isTrixPost,o=t.body_trix_content,i=t.internal_custom_html,a=t.pinned_at_top_of_space,s=(0,C.w)().navigateToPost,c=(0,k.Tu)(),d=c.params,p=c.hasNextPage,f=4;a&&(f=2);var m=["help","help-en"].includes(t.community_slug)&&(0,u.V1)(t);return(0,r.jsxs)("div",{className:"flex w-full flex-col items-start justify-start gap-2",children:[(0,r.jsxs)(j.W,{lines:f,hideToggle:!0,children:[n&&o&&(0,r.jsx)(_.X,{content:o,contentParentPath:S.Yl.show({slug:t.slug,spaceSlug:t.space_slug})}),i&&(0,r.jsx)(w.A,{html:i},"internal_custom_html"),m&&(0,r.jsx)(P.U,{post:t})]}),(0,r.jsx)("button",{type:"button",className:"text-md text-default hover:text-dark",onClick:function(){s({newPost:t,params:d,hasNextPage:p})},children:(0,O.t)("see_more")})]})},N=function(e){var t=e.noPadding,n=(0,l.W)(),o=n.post,i=n.isTiptapPost,a=n.isPostBodyEmpty,s=o.updated_at;return a?null:(0,r.jsx)("div",{className:v()((0,y.W2)("post__body"),{"!p-0":void 0!==t&&t,"px-5 pb-5 md:px-6":(0,u.AF)(o)}),"data-testid":"post-body",children:(0,r.jsx)("div",{className:v()((0,y.W2)("post__inside trix-v2"),"w-full"),"data-testid":"post-body-inside",children:i?(0,r.jsx)(x.d,{}):(0,r.jsx)(I,{})})},s)},A=n(680393);function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var R=function(e){var t,n=e.children,o=(0,m.P)(),i=(0,l.W)(),a=i.isImagePost,s=i.isPostBodyEmpty,u=i.isPostMetaHidden,p=i.isSharedPostWithTeaserLayout,f=(0,c.a)().usedIn,b=(0,h.a)().isFeedRoute,g="full-post-modal"===f,v=s&&!b&&!u&&!a;return(0,r.jsx)("div",{className:(0,d.x)((0,y.W2)("post__content"),"text-dark",(E(t={},o?"px-4 py-3 md:p-5 md:px-6":"p-5 md:px-6",!a&&u),E(t,o?"px-4 py-3 md:px-6 md:py-5":"px-5 pb-5 pt-4 md:px-6 md:py-5",!a&&!u),E(t,o?"pt-3 md:pt-5":"pt-5",a&&!g&&u),E(t,"pt-4 md:pt-5",!o&&a&&!g&&!u),E(t,"py-5",a&&g),E(t,"!pb-0",a&&g&&!s),E(t,"pb-5",v),E(t,"relative",p),t)),"data-testid":"post-content-wrapper",children:n})},L=n(228185),D=n(405880),T=n(370881);function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var B=function(e){var t,n=e.autofocusReplyForm,g=e.className,v=e.defaultShowComment,x=e.hideAuthorHeadline,j=e.hideBookmarkButton,_=e.hidePinnedToTopIcon,w=void 0!==_&&_,O=e.hideShareLink,S=e.isRenderedOutsideTheSpace,P=e.metaInfoWrapperClassName,C=e.onPostChange,k=e.onPostDestroy,I=e.pageSupportsContentTruncation,E=e.refetchPosts,M=e.shouldOpenCommentPage,B=e.tagsLimit,q=e.tagsShowMoreLabelVariant,U=e.shouldForceSamePageInteractions,z=void 0!==U&&U,W=e.scrollableTarget,$=(0,f.useRef)(null),V=(0,c.a)(),H=V.record,G=V.usedIn,Z=(0,l.W)(),Q=Z.isPostBodyEmpty,Y=Z.showPostActions,J=K((0,f.useState)(void 0!==v&&v),2),X=J[0],ee=J[1],et=K((0,f.useState)(void 0!==n&&n),2),en=et[0],er=et[1],eo=(0,p.qI)(),ei=(0,m.P)(),ea=H.is_truncation_disabled,es=H.is_comments_enabled,el=H.hide_meta_info,ec=H.pinned_at_top_of_space,eu=H.post_details_loaded,ed=(0,h.a)().isPostDetailPage,ep=(0,u.V1)(H)&&!(null==ed?void 0:ed.isExact)&&!ea&&!z,ef=(0,l.W)(),em=ef.isSharedPostView,eb=ef.isSharedPostWithTeaserLayout,ey=(void 0===I||I)&&!ea||eb,eh=(0,u.AF)(H)||(0,u.V1)(H),eg="full-post-modal"===G;if(!H||!H.id)return null;var ev=(0,f.useCallback)(function(){return(0,o.f)($.current)&&$.current.focus()},[$]);(0,f.useEffect)(function(){en&&ev()},[ev]);var ex=(0,f.useCallback)(function(){if(ee(!0),er(!0),$.current)if((0,o.f)($.current))(0,o.f)($.current)&&$.current.focus();else{var e,t;null==(t=$.current.commands)||null==(e=t.focus)||e.call(t,"end")}},[]),ej=(0,d.x)((0,y.W2)("post post--parent",{"post--shared":em,"is-truncation-disabled":!ey,"is-pinned":ec}),ei?"[overflow:clip] rounded-none border-0 border-primary bg-primary first:mt-0 md:rounded-lg md:border":"[overflow:clip] rounded-none border border-primary bg-primary first:mt-5 md:rounded-lg first:md:mt-0",{"!rounded-none !border-0 !shadow-none":eg,"!mb-5 md:!mb-6":!eg},g);return(0,r.jsxs)("div",{className:ej,"data-testid":"post-container",children:[!w&&eo&&eh&&(0,r.jsx)(s.a,{post:H}),(0,r.jsx)(L.Z,{post:H}
1),!ey&&(0,r.jsx)("div",{className:(0,d.x)("overflow-hidden bg-transparent md:rounded-t-xl",{"rounded-t-none md:rounded-t-none":eg||!!H.cover_image_url}),children:(0,r.jsx)(T.x,{post:H})}),(0,r.jsx)("div",{className:(0,y.W2)("post__post"),children:(0,r.jsxs)(R,{children:[(0,r.jsx)("div",{className:(0,d.x)((F(t={"mb-5":!Q},ei?"px-4 md:px-6":"px-5 md:px-6",(0,u.AF)(H)),F(t,"hidden",!Y&&"full-post-modal"===G&&el),t)),children:(0,r.jsx)(D.I,{post:H,isRenderedOutsideTheSpace:void 0!==S&&S,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};C(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){F(e,t,n[t])})}return e}({},H,e),t)},refetchPosts:E,onPostDestroy:k,hideShareLink:void 0!==O&&O,hidePinnedToTopIcon:w,hideBookmarkButton:void 0!==j&&j,hideSummarizeButton:ey,tagsLimit:eo?1:void 0===B?3:B,tagsShowMoreLabelVariant:void 0===q?"numbers":q,metaInfoWrapperClassName:P,hideAuthorHeadline:void 0!==x&&x})}),(0,u.AF)(H)&&"full-post-modal"!==G&&(0,r.jsx)(b.F,{onPostChange:C,onPostDestroy:k}),ep?(0,r.jsx)(N,{}):(0,r.jsx)(A.N,{enableTruncation:ey}),eb&&(0,r.jsx)("div",{className:"absolute bottom-0 left-0 z-10 h-1/2 w-full bg-gradient-to-b from-transparent to-primary"})]})}),(0,r.jsx)("div",{className:"mt-auto",children:(0,r.jsx)(a.F,{toggleComment:function(){er(!1),ee(function(e){return!e})},showCommentAndFocusCommentForm:ex,shouldOpenCommentPage:void 0!==M&&M,shouldForceSamePageInteractions:z})}),eu&&es&&X&&(0,r.jsx)(i.C,{commentsFormRef:$,autofocusReplyForm:en,scrollableTarget:W})]})},q=function(e){return(0,r.jsx)(B,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))}},181459(e,t,n){"use strict";var r=n(398061),o=n(230763),i=n(316172),a=n.n(i),s=n(933578),l=n(417980),c=n(717526),u=n(915779);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var p=function(e){var t,n=e.post,i=e.getSharePostLink,p=e.sharePostData,f=(0,c.d)().success,m=(0,o.Od)().currentCommunity,b=(0,r.Ir)().data,y=function(e){if(Array.isArray(e))return e}(t=(0,s.useState)({post:{show_post_teaser:!!(null==n?void 0:n.show_post_teaser),share_to_web:!!(null==n?void 0:n.share_post_enabled),share_post_enabled:!!(null==n?void 0:n.share_post_enabled),minimal_layout:!!(null==n?void 0:n.minimal_layout)}}))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return d(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),h=y[0],g=y[1],v=(0,u.sY)({spaceSlug:null==n?void 0:n.space_slug,slug:null==n?void 0:n.slug});return(0,s.useEffect)(function(){n.share_post_enabled&&!p&&i({postId:null==n?void 0:n.id,body:h})},[null==n?void 0:n.share_post_enabled,p,h,i,null==n?void 0:n.id]),{onClickCopyLink:function(e){a()(e||window.location.origin+v),f((0,l.t)("post.share.link_copied"),{duration:"short",shouldUseProgress:!1})},onChange:function(e){g(function(t){var r={post:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t.post,e)};return i({postId:null==n?void 0:n.id,body:r}),r})},formData:h,currentCommunity:m,currentSpace:b}};n.d(t,{x:()=>p})},350954(e,t,n){"use strict";var r=n(665888),o=function(e){return"paragraph"===e.type&&(!e.content||0===e.content.length)||void 0!==e.text&&""===e.text.trim()&&" "!==e.text},i=function(e){return e.filter(function(e){return!o(e)}).map(function(e){if(e.content){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={content:i(e.content)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t}return e})},a=function(e){return!(e&&e.content&&Array.isArray(e.content))||0===e.content.length},s=function(e){return"string"==typeof e.type&&r.E8.includes(e.type)};n.d(t,{Bv:()=>s,Ds:()=>i,Op:()=>o,ZB:()=>a})},791851(e,t,n){"use strict";var r=n(451430),o=n(665888),i=n(350954);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function s(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var l=function(e){if(!e)return{truncatedContent:[],mediaContent:null,hasTruncatedContent:!1,hasMediaAttachmentsBeforeTruncation:!1};var t={charCount:0,mediaCount:0,truncatedContent:[],mediaContent:null,hasTruncatedContent:!1,textLengthCache:new Map,hasMediaAttachmentsBeforeTruncation:!1};return f(e,t),{truncatedContent:(0,i.Ds)(t.truncatedContent),mediaContent:t.mediaContent,hasTruncatedContent:t.hasTruncatedContent,hasMediaAttachmentsBeforeTruncation:t.hasMediaAttachmentsBeforeTruncation}},c=function(e,t){return!t.mediaContent&&(t.mediaContent=e,!0)},u=function(e,t){(0,i.Bv)(e)?m(e,t):e.content&&Array.isArray(e.content)?d(e,t):b(e,t)},d=function(e,t){var n=s(a({},e),{content:[]});if(t.truncatedContent.push(n),e.content){var r=!0,i=!1,l=void 0;try{for(var c,d=e.content[Symbol.iterator]();!(r=(c=d.next()).done);r=!0){var f=c.value;if(t.hasTruncatedContent)break;var m=h(f,t),b=o.h7-t.charCount;m<=b?(u(f,s(a({},t),{truncatedContent:n.content})),t.charCount+=m):(y(f,b,s(a({},t),{truncatedContent:n.content})),t.hasTruncatedContent=!0),p(t)}}catch(e){i=!0,l=e}finally{try{r||null==d.return||d.return()}finally{if(i)throw l}}}},p=function(e){(e.charCount>o.h7||e.mediaCount>o.LW)&&(e.hasTruncatedContent=!0)},f=function(e,t){return(0,r.some)(e,function(e){if((0,i.Op)(e))return!1;var n,r=t.hasTruncatedContent&&(0,i.Bv)(e),o=t.hasTruncatedContent&&Array.isArray(e.content);return!!(r&&c(e,t))||(t.hasTruncatedContent||(u(e,t),p(t)),o&&f(null!=(n=e.content)?n:[],t))})},m=function(e,t){t.hasMediaAttachmentsBeforeTruncation=!0,t.mediaCount<o.LW?(t.mediaCount+=1,t.truncatedContent.push(a({},e))):(c(e,t),t.hasTruncatedContent=!0)},b=function(e,t){var n=h(e,t),r=o.h7-t.charCount;n<=r?(t.charCount+=n,t.truncatedContent.push(a({},e))):(y(e,r,t),t.hasTruncatedContent=!0)},y=function(e,t,n){var r=a({},e);"string"==typeof e.text?(r.text=e.text.slice(0,t),r.text&&(t<e.text.length&&(r.text+="..."),n.truncatedContent.push(r),n.charCount+=r.text.length)):e.content&&Array.isArray(e.content)&&(r.content=[],n.truncatedContent.push(r),f(e.content,s(a({},n),{truncatedContent:r.content})))},h=function(e,t){if(t.textLengthCache.has(e)){var n;return null!=(n=t.textLengthCache.get(e))?n:0}var r=0;return"string"==typeof e.text?r=e.text.length:e.content&&Array.isArray(e.content)&&(r=e.content.reduce(function(e,n){return e+h(n,t)},0)),t.textLengthCache.set(e,r),r};n.d(t,{d:()=>l})},361287(e,t,n){"use strict";n.d(t,{W:()=>h});var r=n(931639),o=n(230763),i=n(765724),a=n(6418),s=n(199563),l=n(766160),c=n(328187),u=n(341409),d=n(506493),p=n(258752),f=n(51730),m=n(998597);function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var y=function(e,t,n,r,o){var i=c.pn(e,{postSlugInUrl:r}),a=!!(i&&e.minimal_layout),s=!!(i&&e.show_post_teaser),l=!t&&c.JE(e,{currentUser:n,postSlugInUrl:r}),u=!!(!n&&e.is_comments_enabled&&!e.is_comments_closed||s),d=u&&e.comments_count>5,p=u&&e.comments_count<=5,f=!!(e.flagged_for_approval_at&&o),m=!!(!a&&(e.is_liking_enabled||e.is_comments_enabled));return{isSharedPostView:i,isSharedPostViewWithMinimalLayout:a,isSharedPostWithTeaserLayout:s,showSpaceName:a,showGatedCommentSection:u,showGatedCommentSectionAtBottom:p,showGatedCommentSectionAtTop:d,showModerationInActionsDropdown:f,showPostActions:l,showEngagementActions:m}},h=function(){var e,t,n,h,g,v=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).onChangeSharePost,x=(0,m.HH)().postSlug,j=(0,d.B)(),_=(0,r.a)(),w=_.record,O=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(_,["record"]),S=(n=(0,l.l8)(null==w||null==(e=w.community_member)?void 0:e.member_since,null==w||null==(t=w.community_member)?void 0:t.created_at))?(0,s.z9)(n):"",P=(0,o.Od)(),C=P.currentUser,k=P.currentCommunity,I=P.currentCommunityMember,N={canManagePost:c.AT(w),canUpdatePost:c.su(w),canDuplicatePost:c.mc(w),canDestroyPost:c.Vz(w),canReportPost:c.Ni(w)},A=y(w,j,C,x,N.canManagePost),E=c.V1(w),R=c.bZ(w),L=c.AF(w),D=c.Ux(w),T=c.J0(w),M=c.Cu(w),F=c.g(w),K=!!(A.isSharedPostViewWithMinimalLayout&&I),B=(0,p.n_)({mutationFn:function(e){var t=e.postId,n=e.body;return(0,f.$H)("/posts/".concat(t,"/share"),n)},onSuccess:function(e){v&&v(b({},w,e),{refetch:!1})}}),q=B.mutate,U=B.data,z=B.isPending;return h=b({post:w},O,N,A),g=g={getSharePostLink:q,isBasicPost:E,isEventPost:R,isImagePost:L,isLoadingSharePostData:z,isPostBodyEmpty:M,isPostMetaHidden:F,isTiptapPost:D,isTrixPost:T,posterJoinedDate:S,sharePostData:U,shouldHideCommentsListForSpace:function(e){var t=e.space,n=(0,i.tI)(k)||I,r=(0,u.Mk)(t)||(0,u.z)(t)||(0,a.V8)(I);return!(n&&r)||A.isSharedPostViewWithMinimalLayout||A.isSharedPostWithTeaserLayout},shouldShowLeaveCommentButton:K,showShareOnWebOptions:function(e){return!A.isSharedPostView&&!j&&c.YU(w,k,e)}},Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(g)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(g)).forEach(function(e){Object.defineProperty(h,e,Object.getOwnPropertyDescriptor(g,e))}),h}},970480(e,t,n){"use strict";var r=n(391426),o=n(497504),i=n(51292),a=n(34819),s=n(617593),l=n(417980),c=n(804939),u=function(e){var t=e.closeButtonRef;return(0,c.P)()?(0,r.jsxs)("header",{className:"flex flex-row items-center border-b border-primary px-4 py-3","aria-busy":"true","aria-live":"polite",children:[(0,r.jsx)(o.H,{ref:t,render:(0,r.jsx)(a.K,{variant:"ghost",size:"sm",icon:"arrow-left","aria-label":(0,l.t)("post.post_modal.go_back")})}),(0,r.jsx)(i.L,{className:"sr-only",children:(0,l.t)("post_modal_v4.loading_title")}),(0,r.jsx)("div",{className:"ml-auto flex items-center gap-1",children:(0,r.jsx)(s.E,{className:"size-8"})})]}):(0,r.jsxs)("header",{className:"flex flex-row items-center gap-4 rounded-t-lg px-6 pt-4","aria-busy":"true","aria-live":"polite",children:[(0,r.jsx)(i.L,{className:"sr-only",children:(0,l.t)("post_modal_v4.loading_title")}),(0,r.jsx)(s.E,{className:"h-8 w-2/3"}),(0,r.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[Array.from({length:5}).map(function(e,t){return(0,r.jsx)(s.E,{className:"size-9"},"skeleton-".concat(String(t)))}),(0,r.jsx)(o.H,{ref:t,render:(0,r.jsx)(a.K,{variant:"ghost",size:"md",icon:"cross","aria-label":(0,l.t)("post_modal_v4.close")})})]})]})};n.d(t,{s:()=>u})},190552(e,t,n){"use strict";n.d(t,{K:()=>a});var r=n(391426),o=n(617593),i=n(755018),a=function(){return(0,r.jsxs)("div",{className:"flex flex-col gap-6","aria-busy":"true","aria-live":"polite",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(o.E,{shape:"pill",className:"size-10"}),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)(o.E,{className:"h-3.5 w-32"}),(0,r.jsx)(o.E,{className:"h-3 w-20"})]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(o.E,{className:"h-6 w-3/4"}),(0,r.jsx)(o.E,{className:"h-4 w-full"}),(0,r.jsx)(o.E,{className:"h-4 w-full"}),(0,r.jsx)(o.E,{className:"h-4 w-11/12"}),(0,r.jsx)(o.E,{className:"h-4 w-5/6"})]}),(0,r.jsx)(o.E,{shape:"square",className:"h-56 w-full"}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(o.E,{className:"h-4 w-2/3"}),(0,r.jsx)(o.E,{className:"h-4 w-1/2"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 border-t pt-4",children:[(0,r.jsx)(o.E,{shape:"pill",className:"h-8 w-20"}),(0,r.jsx)(o.E,{shape:"pill",className:"h-8 w-20"}),(0,r.jsx)(o.E,{shape:"pill",className:"h-8 w-20"})]}),(0,r.jsx)(i.H.CollapsibleComposerSkeleton,{})]})}},709953(e,t,n){"use strict";var r=n(339551),o=n(341409),i=n(100736),a=n(674453),s=n(998597),l=function(e){return e.replace(/\/$/,"")},c=function(){var e=(0,s.HH)().spaceSlug,t=(0,a.pL)(),n=(0,r.E)().helpers.findBy({slug:e});return!!e&&!!t&&!!(0,o.nK)(n)&&l(t)===l(i.Y.index({spaceSlug:e}))};n.d(t,{V:()=>c})},784273(e,t,n){"use strict";var r=n(391426),o=n(296612),i=n(395596),a=function(e){var t=e.profileFields,n=t.visible,a=t.not_visible;return(0,r.jsxs)(i.w,{dataTestId:"profile-fields-section",children:[(0,r.jsx)(o._,{fields:n}),(0,r.jsx)(o._,{fields:a,isHidden:!0})]})};n.d(t,{P:()=>a})},259229(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(497184),a=n.n(i),s=n(288513),l=function(e){var t=e.iconType,n=e.iconProps,i=e.info,l=e.dataTestId,c=e.className,u=e.iconClassName;return i?(0,r.jsxs)("div",{className:a()((0,s.W2)("profile-drawer__about__block"),"whitespace-pre-line [word-break:break-word]",void 0===c?"":c),"data-testid":l,children:[t?(0,r.jsx)(o.In,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({useWithFillCurrentColor:!0,className:a()("text-dark",void 0===u?"":u),type:t},void 0===n?{}:n)):null," ",(0,r.jsx)("p",{children:i})]}):null};n.d(t,{j:()=>l})},923445(e,t,n){"use strict";var r=n(391426),o=n(13444),i=n(259229),a=function(e){var t=e.link,n=e.iconType;return t?(0,r.jsx)(i.j,{iconType:n,info:(0,r.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:(0,o.R)(t)})}):null};n.d(t,{X:()=>a})}
1,395596(e,t,n){"use strict";var r=n(391426),o=n(288513);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function a(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var s=function(e){var t=e.title,n=void 0===t?"":t,s=e.children,l=e.dataTestId;return(0,r.jsxs)("div",a(i({className:(0,o.W2)("profile-drawer__about__section"),"data-testid":l},(0,o.Bs)({anchor:"profile-about-section"})),{children:[n&&(0,r.jsx)("div",a(i({className:(0,o.W2)("profile-drawer__about__heading")},(0,o.Bs)({anchor:"profile-about-section-title"})),{children:n})),s]}))};n.d(t,{w:()=>s})},116047(e,t,n){"use strict";n.d(t,{b:()=>h});var r=n(391426),o=n(494620),i=n(933578),a=n(174404),s=n(973646),l=n(617492),c=n(443200),u=n(677123),d=n(519104),p=n(417980),f=n(387099),m=n(674251),b=(0,i.forwardRef)(function(e,t){var n=e.agentProfileInfo,i=e.publicUid,a=e.avatarURL,b=e.name,y=void 0===b?"":b,h=e.closeCard,g=(0,l.g)(),v=(0,u.IH)().setCurrentBotProfile,x=(0,d.Z)();return(0,r.jsxs)(o.UC,{ref:t,className:"border-primary bg-primary z-[1061] w-full max-w-[320px] rounded-lg border p-6 shadow-xl",sideOffset:5,side:"right",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between",children:[(0,r.jsxs)("div",{className:"text-dark mr-4 min-w-0 flex-1",children:[(0,r.jsx)(m.o.LabelMd,{weight:"semibold",children:(0,r.jsx)("span",{className:"text-dark",children:y})}),(0,r.jsx)("br",{}),(0,r.jsx)("div",{className:"text-light break-words",children:(0,r.jsx)(m.o.LabelSm,{weight:"regular",children:(0,r.jsx)("span",{className:"text-light",children:null==n?void 0:n.bio})})})]}),(0,r.jsx)("div",{className:"shrink-0",children:(0,r.jsx)(c.v,{avatarUrl:a,name:y,size:"small"})})]}),(0,r.jsx)("div",{className:"mt-4 space-y-2"}),(0,r.jsxs)("div",{className:"mt-4 flex w-full space-x-2",children:[i&&(0,r.jsxs)(f.$,{className:"!border-primary flex items-center justify-center space-x-2 !px-3 !py-1.5 !font-medium",full:!0,variant:"secondary",onClick:function(){g.show({memberPublicId:i}),h()},children:[(0,r.jsx)(s.In,{type:"16-user",useWithFillCurrentColor:!0,size:16,"aria-hidden":!0}),(0,r.jsx)("span",{children:(0,p.t)("view_profile")})]}),(null==n?void 0:n.can_interact)&&(0,r.jsxs)(f.$,{onClick:function(e){var t;e.preventDefault(),e.stopPropagation(),v(null!=(t=null==n?void 0:n.profile)?t:null),x({to:"/messages/$uuid",params:{uuid:"new"}})},variant:"circle",full:!0,children:[(0,r.jsx)(s.In,{type:"plus",useWithFillCurrentColor:!0,size:16,"aria-hidden":!0,className:"mr-1"}),(0,r.jsx)("span",{children:(0,p.t)("community_inbox.new_conversation")})]})]})]})});function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}b.displayName="CardContent";var h=function(e){var t,n=e.children,s=e.communityMemberId,l=e.publicUid,c=e.avatarURL,u=e.name,d=e.disabled,p=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return y(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return y(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),f=p[0],m=p[1],h=(0,a.K)({agentId:Number(s)}).getAgentProfileInfoQuery.data;return(0,r.jsxs)(o.bL,{openDelay:300,closeDelay:100,open:f,onOpenChange:m,children:[(0,r.jsx)(o.l9,{asChild:!0,children:(0,r.jsx)("div",{children:n})}),(0,r.jsx)(o.ZL,{children:!(void 0!==d&&d)&&(0,r.jsx)(b,{agentProfileInfo:null!=h?h:null,publicUid:l,avatarURL:c,name:void 0===u?"":u,closeCard:function(){return m(!1)}})})]})}},603751(e,t,n){"use strict";var r=n(391426),o=n(288513);function i(e){var t=e.title,n=e.subtitle;return(0,r.jsxs)("div",{className:(0,o._h)("profile-drawer__empty"),children:[(0,r.jsx)("div",{className:(0,o.W2)("profile-drawer__empty__title"),children:t}),(0,r.jsx)("div",{className:(0,o.W2)("profile-drawer__empty__subtitle"),children:n})]})}n.d(t,{A:()=>i})},395878(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(230763),a=n(51730),s=n(915779),l=n(258752),c=n(110875),u=n(659038),d=n(434204),p=n(932838),f=n(257149),m=n(121517),b=n(387099),y=n(132416),h=n(570310),g=n(294395),v=n(355104),x=n(555169),j={page_name:y.TP.PROFILE_VIEW},_=function(e){var t=e.communityMemberId,n=e.publicUid,y=e.sqid,_=e.messagingEnabled,w=e.closeCard,O=(0,i.Od)().currentCommunityMember,S=(0,m.$)().shouldShowMessageOption,P=(null==O?void 0:O.id)==t,C=(0,v.c)().isCircleV4,k=!P&&!!n,I=!P&&!n&&!!y,N=(0,g.dS)({publicId:k?n:void 0,params:j}).getProfileInfoQuery,A=(0,l.IT)({queryKey:["contact_profile",y,j],queryFn:function(){return(0,a.i_)(s.iK.profile.showBySqid({sqid:null!=y?y:"",params:j}))},retry:!1,enabled:I}),E=(0,x.V)(),R=I?A.data:N.data,L=I?A.isInitialLoading:N.isInitialLoading,D=(0,d.R)(R),T=D.isActive,M=D.isEmpty,F=!P&&_&&!E&&S(R);return F||E||R?(0,r.jsxs)("div",{className:(0,h.x)("flex w-full *:flex-1",{"gap-3":C,"mt-4 space-x-2":!C}),children:[!E&&F&&(0,r.jsx)(p.k,{memberId:t,closeParent:w}),E&&(0,r.jsxs)(r.Fragment,{children:[!P&&L&&(0,r.jsx)(b.$,{variant:"secondary",disabled:!0,className:"!border-primary !h-8 w-full gap-2 !px-4 !font-medium",children:(0,r.jsx)(o.In,{type:"loader"})}),M&&R&&(0,r.jsx)(c.p,{recipient:R,className:"flex-1",buttonVariant:"circle",onClick:w}),!L&&T&&(0,r.jsx)(u.m,{className:"!bg-secondary border-0 flex-1",compassClassName:"flex-1"})]}),R&&(0,r.jsx)(f.t,{member:R,className:"flex-1",onProfileOpen:w})]}):null};n.d(t,{w:()=>_})},578703(e,t,n){"use strict";var r=n(391426),o=n(443200),i=n(244751),a=n(289058),s=n(934019),l=n(494620),c=n(933578),u=n(674251),d=n(570310),p=n(395878),f=(0,c.forwardRef)(function(e,t){var n=e.communityMemberId,c=e.publicUid,f=e.sqid,m=e.messagingEnabled,b=e.avatarURL,y=e.name,h=void 0===y?"":y,g=e.headline,v=void 0===g?"":g,x=e.side,j=e.sideOffset,_=e.closeCard,w=(0,s.k)().data,O=(0,a.T)({member_ids:[n]}),S=O.isLoading,P=O.data,C=null==P?void 0:P.find(function(e){return Number(e.community_member_id)===Number(n)}),k=!!(null==w?void 0:w.enabled);return(0,r.jsxs)(l.UC,{ref:t,className:"border-primary bg-primary z-[1061] w-full min-w-[350px] max-w-[360px] rounded-lg border p-6 shadow-xl",sideOffset:j,side:x,children:[(0,r.jsxs)("div",{className:(0,d.x)("flex justify-between",v?"items-start":"items-center"),children:[(0,r.jsxs)("div",{className:"text-dark mr-4 truncate",children:[(0,r.jsx)(u.o.LabelLg,{weight:"semibold",children:(0,r.jsx)("span",{className:"text-dark",children:h})}),(0,r.jsx)("br",{}),v&&(0,r.jsx)("div",{className:"text-light truncate",children:(0,r.jsx)(u.o.LabelSm,{weight:"regular",children:(0,r.jsx)("span",{className:"text-light",children:v})})}),k&&(0,r.jsx)("div",{className:"mt-2",children:S?(0,r.jsx)("div",{className:"bg-tertiary mb-2 h-7 w-32 animate-pulse rounded-full text-center text-transparent md:text-left"}):(null==C?void 0:C.current_level)&&(0,r.jsx)(i.s,{level:null==C?void 0:C.current_level,levelName:null==C?void 0:C.current_level_name})})]}),(0,r.jsx)("div",{className:"flex flex-1 justify-end",children:(0,r.jsx)(o.v,{avatarUrl:b,name:h,size:"small",progress:null==C?void 0:C.level_progress,level:null==C?void 0:C.current_level})})]}),(0,r.jsx)("div",{className:"mt-4 space-y-2"}),(0,r.jsx)(p.w,{communityMemberId:n,publicUid:c,sqid:f,messagingEnabled:m,closeCard:_})]})});
1f.displayName="CardContent",n.d(t,{W:()=>f})},567431(e,t,n){"use strict";var r=n(391426),o=n(443200),i=n(244751),a=n(289058),s=n(934019),l=n(817751),c=n(617593),u=n(892907),d=n(933578),p=n(417980),f=n(199563),m=n(570310),b=n(395878),y=function(e){var t=e.communityMemberId,n=e.publicUid,y=e.sqid,h=e.messagingEnabled,g=e.avatarURL,v=e.name,x=void 0===v?"":v,j=e.headline,_=void 0===j?"":j,w=e.userLastSeenAt,O=e.closeCard,S=(0,s.k)().data,P=!!(null==S?void 0:S.enabled),C=(0,a.T)({member_ids:[t],enabled:P}),k=C.isLoading,I=C.data,N=(0,d.useMemo)(function(){return null==I?void 0:I.find(function(e){return Number(e.community_member_id)===Number(t)})},[I,t]);return(0,r.jsxs)("div",{className:(0,m.x)("flex justify-between flex-col gap-6 w-full",_?"items-start":"items-center"),children:[(0,r.jsxs)("div",{className:"flex flex-col gap-5 w-full",children:[(0,r.jsxs)("div",{className:"flex flex-row gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1 max-w-48",children:[(0,r.jsx)(u.o5,{className:"line-clamp-2",variant:"heading-md",children:x}),_&&(0,r.jsx)(u.o5,{className:"line-clamp-2",variant:"body-sm",color:"secondary",children:_})]}),(0,r.jsx)("div",{className:"flex justify-end flex-1",children:P&&k?(0,r.jsx)(c.E,{shape:"rounded",className:"size-16"}):(0,r.jsx)(o.v,{avatarUrl:g,name:x,size:"small",progress:null==N?void 0:N.level_progress,level:null==N?void 0:N.current_level})})]}),w&&(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.t,{name:"clock",size:"md"}),(0,r.jsx)(u.o5,{variant:"caption",children:(0,p.t)("profile_drawer.last_seen",{last_seen:(0,f.z9)(w)})})]}),P&&(0,r.jsx)(r.Fragment,{children:k?(0,r.jsx)(c.E,{shape:"rounded",className:"mb-2 h-7 w-32"}):(null==N?void 0:N.current_level)&&(0,r.jsx)("div",{children:(0,r.jsx)(i.s,{className:"mb-0",level:null==N?void 0:N.current_level,levelName:null==N?void 0:N.current_level_name})})})]}),(0,r.jsx)(b.w,{communityMemberId:t,publicUid:n,sqid:y,messagingEnabled:h,closeCard:O})]})};n.d(t,{m:()=>y})},451251(e,t,n){"use strict";n.d(t,{C:()=>b});var r=n(391426),o=n(355104),i=n(443151),a=n(933578),s=n(570310),l=n(567431),c=function(e){var t=e.children,n=e.communityMemberId,c=e.publicUid,u=e.sqid,d=e.messagingEnabled,p=e.avatarURL,f=e.name,m=e.headline,b=e.disabled,y=e.side,h=e.sideOffset,g=e.delay,v=e.closeDelay,x=e.userLastSeenAt,j=(0,a.useMemo)(function(){return(0,i.nm)()},[]),_=(0,o.c)().isCircleV4;return void 0!==b&&b?(0,r.jsx)("span",{children:t}):(0,r.jsx)(i.Ns,{trigger:(0,r.jsx)("span",{children:t}),side:void 0===y?"right":y,sideOffset:void 0===h?5:h,delay:void 0===g?300:g,closeDelay:void 0===v?100:v,handle:j,className:(0,s.x)("p-5",{"min-w-80":_,"w-80":!_}),children:(0,r.jsx)(l.m,{communityMemberId:n,publicUid:c,sqid:u,avatarURL:p,name:void 0===f?"":f,headline:void 0===m?"":m,messagingEnabled:d,closeCard:function(){return j.close()},userLastSeenAt:x})})},u=n(494620),d=n(578703);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var f=function(e){var t,n=e.children,o=e.communityMemberId,i=e.publicUid,s=e.sqid,l=e.messagingEnabled,c=e.avatarURL,f=e.name,m=e.headline,b=e.disabled,y=e.side,h=e.sideOffset,g=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return p(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return p(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),v=g[0],x=g[1];return(0,r.jsxs)(u.bL,{openDelay:300,closeDelay:100,open:v,onOpenChange:x,children:[(0,r.jsx)(u.l9,{asChild:!0,children:(0,r.jsx)("span",{children:n})}),(0,r.jsx)(u.ZL,{children:!(void 0!==b&&b)&&(0,r.jsx)(d.W,{communityMemberId:o,publicUid:i,sqid:s,avatarURL:c,name:void 0===f?"":f,headline:void 0===m?"":m,messagingEnabled:l,closeCard:function(){return x(!1)},side:void 0===y?"right":y,sideOffset:void 0===h?5:h})})]})};function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var b=function(e){return(0,o.c)().isCircleV4?(0,r.jsx)(c,m({},e)):(0,r.jsx)(f,m({},e))}},289058(e,t,n){"use strict";var r=n(11992),o=n(258752),i=function(e){var t=e.member_ids,n=e.enabled;return(0,o.IT)(r.g7.memberScores({memberIds:t,enabled:void 0===n||n}))};n.d(t,{T:()=>i})},156713(e,t,n){"use strict";n.d(t,{W:()=>eM});var r=n(391426),o=n(184080),i=n(560651),a=n(497184),s=n.n(a),l=n(451430),c=n(417980),u=n(288513),d=n(715208),p=n(932252),f=n(722114),m=n(984547),b=n(579880),y=n(852661),h=n(674251),g=n(37635),v=n(199563),x=n(132416),j=n(766160),_=n(722486),w=n(146796),O=n(605274),S=n(784273),P=n(259229),C=n(923445),k=n(395596),I=function(e){var t,n=e.member,o=Object.prototype.hasOwnProperty.call(n,"email"),i=(0,b.Z)(),a=(0,b.P)(),s=(0,w.mD)(),l=(0,_.Q)(),d=(0,O.qI)(),p=null==(t=n.member_tags)?void 0:t.filter(function(e){var t;return(null==e?void 0:e.is_public)&&(null==e||null==(t=e.display_locations)?void 0:t.profile_page)}),I=(null==p?void 0:p.length)>0;return(0,r.jsxs)("div",{className:(0,u.W2)("profile-drawer__about"),children:[!i&&n.bio&&(0,r.jsx)(k.w,{dataTestId:"biography-section",title:(0,c.t)("profile_drawer.biography"),children:(0,r.jsx)(P.j,{info:n.bio,dataTestId:"profile-member-bio"})}),(0,r.jsxs)(k.w,{dataTestId:"profile-info-section",children:[!l&&o&&(0,r.jsx)(P.j,{iconType:"at-symbol",info:n.email,dataTestId:"profile-member-email"}),!i&&(0,r.jsx)(P.j,{iconType:"map-pin",iconProps:{viewBox:"0 0 14 18"},info:n.location,dataTestId:"profile-member-location"}),(0,r.jsx)(P.j,{iconType:"calendar",info:(0,c.t)("profile_drawer.member_since",{member_since:(0,j.Fw)((0,j.l8)(n.member_since,n.created_at))}),dataTestId:"profile-member-since"}),!!n.last_seen_at&&(0,r.jsx)(P.j,{iconType:"16-clock",info:(0,c.t)("profile_drawer.last_seen",{last_seen:(0,v.z9)(n.last_seen_at)}),iconProps:{viewBox:"0 0 18 18",className:"text-dark ml-0.5 mt-0.5"}})]}),s&&(0,r.jsx)(k.w,{dataTestId:"activity-score-section",children:(0,r.jsxs)("div",{className:"flex flex-col gap-y-3",children:[(0,r.jsx)(h.o.LabelSm,{weight:"semibold",children:(0,c.t)("activity_score.activity_score_title")}),(0,r.jsx)(f.z7,{ids:[n.id],children:(0,r.jsx)(g.j,{memberId:n.id})})]})}),I&&!d&&(0,r.jsx)(k.w,{title:(0,c.t)("profile_drawer.tags"),children:(0,r.jsx)("div",{className:(0,u._h)("profile-drawer__about__tags"),children:(0,r.jsx)(y.e,{limit:1/0,memberTags:p})})}),a&&(0,r.jsx)(k.w,{title:(0,c.t)("profile_fields.upgrade_flow.title"),children:(0,r.jsx)(m.t,{})}),i&&(0,r.jsx)(S.P,{profileFields:n.profile_fields}),!i&&(0,x.Ni)(n)&&(0,r.jsxs)(k.w,{title:(0,c.t)("profile_drawer.social"),children:[(0,r.jsx)(C.X,{iconType:"globe",link:n.website_url}),(0,r.jsx)(C.X,{iconType:"facebook",link:n.facebook_url}),(0,r.jsx)(C.X,{iconType:"twitter",link:n.twitter_url}),(0,r.jsx)(C.X,{iconType:"linkedin",link:n.linkedin_url}),(0,r.jsx)(C.X,{iconType:"instagram",link:n.instagram_url})]})]})},N=n(568316),A=function(){return(0,r.jsx)("div",{className:"p-6",children:(0,r.jsx)(N.o.LabelSm,{children:(0,c.t)("something_went_wrong")})})},E=function(e){return(0,r.jsx)(p.t,{renderFunc:A,children:(0,r.jsx)(I,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))})},R=n(224444),L=n(570310),D=n(913479),T=n(325335),M=n(914519),F=n(355104),K=n(603751),B=n(988269),q=n(786158),U=n(340479),z=n(328187),W=n(534529),$=n(898666),V=n(9995);function H(e){var t=e.comment,n=e.onClose,o=e.shouldOpenInNewTab,i="tiptap"===t.editor;return(0,r.jsx)(W.N_,{to:"/c/$spaceSlug/$postSlug",params:{spaceSlug:t.space_slug,postSlug:t.post_slug},hash:"".concat(V.ho).concat(t.id),onClick:function(e){return!(0,U.s6)(e)&&n()},className:(0,L.x)((0,u.W2)("profile-comments__item"),"flex items-start bg-primary p-5 transition-colors duration-150 hover:outline-secondary focus-visible:outline-secondary md:px-6"),target:o&&"_blank",children:(0,r.jsxs)("div",{className:(0,L.x)((0,u.W2)("profile-comments__content"),"flex w-full flex-col space-y-3 text-md text-darkest"),children:[(0,r.jsx)("div",{className:(0,L.x)((0,u.W2)("profile-comments__meta"),"flex flex-row space-x-3 text-sm font-normal text-default"),children:(0,r.jsxs)("div",{className:"space-x-2",children:[(0,r.jsxs)("span",{className:"break-all text-default",children:[(0,c.t)("profile_drawer.comments.commented_on")," ",(0,r.jsx)("span",{className:"font-medium text-dark",children:t.post_name||t.post_truncated_content})]}),(0,r.jsx)("span",{className:"inline-block size-1 rounded-full bg-badge align-middle"}),(0,r.jsx)($.$,{interactive:!1,content:(0,z.VG)(t.created_at),className:"inline-flex",children:(0,r.jsx)("span",{children:(0,v.z9)(t.created_at,{format:v.Or.short})})})]})}),i?(0,r.jsx)(q._,{tiptapBody:t.tiptap_body}
1,t.updated_at):(0,r.jsx)(B.X,{content:t.body_trix_content})]})})}var G=function(e){var t=e.memberPublicId,n=e.member,o=e.onClose,i=e.shouldOpenInNewTab,a=e.scrollableTarget,s=(0,D.H)({memberPublicId:t}),l=s.fetchNextPage,d=s.comments,p=s.hasNextPage,f=s.isLoading,m=(0,F.c)().isCircleV4?M.M:H;return f?(0,r.jsx)(R.y,{}):d.length<1?(0,r.jsx)(K.A,{title:c.Ay.t("profile_drawer.comments.empty_state.title"),subtitle:c.Ay.t("profile_drawer.comments.empty_state.description")}):(0,r.jsx)("div",{className:(0,L.x)((0,u.W2)("profile-comments"),"bg-tertiary h-full overflow-auto"),id:"profile-comments-scrollable-target",children:(0,r.jsx)(T.A,{scrollThreshold:.5,next:l,hasMore:!!p,loader:(0,r.jsx)(R.y,{}),dataLength:d.length,scrollableTarget:a||"profile-comments-scrollable-target",className:"flex flex-col space-y-2",children:d.map(function(e){return(0,r.jsx)(m,{onClose:o,comment:e,member:n,shouldOpenInNewTab:i},e.id)})})})},Z=n(398061),Q=n(319143),Y=n(897328),J=n(568715),X=function(e){var t=e.memberPublicId,n=e.shouldOpenInNewTab,o=e.scrollableTarget,i=(0,Y.U)({memberPublicId:t}),a=i.fetchNextPage,s=i.posts,l=i.data,d=i.hasNextPage,p=i.isLoading,f=i.onPostChange,m=i.onPostDestroy;if(p)return(0,r.jsx)(R.y,{});if(s.length<1)return(0,r.jsx)(K.A,{title:(0,c.t)("profile_drawer.posts.empty_state.title"),subtitle:(0,c.t)("profile_drawer.posts.empty_state.description")});var b=null==l?void 0:l.pages.map(function(e){return e.records.map(function(e){return e.id})});return(0,r.jsx)(Q.U,{perPagePostIds:b,children:(0,r.jsx)("div",{className:(0,L.x)((0,u.W2)("profile-posts"),"bg-tertiary h-full overflow-auto"),id:"profile-posts-scrollable-target",children:(0,r.jsx)(T.A,{style:{overflow:"initial"},scrollThreshold:.5,next:a,hasMore:!!d,loader:(0,r.jsx)(R.y,{}),dataLength:s.length,scrollableTarget:o||"profile-posts-scrollable-target",className:"space-y-2",children:s.map(function(e){return(0,r.jsx)(Z.Yy,{spaceId:e.space_id,children:(0,r.jsx)(J.s,{forceSimplifiedView:!0,onPostChange:f,onPostDestroy:m,post:e,shouldOpenInNewTab:n},e.id)},e.id)})})})})},ee=n(769942),et=n(720613),en=n(734527),er=n(745323),eo=n(10457),ei=n(687857),ea=n(104938),es=n(881692),el=n(930260),ec=function(e){var t=e.member,n=t.is_deleted?(0,c.t)("deactivated"):t.admin?(0,c.t)("admin"):t.moderator?(0,c.t)("moderator"):null;return n?(0,r.jsx)("div",{className:s()("text-badge m-0 inline-block select-none overflow-hidden rounded-xl bg-clip-padding px-2 py-[2px] text-[9px] font-bold uppercase",{"bg-[#ef4444] text-white":t.is_deleted,"bg-brand text-brand-button":!t.is_deleted}),children:n}):null},eu=n(915779),ed=n(316172),ep=n.n(ed),ef=n(387099),em=n(717526),eb=n(973646),ey=function(e){var t=e.member.public_uid,n=e.large,o=(0,em.d)().success,i=(0,eu.qN)({public_uid:t});return(0,r.jsx)($.$,{placement:"bottom",content:(0,c.t)("post.share.copy_link_to_profile"),interactive:!1,children:(0,r.jsx)("div",{children:(0,r.jsx)(ef.$,{type:"button",variant:"secondary","aria-label":(0,c.t)("post.share.copy_link_to_profile"),onClick:function(){ep()(window.location.origin+i),o((0,c.t)("post.share.link_copied"),{duration:"short",shouldUseProgress:!1})},"data-testid":"copy-link-profile",large:n,className:s()({"!px-2.5":n}),children:(0,r.jsx)(eb.In,{type:"link",size:16,useWithFillCurrentColor:!0})})})})},eh=function(e){var t=e.toggleDrawer;return(0,r.jsx)($.$,{placement:"bottom",content:(0,c.t)("post.share.edit_profile"),interactive:!1,children:(0,r.jsx)(ef.$,{variant:"secondary",onClick:t,"aria-label":(0,c.t)("post.share.edit_profile"),children:(0,r.jsx)(eb.In,{type:"pencil",useWithFillCurrentColor:!0,size:16,"aria-hidden":!0})})})},eg=n(244174),ev=n(429807),ex=n(519104),ej=n(810327),e_=n(953068);function ew(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var eO=function(e){var t=e.member,n=e.onSendMessageClick,o=e.isFullPageProfile,i=void 0!==o&&o,a=e.shouldHideMessageButton,s=e.shouldAutoNavigate,l=void 0===s||s,u=(0,ev.n)().findOrCreateChatRoom,d=(0,ex.Z)(),p=(0,ej.B)(),f=(0,e_.W)({memberPublicId:t.public_id,member:t,isFullPageProfile:i,shouldHideMe
1ssageButton:void 0!==a&&a}),m=f.shouldShowEditProfileButton,b=f.onClickOpenEditProfileDrawer,h=f.handleCopyProfileLink,g=f.shouldShowMemberChatIcon,v=function(e){var t;return(t=function(){var t;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:return[4,u({kind:eg.Br,community_member_ids:[e]})];case 1:var o,i;return t=r.sent(),l&&d((o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},(0,eu.mF)({uuid:t})),i=i={state:p},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(i)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))}),o)),n(t),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){ew(i,r,o,a,s,"next",e)}function s(e){ew(i,r,o,a,s,"throw",e)}a(void 0)})})()};return(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 p-6",children:[(0,r.jsx)(en.J,{name:null==t?void 0:t.name,size:"16",src:null==t?void 0:t.avatar_url}),(0,r.jsxs)("div",{children:[(0,r.jsx)(N.o.TitleSm,{weight:"font-bold",textAlign:"text-center",children:null==t?void 0:t.name}),(0,r.jsx)(N.o.BodySm,{textAlign:"text-center",children:null==t?void 0:t.headline})]}),(0,x.kS)(t)&&(0,r.jsx)(y.e,{limit:1/0,memberTags:t.member_tags}),g&&(0,r.jsx)(ef.$,{full:!0,variant:"circle",onClick:function(){return v(t.id)},children:(0,c.t)("message")}),i&&(0,r.jsxs)("div",{className:(0,L.x)("grid gap-2",{"grid-cols-2":m}),children:[(0,r.jsx)(ef.$,{full:!0,variant:"secondary-light",onClick:h,children:(0,c.t)("profile_drawer.dropdown.copy_profile_link")}),m&&(0,r.jsx)(ef.$,{full:!0,variant:"secondary-light",onClick:b,children:(0,c.t)("profile_drawer.dropdown.edit_member_profile")})]})]})},eS=function(e){var t=e.member,n=e.onSendMessageClick,o=e.isFullPageProfile,i=e.shouldHideMessageButton,a=e.shouldOpenInNewTab,s=e.refetch,l=(0,O.qI)(),d=(0,(0,eo.r)().canBlockMemberDm)(t),p=(0,e_.W)({memberPublicId:t.public_id,member:t,isFullPageProfile:o,shouldHideMessageButton:i}),f=p.shouldShowEditProfileButton,m=p.onClickOpenEditProfileDrawer,b=p.shouldShowMemberChatIcon,y=p.canEditProfile,h=p.canViewOnlyMasquerade,g=(0,er.b)({onSuccess:function(){null==s||s()},memberName:t.name}),v=g.isUnblocking,x=g.unBlockMember,j=g.setIsBlockDmsModalOpen,_=g.isBlockDmsModalOpen,w=g.isBlocking,S=g.blockMember;if(l)return(0,r.jsx)(eO,{member:t,shouldAutoNavigate:!a,onSendMessageClick:n,shouldHideMe
1ssageButton:i,isFullPageProfile:o});var P=[];return h&&P.push({label:(0,c.t)("post.share.view_as",{member_first_name:t.first_name}),icon:"16-eye-open",onClick:function(){(0,ee.c)({entityId:t.id,entityType:"CommunityMember"}).then(function(e){return window.open(e.masquerade_url,"_self")}).catch(function(e){return console.error(e)})},testId:"view-only-masquerade-button"}),d&&(t.is_blocked_by_current_community_member?P.push({label:(0,c.t)("messaging.unblock_direct_messages"),icon:"20-message-check",iconSize:20,onClick:function(){return!v&&x({memberId:t.id})},testId:"unblock-direct-messages-button"}):P.push({label:(0,c.t)("messaging.block_direct_messages"),icon:"20-block-dms",iconSize:20,iconClassName:"text-feedback-error",onClick:function(){return j(!0)},testId:"block-direct-messages-button",textColor:"text-feedback-error"})),(0,r.jsxs)("div",{className:(0,u.W2)("profile-drawer__header"),children:[(0,r.jsxs)("div",{className:"relative flex items-center justify-center",children:[(0,r.jsx)(en.J,{size:"24",src:t.avatar_url,name:t.name,isFullRounded:!0}),(0,r.jsx)("div",{className:"absolute -bottom-2 flex items-center gap-1",children:(0,r.jsx)(ec,{member:t})})]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,r.jsx)("div",{children:(0,r.jsx)("h3",{className:(0,u.W2)("profile-drawer__header__name"),children:t.name})}),(null==t?void 0:t.headline)&&(0,r.jsx)("div",{className:"!mt-1",children:(0,r.jsx)(N.o.BodySm,{textAlign:"text-start",weight:"font-medium",color:"text-light",children:t.headline})}),t.is_blocked_by_current_community_member&&(0,r.jsx)("div",{className:"pb-1",children:(0,r.jsx)(es.I,{})}),(0,r.jsxs)(el.F,{children:[(0,r.jsxs)("div",{className:(0,u.W2)("profile-drawer__header__actions"),children:[b&&(0,r.jsx)(ei.o,{communityMemberId:t.id,onClick:n,shouldAutoNavigate:!a,variant:h?"icon":"button"}),f&&(0,r.jsx)(eh,{toggleDrawer:m}),o?y&&(0,r.jsx)(eh,{toggleDrawer:m}):(0,r.jsx)(ey,{member:t}),(0,r.jsx)(et.H,{actions:P,isRenderedInProfileHeader:!0})]}),(0,r.jsx)(ea.B,{showModal:_,onClose:function(){return j(!1)},onConfirm:function(){S({memberId:t.id}),j(!1)},memberName:t.name,isLoading:w})]})]})]})},eP=n(922572),eC=n(938372),ek=n.n(eC),eI=n(269131),eN=n(258920),eA=n(230763),eE=n(6418),eR=n(202090),eL=function(e){var t=e.onClose,n=e.space,o=n.emoji,i=n.custom_emoji_url,a=n.custom_emoji_dark_url,s=n.hide_members_count,l=n.name,d=n.slug,p=n.member_count,f=n.is_private,m=n.show_lock_icon_for_non_members,b=n.is_space_member,y=e.shouldOpenInNewTab,h=(0,eR.wR)().currentAppearance,g=(0,eA.Od)().currentCommunityMember,v=(0,eE.V8)(g),x=(0,eN.O)({shouldShowLockIconForNonMembers:m&&!b,isPrivate:f,isAdmin:v});return(0,r.jsxs)(W.N_,{to:"/c/$spaceSlug",params:{spaceSlug:d},onClick:function(e){return!(0,U.s6)(e)&&t()},className:(0,u.W2)("profile-spaces__item"),target:y&&"_blank",children:[(0,r.jsx)(eI.K,{wrapperClassName:(0,L.x)((0,u._h)("profile-spaces__emoji"),"self-start"),className:(0,u.W2)("gated-or-not with-emoji"),emoji:o,customEmojiUrl:i,customEmojiDarkUrl:a,appearance:h,shouldUseLockIcon:x,lockIcon:(0,r.jsx)("span",{className:(0,u.W2)("gated-or-not"),children:(0,r.jsx)(eb.In,{type:"lock",useWithFillCurrentColor:!0,className:"text-dark"})})}),(0,r.jsxs)("div",{className:(0,u._h)("profile-spaces__details"),children:[(0,r.jsx)("p",{className:(0,u._h)("profile-spaces__title"),children:l}),!s&&(0,r.jsx)("p",{className:(0,u.W2)("profile-spaces__members"),children:(0,c.t)("profiles.members",{count:p})})]})]})},eD=function(e){var t=e.memberPublicId,n=e.onClose,o=e.shouldOpenInNewTab,i=e.scrollableTarget,a=(0,eP.m)({memberPublicId:t}),s=a.spaces,l=a.isLoading,c=a.fetchNextPage,d=a.hasNextPage;return l?(0,r.jsx)(R.y,{}):s.length<1?(0,r.jsx)(K.A,{title:I18n.t("profile_drawer.spaces.empty_state.title"),subtitle:I18n.t("profile_drawer.spaces.empty_state.description")}):(0,r.jsx)("div",{className:"h-full overflow-auto",id:"profile-spaces-scrollable-target",children:(0,r.jsx)(T.A,{scrollThreshold:.5,next:c,hasMore:d,loader:(0,r.jsx)(R.y,{}),dataLength:s.length,className:(0,u._h)("profile-spaces"),scrollableTarget:i||"profile-spaces-scrollable-target",children:s.map(function(e){return(0,r.jsx)(eL,{onClose:n,space:e,shouldOpenInNewTab:o},e.id)})})})};eD.propTypes={memberPublicId:ek().string.isRequired,onClose:ek().func.isRequired,shouldOpenInNewTab:ek().bool,scrollableTarget:ek().string};var eT={get ABOUT(){return(0,c.t)("profile_tabs.about")},get POSTS(){return(0,c.t)("profile_tabs.posts")},get COMMENTS(){return(0,c.t)("profile_tabs.comments")},get SPACES(){return(0,c.t)("profile_tabs.spaces")}}
1,eM=function(e){var t=e.member,n=e.onClose,a=void 0===n?l.noop:n,c=e.onOpenMessaging,p=e.memberPublicId,f=e.isFullPageProfile,m=e.shouldOpenInNewTab,b=void 0!==m&&m,y=e.shouldHideMessageButton,h=e.shouldHideBadge,g=e.isRenderedOnRailBar,v=void 0!==g&&g,x=e.shouldFixTabsOnTop,j=e.refetch,_=t.comments_count,w=t.posts_count,O=t.spaces_count,S=void 0!==h&&h?Object.values(eT).map(function(e){return{label:e}}):[{label:eT.ABOUT},{label:eT.POSTS,badge:{value:w}},{label:eT.COMMENTS,badge:{value:_}},{label:eT.SPACES,badge:{value:O}}],P=(0,d.u)(),C=f?P:null;return(0,r.jsx)("div",{className:s()((0,u.W2)({"profile-full-page":f,"profile-drawer trix-v2":!f}),{"flex h-full":t.is_deleted}),children:t.is_deleted?(0,r.jsx)(o.NZ,{}):(0,r.jsxs)(i.o.Group,{className:s()("flex flex-col !overflow-hidden",{"!h-[calc(100vh-50px)] md:!h-[calc(100vh-60px)]":!f&&!v,"!h-[calc(100dvh-24px)] md:!h-[calc(100vh-2.5rem-64px)]":v&&!f}),children:[(0,r.jsxs)("div",{className:s()({"sticky top-0 z-30":void 0!==x&&x}),children:[(0,r.jsx)(eS,{member:t,onSendMessageClick:f?l.noop:function(e){c?c(e):a()},isFullPageProfile:f,shouldHideMessageButton:void 0!==y&&y,shouldOpenInNewTab:b,refetch:j}),(0,r.jsx)("div",{className:"border-primary bg-primary border-b px-6",children:(0,r.jsx)(i.o.List,{children:Object.values(S).map(function(e){return(0,r.jsxs)(i.o,{className:"text-sm",children:[e.label,(0,r.jsx)(i.o.Counter,{children:e.badge&&e.badge.value>0&&e.badge.value})]},e.label)})})})]}),(0,r.jsxs)(i.o.Panels,{className:s()({"h-full grow":!f}),children:[(0,r.jsx)(i.o.Panel,{children:(0,r.jsx)(E,{member:t})}),(0,r.jsx)(i.o.Panel,{children:(0,r.jsx)(X,{memberPublicId:p,onClose:f?l.noop:a,shouldOpenInNewTab:b,scrollableTarget:C})}),(0,r.jsx)(i.o.Panel,{children:(0,r.jsx)(G,{memberPublicId:p,member:t,onClose:f?l.noop:a,shouldOpenInNewTab:b,scrollableTarget:C})}),(0,r.jsx)(i.o.Panel,{children:(0,r.jsx)(eD,{memberPublicId:p,onClose:f?l.noop:a,shouldOpenInNewTab:b,scrollableTarget:C})})]})]})})};eM.displayName="Profile"},121517(e,t,n){"use strict";var r=n(451430),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.shouldHideMessageButton,n=void 0!==t&&t;return{shouldShowMessageOption:function(e){return!!(0,r.isObject)(e)&&!n&&!!e.can_receive_dm_from_current_member}}};n.d(t,{$:()=>o})},953068(e,t,n){"use strict";var r=n(230763),o=n(915779),i=n(523411),a=n(316172),s=n.n(a),l=n(417980),c=n(717526),u=n(121517),d=function(e){var t=e.member,n=e.memberPublicId,a=e.isFullPageProfile,d=e.shouldHideMessageButton,p=(0,c.d)().success,f=(0,o.qN)({public_uid:n}),m=(0,i.w)(),b=m.showOwnProfileEdit,y=m.showMemberProfileEdit,h=(0,r.Od)().currentCommunityMember,g=(null==h?void 0:h.id)==(null==t?void 0:t.id),v=null==h?void 0:h.is_admin;return{shouldShowEditProfileButton:!(void 0!==a&&a)&&!(null==t?void 0:t.is_deleted)&&(g||v),onClickOpenEditProfileDrawer:function(){g?b():v&&y({member:t})},handleCopyProfileLink:function(){s()(window.location.origin+f),p((0,l.t)("post.share.link_copied"),{duration:"short",shouldUseProgress:!1})},shouldShowMemberChatIcon:(0,(0,u.$)({shouldHideMessageButton:void 0!==d&&d}).shouldShowMessageOption)(t),canEditProfile:!(null==t?void 0:t.is_deleted)&&v,canViewOnlyMasquerade:v&&(null==h?void 0:h.id)!==(null==t?void 0:t.id)}};n.d(t,{W:()=>d})},452603(e,t,n){"use strict";n.d(t,{h:()=>L});var r=n(391426),o=n(973646),i=n(529648),a=n(568316),s=n(933578),l=n(417980),c=n(898666),u=n(692990),d=n(230763),p=n(570310),f=n(982349),m=n(927561),b=n(737225),y=n(974618),h=n(278636),g=n(361971),v=n(387099),x=["harassment","spam","against_guidelines","other"],j=function(){var e=(0,g.xW)(),t=e.setValue,n=(0,e.watch)("reported_reason_type"),a=function(e){return(0,l.t)("flagged_contents.report_reasons.".concat(e))};return(0,r.jsx)("div",{className:"w-full",children:(0,r.jsx)(i.ms,{direction:"bottom-start",size:"full",className:"w-full",buttonClassName:"w-full",buttonWrapperClassName:"w-full",menuWrapperClassName:"!px-0",menuItemsClassName:"!w-full !p-2",popperOptions:{modifiers:[f.w]},button:(0,r.jsxs)(i.ms.MenuButton,{className:"border-primary hover:border-dark flex h-10 w-full items-center justify-between rounded-lg border bg-transparent px-3 transition-colors",children:[(0,r.jsx)("span",{className:"text-dark truncate text-sm",children:a(n)}),(0,r.jsx)(o.In,{size:16,type:"20-chevron-down",className:"text-light shrink-0"})]}),children:x.map(function(e){return(0,r.jsx)(i.ms.ItemWithLink,{linkType:"button",active:n===e,onClick:function(){return t("reported_reason_type",e)},children:a(e)},e)})})})},_=function(e){var t=e.onSubmit,n=e.isLoading,o=void 0!==n&&n,i=(0,h.hS)();return(0,r.jsxs)(b.aF,{isOpen:i.visible,onClose:i.hide,children:[(0,r.jsx)(b.aF.Overlay,{}),(0,r.jsxs)(b.aF.Content,{size:"md",children:[(0,r.jsxs)(b.aF.Header,{children:[(0,r.jsx)(b.aF.Title,{size:"sm",children:(0,l.t)("profile_drawer.connect_banner.report_note.title")}),(0,r.jsx)(b.aF.HeaderActions,{children:(0,r.jsx)(b.aF.CloseButton,{onClick:i.hide})})]}),(0,r.jsxs)(m.l,{defaultValues:{reported_reason_body:"",reported_reason_type:"spam"},onSubmit:function(e){t(e),i.hide()},children:[(0,r.jsxs)(b.aF.Body,{children:[(0,r.jsx)(m.l.Item,{className:"!pt-0",fullWidth:!0,hideBorder:!0,hideDescription:!0,label:(0,l.t)("flagged_contents.form.reported_reason_type"),name:"reported_reason_type",children:(0,r.jsx)(j,{})}),(0,r.jsx)(m.l.Item,{fullWidth:!0,hideBorder:!0,hideDescription:!0,label:"".concat((0,l.t)("flagged_contents.form.reported_reason_body")," (").concat((0,l.t)("paywall_checkout.form.fields.optional").toLowerCase(),")"),name:"reported_reason_body",children:(0,r.jsx)(m.l.TextArea,{name:"reported_reason_body"})})]}),(0,r.jsx)(b.aF.Footer,{children:(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,r.jsx)(v.$,{disabled:o,onClick:i.hide,type:"button",variant:"secondary",children:(0,l.t)("cancel")}),(0,r.jsx)(v.$,{disabled:o,type:"submit",variant:"primary",children:(0,l.t)("report")})]})})]})]})]})},w=y.PT.create(function(e){var t=e.onSubmit,n=e.isLoading;return(0,r.jsx)(_,{onSubmit:t,isLoading:n})}),O=n(658232),S=n(274685),P=n(717526),C=n(258752),k=n(952476),I=n(210541);function N(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var A=function(e){var t,n=e.member,r=(0,P.d)(),o=(0,S.jE)(),i=(t={onSuccess:function(){var e;return(e=function(){var e;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return[4,(0,I.$e)(o,null!=(e=null==n?void 0:n.public_uid)?e:"")];case 1:return t.sent(),(0,O.cc)({queryClient:o}),r.success((0,l.t)("profile_drawer.connect_banner.messages.connection_flagged",{name:null==n?void 0:n.name})),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){N(i,r,o,a,s,"next",e)}function s(e){N(i,r,o,a,s,"throw",e)}a(void 0)})})()},onError:function(){r.error((0,l.t)("profile_drawer.connect_banner.messages.connection_flag_error"))}},(0,C.n_)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({mutationFn:function(e){return k.K.flagConnection(e)}},t)));return{flagConnectionForUser:i.mutate,isFlagging:i.isLoading}};function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var L=function(e){var t=e.note,n=e.collapse,f=void 0!==n&&n,m=e.lineClamp,b=e.className,y=e.connectionId,g=e.initiatorIsAdmin,v=e.member,x=R((0,s.useState)(!1),2),j=x[0],_=x[1],O=R((0,s.useState)(!1),2),S=O[0],P=O[1],C=(0,s.useRef)(null),k=(0,d.Od)().currentCommunitySettings,I=(0,h.hS)(w),N=y&&(null==v?void 0:v.public_uid)&&!g&&!!(null==k?void 0:k.connect_flagging_enabled),E=A({member:v}),L=E.flagConnectionForUser,D=E.isFlagging,T=function(e){y&&L({connectionId:y,reported_reason_body:e.reported_reason_body,reported_reason_type:e.reported_reason_type})};(0,s.useEffect)(function(){if(f&&C.current){var e=C.current;P(e.scrollHeight>e.clientHeight)}},[t,f]);var M=(0,u.n)();return t?(0,r.jsx)("div",{className:(0,p.x)("bg-secondary !mt-2 w-full rounded-lg px-3 py-2.5",M?"mb-1":"mb-3",b),children:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,r.jsx)("div",{ref:C,className:(0,p.x)(f&&"whitespace-pre-wrap",f&&!j&&"line-clamp-".concat(void 0===m?3:m)),children:(0,r.jsx)(a.o.BodyXs,{color:"text-darkest",weight:"normal",children:t})}),f&&S&&!j&&(0,r.jsx)("div",{className:"bg-secondary absolute bottom-0 right-0 pl-2",children:(0,r.jsx)("button",{type:"button",onClick:function(e){e.preventDefault(),e.stopPropagation(),_(!0)},className:"text-dark text-xs font-semibold",children:(0,l.t)("settings.connect_audience.see_more")})})]}),N&&(0,r.jsx)(i.ms,{direction:"bottom-end",buttonClassName:"flex shrink-0 items-center justify-center h-6 w-6 rounded-md hover:bg-tertiary focus-visible:outline-secondary focus-visible:rounded-md focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",button:(0,r.jsx)(c.$,{content:(0,l.t)("messaging.more_actions"),className:"flex items-center",children:(0,r.jsx)(o.In,{type:"16-menu-dots-horizontal",size:16,className:"text-default","aria-label":(0,l.t)("messaging.more_actions")})}),dataTestId:"connection-note-actions-dropdown",children:(0,r.jsx)(i.ms.ItemWithLink,{"data-testid":"flag-button",linkType:"button",onClick:function(e){e.preventDefault(),e.stopPropagation(),I.show({onSubmit:T,isLoading:D})},children:(0,l.t)("report")})})]})}):null}},140716(e,t,n){"use strict";n.d(t,{O:()=>m});var r=n(391426),o=n(658232),i=n(274685),a=n(417980),s=n(121517),l=n(717526),c=n(734366),u=n(258752),d=n(952476),p=n(210541);function f(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var m=function(e){var t,n=e.initiator,m=e.onSuccess,b=(0,l.d)(),y=(0,i.jE)(),h=(0,(0,s.$)().shouldShowMessageOption)(n),g=(0,c.d)(),v=g.handleMessageMember,x=g.isLoading,j=(t={onMutate:function(e){(0,p.rG)(y,e),b.success((0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{children:(0,a.t)("profile_drawer.connect_banner.messages.connection_accepted",{firstName:n.first_name})}),h&&(0,r.jsx)("button",{type:"button",className:"hover:text-light underline transition-colors",onClick:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,v(n.id.toString())];case 1:return e.sent(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){f(i,r,o,a,s,"next",e)}function s(e){f(i,r,o,a,s,"throw",e)}a(void 0)})})()},children:(0,a.t)("message")})]}),{duration:"long"}),null==m||m()},onSuccess:function(){(0,p.$e)(y,n.public_uid),(0,o.cc)({queryClient:y})},onError:function(){b.error((0,a.t)("profile_drawer.connect_banner.messages.connection_accept_error")),(0,p.$e)(y,n.public_uid),(0,o.cc)({queryClient:y})}},(0,u.n_)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({mutationFn:function(e){return d.K.acceptConnection(e)}},t)));return{acceptConnectionForUser:j.mutate,isAccepting:j.isLoading||x}}},432202(e,t,n){"use strict";n.d(t,{Q:()=>c});var r=n(274685),o=n(417980),i=n(717526),a=n(258752),s=n(952476),l=n(210541),c=function(e){var t,n=e.initiator,c=e.onSuccess,u=(0,i.d)(),d=(0,r.jE)(),p=(t={onMutate:function(e){(0,l.rG)(d,e),u.success((0,o.t)("profile_drawer.connect_banner.messages.connection_ignored",{firstName:n.first_name})),null==c||c()},onSuccess:function(){(0,l.$e)(d,n.public_uid)},onError:function(){u.error((0,o.t)("profile_drawer.connect_banner.messages.connection_ignore_error")),(0,l.$e)(d,n.public_uid)}},(0,a.n_)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({mutationFn:function(e){return s.K.ignoreConnection(e)}},t)));return{ignoreConnectionForUser:p.mutate,isIgnoring:p.isLoading}}},210541(e,t,n){"use strict";var r=n(132416),o=n(526448),i=n(294395);function a(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var c=function(e,t){var n=[o.Du];e.setQueriesData(n,function(e){return e?l(s({},e),{pages:e.pages.map(function(e){return l(s({},e),{count:Math.max(0,e.count-1),records:e.records.filter(function(e){return String(e.id)!==t})})})}):e})},u=function(e,t){var n;return(n=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:return[4,Promise.all([e.invalidateQueries({queryKey:["recommendations"]}),e.invalidateQueries({queryKey:[i.ym,t,{page_name:r.TP.PROFILE_VIEW}]}),e.invalidateQueries({queryKey:["community-members"]}),e.invalidateQueries({queryKey:["audience"]}),e.invalidateQueries({queryKey:[o.Du]})])];case 1:return n.sent(),[2]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function s(e){a(i,r,o,s,l,"next",e)}function l(e){a(i,r,o,s,l,"throw",e)}s(void 0)})})()};n.d(t,{$e:()=>u,rG:()=>c})},785466(e,t,n){"use strict";var r=n(391426),o=n(288513);function i(e){var t=e.title,n=e.subtitle;return(0,r.jsxs)("div",{className:(0,o._h)("profile-drawer__empty"),children:[(0,r.jsx)("div",{className:(0,o.W2)("profile-drawer__empty__title"),children:t}),(0,r.jsx)("div",{className:(0,o.W2)("profile-drawer__empty__subtitle"),children:n})]})}n.d(t,{A:()=>i})},720613(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(529648),a=n(568316),s=n(570310),l=n(387099),c=function(e){var t=e.actions,n=e.isRenderedInProfileHeader;return 0===t.length?null:(0,r.jsx)(i.ms,{size:"large",button:(0,r.jsx)(l.$,{type:"button",variant:"secondary","data-testid":"actions-dropdown-button",className:(0,s.x)({"!px-2.5":!n}),large:!n,children:(0,r.jsx)(o.In,{type:"16-menu-dots-horizontal",size:16,useWithFillCurrentColor:!0})}),menuButtonEl:"div",children:t.map(function(e){var t,n;return(0,r.jsx)(i.ms.ItemWithLink,{linkType:"button",onClick:e.onClick,"data-testid":e.testId,children:(0,r.jsxs)(i.ms.IconContainer,{children:[(0,r.jsx)(o.In,{type:e.icon,size:null!=(t=e.iconSize)?t:16,className:(0,s.x)("mr-2",e.iconClassName)}),(0,r.jsx)(a.o.LabelSm,{weight:"regular",color:null!=(n=e.textColor)?n:"text-very-dark",children:e.label})]})},e.label)})})};n.d(t,{H:()=>c})},881692(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(568316),a=n(417980),s=function(){return(0,r.jsxs)("div",{className:"border border-feedback-error rounded-md px-2 py-0.5 items-center justify-center flex gap-1 bg-[#EF44441A]/10",children:[(0,r.jsx)(o.In,{type:"16-block-dms",size:16,className:"text-feedback-error !w-4"}),(0,r.jsx)(i.o.LabelXs,{weight:"medium",color:"text-feedback-error","data-testid":"member-blocked",children:(0,a.t)("profile_drawer.blocked_dms")})]})};n.d(t,{I:()=>s})},964786(e,t,n){"use strict";var r=n(391426),o=n(568316),i=n(570310),a=n(451430),s=n(320996),l=function(e){var t=e.title,n=e.isActive,l=e.onClick,c=e.count,u=e.hasBlip;return(0,r.jsx)("button",{type:"button",className:(0,i.x)("bg-primary border-primary hover:bg-secondary focus-visible:outline-secondary text-darkest cursor-pointer rounded-full border px-4 py-2 text-sm transition-colors duration-75 focus-visible:rounded-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",{"border-secondary":n}),onClick:l,children:(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[u&&(0,r.jsx)("div",{className:"size-2 roun
1ded-full bg-red-500"}),(0,r.jsx)(o.o.LabelSm,{color:"text-darkest",weight:"medium",children:t}),(0,a.isNumber)(c)&&c>0&&(0,r.jsx)(o.o.LabelSm,{color:"text-light",children:(0,s.E)(c,!1)})]})})};n.d(t,{V:()=>l})},961533(e,t,n){"use strict";var r=n(391426),o=function(){return(0,r.jsxs)("div",{className:"border-primary rounded-lg border px-5 pt-6",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("div",{className:"bg-tertiary size-10 animate-pulse rounded-full"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("div",{className:"bg-tertiary h-5 w-36 animate-pulse rounded-md duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary h-3 w-20 animate-pulse rounded-md duration-300"})]})]}),(0,r.jsxs)("div",{className:"mb-5 mt-10 space-y-3",children:[(0,r.jsx)("div",{className:"bg-tertiary h-3 w-full animate-pulse rounded-md duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary h-3 w-full animate-pulse rounded-md duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary h-3 w-64 animate-pulse rounded-md duration-300"})]}),(0,r.jsxs)("div",{className:"border-primary -mx-5 flex h-12 items-center justify-between space-x-2 border-t px-5",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("div",{className:"bg-tertiary size-6 animate-pulse rounded-md duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary size-6 animate-pulse rounded-md duration-300"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("div",{className:"bg-tertiary h-6 w-12 animate-pulse rounded-md duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary h-6 w-16 animate-pulse rounded-md duration-300"})]})]})]})};n.d(t,{M:()=>o})},226603(e,t,n){"use strict";var r=n(391426),o=n(570310),i=function(e){var t=e.isFullPageView;return(0,r.jsx)("div",{className:(0,o.x)("border-primary col-span-full w-full overflow-auto border-r p-4 md:col-span-4",{"!md:w-1/3":t}),children:(0,r.jsxs)("div",{className:"flex flex-col items-center py-9",children:[(0,r.jsx)("div",{className:"bg-tertiary size-24 animate-pulse rounded-full duration-300"}),(0,r.jsxs)("div",{className:"mt-7 flex flex-col items-center space-y-1.5",children:[(0,r.jsx)("div",{className:"bg-tertiary h-4 w-32 animate-pulse rounded-md duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary h-4 w-48 animate-pulse rounded-md duration-300"})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-col items-center space-y-2",children:[(0,r.jsx)("div",{className:"bg-tertiary h-6 w-56 animate-pulse rounded-md duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary h-5 w-32 animate-pulse rounded-md duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary h-5 w-24 animate-pulse rounded-md duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary h-5 w-44 animate-pulse rounded-md duration-300"})]}),(0,r.jsxs)("div",{className:"mt-8 flex items-center justify-between space-x-3",children:[(0,r.jsx)("div",{className:"bg-tertiary h-[34px] w-24 animate-pulse rounded-full duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary size-[34px] animate-pulse rounded-full duration-300"})]})]})})};n.d(t,{_:()=>i})},906015(e,t,n){"use strict";var r=n(391426),o=function(){return(0,r.jsxs)("div",{className:"mb-6 flex items-center space-x-2",children:[(0,r.jsx)("div",{className:"bg-tertiary w-18 h-[38px] animate-pulse rounded-full duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary w-18 h-[38px] animate-pulse rounded-full duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary h-[38px] w-[106px] animate-pulse rounded-full duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary h-[38px] w-[84px] animate-pulse rounded-full duration-300"}),(0,r.jsx)("div",{className:"bg-tertiary h-[38px] w-[90px] animate-pulse rounded-full duration-300"})]})};n.d(t,{o:()=>o})},506782(e,t,n){"use strict";var r=n(74529);n.d(t,{K:()=>r.K,Y:()=>r.Y})},914519(e,t,n){"use strict";n.d(t,{M:()=>m});var r=n(391426),o=n(988269),i=n(786158),a=n(199563),s=n(328187),l=n(844842),c=n(314054),u=n(892907),d=n(534529),p=n(417980),f=n(9995),m=function(e){var t,n=e.comment,m=e.onClose,b=e.member;return(0,r.jsxs)(d.N_,{to:"/c/$spaceSlug/$postSlug",params:{spaceSlug:n.space_slug,postSlug:n.post_slug},hash:"".concat(f.ho).concat(n.id),onClick:m,className:"flex items-start gap-3 rounded-xl bg-primary p-3 hover:bg-secondary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary",children:[(0,r.jsx)("div",{className:"mt-1 shrink-0",children:(0,r.jsx)(l.t,{name:null!=(t=null==b?void 0:b.name)?t:"",src:b.avatar_url,size:"md"})}),(0,r.jsx)("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:(0,r.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2",children:[(0,r.jsx)(u.o5,{variant:"body-sm",color:"secondary",component:"span",className:"shrink-0",children:(0,p.t)("profile_drawer.comments.commented_on")}),(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,r.jsx)(u.o5,{variant:"label-sm",color:"primary",component:"span",className:"min-w-0",truncate:!0,children:n.post_name||n.post_truncated_content}),(0,r.jsx)(c.m,{content:(0,s.VG)(n.created_at),children:(0,r.jsx)(u.o5,{variant:"caption",color:"disabled",component:"span",className:"shrink-0 whitespace-nowrap",children:(0,a.z9)(n.created_at,{format:a.Or.short})})})]})]}),(0,r.jsx)("div",{className:"flex flex-col items-start gap-2",children:"tiptap"===n.editor?(0,r.jsx)(i._,{tiptapBody:n.tiptap_body,variant:"compact"},n.updated_at):(0,r.jsx)(o.X,{content:n.body_trix_content})})]})})]})}},946647(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var i=[45,65],a=[45,60],s=[25,28],l=[220,245],c=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0xdeadbeef^t,r=0x41c6ce57^t,o=0;o<e.length;o++){var i=e.charCodeAt(o);n=Math.imul(n^i,0x9e3779b1),r=Math.imul(r^i,0x5f356495)}return n=Math.imul(n^n>>>16,0x85ebca6b)^Math.imul(r^r>>>13,0xc2b2ae35),0x100000000*(2097151&(r=Math.imul(r^r>>>16,0x85ebca6b)^Math.imul(n^n>>>13,0xc2b2ae35)))+(n>>>0)},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.seed,r=t.saturation,s=void 0===r?i:r,l=t.lightness,u=void 0===l?a:l,d=t.excludeHueRange,p=c(e,void 0===n?0:n),f=p%360;if(d){var m=o(d,2),b=m[0],y=m[1],h=y-b;f>=b&&f<=y?f=(y+1+(f-b))%360:f>y&&(f=(f-h-1+360)%(360-h-1)+y+1)>=b&&f<=y&&(f=y+1)}var g=s[0]+(p>>>8)%100/100*(s[1]-s[0]),v=u[0]+(p>>>16)%100/100*(u[1]-u[0]);return"hsl(".concat(f,", ").concat(Math.round(g),"%, ").concat(Math.round(v),"%)")},d=function(e){var t=e.trim().split(/\s+/).filter(Boolean);return 0===t.length?"":1===t.length?t[0][0].toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()},p=function(e){return u(d(e),{lightness:s,excludeHueRange:l})},f=/rgba\((\d+),\s*(\d+),\s*(\d+)/,m=function(e){if(!e)return{};var t=f.exec(e);if(!t)return{};var n=o(t,4),r=n[1],i=n[2],a=n[3];return{background:"linear-gradient(180deg, rgba(".concat(r,", ").concat(i,", ").concat(a,", 0.2) 0%, rgba(").concat(r,", ").concat(i,", ").concat(a,", 0) 50%)")}};n.d(t,{Lk:()=>p,P:()=>m})},74529(e,t,n){"use strict";var r=n(391426),o=n(451430),i=n(933578),a=(0,i.createContext)({isFullPageView:!1,isLoading:!1,onClose:o.noop,refetchProfileInfo:o.noop});a.displayName="ProfileContext";var s=function(){return(0,i.useContext)(a)},l=function(e){var t=e.member,n=e.isFullPageView,i=e.isLoading,s=e.children,l=e.onClose,c=void 0===l?o.noop:l,u=e.refetchProfileInfo;return(0,r.jsx)(a.Provider,{value:{isFullPageView:void 0!==n&&n,isLoading:i,member:t,onClose:c,refetchProfileInfo:u},children:s})};n.d(t,{K:()=>s,Y:()=>l})},538587(e,t,n){"use strict";n.d(t,{j:()=>m});var r=n(391426),o=n(157199),i=n(624390),a=n(230763),s=n(739042),l=n(927139),c=n.n(l),u=n(387099),d=n(231127),p=n(973646),f=function(e){var t,n,o=e.anchorProps,i=e.children,a=e.className,l=e.hasIcon,f=e.id,m=e.isButton,b=e.linkName,y=e.render,h=e.showModal,g=(0,d.T)("circle_v4_buttons_enabled");return c()(y)?(0,r.jsx)(r.Fragment,{children:y({onClick:h})}):void 0!==m&&m?g?(0,r.jsx)(s.$,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({type:"button",variant:"branded",size:"sm",id:f,onClick:h},o),n=n={children:b||i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)):(0,r.jsxs)(u.$,{type:"button",className:a,id:f,onClick:h,"aria-haspopup":!0,large:!0,isFullRounded:!0,children:[void 0!==l&&l&&(0,r.jsx)(p.In,{type:"plus"}),b||i]}):(0,r.jsx)("a",{className:a,id:f,onClick:h,href:"#new-post","aria-haspopup":!0,children:b||i})},m=function(e){var t=e.anchorProps,n=e.children,s=e.className,l=e.currentSpaceId,c=e.hasIcon,u=e.id,d=e.isButton,p=e.linkName,m=e.onSubmitSuccess,b=e.render,y=e.tiptapBodyForEditor,h=e.title,g=(0,a.Od)().isViewOnlyMasquerading,v=(0,o.s)(),x=(0,i.U)(l);return(0,r.jsx)(f,{anchorProps:t,className:s,hasIcon:void 0!==c&&c,id:u,isButton:void 0===d||d,linkName:p,render:b,showModal:function(e){g||(e.preventDefault(),v.show({spaceId:x,onSubmitSuccess:m,tiptapBodyForEditor:y,title:h}))},children:n})}},157199(e,t,n){"use strict";n.d(t,{x:()=>nf,s:()=>np});var r=n(974618),o=n(61427),i=n(391426),a=n(429165),s=n(509911),l=n(139645),c=n(737225),u=n(257957),d=function(){return(0,i.jsx)(c.aF.Content,{className:"flex min-h-[400px] items-center justify-center",children:(0,i.jsx)(u.a,{})})},p=n(805426),f=n(931639),m=n(319143),b=n(527374),y=function(e){var t=e.post,n=e.onSubmitSuccess,r=e.onPostChange,o=e.shouldSkipRedirectAfterSubmit,a=(0,b.C)({spaceId:t.space_id,postSlug:t.slug,queryOptions:{gcTime:0}}),s=a.post,l=a.isInitialLoading,c=(0,m.c)(t.id).isLoading;return l||c?(0,i.jsx)(d,{}):(0,i.jsx)(f.m,{post:s,onPostChange:r,children:(0,i.jsx)(p.u,{shouldSkipRedirectAfterSubmit:o,onSubmitSuccess:n})})},h=n(808296),g=n(365358),v=n(204107),x=n(339551),j=n(570310),_=n(451430),w=n(288513),O=function(e){var t=e.post,n=e.onSubmitSuccess,o=e.onPostChange,u=e.shouldSkipRedirectAfterSubmit,d=(0,r.hS)(),p=(0,h.v)().isDirty,f=(0,v.f)({shouldPrevent:p}),b=(0,s.o)(),O=(0,l.k)(),S=(0,a.q)(),P=b.visible||O.visible||S.visible;return(0,g.w)({disabled:P,onClose:f}),(0,i.jsxs)(c.aF,{isOpen:d.visible,onClose:_.noop,className:(0,j.x)((0,w.W2)("quick-post-v2-modal"),"w-full max-w-3xl"),children:[(0,i.jsx)(c.aF.Overlay,{onClick:f}),(0,i.jsx)(x.Q,{children:(0,i.jsx)(m.U,{perPagePostIds:[[t.id]],queryOptions:{gcTime:0},children:(0,i.jsx)(y,{post:t,onPostChange:o,onSubmitSuccess:n,shouldSkipRedirectAfterSubmit:u})})})]})},S=r.PT.create(function(e){return(0,i.jsx)(O,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))}),P=n(244174),C=n(624390),k=n(658865),I=n(168293),N=function(e){if((0,k.u4)(e)){var t,n={},r=(0,C.h)(e.space_id);return"string"==typeof e.body&&(n.body=e.body),"string"==typeof e.name&&(n.name=e.name),r&&(n.space_id=r),(0,k.HO)(e.tiptap_body)&&(n.tiptap_body=e.tiptap_body),"cover_image"in e&&(null===e.cover_image||"object"==((t=e.cover_image)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"string"==typeof e.cover_image)&&(n.cover_image=e.cover_image),n}},A=function(){(0,I.XF)(P.PA)},E=n(610818),R=n(892907),L=n(417980),D=n(962548),T="quick_post_v3.discard_changes",M=function(e){var t=e.onDiscardChanges,n=e.onConfirm,r=(0,E.q)(),o=r.isOpen,a=r.hide;return(0,i.jsx)(D.V,{isOpen:o,onClose:a,onCancel:a,onConfirm:function(){null==t||t(),n(),a()},size:"sm",title:(0,L.t)([T,"title"]),confirmText:(0,L.t)([T,"confirm"]),confirmVariant:"danger",children:(0,i.jsx)(R.o5,{variant:"body-sm",children:(0,L.t)([T,"description"])})})},F=r.PT.create(function(e){return(0,i.jsx)(M,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))}),K=n(155633),B=n(50301),q=n(618489),U=n(597851),z=n(933578);function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var $=function(e){var t,n=e.onAttach,r=(0,E.q)(),o=r.isOpen,a=r.hide,s=function(e){if(Array.isArray(e))return e}(t=(0,z.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return W(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return W(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1],u=(0,z.useCallback)(function(e,t){n(t)},[n]);return(0,i.jsx)(U.X,{showModal:o,closeModal:a,attachImage:u,uploadProgress:function(){},aspectRatio:P.nT.DEFAULT,hasFile:l,inputFieldName:"cover_image",isCropEnabled:!0,setHasFile:c,title:(0,L.t)("quick_post_v2.choose_cover_image")})},V=r.PT.create(function(e){return(0,i.jsx)($,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))}),H=function(){return(0,r.hS)(V)},G=n(795428),Z=n(381859),Q=function(){var e=(0,K.e)(),t=H(),n=(0,a.q)(),r=(0,s.o)(),o=(0,B._)(),i=(0,l.k)(),c=(0,q.O)(),u=(0,Z.w)(),d=(0,G.U)();return e.visible||t.visible||n.visible||r.visible||o.visible||i.visible||c.visible||u.visible||d.visible},Y=n(698804),J={isDirty:!1,isFullscreen:!1,isSubmitting:!1,view:"composer"},X=(0,Y.vt)(function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},J),n=n={goToComposer:function(){return e({view:"composer"})},goToSettings:function(){return e({view:"settings"})},reset:function(){return e(J)},setIsDirty:function(t){return e({isDirty:t})},setIsSubmitting:function(t){return e({isSubmitting:t})},toggleFullscreen:function(){return e(function(e){return{isFullscreen:!e.isFullscreen}})}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t}),ee=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).onDiscardChanges,t=(0,E.q)(),n=t.isOpen,o=t.hide,i=(0,r.hS)(F),a=Q(),s=(0,z.useCallback)(function(){X.getState().isDirty?i.show({onDiscardChanges:e,onConfirm:o}):o()},[i,o,e]),l=(0,z.useCallback)(function(e){e||a||s()},[s,a]);return{closeModal:s,forceClose:o,handleOpenChange:l,isOpen:n}},et=n(930303),en="#".concat(et.a7," { z-index: ").concat(et.PH," !important; }\n#").concat(et.aI," { z-index: ").concat(et.OB," !important; }"),er=n(574795),eo=function(e){return e.active?(0,er.createPortal)((0,i.jsx)("style",{id:et.aj,children:en}),document.head):null},ei=n(475323),ea={hide_from_featured_areas:!1,hide_meta_info:!1,is_comments_closed:!1,is_comments_disabled:!1,is_liking_disabled:!1,is_truncation_disabled:!1,meta_tag_attributes:{},pin_to_top:!1},es=function(e){var t;return{cardview_thumbnail:e.cardview_thumbnail,created_at:e.created_at,hide_from_featured_areas:!!e.hide_from_featured_areas,hide_meta_info:!!e.hide_meta_info,internal_custom_html:e.internal_custom_html,is_comments_closed:!!e.is_comments_closed,is_comments_disabled:!!e.is_comments_disabled,is_liking_disabled:!!e.is_liking_disabled,is_truncation_disabled:!!e.is_truncation_disabled,meta_tag_attributes:null!=(t=e.meta_tag_attributes)?t:{},pin_to_top:!!e.pin_to_top,pinned_at:e.pinned_at,slug:e.slug,user_id:e.user_id}},el=function(e,t,n){var r;return{post:t?{id:null!=(r=n.id)?r:void 0,slug:n.slug,space_id:n.space_id}:{space_id:e.space_id},formData:t?e:(0,_.omit)(e,"id")}};function ec(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function eu(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var ed=function(e){if("create"===e.variant){var t,n,r,o,i,a,s,l=e.currentUserId,c=e.defaultSpaceId,u=e.persistedDraft,d=e.tiptapBodyForEditor,p=e.title;return{defaultValues:eu(ec({},ea),{cover_image:null==u?void 0:u.cover_image,id:null,name:p||(null==u?void 0:u.name)||"",published_at:null,space_id:null!=c?c:(0,C.h)(null==u?void 0:u.space_id),status:"published",user_id:l,tiptap_body:d||(null==u?void 0:u.tiptap_body)||{body:{type:"doc",content:[{type:"paragraph"}]},inline_attachments:[],sgids_to_object_map:{}},topics:[]}),shouldShowTipTap:!0}}var f=e.post;return{defaultValues:eu(ec({},es(f)),{body:null!=(t=null!=(n=f.body_for_editor)?n:f.body)?t:"",cover_image:f.cover_image,id:f.id,name:null!=(r=f.name)?r:"",slug:f.slug,published_at:null!=(o=f.published_at)?o:null,space_id:f.space_id,status:null!=(i=f.status)?i:"published",tiptap_body:null!=(a=f.tiptap_body)?a:void 0,topics:null!=(s=f.topics)?s:[]}),shouldShowTipTap:"tiptap"===f.editor}},ep=n(927561),ef=n(641741),em=n(315164),eb=n(328187),ey=n(12471),eh=n(361971),eg=function(){var e=(0,eh.xW)().setValue,t=(0,em.g)().canManageSelectedSpace,n=(0,f.a)(),r=n.isEdit,o=n.record,i=(0,eh.FH)({name:"status"}),a=(0,eh.FH)({name:"published_at"}),s=(0,z.useMemo)(function(){return a?(0,ey.H)(a):void 0},[a]),l=i===eb.Y0&&!!s,c=(0,z.useMemo)(function(){return{before:new Date}},[]),u=!!(t&&!(r&&(0,eb.Rj)(o))),d=(0,z.useCallback)(function(t){return e("status",t,{shouldDirty:!0})},[e]),p=(0,z.useCallback)(function(t){var n;e("published_at",null!=(n=null==t?void 0:t.toISOString())?n:null,{shouldDirty:!0})},[e]);return{canSchedule:u,disabledDays:c,isEdit:!!r,isScheduled:l,onScheduleDateSave:(0,z.useCallback)(function(e){p(e),d(eb.Y0)},[d,p]),scheduledAt:s,setStatus:d,status:i,updatePublishedAt:p}},ev=n(889828),ex=n(739042),ej=n(817751),e_=n(735815);function ew(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eO=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,z.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return ew(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ew(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1],o=eg(),a=o.canSchedule,s=o.disabledDays,l=o.isScheduled,c=o.onScheduleDateSave,u=o.scheduledAt,d=o.setStatus,p=o.updatePublishedAt;if(!l||!u)return null;var f=(0,ev.w)({dateTime:u,format:"short_date_at_short_time"});return(0,i.jsxs)("div",{className:"border-primary bg-secondary flex items-center justify-between gap-3 border-b px-6 py-3",children:[(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,i.jsx)(ej.t,{name:"clock-dash",size:"sm"}),(0,i.jsx)(R.o5,{variant:"label-sm",color:"primary",className:"truncate",children:(0,L.t)("quick_post_v2.scheduled_for",{date:f})})]}),a&&(0,i.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,i.jsx)(e_.s,{disabledDays:s,onOpenChange:r,onSave:c,open:n,side:"bottom",trigger:(0,i.jsx)(ex.$,{size:"sm",type:"button",variant:"outline",children:(0,L.t)("edit")}),value:u}),(0,i.jsx)(ex.$,{onClick:function(){p(null),d(eb.q1)},size:"sm",type:"button",variant:"primary",children:(0,L.t)("delete")})]})]})},eS=(0,z.createContext)(void 0);eS.displayName="RequestCloseContext";var eP=function(e){var t=e.children,n=e.onRequestClose;return(0,i.jsx)(eS.Provider,{value:n,children:t})},eC=function(){var e=(0,z.useContext)(eS);if(!e)throw Error("useRequestClose must be used within RequestCloseProvider");return e},ek=function(e){var t=e.enabled,n=e.variant,o=(0,r.hS)(),i=(0,eh.xW)().formState,a=i.isDirty,s=i.isSubmitSuccessful,l=i.isSubmitting;(0,I.Bp)({cacheKey:P.PA,fields:["name","body","tiptap_body","space_id","cover_image"],enabled:o.visible&&a&&"edit"!==n&&!l&&!s&&(void 0===t||t)})},eI=n(942852),eN=n(684716),eA=n(843897),eE=n(9695),eR=n(452825),eL=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).inline;return(0,i.jsxs)("div",{className:"shrink-0 px-6",children:[(0,i.jsxs)("div",{className:(0,j.x)("border-primary min-w-0 border-t",e?"flex min-h-16 items-center gap-4 py-1.5":"flex h-16 items-center"),children:[(0,i.jsx)(eA.M,{shrink:e}),e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eR.c,{orientation:"vertical",className:"border-primary h-6 shrink-0"}),(0,i.jsx)("div",{className:"min-w-0 flex-1",children:(0,i.jsx)(eE.n,{inline:!0})})]}):null]}),e?null:(0,i.jsx)(eE.n,{className:"border-primary border-t"})]})},eD=n(340772),eT=n(448963),eM=function(e){var t,n;return e.value||e.processing?(0,i.jsx)(eT.Z,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={removeButtonVariant:"danger"},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)):null},eF=function(){var e=(0,em.g)().hasCover;return(0,i.jsx)(eD.t,{name:"cover_image",renderer:eM,aspectRatio:P.nT.DEFAULT,changeImageText:(0,L.t)("replace"),className:(0,j.x)("relative",e&&"mb-3 [&_img]:h-[267px] [&_img]:w-full [&_img]:rounded-none [&_img]:object-cover")})},eK=n(859615),eB=n(364133),eq=n(531404),eU=n(383711),ez=n(504531),eW=function(){var e=(0,eh.xW)().watch,t=(0,ez.b)(),n=(0,eU.D)(),r=e("space_id"),o=e("name"),a=(0,eB.H)(),s=a.handleAttachmentsChange,l=a.handleSgidChange,c=a.inlineAttachments,u=a.sgidToObjectMap;return(0,i.jsx)(eq.P,{placeholder:(0,L.t)("quick_post_v2.body_placeholder"),name:"tiptap_body.body",toolbars:[{portalId:et._f,component:eK.M}],className:"h-full",editorClassName:(0,j.x)("text-primary h-full text-base leading-6",(0,w.W2)("quick-post-modal--v3")),spaceId:r,sgidToObjectMap:u,inlineAttachments:c,onLocalSgidToObjectMapChange:l,onLocalAttachmentsChange:s,aiCopilotTitle:null!=o?o:void 0,isVideoClipAllowed:!0,isVoiceMessageAllowed:n,isMediaUploadAllowed:t})},e$=n(585565),eV=n(914104),eH=function(){var e=(0,em.g)().spaceId;return(0,i.jsx)(eV.k,{id:"post_body",name:"body",is_private_space:!1,space_id:e,placeholder:(0,L.t)("quick_post_v2.body_placeholder"),tabIndex:0,toolbarPortalId:et._f,shouldRenderPopupsInBody:!0,toolbarWrapperClassName:"[&_.toolbar]:flex [&_.toolbar]:items-center [&_.toolbar]:gap-1",className:(0,j.x)((0,w.W2)("trix-v2"),"[&_.trix-editor-textbox]:!border-none [&_.trix-editor-textbox]:!rounded-none [&_.trix-editor-textbox]:!px-0 [&_.trix-editor-textbox]:!py-2")})},eG=function(e){var t=e.shouldShowTipTap,n=(0,em.g)(),r=n.hasCover,o=n.hasSelectedSpace,a=n.canShowCover,s=n.canShowTitle;return(0,i.jsxs)("div",{className:(0,j.x)("flex min-h-0 flex-1 flex-col",!o&&"pb-6"),children:[a&&(0,i.jsx)("div",{className:"shrink-0",children:(0,i.jsx)(eF,{})}),(0,i.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col","data-ai-scrollable":!0,children:[s&&(0,i.jsx)("div",{className:(0,j.x)("mx-auto w-full max-w-3xl shrink-0 px-6",r?"pt-3":"pt-5"),children:(0,i.jsx)(e$.h,{})}),(0,i.jsx)("div",{className:(0,j.x)("mx-auto flex w-full max-w-3xl flex-1 flex-col px-6",!s&&(r?"pt-3":"pt-5")),children:(0,i.jsx)("div",{className:"min-h-0 flex-1",children:t?(0,i.jsx)(eW,{}):(0,i.jsx)(eH,{})})})]})]})},eZ=n(605274),eQ=function(){var e=X(function(e){return e.isFullscreen}),t=(0,eZ.qI)(),n=(0,eZ.V0)(),r=e||t;return{isMdScreen:n,isSmScreen:t,isFullScreenLayout:r,shouldInlineTopics:r&&n}},eY=n(791009);function eJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eX=function(e){var t,n=document.querySelector('[data-testid="'.concat(e,'"]'));return null!=(t=null==n?void 0:n.querySelector(".overflow-y-auto"))?t:null},e0=function(e){var t,n=e.targetTestId,r=function(e){if(Array.isArray(e))return e}(t=(0,z.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eJ(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eJ(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],a=r[1];return(0,z.useLayoutEffect)(function(){var e=eX(n);if(e){var t=function(){var t=e.scrollTop;a(e.scrollHeight>e.clientHeight&&t>1)};t(),e.addEventListener("scroll",t);var r=new ResizeObserver(t);return r.observe(e),function(){e.removeEventListener("scroll",t),r.disconnect()}}},[n]),(0,i.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute top-0 left-0 right-0 z-10 h-10 transition-opacity duration-200 motion-reduce:transition-none",style:{background:"linear-gradient(180deg, var(--color-background-primary) 0%, transparent 72%)",opacity:+!!o}})},e1=function(e){var t=e.children,n=e.customLayout,r=e["data-testid"],o=void 0!==n&&n?(0,i.jsx)("div",{className:"text-primary flex min-h-0 flex-1 flex-col overflow-y-auto rounded-b-lg text-body-md","data-testid":r,children:t}):(0,i.jsx)(eY.a.Body,{"data-testid":r,children:t});return(0,i.jsxs)("div",{className:"relative flex min-h-0 flex-1 flex-col overflow-hidden",children:[(0,i.jsx)(e0,{targetTestId:r}),o]})},e2=function(e){var t=e.shouldShowTipTap,n=eQ().shouldInlineTopics;return(0,i.jsx)("div",{className:"bg-secondary flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",children:(0,i.jsxs)("div",{className:"bg-primary flex min-h-0 flex-1 flex-col overflow-hidden rounded-b-lg",children:[(0,i.jsx)(e1,{customLayout:!0,"data-testid":"quick-
1post-v3-body",children:(0,i.jsx)("div",{className:"flex min-h-full flex-col",children:(0,i.jsx)(eG,{shouldShowTipTap:t})})}),(0,i.jsx)(eL,{inline:n})]})})},e3=function(e){var t=e.onClick;return(0,i.jsx)(ex.$,{variant:"outline",size:"md",onClick:t,children:(0,L.t)("quick_post.scheduled_post_ui.cancel")})},e4=n(603229);function e5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var e6=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,z.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return e5(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e5(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1],o=(0,eh.xW)().formState.isSubmitting,i=eg(),a=i.canSchedule,s=i.disabledDays,l=i.isEdit,c=i.isScheduled,u=i.onScheduleDateSave,d=i.scheduledAt,p=i.setStatus,f=i.status,m=i.updatePublishedAt,b=(0,z.useCallback)(function(e){e.value===eb.Y0?r(!0):(p(e.value),r(!1),m(null))},[p,m]),y=(0,e4.P)({isSubmitting:o,onSelectAction:b,status:f});return{disabledDays:s,getSubmitLabel:y.getSubmitLabel,isEdit:l,isFooterSchedulePickerOpen:n,menuOptions:y.menuOptions,onScheduleDateSave:u,scheduledAt:d,selectedAction:y.selectedAction,setIsFooterSchedulePickerOpen:r,shouldRenderFooterSchedulePicker:a&&!c,shouldShowActionSelector:a}},e8=n(582385),e9=n(186784),e7=n(314054),te=function(e){var t=e.anchor,n=e.disabledDays,r=e.onOpenChange,o=e.onSave,a=e.open,s=e.value;return(0,i.jsx)(e_.s,{anchor:t,disabledDays:n,onOpenChange:r,onSave:o,open:a,side:"top",value:s})},tt=function(){var e=(0,z.useRef)(null),t=(0,e8.t)(),n=t.errorMessage,r=t.isDisabled,o=e6(),a=o.disabledDays,s=o.getSubmitLabel,l=o.isEdit,c=o.isFooterSchedulePickerOpen,u=o.menuOptions,d=o.onScheduleDateSave,p=o.scheduledAt,f=o.selectedAction,m=o.setIsFooterSchedulePickerOpen,b=o.shouldRenderFooterSchedulePicker,y=o.shouldShowActionSelector;return(0,i.jsxs)("div",{ref:e,children:[b&&(0,i.jsx)(te,{anchor:e,disabledDays:a,onOpenChange:m,onSave:d,open:c,value:p}),(0,i.jsx)(e7.m,{content:null!=n?n:"",disabled:!n,children:y?(0,i.jsx)(e9.f,{variant:"primary",size:"md",disabled:r,form:et._5,type:"submit",align:"end",side:"top",menuOptions:u,children:f.label}):(0,i.jsx)(ex.$,{variant:"primary",size:"md",disabled:r,form:et._5,type:"submit",children:s({isEdit:l})})})]})},tn=n(471600),tr=n(639113),to=n(523733),ti=function(){var e=eQ().isMdScreen,t=(0,(0,x.E)().helpers.basicSpacesWithPostCreationAllowed)();return(0,i.jsx)("div",{className:"min-w-0",children:(0,i.jsx)(tr.Z,{selectorQuery:"#".concat(et.dc),disablePortal:e,children:(0,i.jsx)("div",{className:(0,j.x)("min-w-0",{"border-primary border-t":!e}),children:(0,i.jsx)(tn.$,{spaces:t,name:"space_id",trigger:(0,i.jsx)(to.L,{isMd:e}),dropdownMaxWidth:et.Ku,dropdownMaxHeight:et.XC})})})})},ta=function(){var e=eC();return(0,i.jsxs)("footer",{className:"bg-secondary flex h-[68px] shrink-0 items-center justify-between gap-2 px-6 py-4","data-testid":"quick-post-footer",children:[(0,i.jsx)(ti,{}),(0,i.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,i.jsx)(e3,{onClick:e}),(0,i.jsx)(tt,{})]})]})},ts=n(34819),tl=function(e){var t=e.label,n=e.onClick,r=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["label","onClick"]);return(0,i.jsx)("li",{children:(0,i.jsx)(e7.m,{content:t,side:"bottom",children:"text"===r.kind?(0,i.jsx)(ex.$,{type:"button",variant:"outline",size:"md",startIcon:r.startIcon,onClick:n,"aria-label":t,children:t}):(0,i.jsx)(ts.K,{variant:"outline",size:"md",icon:r.icon,onClick:n,"aria-label":t})})})},tc=function(){var e=(0,eh.xW)().setValue,t=H(),n=(0,z.useCallback)(function(t){e("cover_image",t,{shouldDirty:!0,shouldValidate:!0})},[e]);return{openCoverPicker:(0,z.useCallback)(function(){t.show({onAttach:n})},[t,n])}},tu=n(661116),td=function(e){var t=e.variant,n=X(function(e){return e.isFullscreen}),r=X(function(e){return e.goToSettings}),o=X(function(e){return e.toggleFullscreen}),a=(0,em.g)(),s=a.canManageSelectedSpace,l=a.shouldShowAddCover,c=tc().openCoverPicker,u=eQ().isSmScreen,d=eC(),p=(0,tu.W)().isElectron,f=n?(0,L.t)("builder_ui.canvas.exit_fullscreen"):(0,L.t)("quick_post_v2.header.fullscreen"),m=(0,L.t)("quick_post_v2.header.add_cover"),b=(0,L.t)("quick_post_v2.header.close"),y=(0,L.t)("quick_post_v2.header.settings"),h=(0,L.t)("edit"===t?"quick_post_v3.edit_title":"quick_post_v3.create_title");return(0,i.jsxs)("header",{className:(0,j.x)("flex shrink-0 flex-col px-6 pb-0 pt-6",{"mt-6":p&&n}
1),"data-testid":"quick-post-v3-header",children:[(0,i.jsxs)("div",{className:"mb-3 flex w-full flex-row items-center gap-4",children:[(0,i.jsx)(R.o5,{className:"min-w-0 flex-1 truncate",color:"primary",variant:"heading-lg",children:h}),(0,i.jsxs)("ul",{className:"flex shrink-0 list-none items-center gap-2",children:[s&&(0,i.jsx)(tl,{kind:"icon",label:y,icon:"settings-gear",onClick:r}),l&&(0,i.jsx)(tl,{kind:"text",label:m,startIcon:"image",onClick:c}),!u&&(0,i.jsx)(tl,{kind:"icon",label:f,icon:n?"minimize":"expand",onClick:o}),(0,i.jsx)(tl,{kind:"icon",label:b,icon:"cross",onClick:d})]})]}),(0,i.jsx)("div",{"aria-hidden":!0,className:"border-primary border-t"})]})},tp=function(e){var t=e.onRequestClose,n=e.shouldPersistDraft,r=e.shouldShowTipTap,o=e.variant,a=(0,eh.xW)();return ek({enabled:void 0===n||n,variant:o}),(0,eN.vC)("meta+enter, ctrl+enter",function(){(0,eI.N)(a)&&a.triggerFormSubmit()},{enableOnContentEditable:!0,enableOnFormTags:["INPUT","TEXTAREA"]},[a]),(0,i.jsx)(eP,{onRequestClose:t,children:(0,i.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,i.jsx)(td,{variant:o}),(0,i.jsx)(eO,{}),(0,i.jsx)(e2,{shouldShowTipTap:r}),(0,i.jsx)("div",{id:et.dc}),(0,i.jsx)(ta,{})]})})},tf=n(230763),tm=n(6418),tb=n(961756),ty=n(518964),th=n(909954),tg=function(e){var t=e.title,n=e.children;return(0,i.jsxs)("section",{className:"flex w-full flex-col rounded-xl border border-primary bg-primary",children:[(0,i.jsx)("div",{className:"px-6 py-5",children:(0,i.jsx)(R.o5,{variant:"label-md",component:"h3",children:t})}),n]})},tv=function(e){var t=e.children,n=e.className;return(0,i.jsx)("div",{className:(0,j.x)("flex flex-col gap-5 px-6 pb-5 pt-2",n),children:t})},tx=function(){var e=(0,eh.xW)().control,t=(0,tf.Od)().currentCommunityMember,n=(0,tm.V8)(t),r=(0,tb.m)({enabled:n}),o=r.data,a=void 0===o?{}:o,s=r.isInitialLoading;return n?s?(0,i.jsx)(u.a,{}):"boolean"==typeof(null==a?void 0:a.internal_custom_html_enabled)&&a.internal_custom_html_enabled?(0,i.jsx)(tg,{title:(0,L.t)("quick_post_v3.settings.sections.advanced"),children:(0,i.jsx)(tv,{children:(0,i.jsx)(th.z,{layout:"vertical",label:(0,L.t)("post.internal_custom_html"),description:(0,L.t)("post.internal_custom_html_description"),children:(0,i.jsx)(eh.xI,{control:e,name:"internal_custom_html",render:function(e){var t=e.field,n="string"==typeof t.value?t.value:"";return(0,i.jsx)(ty.CodeInput,{indentOnTab:!0,language:"html",maxLines:8,minLines:4,onBlur:t.onBlur,onValueChange:function(e){return t.onChange(e)},value:n})}})})})}):null:null},tj=n(792176),t_=n(915779),tw=n(543381);function tO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tS=function(e){var t,n,r=e.description,o=e.fieldName,a=e.fileLabel,s=e.testId,l=e.title,c=e.uploadFieldName,u=(0,eh.xW)(),d=u.setValue,p="string"==typeof(t=(0,u.watch)(o))&&t.length>0?t:void 0,f=function(e){if(Array.isArray(e))return e}(n=(0,z.useState)([]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(n)||function(e){if(e){if("string"==typeof e)return tO(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tO(e,2)}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=f[0],b=f[1],y=(0,z.useMemo)(function(){return m.length>0?m:p?[{url:(0,t_.nD)({signed_id:p}),name:a}]:[]},[a,m,p]),h=(0,z.useCallback)(function(e){new tj.d(e,function(e,t){d(o,t,{shouldDirty:!0}),b([])},"",c,function(){},void 0,function(){b([])}).start()},[o,d,c]),g=(0,z.useCallback)(function(e){if(0===e.length){d(o,null,{shouldDirty:!0}),b([]);return}b(e);var t,n=null==(t=e[0])?void 0:t.file;n&&h(n)}
1,[o,d,h]);return(0,i.jsx)(tw.m,{value:y,onValueChange:g,title:l,description:r,"data-testid":s})},tP=function(){return(0,i.jsx)(tS,{fieldName:"cardview_thumbnail",uploadFieldName:"cardview_thumbnail",fileLabel:(0,L.t)("cardview_thumbnail"),title:(0,L.t)("upload_a_cardview_thumbnail"),testId:"quick-post-v3-cardview-thumbnail-dropzone"})},tC=function(){var e=(0,eh.xW)().watch,t=(0,em.g)().space,n=e("id"),r=e("status"),o=!!n&&(0,eb.Rj)({status:r}),a=(0,eb.a1)(t);return(0,i.jsx)(tg,{title:(0,L.t)("quick_post_v3.settings.sections.display_featuring"),children:(0,i.jsxs)(tv,{children:[a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(th.z,{layout:"horizontal",horizontalLayoutRatio:"40/60",label:(0,L.t)("cardview_thumbnail"),labelTooltip:(0,L.t)("cardview_thumbnail_description"),children:(0,i.jsx)(tP,{})}),(0,i.jsx)(eR.c,{})]}),(0,i.jsx)(ep.l.ToggleSwitch,{name:"hide_meta_info",label:(0,L.t)("post.hide_meta_info"),labelPosition:"end"}),!(null==t?void 0:t.hide_from_featured_areas)&&(0,i.jsx)(ep.l.ToggleSwitch,{name:"hide_from_featured_areas",label:(0,L.t)("post.hide_from_featured_areas"),labelPosition:"end"}),(0,i.jsx)(ep.l.ToggleSwitch,{name:"is_truncation_disabled",label:(0,L.t)("post.is_truncation_disabled"),labelPosition:"end"}),o&&(0,i.jsx)(ep.l.ToggleSwitch,{name:"pin_to_top",label:(0,L.t)("post.pin_to_top"),labelPosition:"end"}),o&&!(null==t?void 0:t.hide_right_sidebar)&&(0,i.jsx)(ep.l.ToggleSwitch,{name:"pinned_at",label:(0,L.t)("post.pinned_at"),labelPosition:"end"})]})})},tk=function(){var e=(0,(0,eh.xW)().watch)("is_comments_disabled");return(0,i.jsx)(tg,{title:(0,L.t)("quick_post_v3.settings.sections.engagement"),children:(0,i.jsxs)(tv,{children:[(0,i.jsx)(ep.l.ToggleSwitch,{name:"is_comments_disabled",label:(0,L.t)("post.is_comments_disabled"),labelPosition:"end"}),!e&&(0,i.jsx)(ep.l.ToggleSwitch,{name:"is_comments_closed",label:(0,L.t)("post.is_comments_closed"),labelPosition:"end"}),(0,i.jsx)(ep.l.ToggleSwitch,{name:"is_liking_disabled",label:(0,L.t)("post.is_liking_disabled"),labelPosition:"end"})]})})},tI=function(){var e=X(function(e){return e.goToComposer});return(0,i.jsx)("header",{className:"flex shrink-0 flex-col px-6 pb-0 pt-6","data-testid":"quick-post-v3-settings-header",children:(0,i.jsxs)("div",{className:"mb-3 flex w-full flex-row items-center gap-4",children:[(0,i.jsx)(ts.K,{"aria-label":(0,L.t)("previous"),icon:"arrow-left",onClick:e,size:"sm",type:"button",variant:"outline"}),(0,i.jsx)(R.o5,{className:"min-w-0 truncate",color:"primary",variant:"heading-lg",children:(0,L.t)("quick_post_v3.settings.title")}),(0,i.jsx)(ex.$,{className:"ml-auto",onClick:e,size:"md",type:"button",variant:"primary",children:(0,L.t)("quick_post_v2.done")})]})})},tN=n(382814),tA=n(364473),tE=n(341409),tR=n(993465),tL=n(253737),tD=n(771019),tT=n(356593),tM=function(e){if(e){var t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}},tF=function(){var e=(0,eh.xW)().control,t=(0,z.useMemo)(function(){return(0,tT.D)(new Date)},[]),n=(0,z.useMemo)(function(){return{after:t}},[t]),r=(0,z.useCallback)(function(e){e.stopPropagation()},[]),o=(0,tR.a)();return(0,i.jsx)(eh.xI,{control:e,name:"created_at",render:function(e){var a=e.field;return(0,i.jsx)(tD.e,{"data-testid":"quick-post-v3-publish-time",disabledDays:n,endMonth:t,horizontalLayoutRatio:"40/60",label:(0,L.t)("publish_date"),labelTooltip:(0,L.t)("publish_date_description"),layout:o?"vertical":"horizontal",onChange:function(e){var t;a.onChange(null!=(t=null==e?void 0:e.toISOString())?t:null)},rootProps:{onClick:r,onPointerDown:r},value:tM(a.value)})}})};function tK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tB=function(){var e=(0,em.g)().space;if("u"<typeof window)return{pathPrefix:""};var t=null==e?void 0:e.slug;return{pathPrefix:t?"/c/".concat(t,"/"):"/c/"}},tq=function(){var e,t=(0,tR.a)(),n=(0,eh.xW)(),r=n.control,o=n.watch,a=(0,em.g)().space,s=tB().pathPrefix,l=(0,z.useRef)(null),c=(0,tL.o)(l),u=(0,x.E)().helpers.basicSpacesWithPostCreationAllowed,d=function(e){if(Array.isArray(e))return e}(e=o(["id","status","slug"]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),3!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return tK(e,3);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tK(e,3)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=d[0],f=d[1],m=d[2],b=u(),y=!!a&&(0,tE.WY)(a),h=!!p&&(0,eb.Rj)({status:f});return(0,i.jsx)(tg,{title:(0,L.t)("quick_post_v3.settings.sections.publishing"),children:(0,i.jsxs)(tv,{children:[h&&(0,i.jsx)(tF,{}),(0,i.jsx)(th.z,{layout:t?"vertical":"horizontal",horizontalLayoutRatio:"40/60",label:(0,L.t)("post.space_id"),children:(0,i.jsx)(eh.xI,{control:r,name:"space_id",render:function(e){var t,n=e.field;return(0,i.jsx)(tN.Y,{spaces:b,value:null!=(t=n.value)?t:null,dropdownMaxWidth:et.Ku,dropdownMaxHeight:et.XC,onChange:function(e){(null!=e||null==n.value)&&n.onChange(e)}})}})}),(0,i.jsx)(th.z,{layout:t?"vertical":"horizontal",horizontalLayoutRatio:"40/60",label:(0,L.t)("post.slug"),children:(0,i.jsx)(ep.l.Input,{name:"slug",placeholder:m?void 0:(0,L.t)("quick_post_v3.settings.slug_placeholder"),prefix:(0,i.jsx)(e7.m,{content:s,disabled:!c,children:(0,i.jsx)(R.o5,{ref:l,variant:"body-sm",color:"tertiary",component:"span",className:"block min-w-0",truncate:!0,children:s})}),prefixWrapperClassName:"min-w-0 overflow-hidden"})}),y&&(0,i.jsx)(th.z,{layout:t?"vertical":"horizontal",horizontalLayoutRatio:"40/60",label:(0,L.t)("post.user_id"),children:(0,i.jsx)(eh.xI,{control:r,name:"user_id",render:function(e){var t,n=e.field;return(0,i.jsx)(tA.q,{value:null!=(t=n.value)?t:null,valueField:"user_id",onChange:n.onChange})}})})]})})},tU=function(){return(0,i.jsx)(tS,{fieldName:"meta_tag_attributes.opengraph_image",uploadFieldName:"opengraph_image",fileLabel:(0,L.t)("meta_tag_attributes.opengraph_image"),title:(0,L.t)("spaces.form.edit.options.seo.opengraph_image.add"),description:(0,L.t)("spaces.form.edit.options.seo.opengraph_image.description"),testId:"quick-post-v3-opengraph-image-dropzone"})},tz=function(e){var t=e.title,n=e.children;return(0,i.jsxs)("div",{className:"flex flex-col gap-5 px-6 pb-5 pt-2",children:[(0,i.jsx)("div",{className:"flex w-full items-center border-b border-primary py-1",children:(0,i.jsx)(R.o5,{variant:"label-xs",color:"secondary",className:"w-full",children:t})}),n]})},tW=function(){var e=(0,tR.a)();return(0,(0,eh.xW)().watch)("created_at")?(0,i.jsxs)(tg,{title:(0,L.t)("quick_post_v3.settings.sections.sharing"),children:[(0,i.jsxs)(tz,{title:(0,L.t)("quick_post_v3.settings.subsections.seo"),children:[(0,i.jsx)(th.z,{layout:e?"vertical":"horizontal",horizontalLayoutRatio:"40/60",label:(0,L.t)("meta_tag_attributes.meta_title"),labelTooltip:(0,L.t)("meta_tag_attributes.meta_title_description",{obj:"post"}),children:(0,i.jsx)(ep.l.Input,{name:"meta_tag_attributes.meta_title",placeholder:(0,L.t)("quick_post_v3.settings.meta_title_placeholder")})}),(0,i.jsx)(th.z,{layout:e?"vertical":"horizontal",horizontalLayoutRatio:"40/60",label:(0,L.t)("meta_tag_attributes.meta_description"),labelTooltip:(0,L.t)("meta_tag_attributes.meta_description_description"),children:(0,i.jsx)(ep.l.TextArea,{name:"meta_tag_attributes.meta_description",rows:4,placeholder:(0,L.t)("quick_post_v3.settings.meta_description_placeholder")})})]}),(0,i.jsxs)(tz,{title:(0,L.t)("quick_post_v3.settings.subsections.social"),children:[(0,i.jsx)(th.z,{layout:e?"vertical":"horizontal",horizontalLayoutRatio:"40/60",label:(0,L.t)("spaces.form.edit.options.seo.opengraph_image.label"),children:(0,i.jsx)(tU,{})}),(0,i.jsx)(th.z,{layout:e?"vertical":"horizontal",horizontalLayoutRatio:"40/60",label:(0,L.t)("meta_tag_attributes.opengraph_title"),labelTooltip:(0,L.t)("meta_tag_attributes.opengraph_title_description",{obj:"post"}),children:(0,i.jsx)(ep.l.Input,{name:"meta_tag_attributes.opengraph_title",placeholder:(0,L.t)("quick_post_v3.settings.opengraph_title_placeholder")})}),(0,i.jsx)(th.z,{layout:e?"vertical":"horizontal",horizontalLayoutRatio:"40/60",label:(0,L.t)("meta_tag_attributes.opengraph_description"),labelTooltip:(0,L.t)("meta_tag_attributes.opengraph_description_description"),children:(0,i.jsx)(ep.l.TextArea,{name:"meta_tag_attributes.opengraph_description",rows:4,placeholder:(0,L.t)("quick_post_v3.settings.opengraph_description_placeholder")})})]})]}):null},t$=function(){return(0,i.jsxs)("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",children:[(0,i.jsx)(tI,{}),(0,i.jsx)("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",children:(0,i.jsx)(e1,{"data-testid":"quick-
1post-v3-settings",children:(0,i.jsxs)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 pt-2",children:[(0,i.jsx)(tq,{}),(0,i.jsx)(tk,{}),(0,i.jsx)(tC,{}),(0,i.jsx)(tW,{}),(0,i.jsx)(tx,{})]})})})]})},tV=n(824847),tH=n(519104),tG=n(258752),tZ=n(717526),tQ=function(){var e=(0,eh.xW)().formState.isDirty,t=X(function(e){return e.setIsDirty});return(0,z.useEffect)(function(){t(e)},[e,t]),null},tY=n(974999),tJ="col-start-1 row-start-1 flex h-full min-h-0 min-w-0 flex-col will-change-transform motion-reduce:transition-none",tX="cubic-bezier(0.32, 0.72, 0, 1)",t0=function(e){return{transition:["opacity ".concat(220,"ms ").concat(tX),"transform ".concat(220,"ms ").concat(tX),!e&&"visibility 0ms linear ".concat(220,"ms")].filter(Boolean).join(", "),visibility:e?"visible":"hidden"}},t1=function(e){var t=e.composer,n=e.settings,r="settings"===X(function(e){return e.view});return(0,i.jsxs)("div",{className:"relative grid h-full min-h-0 min-w-0 flex-1 overflow-hidden","data-testid":"quick-post-v3-view-transition",children:[(0,i.jsx)("div",{className:(0,j.x)(tJ,r?"pointer-events-none -translate-x-full opacity-0":"translate-x-0 opacity-100"),style:t0(!r),children:t}),(0,i.jsx)("div",{className:(0,j.x)(tJ,r?"translate-x-0 opacity-100":"pointer-events-none translate-x-full opacity-0"),style:t0(r),children:n})]})};function t2(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function t3(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){t2(i,r,o,a,s,"next",e)}function s(e){t2(i,r,o,a,s,"throw",e)}a(void 0)})}}function t4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function t5(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function t6(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var t8=function(e){var t=e.children,n=e.isFullscreen,r=e.isSmScreen,o=e.shouldUseFixedModalHeight,a=(0,em.g)().hasCover,s=t4({transitionDuration:"".concat(220,"ms"),transitionTimingFunction:"cubic-bezier(0.32, 0.72, 0, 1)"},o&&{height:a?720:600});return(0,i.jsx)(eY.a.Content,t5(t4({},{style:s}),{"data-testid":n&&!r?"quick-post-v3-modal-content-fullscreen":"quick-post-v3-modal-content",children:t}))},t9=function(e){var t=e.isAdmin,n=e.isEdit,o=e.responseData,i=e.success;n?i((0,L.t)("quick_post.toasts.changes_saved")):t&&"published"===o.status?r.PT.show(ef.i,{post:o}):i((0,L.t)("quick_post.toasts.".concat(o.status,"_saved")))},t7=function(e){var t=e.defaultValues,n=e.onForceClose,r=e.onRequestClose,o=e.onSubmitSuccess,a=e.shouldPersistDraft,s=e.shouldSkipRedirectAfterSubmit,l=e.shouldShowTipTap,c=e.variant,u=(0,tH.Z)(),d=(0,tZ.d)(),p=d.success,m=d.error,b=(0,tf.Od)().currentCommunityMember,y=(0,f.a)(),h=y.onPostChange,g=y.refetchPostDetails,v=X(function(e){return e.isFullscreen}),x=(0,eZ.qI)(),j="edit"===c,_=(0,tm.V8)(b),O=(0,tG.n_)({mutationFn:function(e){return t3(function(){return t6(this,function(n){switch(n.label){case 0:var r;return[4,(r=el(e,j,t),ei.d.createOrUpdate({post:r.post,formData:r.formData}))];case 1:return[2,n.sent().json()]}})})()},onSuccess:function(e,r){var i=j&&!!r.is_comments_closed!=!!t.is_comments_closed;h(e),null==g||g(),null==o||o(),j||A(),i&&tV.NP.forPost({postId:e.id}),n(),t9({isAdmin:_,isEdit:j,responseData:e,success:p}),s||u({href:(0,eb.Lo)({post:e})})},onError:function(){m((0,L.t)(j?"quick_post.toasts.failed_to_update":"quick_post.toasts.failed_to_create"))}});return(0,i.jsx)(ep.l,t5(t4({id:et._5,defaultValues:t,mode:"all",className:"flex size-full min-h-0 min-w-0 flex-1 flex-col",formClassName:"flex h-full min-h-0 flex-1 flex-col",onSubmit:function(e){return t3(function(){return t6(this,function(t){switch(t.label){case 0:return[4,O.mutateAsync(e)];case 1:return t.sent(),[2]}})})()},validationSchema:l?tY.RB:tY.US},(0,w.Bs)({anchor:"post-composer"})),{children:(0,i.jsx)(t8,{isFullscreen:v,isSmScreen:x,shouldUseFixedModalHeight:!v&&!x,children:(0,i.jsxs)("div",{className:"flex h-full min-h-0 flex-1 flex-col overflow-hidden",children:[(0,i.jsx)(tQ,{}),(0,i.jsx)(t1,{composer:(0,i.jsx)(tp,{onRequestClose:r,shouldPersistDraft:
1a,shouldShowTipTap:l,variant:c}),settings:(0,i.jsx)(t$,{})})]})})}))},ne=function(e){var t=e.onForceClose,n=e.onRequestClose,r=e.onSubmitSuccess,o=e.shouldPersistDraft,a=e.shouldSkipRedirectAfterSubmit,s=e.spaceId,l=e.tiptapBodyForEditor,c=e.title,u=(0,C.U)(s),d=N((0,(0,I.bE)({cacheKey:P.PA}).getPersistedFormFieldValues)()),p=(0,tf.Od)().currentUser,m=ed({currentUserId:null==p?void 0:p.id,defaultSpaceId:u,persistedDraft:d,tiptapBodyForEditor:l,title:c,variant:"create"}),b=m.defaultValues,y=m.shouldShowTipTap;return(0,i.jsx)(f.m,{post:b,children:(0,i.jsx)(t7,{defaultValues:b,onForceClose:t,onRequestClose:n,onSubmitSuccess:r,shouldPersistDraft:o,shouldSkipRedirectAfterSubmit:a,shouldShowTipTap:y,variant:"create"})})};function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nn=function(e){var t,n=e.onSubmitSuccess,o=e.shouldSkipRedirectAfterSubmit,a=e.spaceId,s=e.tiptapBodyForEditor,l=e.title,c=function(e){if(Array.isArray(e))return e}(t=(0,z.useState)(!0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return nt(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nt(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=c[0],d=c[1],p=(0,z.useCallback)(function(){d(!1),A()},[]),f=(0,r.hS)(),b=ee({onDiscardChanges:p}),y=b.closeModal,h=b.forceClose,g=b.handleOpenChange,v=b.isOpen,j=X(function(e){return e.reset}),_=X(function(e){return e.isFullscreen}),w=(0,eZ.qI)();return(0,z.useEffect)(function(){f.visible&&(j(),d(!0))},[f.visible,j]),(0,i.jsxs)(eY.a.Root,{open:v,onOpenChange:g,size:_||w?"full-screen":"lg",children:[(0,i.jsx)(eo,{active:f.visible}),(0,i.jsx)(x.Q,{children:(0,i.jsx)(m.U,{children:(0,i.jsx)(ne,{onForceClose:h,onRequestClose:y,shouldPersistDraft:u,spaceId:a,tiptapBodyForEditor:s,title:l,onSubmitSuccess:n,shouldSkipRedirectAfterSubmit:o})})})]})},nr=r.PT.create(function(e){return(0,i.jsx)(nn,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))});function no(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var ni=function(e){return!!(e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"&&"id"in e&&"number"==typeof e.id&&"slug"in e&&"string"==typeof e.slug&&"space_id"in e)},na=function(e){var t,n,r,o=(0,C.h)(e.space_id),i=(0,b.C)({spaceId:o,postSlug:e.slug,queryOptions:{gcTime:0}}),a=(0,m.c)(e.id),s=ni(i.post)?i.post:null;if(i.isInitialLoading||a.isLoading||!s)return{status:"loading"};var l=no({},s,null!=(r=a.postDetails)?r:{}),c=(0,C.h)(l.space_id);return c?{post:(t=no({},l),n=n={space_id:c},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t),status:"ready"}:{status:"loading"}},ns=function(){return(0,i.jsx)(eY.a.Content,{children:(0,i.jsx)(eY.a.Body,{children:(0,i.jsx)("div",{className:"flex min-h-[400px] items-center justify-center",children:(0,i.jsx)(u.a,{})})})})},nl=function(e){var t=e.post,n=e.onForceClose,r=e.onPostChange,o=e.onRequestClose,a=e.onSubmitSuccess,s=e.shouldSkipRedirectAfterSubmit,l=na(t);if("ready"!==l.status)return(0,i.jsx)(ns,{});var c=ed({post:l.post,variant:"edit"}),u=c.defaultValues,d=c.shouldShowTipTap;return(0,i.jsx)(f.m,{post:l.post,onPostChange:r,children:(0,i.jsx)(t7,{defaultValues:u,onForceClose:n,onRequestClose:o,onSubmitSuccess:a,shouldSkipRedirectAfterSubmit:s,shouldShowTipTap:d,variant:"edit"})})},nc=function(e){var t=e.post,n=e.onPostChange,o=e.onSubmitSuccess,a=e.shouldSkipRedirectAfterSubmit,s=(0,r.hS)(),l=ee(),c=l.closeModal,u=l.forceClose,d=l.handleOpenChange,p=l.isOpen,f=X(function(e){return e.reset}),b=X(function(e){return e.isFullscreen}),y=(0,eZ.qI)();return(0,z.useEffect)(function(){s.visible&&f()},[s.visible,f]),(0,i.jsxs)(eY.a.Root,{open:p,onOpenChange:d,size:b||y?"full-screen":"lg",children:[(0,i.jsx)(eo,{active:s.visible}),(0,i.jsx)(x.Q,{children:(0,i.jsx)(m.U,{perPagePostIds:[[t.id]],queryOptions:{gcTime:0},children:(0,i.jsx)(nl,{onForceClose:u,onRequestClose:c,post:t,onPostChange:n,onSubmitSuccess:o,shouldSkipRedirectAfterSubmit:a})})})]})},nu=r.PT.create(function(e){return(0,i.jsx)(nc,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))}),nd=n(355104),np=function(){var e=(0,nd.c)().isCircleV4;return(0,r.hS)(e?nr:o.td)},nf=function(){var e=(0,nd.c)().isCircleV4;return(0,r.hS)(e?nu:S)}},624390(e,t,n){"use strict";var r=n(398061),o=n(339551),i=n(488872),a=function(e){if(null!=e&&""!==e){if("number"==typeof e)return e;var t=Number(e);return t>0?t:void 0}},s=function(e){var t,n=a(e),s=(0,i.E)(),l=(0,r.Ir)().data,c=(0,o.E)().helpers;if(void 0!==n)return n;if(s){var u=c.findBy({slug:s});return(null==u?void 0:u.id)?u.id:null!=(t=null==l?void 0:l.id)?t:void 0}};n.d(t,{U:()=>s,h:()=>a})},306523(e,t,n){"use strict";var r=n(391426),o=n(808296),i=n(417980),a=n(387099),s=function(e){var t=e.isDisabled,n=e.isEdit,s=(0,o.v)().isSubmitting;return(0,r.jsx)(a.$,{disabled:t,type:"submit",variant:"circle",children:(0,i.t)("quick_post.scheduled_post_ui.".concat(s?"submitting_button":"submit_button",".").concat(n?"save":"publish"))})};n.d(t,{D:()=>s})},569445(e,t,n){"use strict";n.d(t,{h:()=>m});var r=n(391426),o=n(561765),i=n(639113),a=n(896406),s=n(973646),l=n(428266),c=n(933578),u=n(417980),d=n(674251),p=n(889828);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var m=function(e){var t,n=e.publishedAt,m=e.updatePublishedAt,b=e.status,y=e.revertToDraftState,h=e.variant,g=void 0===h?"default":h,v=function(e){if(Array.isArray(e))return e}(t=(0,c.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return f(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),x=v[0],j=v[1],_=function(){return j(!1)},w=(0,p.w)({dateTime:new Date(n),format:"short_date_at_short_time"});return"scheduled"!==b?null:(0,r.jsx)(i.Z,{selectorQuery:"#".concat(a.I),children:(0,r.jsx)(o.l,{value:n,datePickerVisible:x,onCancel:_,onSave:function(e){m(e),_()},placement:"bottom-end",saveButtonVariant:"circle",children:(0,r.jsxs)("div",{className:"border-primary bg-secondary -mt-px flex flex-col border-y px-5 py-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(s.In,{type:"16-clock",size:16}),(0,r.jsx)(d.o.LabelSm,{weight:"2-lines"===g?"semibold":"medium",children:"default"===g?(0,u.t)("quick_post_v2.scheduled_for",{date:w}):(0,u.t)("quick_post_v2.post_scheduled")})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,r.jsx)(l.K,{variant:"secondary",name:"16-edit",iconClassName:"!text-dark",onClick:function(){return j(!0)},ariaLabel:(0,u.t)("edit")}
1),(0,r.jsx)(l.K,{variant:"secondary",name:"16-trash-bin",iconClassName:"!text-dark",onClick:y,ariaLabel:(0,u.t)("delete")})]})]}),"2-lines"===g&&(0,r.jsx)("div",{className:"mt-1",children:(0,r.jsx)(d.o.LabelSm,{weight:"normal",children:w})})]})})})}},392582(e,t,n){"use strict";n.d(t,{w:()=>D,Z:()=>R});var r=n(391426),o=n(639113),i=n(561765),a=n(306523),s=n(569445),l=n(252478),c=n(808296),u=n(363834),d=n(931639),p=n(339551),f=n(328187),m=n(341409),b=n(451430),y=n(933578),h=n(361971),g=n(417980),v=n(632707),x=n(898666);function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var _=function(){var e,t,n=(0,h.xW)(),o=n.watch,_=n.setValue,w=n.getValues,O=o(),S=O.published_at,P=O.status,C=function(e){if(Array.isArray(e))return e}(e=(0,y.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return j(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return j(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),k=C[0],I=C[1],N=(0,c.v)().isSubmitting,A=w(),E=A.name,R=A.body,L=A.tiptap_body,D=A.space_id,T=A.topics,M=(0,d.a)(),F=M.record,K=M.helpers,B=M.isSubmitEnabled,q=!!(null==K?void 0:K.isTiptapPost),U=!!(null==F?void 0:F.id),z=(0,f.Rj)(F),W=!U||q?(0,u.l3)(L):(0,u.Pp)(R),$="quick_post.scheduled_post_ui.".concat(N?"submitting_button":"submit_button"),V=[{icon:"16-download",label:(0,g.t)("".concat($,".save_draft")),value:"draft"},{icon:"16-calendar",label:(0,g.t)("".concat($,".schedule_post")),value:"scheduled"},{icon:"16-publish",label:(0,g.t)("".concat($,".publish")),value:"published"}],H=(0,b.find)(V,{value:P||"published"}),G=function(e){"scheduled"===e.value?I(!0):(_("status",e.value),I(!1),Z(null))},Z=function(e){_("published_at",e)},Q=function(){G(V[0])},Y=o("space_id"),J=(0,p.E)();(0,l.p)(J)&&(t=J.helpers.findById(Y));var X=(0,y.useMemo)(function(){return(0,u.uV)(E)||W?D?(null==t?void 0:t.require_topic_selection)&&0>=Number(null==T?void 0:T.length)?(0,g.t)("quick_post_v2.error_messages.no_topics"):null:(0,g.t)("quick_post_v2.error_messages.no_space"):(0,g.t)("quick_post_v2.error_messages.no_title_or_body")},[E,D,W,T,t]),ee=!!X||N||!B,et=t&&(0,m.WY)(t)&&!z;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h,{publishedAt:S,revertToDraftState:Q,status:P,updatePublishedAt:Z}),(0,r.jsx)(i.l,{datePickerVisible:k,onCancel:function(e){e&&e.preventDefault(),I(!1),"scheduled"===P&&Q()},value:S,onSave:function(e){Z(e),_("status","scheduled"),I(!1)},className:"-bottom-11",saveButtonVariant:"circle",children:(0,r.jsx)(x.$,{disabled:!ee,content:X,trigger:"mouseenter click focus focusin",children:et?(0,r.jsx)(v.u,{type:"submit",disabled:ee,selectedAction:H,setSelectedAction:G,options:V,variant:"circle"}):(0,r.jsx)(a.D,{isEdit:U,isDisabled:ee})})})]})},w=n(973646),O=n(570310),S=n(605274),P=n(429273),C=n(674251);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function I(e){if(Array.isArray(e))return e}function N(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}}var E=(0,y.forwardRef)(function(e,t){var n,o,i,a=I(n=[e,t])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||A(n)||N(),s=a[0],l=a.slice(1),c=s.spaces,u=s["data-popup-open"],d=s.className,p=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}
1(s,["spaces","data-popup-open","className"]),f=(I(l)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(l)||A(l,1)||N())[0],m=(0,(0,h.xW)().watch)("space_id"),y=null!=m?(0,b.find)(c,{id:m}):void 0,v=!0===p["aria-expanded"]||"true"===p["aria-expanded"]||void 0!==u;return(0,r.jsxs)("button",(o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:f,type:"button",className:(0,O.x)("hover:bg-secondary focus-visible:bg-secondary flex w-full cursor-pointer items-center rounded-md px-5 py-4 md:px-3 md:py-2",{"bg-secondary":v},d),"data-popup-open":u},p),i=i={children:[(0,r.jsx)("div",{className:"flex min-w-0 flex-1 items-center space-x-1",children:(null==y?void 0:y.name)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"shrink-0",children:(0,r.jsxs)(C.o.LabelSm,{weight:"medium",color:"text-default",children:[(0,g.t)("quick_post_v2.posting_in")," "]})}),(0,r.jsx)(C.o.LabelSm,{weight:"medium",color:"text-dark",truncate:!0,children:y.name})]}):(0,r.jsx)(C.o.LabelSm,{weight:"medium",color:"text-default",children:(0,g.t)("quick_post_v2.choose_a_space")})}),(0,r.jsx)(w.In,{className:"!text-dark",type:"16-chevron-down",size:16})]},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(i)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))}),o))});E.displayName="QuickPostSpaceTrigger";var R=function(e){var t;return!!(null==e||null==(t=e.helpers)?void 0:t.basicSpacesWithPostCreationAllowed)},L=function(e){var t=e.toggleDropdown,n=e.selectedSpace,o=e.isOpen;return(0,r.jsxs)("button",{type:"button",className:(0,O.x)("hover:bg-secondary focus-visible:bg-secondary flex w-full cursor-pointer items-center rounded-md px-5 py-4 md:px-3 md:py-2",{"bg-secondary":o}),onClick:t,children:[(0,r.jsx)("div",{className:"flex min-w-0 flex-1 items-center space-x-1",children:(null==n?void 0:n.name)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"shrink-0",children:(0,r.jsxs)(C.o.LabelSm,{weight:"medium",color:"text-default",children:[(0,g.t)("quick_post_v2.posting_in")," "]})}),(0,r.jsx)(C.o.LabelSm,{weight:"medium",color:"text-dark",truncate:!0,children:n.name})]}):(0,r.jsx)(C.o.LabelSm,{weight:"medium",color:"text-default",children:(0,g.t)("quick_post_v2.choose_a_space")})}),(0,r.jsx)(w.In,{className:"!text-dark",type:"16-chevron-down",size:16})]})},D=function(){var e=(0,S.V0)(),t=(0,p.E)(),n=R(t)?t.helpers.basicSpacesWithPostCreationAllowed():[];return(0,r.jsxs)("footer",{className:"border-primary flex items-center justify-between border-t px-5 py-4","data-testid":"quick-post-footer",children:[(0,r.jsx)("nav",{"aria-label":(0,g.t)("quick_post_v2.footer_menu_aria_label"),id:"quick-post-v2-footer-toolbar"}),(0,r.jsxs)("div",{className:"flex min-w-0 items-center space-x-2",children:[(0,r.jsx)("div",{className:"min-w-0 flex-1",children:(0,r.jsx)(o.Z,{selectorQuery:"#space-select-for-mobile",disablePortal:e,children:(0,r.jsx)(P.r,{dropdownClassName:e?"bottom-14":"bottom-32 right-1",spaces:n,containerClassname:(0,O.x)("!max-w-full",{"border-t border-primary":!e}),name:"space_id",trigger:(0,r.jsx)(E,{spaces:n}),customButton:L})})}),(0,r.jsx)(_,{})]})]})}},15809(e,t,n){"use strict";n.d(t,{N:()=>Q});var r=n(391426),o=n(428266),i=n(570310),a=n(824836),s=n(79501),l=n(677164),c=n(574795),u=n(417980),d=n(898666),p=n(928327),f=n(456487),m=n(366636),b=n(560462),y=n(568316),h=n(973646),g=function(e){var t=e.searchQuery,n=e.isCreatingTopic,o=e.onCreateTopic;return(0,r.jsxs)(f.c,{option:"create",onClick:function(e){e.preventDefault(),e.stopPropagation(),n||o(t)},className:"flex items-center",children:[(0,r.jsx)(h.In,{className:"mr-1",size:16,type:n?"loader":"plus-v2"}),(0,u.t)(n?"quick_post_v2.topics.creating":"quick_post_v2.topics.create"),(0,r.jsx)("span",{className:"text-dark ml-1 font-semibold",children:(0,u.t)("quick_post_v2.topics.topic_quoted",{topic:t})})]},"create")},v=function(){return(0,r.jsx)("div",{className:"px-5 py-1.5",children:(0,r.jsx)(y.o.LabelSm,{color:"text-light",children:(0,u.t)("quick_post_v2.topics.loading")})})},x=n(451430),j=function(e){var t,n,o=e.searchQuery,a=e.topics,s=e.isLoading,l=e.isCreatingTopic,c=e.onCreateTopic,d=e.shouldShowCreateTopic,p=e.shouldShowDropdown,h=e.style,j=e.attributes,_=e.popperRef;return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:(0,i.x)("z-10 max-w-[min(90vw,288px)]",{invisible:!p}),ref:_,style:h},j),n=n={children:(0,r.jsx)(m.J,{className:"!relative",dataTestId:"topics-dropdown-list",children:(0,r.jsxs)(b.Z,{children:[s&&(0,r.jsx)(v,{}),a.map(function(e){return(0,r.jsx)(f.c,{option:e,children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(y.o.LabelSm,{children:(0,x.truncate)(e.name,{length:25}
1)}),e.admin_only&&(0,r.jsx)(y.o.LabelXs,{color:"text-light",children:(0,u.t)("quick_post_v2.topics.admin_only")})]})},e.id)}),d&&(0,r.jsx)(g,{isCreatingTopic:l,onCreateTopic:c,searchQuery:o})]})})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},_=n(933578);function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var O=function(e){var t,n=e.topics,r=e.onReorderTopics,o=function(e){if(Array.isArray(e))return e}(t=(0,_.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return w(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return w(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],l=o[1],c=(0,_.useCallback)(function(e){l(e.active.id)},[]),u=(0,_.useCallback)(function(e){var t=e.active,o=e.over;o&&t.id!==o.id&&r((0,s.be)(n,n.findIndex(function(e){return e.id===t.id}),n.findIndex(function(e){return e.id===o.id}))),l(null)},[n,r]),d=(0,a.FR)((0,a.MS)(a.AN,{activationConstraint:{distance:10}}),(0,a.MS)(a.uN,{coordinateGetter:s.JR}));return{draggedTopic:n.find(function(e){return e.id===i}),handleDragStart:c,handleDragEnd:u,sensors:d}},S=n(982349),P=n(872518),C=n(982607),k=n(720702);function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function N(e){return function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return I(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return I(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var A=function(e){var t=e.spaceId,n=e.searchQuery,r=e.selectedTopics,o=e.hasMaxTopicsSelected,i=e.canSelectTopic,a=e.canCreateTopics,s=e.searchInputRef,l=(0,_.useRef)(null),c=(0,_.useRef)(null),u=(0,P.o)(n,200),d=(0,k.g)({spaceId:t,query:u,queryOptions:{keepPreviousData:!0}}),p=d.data,f=d.isLoading,m=(0,_.useMemo)(function(){var e,t=null!=(e=null==p?void 0:p.records)?e:[],n=r.map(function(e){return e.id});return t.filter(function(e){return i(e)&&!n.includes(e.id)})},[p,r,i]),b=(0,C.E)(s.current,l.current,{placement:"top-start",strategy:"absolute",modifiers:[S.w,{name:"offset",options:{offset:[0,2]}}]}),y=b.styles,h=b.attributes,g=b.forceUpdate;(0,_.useEffect)(function(){null==g||g()},[g,r]);var v=(0,_.useMemo)(function(){return!!a&&!o&&0!==n.length&&!N(r.map(function(e){return e.name.toLowerCase()})).concat(N(m.map(function(e){return e.name.toLowerCase()}))).includes(n.toLowerCase())},[a,o,n,r,m]),x=!o&&(f||v||m.length>0);return{isLoading:f,dropdownTopics:m,shouldShowCreateTopic:v,shouldShowDropdown:x,styles:y,attributes:h,popperRef:l,buttonRef:c}};function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var R=function(e){return((function(e){if(Array.isArray(e))return E(e)})(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return E(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return E(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(function(e,t){return e.admin_only&&!t.admin_only?-1:!e.admin_only&&t.admin_only?1:0})},L=n(262669);function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||F(e,t)||function(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||F(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}}var K=function(e){var t=e.spaceId,n=e.value,r=e.onChange,o=e.onTopicCreated,i=e.maxTopicsAllowed,a=void 0===i?p.P:i,s=e.sortable,l=void 0!==s&&s,c=e.canRemoveTopic,u=T((0,_.useState)(n),2),d=u[0],f=u[1],m=T((0,_.useState)([]),2),b=m[0],y=m[1],h=T((0,_.useState)(!1),2),g=h[0],v=h[1],x=(0,_.useRef)(t),j=x.current!==t;(0,_.useEffect)(function(){x.current!==t&&(x.current=t,y([]),f(n),null==r||r([]),v(!1))},[r,t,n]);var w=(0,k.g)({spaceId:t,ids:d}).data,O=(0,k.g)({spaceId:t}).data,S=(0,L.V)({spaceId:t,onSuccess:function(e){y(function(t){return M(t).concat([e])}),null==o||o(e)}}),P=S.mutate,C=S.isPending,I=(0,_.useMemo)(function(){return b.map(function(e){return e.id})},[b]),N=(0,_.useCallback)(function(e){y(l?e:R(e))},[l]);(0,_.useEffect)(function(){!g&&(null==w?void 0:w.records)&&(N(d.length>0?M(w.records).sort(function(e,t){return d.indexOf(e.id)-d.indexOf(t.id)}):[]),v(!0))},[g,d,w,N]),(0,_.useEffect)(function(){g&&!j&&(null==r||r(I))},[j,g,r,I]);var A=(0,_.useCallback)(function(e){y(function(t){return t.filter(function(t){return t.id!==e.id})})},[]),E=(0,_.useCallback)(function(){y(function(e){return e.filter(function(e){return!c(e)})})},[c]),D=(0,_.useCallback)(function(){var e=b[b.length-1];e&&c(e)&&A(e)},[b,c,A]),F=!!O&&O.count>0,K=b.length>0,B=b.length>=a;return{selectedTopics:b,selectedTopicIds:I,updateSelectedTopics:N,hasTopicsForPicker:F,hasTopicsSelected:K,hasMaxTopicsSelected:B,createTopic:P,isCreatingTopic:C,removeTopic:A,removeAllTopics:E,removeLastTopic:D}},B=n(577240);function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var U=function(){var e,t=(0,_.useRef)(null),n=function(e){if(Array.isArray(e))return e}(e=(0,_.useState)(""))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return q(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return q(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=(0,_.useCallback)(function(){t.current&&(t.current.value=""),o("")},[]);return{searchQuery:r,setSearchQuery:o,resetSearchInput:i,searchInputRef:t}},z=function(e){var t=e.value,n=e.onChange,o=e.activeOption,i=e.maxTopicsAllowed,a=e.isCreatingTopic,s=e.onCreateTopic,c=e.onRemoveLastTopic,d=e.onRemoveAllTopics,p=e.searchInputRef,f=e.buttonRef,m=e.placeholder,b=e.hasTopicsSelected,y=e.isDropdownOpen,h=b?"":m||(0,u.t)("quick_post_v2.topics.search",{count:i}),g=(0,_.useCallback)(function(){var e;y||null==(e=f.current)||e.click()},[y]);return(0,r.jsx)(l.oK,{className:"min-w-[200px] flex-1 border-none bg-transparent p-0 px-1 py-[5px] text-sm focus:ring-0",ref:p,value:t,placeholder:h,onChange:function(e){return n(e.target.value)},onFocus:g,onClick:g,onKeyDown:function(e){var n=e.key,r=e.ctrlKey,i=e.metaKey;(r||i)&&"Backspace"===n?d():"Backspace"===n&&0===t.length?c():"Enter"===n&&"create"===o&&!a&&t.trim().length>0&&(e.preventDefault(),s(t))}})},W=function(e){var t=e.topic,n=e.isDraggable,o=e.isDragging,a=e.isRemovable,s=void 0!==a&&a,l=e.onRemove;return(0,r.jsx)(d.$,{placement:"top",content:(0,u.t)("quick_post_v2.topics.admin_only"),interactive:!1,disabled:s,trigger:"mouseenter click focus focusin",children:(0,r.jsxs)("div",{className:(0,i.x)("border-primary bg-primary text-dark inline-flex items-center justify-start gap-1.5 whitespace-nowrap rounded-[32px] border py-1.5 pr-2",void 0!==o&&o?"rotate-1 scale-[1.01] opacity-75 shadow-lg":void 0!==n&&n?"cursor-move":"cursor-default",s?"pl-3.5":"pointer-events-none pl-2"),children:[(0,r.jsx)(y.o.LabelXs,{weight:"medium",children:t.name}),s&&(0,r.jsx)(h.In,{className:"cursor-pointer",onClick:l,type:"12-close",size:12})]})})},$=n(373761);function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var H=function(e){var t,n,o=e.topic,i=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["topic"]),a=(0,s.gl)({id:o.id}),l=a.attributes,c=a.listeners,u=a.setNodeRef,d=a.transform,p=a.transition,f=
1a.isDragging,m={transform:$.Ks.Translate.toString(d),transition:p,opacity:f?.33:1};return(0,r.jsx)("div",(t=V({ref:u,style:m},l,c),n=n={children:(0,r.jsx)(W,V({topic:o},i))},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},G=function(e){var t=e.value,n=e.onChange,f=e.spaceId,m=e.maxTopicsAllowed,b=void 0===m?p.P:m,y=e.sortable,h=void 0!==y&&y,g=e.creatable,v=e.deletable,x=e.containerClassName,_=e.placeholder,w=(0,B.Y)({creatable:void 0!==g&&g,deletable:void 0===v||v}),S=w.canSelectTopic,P=w.canRemoveTopic,C=w.canCreateTopics,k=w.canRemoveAllTopics,I=U(),N=I.searchQuery,E=I.setSearchQuery,R=I.resetSearchInput,L=I.searchInputRef,D=K({spaceId:f,value:void 0===t?[]:t,onChange:n,onTopicCreated:R,maxTopicsAllowed:b,sortable:h,canRemoveTopic:P}),T=D.selectedTopics,M=D.selectedTopicIds,F=D.updateSelectedTopics,q=D.hasTopicsForPicker,$=D.hasTopicsSelected,V=D.hasMaxTopicsSelected,G=D.removeTopic,Z=D.removeLastTopic,Q=D.removeAllTopics,Y=D.isCreatingTopic,J=D.createTopic,X=A({spaceId:f,searchQuery:N,selectedTopics:T,hasMaxTopicsSelected:V,canSelectTopic:S,canCreateTopics:C,searchInputRef:L}),ee=X.isLoading,et=X.dropdownTopics,en=X.shouldShowCreateTopic,er=X.shouldShowDropdown,eo=X.styles,ei=X.attributes,ea=X.popperRef,es=X.buttonRef,el=O({topics:T,onReorderTopics:F}),ec=el.draggedTopic,eu=el.handleDragStart,ed=el.handleDragEnd,ep=el.sensors;return q||C?(0,r.jsx)(l.G3,{value:T,onChange:function(e){F(e),R()},multiple:!0,children:function(e){var t=e.activeOption,n=e.open;return(0,r.jsxs)("div",{className:(0,i.x)("text-dark flex items-start justify-between p-2",x),children:[(0,r.jsxs)("div",{id:"quickpost-topics-picker-sortable",className:"w-full","data-testid":"topics-list",children:[(0,r.jsx)(l.i7,{className:"hidden",ref:es}),(0,r.jsxs)(a.Mp,{sensors:ep,collisionDetection:a.y$,onDragStart:eu,onDragEnd:ed,children:[(0,r.jsx)(s.gB,{items:M,strategy:s.kL,disabled:!h,children:(0,r.jsxs)("div",{className:"flex w-full flex-row flex-wrap items-center gap-2",children:[T.map(function(e){return(0,r.jsx)(H,{topic:e,isDraggable:h,isRemovable:P(e),onRemove:function(){return G(e)}},e.id)}),!V&&(0,r.jsx)(z,{value:N,onChange:E,activeOption:t,maxTopicsAllowed:b,isCreatingTopic:Y,onCreateTopic:J,onRemoveLastTopic:Z,onRemoveAllTopics:Q,searchInputRef:L,buttonRef:es,placeholder:_,hasTopicsSelected:$,isDropdownOpen:n})]})}),(0,c.createPortal)((0,r.jsx)(a.Hd,{zIndex:99999,children:ec&&(0,r.jsx)(W,{topic:ec,isDragging:!0,isRemovable:P(ec),onRemove:function(){return G(ec)}})}),document.body)]}),(0,r.jsx)(j,{searchQuery:N,topics:et,isLoading:ee,isCreatingTopic:Y,onCreateTopic:J,shouldShowCreateTopic:en,shouldShowDropdown:er,style:eo.popper,attributes:ei.popper,popperRef:ea})]}),$&&k&&(0,r.jsx)(d.$,{content:(0,u.t)("quick_post_v2.topics.remove_all"),placement:"top-end",children:(0,r.jsx)(o.K,{className:"size-7",iconClassName:"!text-dark",onClick:Q,name:"16-trash-bin-2",ariaLabel:(0,u.t)("quick_post_v2.topics.remove_all")})})]})}}):null},Z=n(361971),Q=function(e){var t=e.name,n=e.rules,o=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["name","rules"]),i=(0,Z.xW)().control;return(0,r.jsx)(Z.xI,{control:i,name:t,rules:n,render:function(e){var t=e.field;return(0,r.jsx)(G,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({value:t.value,onChange:t.onChange},o))}})}},928327(e,t,n){"use strict";n.d(t,{P:()=>5,R:()=>20})},262669(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(258752),a=n(717526);function s(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var l=function(e){var t=e.onSuccess,n=e.spaceId,l=(0,a.d)();return(0,i.n_)({mutationFn:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){return[2,(0,r.oK)(o.iK.settings.topics.create(),{topic:{name:e,space_ids:[n]}})]})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){s(i,r,o,a,l,"next",e)}function l(e){s(i,r,o,a,l,"throw",e)}a(void 0)})})()},onSuccess:t,onError:function(e){"Name has already been taken"===e.errorDetails&&l.error("A topic with this name already exists. Add it to your space instead from the customize space screen.")}})};n.d(t,{V:()=>l})},720702(e,t,n){"use strict";var r=n(699241),o=n(258752),i=function(e){var t=e.spaceId,n=e.ids,i=e.query,a=e.queryOptions,s=r.AB.pickerList({spaceId:t,ids:n,query:i});return(0,o.IT)(s.queryKey,s.queryFn,a)};n.d(t,{g:()=>i})}
1,577240(e,t,n){"use strict";var r=n(230763),o=n(6418),i=n(933578),a=function(e){var t=e.creatable,n=e.deletable,a=void 0===n||n,s=(0,r.Od)().currentCommunityMember,l=(0,o.V8)(s)||(0,o.JY)(s);return{canSelectTopic:(0,i.useCallback)(function(e){return l||!e.admin_only},[l]),canRemoveTopic:(0,i.useCallback)(function(e){return a&&(l||!e.admin_only)},[l,a]),canCreateTopics:void 0!==t&&t,canRemoveAllTopics:a}};n.d(t,{Y:()=>a})},896406(e,t,n){"use strict";n.d(t,{U:()=>V,I:()=>$});var r=n(391426),o=n(244174),i=n(808296),a=n(931639),s=n(942852),l=n(168293),c=n(933578),u=n(361971),d=n(684716),p=n(340772),f=n(639113),m=n(914104),b=n(859615),y=n(568316),h=n(184956),g=n(798472),v=n(204107),x=n(428266),j=n(339551),_=n(341409),w=n(605274),O=n(417980),S=n(898666),P=n(570310),C=n(661116),k="quick-post-v2-thumbnail-button",I=function(){var e=(0,i.v)(),t=e.isFullscreen,n=e.toggleFullscreen,o=e.isDirty,s=(0,v.f)({shouldPrevent:o}),l=(0,g.Z)(),c=(0,a.a)().record,d=(0,j.E)(),p=(0,u.xW)().watch,f=!!(null==c?void 0:c.id),m=p("space_id"),b=d.helpers.findById(m),I=(0,w.qI)(),N=(0,C.W)().isElectron;return(0,r.jsxs)("header",{className:(0,P.x)("border-primary flex items-center justify-between border-b px-5 py-4",{"mt-6":N&&t}),"data-testid":"quick-post-header",children:[(0,r.jsx)(y.o.TitleSm,{weight:"semibold",children:(0,O.t)(f?"quick_post_v2.edit_title":"quick_post_v2.create_title")}),(0,r.jsxs)("ul",{className:"text-darkest flex list-none items-center space-x-2",children:[(0,r.jsx)("li",{id:k}),b&&(0,_.wp)(b)&&(0,r.jsx)("li",{children:(0,r.jsx)(S.$,{placement:"bottom",content:(0,O.t)("quick_post_v2.header.settings"),children:(0,r.jsx)(x.K,{variant:"secondary",iconSize:20,iconClassName:"!text-dark",name:"20-settings",onClick:function(){l({to:h.o.SETTINGS})},ariaLabel:(0,O.t)("quick_post_v2.header.settings")})})}),!I&&(0,r.jsx)("li",{children:(0,r.jsx)(S.$,{placement:"bottom",content:(0,O.t)("quick_post_v2.header.fullscreen"),children:(0,r.jsx)(x.K,{variant:"secondary",iconSize:20,className:"hidden sm:flex",onClick:n,iconClassName:"!text-dark",name:t?"20-fullscreen-exit":"20-fullscreen",ariaLabel:(0,O.t)("quick_post_v2.header.fullscreen")})})}),(0,r.jsx)("li",{children:(0,r.jsx)(S.$,{placement:"bottom",content:(0,O.t)("quick_post_v2.header.close"),children:(0,r.jsx)(x.K,{variant:"secondary",iconSize:20,onClick:s,iconClassName:"!text-dark",name:"20-close",ariaLabel:(0,O.t)("quick_post_v2.header.close")})})})]})]})},N=n(15809),A=n(252478),E=n(422546),R=n(531404),L=n(328187),D=n(383711),T=n(504531),M=n(208125),F=n(885765),K=n(288513),B=n(231127);function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function U(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return q(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return q(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var z=function(){var e,t=(0,T.b)(),n=(0,D.D)(),i=(0,B.T)("circle_v4_form_elements_enabled"),s=(0,u.xW)(),l=s.watch,c=s.setValue,d=s.control,y=l("tiptap_body.sgids_to_object_map")||{},h=l("name"),g="tiptap_body.inline_attachments",v=l(g)||[],w=(0,a.a)(),C=w.record,I=w.helpers,q=!!(null==I?void 0:I.isTiptapPost),z=(0,M.v)(),W=C||{},$=W.id,V=W.tiptap_body,H=l("space_id"),G=l("cover_image"),Z=(0,j.E)();(0,A.p)(Z)&&(e=Z.helpers.findById(H));var Q=e&&(0,_.wp)(e);return(0,r.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4","data-ai-scrollable":!0,children:(0,r.jsxs)("div",{className:(0,P.x)((0,K.W2)("trix-v2"),"mx-auto grid h-full max-w-3xl grid-rows-[auto,auto,1fr]"),children:[(0,r.jsx)("div",{children:(0,L.HF)(e)&&(0,r.jsx)(p.t,{name:"cover_image",className:(0,P.x)("relative",{"mb-2":!!G}),showAddCoverBtn:!0,aspectRatio:o.nT.DEFAULT,changeImageText:(0,O.t)("replace"),customAddCoverBtn:(0,r.jsx)(f.Z,{selectorQuery:"#".concat(k),children:(0,r.jsx)(S.$,{placement:"bottom",content:(0,O.t)("quick_post_v2.header.add_cover"),children:(0,r.jsx)(x.K,{variant:"secondary",iconSize:20,iconClassName:"!text-dark",name:"20-cover-image",ariaLabel:(0,O.t)("quick_post_v2.header.add_cover")})})})})}),(0,r.jsx)("div",{children:(0,L.O7)(e)&&(i?(0,r.jsx)(u.xI,{control:d,name:"name",render:function(e){var t=e.field,n=t.onChange,o=t.onBlur,i=t.value,a=t.name,s=t.ref;
1return(0,r.jsx)(F.Q6,{name:a,ref:s,value:null!=i?i:"",onChange:function(e){return n(e.target.value)},onBlur:o,maxLength:255,draggable:!1,variant:"heading-xl",lineBreak:!1,autoFocus:!0,placeholder:(0,O.t)("quick_post_v2.title_placeholder"),className:"mb-2",tabIndex:0,"data-testid":"post_name"})}}):(0,r.jsx)(E.b,{maxLength:255,draggable:!1,name:"name",autoFocus:!0,ref:z,placeholder:(0,O.t)("quick_post_v2.title_placeholder"),className:"bg-primary text-dark mb-2 block w-full resize-none border-none p-0 text-xl font-bold focus:ring-0",rows:1,onKeyPress:function(e){"Enter"===e.key&&e.preventDefault()},tabIndex:0,"data-testid":"post_name"}))}),(0,r.jsx)("div",{children:!$||q?(0,r.jsx)(R.P,{placeholder:(0,O.t)("quick_post_v2.body_placeholder"),name:"tiptap_body.body",toolbars:[{portalId:"quick-post-v2-footer-toolbar",component:b.M}],className:"h-full",editorClassName:(0,P.x)("h-full",(0,K.W2)("quick-post-modal--v2")),spaceId:H,sgidToObjectMap:null==V?void 0:V.sgids_to_object_map,inlineAttachments:null==V?void 0:V.inline_attachments,onLocalSgidToObjectMapChange:function(e){c("tiptap_body.sgids_to_object_map",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},y,e))},onLocalAttachmentsChange:function(e){return c(g,U(v).concat(U(e)))},aiCopilotTitle:h,isVideoClipAllowed:!0,isVoiceMessageAllowed:n,isMediaUploadAllowed:t}):(0,r.jsx)(m.k,{id:"post_body",name:"body",is_private_space:!1,space_id:H,placeholder:(0,O.t)("quick_post_v2.body_placeholder"),tabIndex:0,toolbarPortalId:"quick-post-v2-footer-toolbar"})}),!!H&&(0,r.jsx)(f.Z,{selectorQuery:"#topics-picker-portal",children:(0,r.jsx)(N.N,{containerClassName:"border-t border-primary",name:"topics",spaceId:H,creatable:null!=Q&&Q})})]})})},W=n(392582),$="scheduled-post-date-render-portal",V=function(){var e=(0,i.v)().setIsDirty,t=(0,u.xW)(),n=t.formState,p=n.isDirty,f=n.isSubmitSuccessful,m=(0,a.a)().record,b=!!(null==m?void 0:m.id);return(0,c.useEffect)(function(){e(p)},[e,p]),(0,l.Bp)({cacheKey:o.PA,fields:["name","body","tiptap_body","space_id","cover_image"],enabled:!b&&!f}),(0,d.vC)("meta+enter, ctrl+enter",function(){(0,s.N)(t)&&t.triggerFormSubmit()},{enableOnContentEditable:!0,enableOnFormTags:["INPUT","TEXTAREA"]},[t]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(I,{}),(0,r.jsx)("div",{id:$}),(0,r.jsx)(z,{}),(0,r.jsx)("div",{id:"space-select-for-mobile"}),(0,r.jsx)("div",{id:"topics-picker-portal"}),(0,r.jsx)(W.w,{})]})}}
1,805426(e,t,n){"use strict";n.d(t,{u:()=>$});var r=n(391426),o=n(737225),i=n(927561),a=n(475323),s=n(244174),l=n(974618),c=n(808296),u=n(363834),d=n(931639),p=n(230763),f=n(328187),m=n(570310),b=n(168293),y=n(519104),h=n(451430),g=n(933578),v=n(258752),x=n(417980),j=n(717526),_=n(6418),w=n(641741),O=n(303758),S=n(969990),P=n(30864),C=n(891755),k=n(730809),I=n(184956),N=n(896406),A=n(252478),E=n(568316),R=n(798472),L=n(428266),D=n(387099),T=function(){var e=(0,R.Z)(),t=function(){e({to:I.o.CONTENT})};return(0,r.jsxs)("div",{className:"border-primary bg-primary sticky top-0 z-10 flex items-center justify-between border-b px-5 py-3.5 sm:rounded-t-xl",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(L.K,{name:"20-arrow-left",iconSize:20,className:"!p-0",iconClassName:"!h-5 !w-5",onClick:t,ariaLabel:(0,x.t)("previous")}),(0,r.jsx)(E.o.TitleSm,{weight:"semibold",children:(0,x.t)("quick_post_v2.settings")})]}),(0,r.jsx)(D.$,{type:"button",onClick:t,variant:"circle",children:(0,x.t)("quick_post_v2.done")})]})},M=(0,S.gI)({component:P.s}),F=(0,S.un)({getParentRoute:function(){return M},path:I.o.CONTENT,component:N.U}),K=(0,S.un)({getParentRoute:function(){return M},path:I.o.SETTINGS,component:function(){return(0,r.jsxs)("div",{className:"h-full overflow-auto",children:[(0,r.jsx)(T,{}),(0,r.jsx)(A.y,{})]})}}),B=M.addChildren([F,K]),q=function(){return(0,C.a)({routeTree:B,history:(0,k.sC)({initialEntries:[I.o.CONTENT]})})};function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var z=function(){var e,t=(function(e){if(Array.isArray(e))return e}(e=(0,g.useState)(q))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return U(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return U(e,1)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return(0,r.jsx)(O.p,{router:t})};function W(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var $=function(e){var t=e.shouldSkipRedirectAfterSubmit,n=e.onSubmitSuccess,O=(0,l.hS)(),S=(0,c.v)(),P=S.isFullscreen,C=S.setIsSubmitting,k=(0,j.d)(),I=k.success,N=k.error,A=(0,y.Z)(),E=(0,p.Od)().currentCommunityMember,R=(0,d.a)(),L=R.onPostChange,D=R.helpers,T=R.refetchPostDetails,M=null==D?void 0:D.postForTrixEditor,F=!!(null==D?void 0:D.isTiptapPost),K=M&&M(),B=!!K.id,q=(0,_.V8)(E),U=(0,b.bE)({cacheKey:s.PA}).resetValues,$=(0,v.n_)({mutationFn:function(e){return a.d.createOrUpdate({post:{id:K.id,slug:K.slug,space_id:K.space_id||e.space_id},formData:e})},onSuccess:function(e){var r;return(r=function(){var r,o,i;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(a){switch(a.label){case 0:return[4,e.json()];case 1:return r=a.sent(),(0,h.isFunction)(L)&&L(r),null==T||T(),(0,h.isFunction)(n)&&n(),B||U(),o=function(){if(B)return void I((0,x.t)("quick_post.toasts.changes_saved"));var e="published"===r.status;q&&e?l.PT.show(w.i,{post:r}):I((0,x.t)("quick_post.toasts.".concat(r.status,"_saved")))},O.remove(),o(),i=(0,f.Lo)({post:r}),t||A({href:i}),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){W(i,n,o,a,s,"next",e)}function s(e){W(i,n,o,a,s,"throw",e)}a(void 0)})})()},onError:function(){return N((0,x.t)("quick_post.toasts.failed_to_create"))}});return(0,g.useEffect)(function(){C($.isPending)},[$.isPending,C]),(0,r.jsx)(i.l,{id:"quick-post-form",defaultValues:K,mode:"all",className:"h-full",formClassName:"h-full flex flex-col",onSubmit:function(e){return $.mutate(e)},validationSchema:!B||F?u.RB:u.US,children:(0,r.jsx)(o.aF.Content,{size:P?"screen":"auto",className:(0,m.x)("overflow-visible",{"max-h-none":P,"h-full max-h-full max-w-[720px] !rounded-t-none sm:h-full sm:!rounded-t-md md:max-h-[80vh] lg:max-h-[550px]":!P}),animations:"fadeIn",children:(0,r.jsx)(z,{})})})}},641741(e,t,n){"use strict";n.d(t,{i:()=>h});var r=n(391426),o=n(186065),i=n(278636),a=n(417980),s=n(355104),l=n(974618),c=n(973646),u=n(56696),d=n(120557),p=n(619774),f=n(134138),m=n(814679),b=function(e){var t=e.isOpen,n=e.isLoading,o=e.spaceName,i=e.onClose,s=e.onShareViaBroadcast;return(0,r.jsx)(p.S,{isOpen:t,onClose:i,title:(0,a.t)("quick_post_v2.connection_modal.title"),description:(0,a.t)("quick_post_v2.connection_modal.description",{space_name:o}),isLoading:n,children:(0,r.jsx)(m.G,{children:(0,r.jsx)(f.r,{startIcon:"page-edit",onClick:s,disabled:n,"data-testid":"send-announcement-button",children:(0,a.t)("momentum_modal.share_broadcast.review_draft")})})})},y=n(414121),h=l.PT.create(function(e){var t,n=e.post,l=(0,i.hS)(),p=(0,s.c)().isCircleV4,f=(0,y.j)(),m=f.onShareViaBroadcast,h=f.isLoading,g=function(){m({postId:n.id,onSuccess:function(){l.hide()}})};return p?(0,r.jsx)(b,{isOpen:l.visible,isLoading:h,spaceName:null!=(t=n.space_name)?t:"",onClose:l.hide,onShareViaBroadcast:g}):(0,r.jsx)(o.m,{isOpen:l.visible,onClose:l.hide,title:(0,a.t)("quick_post_v2.connection_modal.title"),description:(0,a.t)("quick_post_v2.connection_modal.description",{space_name:n.space_name}),isLoading:h,"data-testid":"post-momentum-modal",children:(0,r.jsx)(d.G,{children:(0,r.jsx)(u.r,{iconEl:(0,r.jsx)(c.In,{type:"20-page-edit-text",size:20}),onClick:g,disabled:h,"data-testid":"send-announcement-button",children:(0,a.t)("momentum_modal.share_broadcast.review_draft")})})})})},252478(e,t,n){"use strict";n.d(t,{y:()=>A,p:()=>N});var r=n(391426),o=n(715097),i=n(927561),a=n(748467),s=n(339950),l=n(257957),c=n(361287),u=n(603192),d=n(230763),p=n(339551),f=n(6418),m=n(328187),b=n(341409),y=n(570310),h=n(961756),g=n(417980),v=n(429273),x=n(288513),j=function(e){var t;return"function"==typeof(null==e||null==(t=e.helpers)?void 0:t.basicSpacesWithPostCreationAllowed)},_=function(e){var t;return"object"==((t=null==e?void 0:e.current_user_roles)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)},w=function(e){var t,n=e.space,w=(0,c.W)().post,O=!!_(n)&&!!(0,b.WY)(n),S=(0,p.E)();j(S)&&(t=S.helpers.basicSpacesWithPostCreationAllowed());var P=(0,d.Od)().currentCommunityMember,C=new Date().toUTCString(),k=(0,h.m)({enabled:(0,f.V8)(P)}),I=k.data,N=void 0===I?{}:I,A=k.isInitialLoading,E=(null==N?void 0:N.internal_custom_html_enabled)!==void 0&&N.internal_custom_html_enabled,R=!!w.id&&(0,m.Rj)(w);return A?(0,r.jsx)(l.a,{}):(0,r.jsxs)(r.Fragment,{children:[R&&(0,r.jsxs)("div",{className:(0,y.x)((0,x.W2)("form-group form-group--column"),"!mt-0"),children:[(0,r.jsx)(u.d,{field:"created_at",label:(0,g.t)("publish_date"),description:(0,g.t)("publish_date_description")}),(0,r.jsx)(o.J,{name:"created_at",maxDate:C})]}),(0,m.a1)(n)&&(0,r.jsxs)("div",{className:(0,y.x)((0,x.W2)("form-group"),(0,x._h)("form-group--two-columns")),children:[(0,r.jsx)(u.d,{field:"cardview_thumbnail",label:(0,g.t)("cardview_thumbnail")}
1),(0,r.jsx)(s.M,{name:"cardview_thumbnail",aspectRatio:2,title:(0,g.t)("upload_a_cardview_thumbnail")})]}),(0,f.V8)(P)&&E&&(0,r.jsx)(i.l.Item,{hideBorder:!0,name:"internal_custom_html",fullWidth:!0,translationRoot:"post",hidePlaceholder:!0,variant:"extra-bottom-margin",children:(0,r.jsx)(i.l.TextArea,{name:"internal_custom_html"})}),(0,r.jsx)(i.l.Item,{variant:"extra-bottom-margin",hideBorder:!0,name:"space_id",translationRoot:"post",fullWidth:!0,children:(0,r.jsx)(v.r,{name:"space_id",variant:"form-input",spaces:t})}),(0,r.jsx)(i.l.Item,{variant:"extra-bottom-margin",hideBorder:!0,name:"slug",fullWidth:!0,translationRoot:"post",hidePlaceholder:!0,children:(0,r.jsx)(i.l.Input,{name:"slug"})}),O&&(0,r.jsx)(i.l.Item,{variant:"extra-bottom-margin",hideBorder:!0,name:"user_id",translationRoot:"post",fullWidth:!0,children:(0,r.jsx)(a.Y,{name:"user_id",direction:"up",valueField:"user_id"})})]})},O=n(244174),S=["meta_title","meta_description","opengraph_title","opengraph_description"],P=function(){return(0,r.jsx)("div",{className:(0,x.W2)("form-section"),children:(0,r.jsxs)("div",{className:(0,x.W2)("form-section__content"),children:[S.map(function(e){return(0,r.jsx)(i.l.Item,{label:(0,g.t)("meta_tag_attributes.".concat(e)),description:(0,g.t)("meta_tag_attributes.".concat(e,"_description"),{obj:"post"}),name:"meta_tag_attributes.".concat(e),hideBorder:!0,variant:"extra-bottom-margin",children:(0,r.jsx)(i.l.Input,{id:e,name:"meta_tag_attributes.".concat(e)},e)},e)}),(0,r.jsx)(i.l.Item,{name:"meta_tag_attributes.opengraph_image",label:(0,g.t)("meta_tag_attributes.opengraph_image"),hideBorder:!0,hideDescription:!0,variant:"extra-bottom-margin",children:(0,r.jsx)(s.M,{name:"meta_tag_attributes.opengraph_image",aspectRatio:O.nT.OPEN_GRAPH})})]})})},C=function(e){var t=e.name;return(0,r.jsx)(i.l.Item,{id:"post_".concat(t),name:t,label:(0,g.t)("post.".concat(t)),hideBorder:!0,hideDescription:!0,inlineReverse:!0,children:(0,r.jsx)(i.l.ToggleSwitch,{name:t,variant:"small"})})},k=n(361971),I=function(e){var t=e.space,n=(0,c.W)().post,o=(0,(0,k.xW)().watch)("is_comments_disabled"),i=!!n.id&&(0,m.Rj)(n);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C,{name:"hide_meta_info"}),(0,r.jsx)(C,{name:"is_comments_disabled"}),!o&&(0,r.jsx)(C,{name:"is_comments_closed"}),(0,r.jsx)(C,{name:"is_liking_disabled"}),(0,r.jsx)(C,{name:"is_truncation_disabled"}),i&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C,{name:"pin_to_top"}),!(null==t?void 0:t.hide_right_sidebar)&&(0,r.jsx)(C,{name:"pinned_at"})]}),!(null==t?void 0:t.hide_from_featured_areas)&&(0,r.jsx)(C,{name:"hide_from_featured_areas"})]})},N=function(e){var t;return"function"==typeof(null==e||null==(t=e.helpers)?void 0:t.findById)},A=function(){var e,t=(0,k.xW)().watch,n=t("created_at"),o=t("space_id"),i=(0,p.E)();return N(i)&&(e=i.helpers.findById(o)),(0,r.jsxs)("div",{className:"mx-auto max-w-3xl px-5 pb-5 pt-2",children:[(0,r.jsx)(I,{space:e}),(0,r.jsx)("div",{className:"my-4"}),(0,r.jsx)(w,{space:e}),!!n&&(0,r.jsx)(P,{})]})}},184956(e,t,n){"use strict";var r=Object.freeze({CONTENT:"/",SETTINGS:"/settings"});n.d(t,{o:()=>r})},61427(e,t,n){"use strict";n.d(t,{td:()=>S,MC:()=>P});var r=n(391426),o=n(429165),i=n(509911),a=n(139645),s=n(974618),l=n(244174),c=n(624390),u=n(805426),d=n(931639),p=n(168293),f=function(e){var t=e.spaceId,n=e.tiptapBodyForEditor,o=e.shouldSkipRedirectAfterSubmit,i=e.onSubmitSuccess,a=(0,c.U)(t),s=(0,(0,p.bE)({cacheKey:l.PA}).getPersistedFormFieldValues)(),f={id:null,space_id:a||(null==s?void 0:s.space_id),name:null==s?void 0:s.name,tiptap_body:n||(null==s?void 0:s.tiptap_body),cover_image:null==s?void 0:s.cover_image};return(0,r.jsx)(d.m,{post:f,children:(0,r.jsx)(u.u,{shouldSkipRedirectAfterSubmit:o,onSubmitSuccess:i})})},m=n(808296),b=n(365358),y=n(204107),h=n(737225),g=n(319143),v=n(339551),x=n(570310),j=n(451430),_=n(417980),w=n(288513),O=function(e){var t=e.spaceId,n=e.shouldSkipRedirectAfterSubmit,l=e.onSubmitSuccess,c=e.tiptapBodyForEditor,u=(0,s.hS)(),d=(0,m.v)().isDirty,p=(0,y.f)({shouldPrevent:d}),O=(0,i.o)(),S=(0,a.k)(),P=(0,o.q)(),C=O.visible||S.visible||P.visible;return(0,b.w)({disabled:C,onClose:p}),(0,r.jsxs)(h.aF,{isOpen:u.visible,onClose:j.noop,className:(0,x.x)((0,w.W2)("quick-post-v2-modal"),"w-full max-w-3xl"),"aria-label":(0,_.t)("quick_post_v2.title"),children:[(0,r.jsx)(h.aF.Overlay,{onClick:p}),(0,r.jsx)(v.Q,{children:(0,r.jsx)(g.U,{children:(0,r.jsx)(f,{spaceId:t,tiptapBodyForEditor:c,shouldSkipRedirectAfterSubmit:n,onSubmitSuccess:l})})})]})},S=s.PT.create(function(e){return(0,r.jsx)(O,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))}),P=function(){return(0,s.hS)(S)}},798472(e,t,n){"use strict";
1var r=(0,n(674274).T)().useScopedNavigate;n.d(t,{Z:()=>r})},808296(e,t,n){"use strict";var r=(0,n(698804).vt)(function(e){return{isFullscreen:!1,toggleFullscreen:function(){return e(function(e){return{isFullscreen:!e.isFullscreen}})},isSubmitting:!1,setIsSubmitting:function(t){return e({isSubmitting:t})},isDirty:!1,setIsDirty:function(t){return e({isDirty:t})}}});n.d(t,{v:()=>r})},365358(e,t,n){"use strict";var r=n(684716),o=function(e){var t=e.disabled,n=e.onClose;(0,r.vC)("esc",n,{enabled:!t,enableOnContentEditable:!0,enableOnFormTags:["INPUT","TEXTAREA"]},[t])};n.d(t,{w:()=>o})},414121(e,t,n){"use strict";var r=n(519104),o=n(914351),i=n(755997),a=function(){var e=(0,r.Z)(),t=(0,i.N)(),n=t.mutate,a=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(t,["mutate"]),s=(0,o.W)();return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({onShareViaBroadcast:function(t){var r=t.postId,o=t.onSuccess;if(!s){e({to:"/settings/emails/broadcast"}),null==o||o();return}n({source_content_id:r,source_content_type:"Post"},{onSuccess:function(t){null==o||o(),e({to:"/settings/emails/broadcast/$id/edit",params:{id:String(t.broadcast.id)}})}})}},a)};n.d(t,{j:()=>a})},204107(e,t,n){"use strict";var r=n(974618),o=n(417980),i=function(e){var t=e.shouldPrevent,n=e.message,i=(0,r.hS)();return function(){(!t||confirm(n||(0,o.t)("quick_post_v2.accidental_leave_confirmation")))&&i.remove()}};n.d(t,{f:()=>i})},363834(e,t,n){"use strict";var r=n(243994),o=function(e){return!!e},i=function(e){return!!e},a=["image","file","embed","mention","horizontalRule"],s=function(e){var t,n;return null!=e&&null!=(n=e.body)&&null!=(t=n.content)&&!!t.length&&e.body.content.some(function(e){return!!e.content||a.includes(e.type)})},l=r.Ik().shape({space_id:r.ai().required()}),c=r.Ik().shape({name:r.Yj().when("body",{is:function(e){return!o(e)},then:r.Yj().required(),otherwise:r.Yj().nullable()}),body:r.Yj().when("name",{is:function(e){return!i(e)},then:r.Yj().required(),otherwise:r.Yj().nullable()})},[["name","body"]]).concat(l),u=r.Ik().shape({name:r.Yj().when("tiptap_body",{is:function(e){return!s(e)},then:r.Yj().required(),otherwise:r.Yj().nullable()}),tiptap_body:r.Ik().when("name",{is:function(e){return!i(e)},then:r.Ik().test({test:function(e){return s(e)}}),otherwise:r.Ik().nullable()})},[["name","tiptap_body"]]).concat(l);n.d(t,{Pp:()=>o,RB:()=>u,US:()=>c,l3:()=>s,uV:()=>i})},523733(e,t,n){"use strict";n.d(t,{L:()=>b});var r=n(391426),o=n(315164),i=n(973646),a=n(570310),s=n(892907),l=n(451430),c=n(933578),u=n(417980);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e){if(Array.isArray(e))return e}function f(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}}var b=(0,c.forwardRef)(function(e,t){var n,c,d,b=p(n=[e,t])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||m(n)||f(),y=b[0],h=b.slice(1),g=y.isMd,v=y["data-popup-open"],x=y.className,j=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}
1(y,["isMd","data-popup-open","className"]),_=(p(h)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(h)||m(h,1)||f())[0],w=(0,o.g)().space,O=!0===j["aria-expanded"]||"true"===j["aria-expanded"]||void 0!==v;return(0,r.jsxs)("button",(c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:_,type:"button",className:(0,a.x)("focus-visible:bg-secondary hover:bg-secondary flex w-full cursor-pointer items-center rounded-md",{"bg-secondary":O,"px-5 py-4":!g,"px-0 py-0":g},x),"data-popup-open":v},j),d=d={children:[(0,r.jsx)("div",{className:(0,a.x)("flex min-w-0 items-center gap-1",{"flex-1":!g}),children:(0,r.jsx)(s.o5,{variant:"label-sm",color:"secondary",component:"span",children:(null==w?void 0:w.name)?(0,r.jsxs)(r.Fragment,{children:[(0,u.t)("quick_post_v2.posting_in")," ",(0,r.jsx)(s.o5,{variant:"label-sm",color:"primary",component:"span",title:w.name,children:(0,l.truncate)(w.name,{length:g?24:36})})]}):(0,r.jsx)(s.o5,{variant:"label-sm",color:"tertiary",component:"span",children:(0,u.t)("quick_post_v2.choose_a_space")})})}),(0,r.jsx)(i.In,{className:"!text-dark",type:"16-chevron-down",size:16})]},Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(d)).forEach(function(e){Object.defineProperty(c,e,Object.getOwnPropertyDescriptor(d,e))}),c))});b.displayName="SpaceTrigger"},585565(e,t,n){"use strict";var r=n(391426),o=n(933578),i=n(361971),a=n(919109),s=n(417980),l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.autoFocus,n=void 0===t||t,l=e.onFocusChange,c=e.placeholder,u=(0,i.xW)().control,d=(0,o.useRef)(null),p=null!=c?c:(0,s.t)("quick_post_v3.title_placeholder");return(0,o.useEffect)(function(){var e;n&&(null==(e=d.current)||e.focus())},[n]),(0,r.jsx)(i.xI,{control:u,name:"name",render:function(e){var t,n,o,i=e.field;return(0,r.jsx)(a.A,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},i),n=n={ref:function(e){i.ref(e),d.current=e},value:null!=(o=i.value)?o:"",maxLength:255,draggable:!1,placeholder:p,className:"text-primary placeholder:text-tertiary mb-5 block w-full resize-none border-none bg-primary p-0 text-heading-xl focus:ring-0",rows:1,onChange:function(e){return i.onChange(e.target.value)},onFocus:function(){return null==l?void 0:l(!0)},onBlur:function(){i.onBlur(),null==l||l(!1)},onKeyDown:function(e){"Enter"===e.key&&e.preventDefault()},tabIndex:0,"data-testid":"post_name","aria-label":p},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}})};n.d(t,{h:()=>l})},843897(e,t,n){"use strict";var r=n(391426),o=n(930303),i=n(570310),a=n(417980),s=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).shrink;return(0,r.jsx)("nav",{"aria-label":(0,a.t)("quick_post_v2.footer_menu_aria_label"),className:(0,i.x)("flex h-12 items-center [&_button]:size-8 [&_button]:rounded-md [&_li:not(.hidden)]:flex [&_li]:items-center [&_li]:justify-center [&_svg]:size-4 [&_ul]:gap-0",e&&"shrink-0"),id:o._f})};n.d(t,{M:()=>s})},9695(e,t,n){"use strict";n.d(t,{n:()=>f});var r=n(391426),o=n(928327),i=n(315164),a=n(570465),s=n(570310),l=n(345115),c=n(933578),u=n(361971),d=n(417980);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var f=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},f=n.className,m=n.inline,b=(0,i.g)(),y=b.spaceId,h=b.canManageSelectedSpace,g=(0,u.xW)().c
1ontrol,v=(0,u.as)({control:g,name:"topics"}).field,x=function(e){if(Array.isArray(e))return e}(e=(0,c.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return p(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return p(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),j=x[0],_=x[1],w=null!=(t=v.value)?t:[],O=(0,a.h)({spaceId:y?String(y):void 0,value:w,onChange:v.onChange,creatable:h}),S=O.createTopic,P=O.creatable,C=O.dropdownOptions,k=O.handleValueChange,I=O.isLoading,N=O.onInputValueChange,A=O.selectedOptions,E=O.shouldOpenDropdown,R=O.shouldShow,L=j&&E;return y&&R?(0,r.jsx)("div",{className:(0,s.x)("text-primary flex w-full min-w-0",f,!m&&"py-2",m&&"min-w-0"),onKeyDownCapture:function(e){"Enter"!==e.key||L||e.preventDefault()},children:(0,r.jsx)(l.K,{"data-testid":"topics-list",className:"flex-1",naked:!0,icon:"tag",open:L,onOpenChange:_,side:"top",align:"start",options:C,value:A,onValueChange:k,onInputValueChange:function(e){N(e),_(!0)},isLoading:I,maxSelections:o.P,placeholder:(0,d.t)("quick_post_v2.topics.search",{count:o.P}),searchPlaceholder:(0,d.t)("search_v2.filters.search_topics"),emptyMessage:(0,d.t)("quick_post_v2.topics.no_results"),creatable:P,onCreateOption:function(e){return S(e)},loadingMessage:(0,d.t)("quick_post_v2.topics.loading")})}):null}},930303(e,t,n){"use strict";n.d(t,{Ku:()=>400,OB:()=>1061,PH:()=>1050,XC:()=>480,_5:()=>"quick-post-v3-form",_f:()=>"quick-post-v3-footer-toolbar",a7:()=>"compass-portal-container",aI:()=>"headlessui-portal-root",aj:()=>"quick-post-v3-portal-layering",dc:()=>"quick-post-v3-space-select-for-mobile",pH:()=>200})},658865(e,t,n){"use strict";var r=["image","file","embed","mention","horizontalRule"],o=function(e){return(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"&&null!==e},i=function(e){return!!o(e)&&"string"==typeof e.type&&(!("content"in e)||Array.isArray(e.content)&&e.content.every(i))},a=function(e){return!!o(e)&&(!("body"in e)||!!o(e.body)&&(!("content"in e.body)||Array.isArray(e.body.content)&&e.body.content.every(i)))},s=function(e){var t=e.content,n=e.type;return!!t||"string"==typeof n&&r.includes(n)},l=function(e){var t,n=null==e||null==(t=e.body)?void 0:t.content;return Array.isArray(n)&&n.some(s)};n.d(t,{HO:()=>a,l3:()=>l,u4:()=>o})},315164(e,t,n){"use strict";n.d(t,{g:()=>l});var r=n(339551),o=n(328187),i=n(341409),a=n(361971);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l=function(){var e,t=(0,a.xW)().watch,n=(0,r.E)().helpers.basicSpacesWithPostCreationAllowed,l=function(e){if(Array.isArray(e))return e}(e=t(["space_id","cover_image"]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return s(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=l[0],u=l[1],d=c?n().find(function(e){return e.id===c}):void 0,p=(0,o.HF)(d),f=(0,o.O7)(d),m=!!d&&(0,i.wp)(d);return{spaceId:c,space:d,coverImage:u,hasSelectedSpace:!!c,hasCover:!!u,canShowCover:p,c
1anShowTitle:f,shouldShowAddCover:p&&!u,canManageSelectedSpace:m}}},610818(e,t,n){"use strict";var r=n(974618),o=n(930303),i=n(933578),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.exitMs,n=void 0===t?o.pH:t,a=(0,r.hS)(),s=(0,i.useRef)(null);(0,i.useEffect)(function(){a.visible&&s.current&&(window.clearTimeout(s.current),s.current=null)},[a.visible]),(0,i.useEffect)(function(){return function(){s.current&&window.clearTimeout(s.current)}},[]);var l=(0,i.useCallback)(function(){a.hide(),s.current&&window.clearTimeout(s.current),s.current=window.setTimeout(function(){s.current=null,a.remove()},n)},[a,n]);return{isOpen:a.visible,hide:l}};n.d(t,{q:()=>a})},582385(e,t,n){"use strict";n.d(t,{t:()=>p});var r=n(315164),o=n(974999),i=n(931639),a=n(339551),s=n(328187),l=n(933578),c=n(361971),u=n(417980);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var p=function(){var e,t,n=(0,c.xW)(),p=n.formState.isSubmitting,f=n.watch,m=(0,a.E)().isLoading,b=(0,r.g)(),y=b.space,h=b.spaceId,g=(0,i.a)(),v=g.helpers,x=null==(t=g.isSubmitEnabled)||t,j=!!g.isEdit,_=function(e){if(Array.isArray(e))return e}(e=f(["name","body","tiptap_body","topics","status","published_at"]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),6!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return d(e,6);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,6)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),w=_[0],O=_[1],S=_[2],P=_[3],C=_[4],k=_[5],I=!j||(null==v?void 0:v.isTiptapPost)?(0,o.l3)(null!=S?S:void 0):(0,o.Pp)(O),N=C===s.Y0&&!k,A=(0,l.useMemo)(function(){return h?(0,o.uV)(w)||I?(null==y?void 0:y.require_topic_selection)&&!(null==P?void 0:P.length)?(0,u.t)("quick_post_v2.error_messages.no_topics"):null:(0,u.t)("quick_post_v2.error_messages.no_title_or_body"):(0,u.t)("quick_post_v2.error_messages.no_space")},[I,w,y,h,P]);return{errorMessage:A,isDisabled:!!A||N||m||p||!x}}},364133(e,t,n){"use strict";var r=n(361971);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return o(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a="tiptap_body.sgids_to_object_map",s="tiptap_body.inline_attachments",l=function(){var e=(0,r.xW)(),t=e.watch,n=e.setValue,o=e.getValues,l=t(a)||{};return{handleAttachmentsChange:function(e){var t,r=Array.from(new Set(i(null!=(t=o(s))?t:[]).concat(i(e))));n(s,r,{shouldDirty:!0})},handleSgidChange:function(e){var t,r=null!=(t=o(a))?t:{};n(a,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},r,e),{shouldDirty:!0})},inlineAttachments:t(s)||[],sgidToObjectMap:l}};n.d(t,{H:()=>l})}
1,570465(e,t,n){"use strict";var r=n(928327),o=n(262669),i=n(720702),a=n(577240),s=n(872518),l=n(451430),c=n(933578);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||m(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}}var b=function(e){return{value:e.id,label:e.name}},y=function(e){var t=e.spaceId,n=e.value,u=e.onChange,m=e.creatable,y=e.maxSelections,h=void 0===y?r.P:y,g=p((0,c.useState)(""),2),v=g[0],x=g[1],j=p((0,c.useState)({}),2),_=j[0],w=j[1],O=v.trim(),S=(0,s.o)(O,200),P=O.length>0,C=S.length>0,k=(0,a.Y)({creatable:void 0!==m&&m}),I=k.canSelectTopic,N=k.canCreateTopics,A=(0,i.g)({spaceId:t,queryOptions:{enabled:!!t}}),E=A.data,R=A.isLoading,L=(0,i.g)({spaceId:t,query:S,queryOptions:{enabled:!!t&&C,keepPreviousData:!0}}),D=L.data,T=L.isLoading,M=(0,i.g)({spaceId:t,ids:n,queryOptions:{enabled:!!t&&n.length>0,keepPreviousData:!0}}),F=M.data,K=M.isFetching,B=(0,c.useMemo)(function(){return K||!F?n:n.filter(function(e){return F.records.some(function(t){return t.id===e})})},[K,n,F]);(0,c.useEffect)(function(){B.length!==n.length&&u(B)},[u,n.length,B]);var q=(0,c.useMemo)(function(){var e,t;return C?null!=(e=null==D?void 0:D.records)?e:[]:null!=(t=null==E?void 0:E.records)?t:[]},[C,null==E?void 0:E.records,null==D?void 0:D.records]),U=(0,o.V)({spaceId:t,onSuccess:function(e){w(function(t){var n,r;return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){d(e,t,n[t])})}return e}({},t),r=null!=(r=d({},e.id,e))?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n}),x(""),n.includes(e.id)||u(f(n).concat([e.id]))}}),z=U.mutate,W=U.isPending,$=(0,c.useMemo)(function(){var e,t,n,r=f(null!=(e=null==E?void 0:E.records)?e:[]).concat(f(null!=(t=null==F?void 0:F.records)?t:[]),f(null!=(n=null==D?void 0:D.records)?n:[]),f(Object.values(_)));return(0,l.keyBy)(r,"id")},[_,null==F?void 0:F.records,null==E?void 0:E.records,null==D?void 0:D.records]),V=(0,c.useMemo)(function(){return q.filter(function(e){return I(e)&&!n.includes(e.id)}).map(b)},[q,n,I]),H=(0,c.useMemo)(function(){return B.map(function(e){var t=$[e];return t?b(t):{value:e,label:String(e)}})},[$,B]),G=(0,c.useMemo)(function(){var e;return(null!=(e=null==E?void 0:E.records)?e:[]).some(I)},[E,I]),Z=B.length>=h,Q=N&&!!t&&!Z&&P,Y=P&&O!==S,J=Y||T||V.length>0||Q,X=R||G||N||B.length>0,ee=(Y||T||W)&&0===V.length;return{createTopic:z,creatable:N&&!!t&&!Z,dropdownOptions:V,handleValueChange:(0,c.useCallback)(function(e){u(e.map(function(e){return e.value}))},[u]),hasMaxTopicsSelected:Z,isLoading:ee,onInputValueChange:x,selectedOptions:H,shouldOpenDropdown:J,shouldShow:X}};n.d(t,{h:()=>y})},974999(e,t,n){"use strict";var r=n(658865),o=n(243994),i=function(e){return!!e},a=function(e){return!!e},s=o.Ik().shape({space_id:o.ai().required()}),l=o.Ik().shape({name:o.Yj().when("body",{is:function(e){return!i(e)},then:o.Yj().required(),otherwise:o.Yj().nullable()}),body:o.Yj().when("name",{is:function(e){return!a(e)},then:o.Yj().required(),otherwise:o.Yj().nullable()})},[["name","body"]]).concat(s),c=o.Ik().shape({name:o.Yj().when("tiptap_body",{is:function(e){return!(0,r.l3)(e)},then:o.Yj().required(),otherwise:o.Yj().nullable()}),tiptap_body:o.Ik().when("name",{is:function(e){return!a(e)},then:o.Ik().test({test:function(e){return(0,r.l3)(e)}}),otherwise:o.Ik().nullable()})},[["name","tiptap_body"]]).concat(s);n.d(t,{Pp:()=>i,RB:()=>c,US:()=>l,l3:()=>r.l3,uV:()=>a})},831610(e,t,n){"use strict";var r=n(391426),o=n(694812),i=n(34819),a=n(892907),s=n(417980),l=function(e){var t=e.title;return(0,r.jsxs)("header",{className:"bg-primary sticky -top-px z-10 -mx-4 flex items-center gap-3 px-5 pb-4",children:[(0,r.jsx)(a.o
15,{variant:"heading-lg",className:"min-w-0 flex-1",truncate:!0,children:t}),(0,r.jsx)(o._s.Close,{children:(0,r.jsx)(i.K,{variant:"ghost",size:"sm",icon:"cross","aria-label":(0,s.t)("close")})})]})};n.d(t,{s:()=>l})},491720(e,t,n){"use strict";var r=n(391426),o=n(41907),i=n(570310),a=n(411718),s=n(817751),l=n(133626),c=n(417980),u=n(928160);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var p=function(e){var t,n=e.className,p=e.onChange,f=e.counts,m=e.selectedReaction,b=e.totalCount,y=[{value:"all",label:"".concat((0,c.t)("reactions.all")," ").concat((0,o.Rt)(b))}].concat(function(e){if(Array.isArray(e))return d(e)}(t=a.O.flatMap(function(e){var t=f[e];return t<=0?[]:[{value:e,label:(0,o.Rt)(t),icon:(0,s.a)(u.t7[e].sentiment)}]}))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return d(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return(0,r.jsx)("div",{className:(0,i.x)("shrink-0 px-5 py-3",n),children:(0,r.jsx)(l.t.Root,{tabs:y,selectedValue:null!=m?m:"all",onValueChange:function(e){var t=a.O.find(function(t){return t===e});p(null!=t?t:null)}})})};n.d(t,{I:()=>p})},830520(e,t,n){"use strict";var r=n(391426),o=n(248043),i=n(411718),a=n(409858),s=n(194358),l=n(417980),c=n(202159),u=n(928160),d=function(e){var t=e.className,n=e.count,d=e.counts,p=e.initialCount,f=e.onClick;if(0===n)return null;var m=(0,l.t)("reactions.count",{count:n,localeCount:(0,o.B4)(n)});return(0,r.jsx)(a.N,{asButton:!0,variant:"custom",typography:"body-sm",color:"secondary",hoverColor:"primary",className:t,"aria-label":m,onClick:f,children:(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[(0,r.jsx)(s.x,{kinds:i.O.flatMap(function(e){return d[e]>0?[u.t7[e].sentiment]:[]})}),(0,r.jsx)(c.z,{count:n,initialCount:p})]})})};n.d(t,{O:()=>d})},928160(e,t,n){"use strict";var r={like:{labelKey:"reactions.types.like",selectedClassName:"icon-sentiment-like",sentiment:"like"},celebrate:{labelKey:"reactions.types.celebrate",selectedClassName:"icon-sentiment-celebrate",sentiment:"celebrate"},love:{labelKey:"reactions.types.love",selectedClassName:"icon-sentiment-love",sentiment:"love"},support:{labelKey:"reactions.types.support",selectedClassName:"icon-sentiment-support",sentiment:"support"},insightful:{labelKey:"reactions.types.insightful",selectedClassName:"icon-sentiment-idea",sentiment:"idea"},funny:{labelKey:"reactions.types.funny",selectedClassName:"icon-sentiment-funny",sentiment:"funny"}},o={like:"like",celebrate:"celebrate",support:"support",love:"love",idea:"insightful",funny:"funny"};n.d(t,{d8:()=>o,lo:()=>"like",t7:()=>r})},123124(e,t,n){"use strict";var r=function(e){var t=e.allReactionsCount,n=e.selectedReaction,r=e.totalCount;return null===n&&null!=r?r:t},o=function(e){var t=e.counts,n=e.previousReaction,r=e.nextReaction,o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t);return n&&(o[n]=Math.max(o[n]-1,0)),r&&(o[r]+=1),o};n.d(t,{j:()=>o,l:()=>r})},554283(e,t,n){"use strict";var r=n(391426),o=n(230763),i=n(570310),a=n(506493),s=n(411718),l=n(828775),c=n(892907),u=n(933578),d=n(258752),p=n(417980),f=n(58661),m=n(717526),b=n(202159),y=n(915779),h=n(928160),g=n(123124),v=n(830520);function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||_(e,t)||function(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}}var w=function(e){var t,n=e.counts,r=e.likesCount,o=e.reaction;return[null!=o?o:"none",r].concat(function(e){if(Array.isArray(e))return x(e)}(t=s.O.map(function(e){return n[e]}))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||_(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).join(":")},O=function(e){var t=e.canReact,n=e.className,s=e.currentUserReaction,x=void 0===s?null:s,_=e.iconOnly,O=e.isLiked,S=e.likesCount,P=e.loginNotice,C=e.onChange,k=e.onSettled,I=e.onSummaryClick,N=e.reactionCounts,A=e.reactionableId,E=e.reactionableType,R=e.showSummary,L=e.variant,D=void 0===L?"default":L,T=(0,o.Od)(),M=T.currentUser,F=T.isViewOnlyMasquerading,K=(0,a.B)(),B=(0,m.d)().error,q={counts:N,likesCount:S,reaction:null!=x?x:O?h.lo:null},U=w(q),z=j((0,u.useState)(U),2),W=z[0],$=z[1],V=j((0,u.useState)(q),2),H=V[0],G=V[1];W!==U&&($(U),G(q));var Z=H.counts,Q=H.likesCount,Y=H.reaction,J={forReactQuery:!0,userLikeableId:A,userLikableType:"post"===E?"Post":"Comment"},X=function(){B(P);var e=y.YO.signIn({params:{post_login_redirect:window.location.href}});K?window.open(e,"_blank","noreferrer"):window.location.href=e},ee=function(e){var t=!!e.reaction;G(e),null==C||C({is_liked:t,is_liked_by_current_user:t,likes_count:e.likesCount,reaction_summary:{counts:e.counts,current_user_reaction_type:e.reaction},user_likes_count:e.likesCount})},et=function(e){var t=e.nextReaction,n=e.nextLikesCount;return ee({counts:(0,g.j)({counts:Z,previousReaction:Y,nextReaction:t}),likesCount:n,reaction:t})},en=(0,d.n_)({mutationFn:function(e){var t,n,r=e.reactionType;return f.p.create((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},J),n=n={reactionType:r},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},onError:function(e,t){ee(t.previousState),B((0,p.t)("reactions.errors.create_failure"))},onSettled:function(){return null==k?void 0:k()}}),er=en.mutate,eo=en.isPending,ei=(0,d.n_)({mutationFn:function(){return f.p.destroy(J)},onError:function(e,t){ee(t.previousState),B((0,p.t)("reactions.errors.destroy_failure"))},onSettled:function(){return null==k?void 0:k()}}),ea=ei.mutate,es=ei.isPending,el=eo||es,ec=function(e){if(!M)return void X();if(!F&&t&&!el){if(Y===e){et({nextReaction:null,nextLikesCount:Math.max(Q-1,0)}),ea({previousState:H});return}et({nextReaction:e,nextLikesCount:Y?Q:Q+1}),er({previousState:H,reactionType:e})}},eu=Y?h.t7[Y].sentiment:void 0;return(0,r.jsxs)("div",{className:(0,i.x)("flex items-center gap-2",n),children:[(void 0===R||R)&&"default"===D&&(0,r.jsx)(v.O,{count:Q,counts:Z,onClick:I}),(0,r.jsxs)("div",{className:(0,i.x)("inline-flex","compact"===D&&"items-center gap-2"),children:[(0,r.jsx)(l.w,{disabled:F||!t||el,iconOnly:void 0!==_&&_||"compact"===D,value:eu,onSentimentSelect:function(e){var t=e?h.d8[e]:Y;t&&e!==eu&&ec(t)},i18n:{like:(0,p.t)(h.t7.like.labelKey),celebrate:(0,p.t)(h.t7.celebrate.labelKey),support:(0,p.t)(h.t7.support.labelKey),love:(0,p.t)(h.t7.love.labelKey),idea:(0,p.t)(h.t7.insightful.labelKey),funny:(0,p.t)(h.t7.funny.labelKey)}}),"compact"===D&&(0,r.jsx)(c.o5,{variant:"label-md",color:"secondary",component:"span",className:(0,i.x)(Y&&h.t7[Y].selectedClassName),children:(0,r.jsx)(b.z,{count:Q})})]})]})};n.d(t,{h:()=>O})},182380(e,t,n){"use strict";var r=n(230763),o=function(){var e=(0,r.Od)().currentCommunitySettings;return!!(null==e?void 0:e.cms_video_analytics_enabled)};n.d(t,{S:()=>o})},446997(e,t,n){"use strict";n.d(t,{$u:()=>"activity_scores",E8:()=>"copilot",Qv:()=>"text-[#6C58E8]"})},581061(e,t,n){"use strict";n.d(t,{m:()=>R});var r=n(809061),o=n(391426),i=n(812857),a=n(915921),s=n(498302),l=n(568316),c=n(588227),u=n(125665),d=n(146796),p=n(640668),f=n(791009),m=n(519104),b=n(417980),y=function(e){var t=e.property,n=e.number,r=e.red,i=void 0!==r&&r,a=10*parseFloat(n);return(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsxs)("div",{className:"mb-2 flex justify-between",children:[(0,o.jsx)(l.o.BodyXs,{children:t}),(0,o.jsx)(l.o.LabelXxs,{weight:"bold",color:i?"text-red-500":"text-green-700",children:n})]}),(0,o.jsx)("div",{className:"bg-tertiary h-1 w-full rounded-sm",children:(0,o.jsx)("div",{className:"h-full rounded-sm ".concat(i?"bg-red-500":"bg-green-700"),style:{width:"".concat(a,"%")}})})]})},h=function(){var e="settings.community_ai.marketing_modal";return(0,o.jsxs)("div",{className:"border-primary rounded-sm border p-5",children:[(0,o.jsx)("div",{className:"mb-1",children:(0,o.jsx)(l.o.LabelLg,{weight:"bold",color:"text-default",children:(0,b.t)("".concat(e,".activity_score.t
1itle"))})}),(0,o.jsx)(l.o.BodySm,{color:"text-default",children:(0,b.t)("".concat(e,".activity_score.description"))}),(0,o.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-4",children:[(0,o.jsx)(y,{property:(0,b.t)("".concat(e,".params.presence")),number:"9.5"}),(0,o.jsx)(y,{property:(0,b.t)("".concat(e,".params.contribution")),number:"5.0",red:!0}),(0,o.jsx)(y,{property:(0,b.t)("".concat(e,".params.participation")),number:"8.3"}),(0,o.jsx)(y,{property:(0,b.t)("".concat(e,".params.connection")),number:"8.5"})]})]})},g=n(446997),v=n(973646),x=function(e){var t=e.localeItem;return(0,o.jsx)("span",{className:"bg-primary rounded-full px-3 py-1",children:(0,o.jsx)(l.o.BodyXs,{children:(0,b.t)(["settings.community_ai.marketing_modal","copilot_items",t])})})},j=function(){var e="settings.community_ai.marketing_modal";return(0,o.jsxs)("div",{className:"border-primary rounded-sm border p-5 pb-0",children:[(0,o.jsx)("div",{className:"mb-1",children:(0,o.jsx)(l.o.LabelLg,{weight:"bold",color:"text-default",children:(0,b.t)("".concat(e,".copilot.title"))})}),(0,o.jsx)(l.o.BodySm,{color:"text-default",children:(0,b.t)("".concat(e,".copilot.description"))}),(0,o.jsxs)("div",{className:"relative mt-4 grid grid-cols-2 gap-1 p-4",children:[(0,o.jsx)("div",{className:"absolute inset-0 z-[-1] rounded-t-md bg-gradient-to-r from-indigo-600 via-purple-600 to-indigo-600 opacity-5"}),(0,o.jsxs)("div",{className:"flex flex-row",children:[(0,o.jsx)(v.In,{type:"16-artificial-intelligence",className:"text-blue-100"}),(0,o.jsx)(l.o.LabelXs,{weight:"semibold",color:g.Qv,children:(0,b.t)("".concat(e,".ask_ai_to"))})]}),(0,o.jsx)("div",{className:"col-span-2 flex justify-around",children:["give_me_ideas","translate","generate_a_paragraph"].map(function(e){return(0,o.jsx)(x,{localeItem:e},e)})}),(0,o.jsx)("div",{className:"col-span-2 mt-2 flex justify-around",children:["improve_writing","summarize","adjust_spelling"].map(function(e){return(0,o.jsx)(x,{localeItem:e},e)})})]})]})},_=function(e){var t=e.localeItem;return(0,o.jsxs)("li",{className:"mb-4 flex items-start justify-start last:mb-0",children:[(0,o.jsx)("div",{className:"mt-1 flex size-5 items-center justify-center",children:(0,o.jsx)(v.In,{size:14,type:"14-magic-ai"})}),(0,o.jsx)("span",{className:"ml-3 text-blue-100",children:(0,o.jsx)(l.o.BodySm,{color:"text-default",children:(0,o.jsx)(u.E,{content:(0,b.t)(["settings.community_ai.marketing_modal","marketing_items",t]),as:"span"})})})]})};function w(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var O=n(737225),S=n(974618),P=function(e){var t=e.feature;return(0,o.jsx)(O.aF.Body,{children:(0,o.jsx)("div",{className:"flex size-full pt-2",children:(0,o.jsxs)("div",{className:"max-w-xl",children:[t===g.E8&&(0,o.jsx)(j,{}),t===g.$u&&(0,o.jsx)(h,{}),(0,o.jsxs)("div",{className:"bg-tertiary mt-6 rounded-sm p-4 pt-2",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(l.o.LabelXxs,{color:"text-default",children:(0,b.t)("settings.community_ai.marketing_modal.plus")})}),t===g.E8&&(0,o.jsx)(_,{localeItem:"activity_scores"}),t===g.$u&&(0,o.jsx)(_,{localeItem:"copilot"}),(0,o.jsx)(_,{localeItem:"transcriptions"})]})]})})})},C=n(387099);function k(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function I(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){k(i,r,o,a,s,"next",e)}function s(e){k(i,r,o,a,s,"throw",e)}a(void 0)})}}function N(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var A=function(e){var t=e.plan,n=e.handleClose,r=e.onSuccess,i=e.source,s=(0,a.M)(),c=(0,m.Z)(),p=(0,d.Cn)(),f=function(){return I(function(){return N(this,function(e){switch(e.label){case 0:return c({to:"/settings/community_ai"}),r&&r(),[4,n()];case 1:return e.sent(),[2]}})})()};return(0,o.jsxs)(O.aF.Footer,{children:[(0,o.jsx)("div",{children:(0,o.jsx)(C.$,{onClick:function(){return I(function(){return N(this,function(e){switch(e.label){case 0:if(!p)return[3,2];return c({to:"/settings/community_ai"}),[4,n()];case 1:return e.sent(),[3,4];case 2:return[4,s.show({planId:t.id,onSuccess:f,source:i,successButtonLabel:(0,b.t)("settings.community_ai.marketing_modal.go_to_community_ai"),showPlanDetails:!0})];case 3:e.sent(),e.label=4;case 4:return[2]}})})()},large:!0,full:!0,variant:"circle",children:(0,b.t)("settings.community_ai.marketing_modal.submit")})}),!p&&(0,o.jsx)("div",{className:"my-3 text-center",children:(0,o.jsx)(l.o.BodySm,{color:"text-default",children:(0,o.jsx)(u.E,{content:(0,b.t)("settings.community_ai.marketing_modal.by_proceeding",{plan_name:t.display_name,price:t.monthly_base_amount_with_interval}),as:"span"})})})]})},E=function(e){var t=e.handleClose;return(0,o.jsxs)(O.aF.Header,{children:[(0,o.jsxs)(O.aF.Title,{size:"md",className:"w-full text-center",children:[(0,o.jsx)("div",{className:"my-2 inline-block w-auto",children:(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsxs)(l.o.TitleLg,{children:[(0,b.t)("settings.community_ai.marketing_modal.title.unlock")," ",(0,o.jsx)("span",{className:g.Qv,children:(0,b.t)("settings.community_ai.marketing_modal.title.community_ai")})]}),(0,o.jsx)(v.In,{type:"16-artificial-intelligence",className:"absolute -right-5 -top-1 text-blue-100"})]})}
1),(0,o.jsx)(l.o.BodyMd,{color:"text-default",children:(0,b.t)("settings.community_ai.marketing_modal.subtitle")})]}),(0,o.jsx)(O.aF.HeaderActions,{className:"absolute right-0 top-0 mr-6 mt-6",children:(0,o.jsx)(O.aF.CloseButton,{onClick:t})})]})},R=(0,r.F)(function(e){var t=e.afterClose,n=e.feature,r=void 0===n?g.$u:n,y=e.source,v=e.onSuccess,x=e.open,O=e.onOpenChange,S=(0,p.B)().changePlanModalParams,P=(0,m.Z)(),C=(0,a.M)(),k=(0,d.Cn)(),I=S(c.G),N=I.planTier,A=I.planId,E=(0,s.P)({planTier:N,planId:A}),R=E.plan,L=E.isPlanLoading,D=function(){null==t||t(),O(!1)},T=function(){P({to:"/settings/community_ai"}),null==v||v(),D()},M=function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:if(!k)return[3,1];return P({to:"/settings/community_ai"}),D(),[3,3];case 1:return[4,C.show({planId:R.id,onSuccess:T,source:y,successButtonLabel:(0,b.t)("settings.community_ai.marketing_modal.go_to_community_ai"),showPlanDetails:!0})];case 2:e.sent(),e.label=3;case 3:return[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){w(i,r,o,a,s,"next",e)}function s(e){w(i,r,o,a,s,"throw",e)}a(void 0)})})()};return(0,o.jsx)(f.a.Root,{open:x,onOpenChange:O,size:"md",children:(0,o.jsx)(f.a.Content,{children:L?(0,o.jsx)("div",{className:"my-28",children:(0,o.jsx)(i.Q,{})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f.a.Header,{title:"".concat((0,b.t)("settings.community_ai.marketing_modal.title.unlock")," ").concat((0,b.t)("settings.community_ai.marketing_modal.title.community_ai"))}),(0,o.jsxs)(f.a.Body,{children:[(0,o.jsx)(l.o.BodyMd,{color:"text-default",children:(0,b.t)("settings.community_ai.marketing_modal.subtitle")}),(0,o.jsxs)("div",{className:"mt-4",children:[(0,o.jsx)("div",{className:"flex size-full pt-2",children:(0,o.jsxs)("div",{className:"max-w-xl",children:[r===g.E8&&(0,o.jsx)(j,{}),r===g.$u&&(0,o.jsx)(h,{}),(0,o.jsxs)("div",{className:"bg-tertiary mt-6 rounded-sm p-4 pt-2",children:[(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(l.o.LabelXxs,{color:"text-default",children:(0,b.t)("settings.community_ai.marketing_modal.plus")})}),r===g.E8&&(0,o.jsx)(_,{localeItem:"activity_scores"}),r===g.$u&&(0,o.jsx)(_,{localeItem:"copilot"}),(0,o.jsx)(_,{localeItem:"transcriptions"})]})]})}),!k&&(0,o.jsx)("div",{className:"my-3 text-center",children:(0,o.jsx)(l.o.BodySm,{color:"text-default",children:(0,o.jsx)(u.E,{content:(0,b.t)("settings.community_ai.marketing_modal.by_proceeding",{plan_name:R.display_name,price:R.monthly_base_amount_with_interval}),as:"span"})})})]})]}),(0,o.jsx)(f.a.Footer,{primaryAction:{label:(0,b.t)("settings.community_ai.marketing_modal.submit"),onClick:function(){M()}},layout:"full-width"})]})})})},function(e){var t=e.afterClose,n=e.feature,r=void 0===n?g.$u:n,a=e.source,l=e.onSuccess,u=(0,S.hS)(),d=(0,(0,p.B)().changePlanModalParams)(c.G),f=d.planTier,m=d.planId,y=(0,s.P)({planTier:f,planId:m}),h=y.plan,v=y.isPlanLoading,x=function(){null==t||t(),u.hide(),u.remove()};return(0,o.jsxs)(O.aF,{title:"".concat((0,b.t)("settings.community_ai.marketing_modal.title.unlock")," ").concat((0,b.t)("settings.community_ai.marketing_modal.title.community_ai")),isOpen:u.visible,onClose:x,children:[(0,o.jsx)(O.aF.Overlay,{}),(0,o.jsx)(O.aF.Content,{size:"md",children:v?(0,o.jsx)("div",{className:"my-28",children:(0,o.jsx)(i.Q,{})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(E,{handleClose:x}),(0,o.jsx)(P,{feature:r}),(0,o.jsx)(A,{handleClose:x,plan:h,source:a,onSuccess:l})]})})]})})},588227(e,t,n){"use strict";var r=n(689492).LQ.business;n.d(t,{G:()=>r})},754309(e,t,n){"use strict";var r=n(230763),o=n(51730),i=n(915779),a=n(677123),s=n(18477),l=n(451430),c=n(258752),u=n(417980),d=n(717526);function p(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function f(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){p(i,r,o,a,s,"next",e)}function s(e){p(i,r,o,a,s,"throw",e)}a(void 0)})}}function m(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var b=function(e){var t,n,r=e.currentPage,o=e.perPage,i=e.enabled;return(0,c.IT)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},s.WQ.list({page:r,perPage:void 0===o?10:o})),n=n={enabled:void 0===i||i,staleTime:3e5,gcTime:6e5},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},y=function(e){var t=e.id;return(0,c.IT)(s.WQ.detail(t))},h=function(){var e=(0,d.d)().success;return(0,c.n_)({mutationFn:function(){return f(function(){return m(this,function(e){switch(e.label){case 0:return[4,(0,o.oK)(i.iK.communityBot.agents.create())];case 1:return[2,e.sent()]}})})()},onSuccess:function(){s.ZU.all(),e((0,u.t)("changes_saved"))}})},g=function(e){var t=e.id,n=(0,d.d)(),p=n.success,b=n.error,y=(0,r.Od)().refetch,h=(0,a.IH)().updateAgentChats;return(0,c.n_)({mutationFn:function(e){var n=1===Object.keys(e).length&&"enabled"in e;return(0,o.$H)(i.iK.communityBot.agents.update({id:t}),{community_bot_profile:n?{enabled:e.enabled}:(0,l.omit)(e,"enabled")})},onSuccess:function(e,n){s.ZU.all(),"boolean"==typeof n.enabled&&h(t,n.enabled),p((0,u.t)("changes_saved"))},onError:function(e){return f(function(){var t,n;return m(this,function(r){switch(r.label){case 0:return[4,y()];case 1:return r.sent(),(null==e||null==(t=e.body)?void 0:t.error_details)?(n=(0,l.values)((0,l.omit)(e.body.error_details,"message","success")),b((0,l.flatten)(n).join(", "))):b((0,u.t)("request_failure_message")),[2]}})})()}})};n.d(t,{Ae:()=>g,Aq:()=>y,JG:()=>h,W7:()=>b})},222256(e,t,n){"use strict";var r=n(391426),o=n(570310),i=function(e){var t,n,i=e.question,a=e.onClick,s=e.className,l=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["question","onClick","className"]);return(0,r.jsx)("button",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({type:"button",onClick:a,className:(0,o.x)("focus-visible:!outline-secondary transition-colors duration-200 focus-visible:!outline focus-visible:!outline-2 focus-visible:!outline-offset-2 disabled:cursor-not-allowed","border-primary border","text-secondary","hover:bg-tertiary","disabled:border-gray-300 disabled:text-gray-400 disabled:opacity-50 disabled:hover:bg-transparent","whitespace-normal","rounded-[1.25rem]","px-3.5 py-2","text-left","text-sm font-medium leading-5","dark:text-dark dark:disabled:border-gray-600 dark:disabled:text-gray-500",s)},l),n=n={children:i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{I:()=>i})},367264(e,t,n){"use strict";n.d(t,{H:()=>m});var r=n(391426),o=n(231127),i=n(74175),a=n(933578),s=n(417980),l=function(e){var t=e.activeItem,n=e.dataTestId,o=e.items,l=e.onItemClick,c=(0,a.useMemo)(function(){return o.map(function(e){return{value:e.id,label:e.name}})},[o]),u=(0,a.useMemo)(function(){var e;return null!=(e=c.find(function(e){return e.value===t.id}))?e:null},[c,t.id]);return(0,r.jsx)(i.t,{options:c,value:u,onValueChange:function(e){var t=o.find(function(t){return t.id===(null==e?void 0:e.value)});t&&l(t)},"aria-label":(0,s.t)("community_inbox.filters.select_agent"),align:"start",side:"bottom","data-testid":n})},c=n(973646),u=n(529648),d=n(568316),p=function(e){var t=e.activeItem,n=e.onItemClick,o=e.items,i=e.dataTestId;return(0,r.jsx)(u.ms,{direction:"bottom-start",className:"min-w-fit",buttonClassName:"w-32",menuItemsClassName:"!w-40",buttonDataTestId:i,button:(0,r.jsxs)(u.ms.MenuButton,{className:"hover:bg-secondary-dark border-primary flex h-[34px] !w-fit justify-between !gap-1 rounded-md border bg-transparent !py-1.5 pl-3 pr-2 transition-colors",children:[(0,r.jsx)("div",{className:"max-w-18 gap-x-2 truncate text-left",children:(0,r.jsx)(d.o.LabelSm,{weight:"medium",children:t.name})}),(0,r.jsx)("div",{className:"shrink-0",children:(0,r.jsx)(c.In,{size:16,type:"16-chevron-triangle-down-small",className:"text-dark"})})]}),children:o.map(function(e){var o=e.name,i=e.id;return(0,r.jsx)(u.ms.Item,{onClick:function(){return n(e)},children:(0,r.jsx)(u.ms.ItemLink,{type:"button",active:t.id===i,"aria-label":o,children:(0,r.jsx)("div",{className:"flex items-center gap-x-2",children:(0,r.jsx)("span",{className:"block w-full truncate",children:o})})})},i)})})};function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var m=function(e){return(0,o.T)("circle_v4_dropdown_enabled")?(0,r.jsx)(l,f({},e)):(0,r.jsx)(p,f({},e))}},665111(e,t,n){"use strict";var r=n(391426),o=n(568316),i=n(570310),a=n(721226),s=n(417980),l=function(){var e=(0,a.$)();return(0,r.jsx)("div",{className:(0,i.x)("flex h-14 items-center px-6 py-2",{"border-primary border-b":!e}),children:(0,r.jsx)(o.o.TitleSm,{weight:"semibold",children:(0,s.t)("settings_nav_v3.community_inbox.label")})})};n.d(t,{N:()=>l})},504576(e,t,n){"use strict";n.d(t,{G:()=>y});var r=n(391426),o=n(973646),i=n(568316),a=n(199563),s=n(570310),l=n(534529),c=n(451430),u=n(417980),d=n(980912),p=n(497184),f=n.n(p),m=n(103738),b=function(e){var t,n,a=e.isDirect,s=e.chatRoomName,l=e.timestamp,c=e.lastMessage,u=e.isUnread,d=e.isAiSnoozed,p=!(0,m.e)(new Date(c.created_at));return(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("span",{className:f()("truncate",p?"max-w-[106px]":"max-w-[130px]"),children:(0,r.jsx)(i.o.BodySm,{truncate:!0,weight:"font-semibold",children:s})}),(0,r.jsx)("span",{className:"mt-[-1px] min-w-fit shrink-0",children:(0,r.jsx)(i.o.BodySm,{as:"time",weight:"font-medium",color:"text-timestamp",children:l})}),(0,r.jsxs)("div",{className:"flex grow justify-end",children:[d&&(0,r.jsx)(o.In,{type:"16-ai-snooze-v3",size:16}),u&&(0,r.jsx)(o.In,{type:"16-inbox-unread",size:16})]})]}),(0,r.jsx)("div",{className:"mt-0.5",children:(0,r.jsx)("p",{className:"text-default !line-clamp-1 flex items-center overflow-hidden hyphens-auto break-all text-left text-sm",children:"".concat(a?"":"".concat(null==(t=c.sender)?void 0:t.name,": ")).concat((null==(n=c.body)?void 0:n.circle_ios_fallback_text)||"")})})]})},y=function(e){var t=e.chat,n=e.path,p=e.isBotType,f=void 0!==p&&p,m=e.shouldHightlightChat,y=void 0!==m&&m,h=e.isUnread,g=t.community_bot_profile,v=t.community_member,x=t.last_message,j=void 0===x?{}:x,_=t.id,w=t.ai_snoozed,O=f?g:v,S=f&&!O.avatar_url;return(0,c.isNull)(j)?null:(0,r.jsx)("div",{className:(0,s.x)({"border-secondary-dark mx-2 border-b last:border-none":!y}),children:(0,r.jsxs)(l.N_,{className:(0,s.x)("hover:bg-secondary-dark -mx-2 block cursor-pointer py-[9px]",y?"bg-[#674FD90A]/[.04] px-6":"rounded-md px-4"),activeOptions:{exact:!1,includeSearch:!1},activeProps:{className:"bg-secondary-dark"},to:n,"data-testid":"chat-room-dm-list",children:[y&&(0,r.jsxs)("div",{className:"-mt-1",children:[(0,r.jsx)(o.In,{type:"20-ai-bot-gradient",size:20,className:"mt-1"}),(0,r.jsx)(i.o.LabelXxs,{weight:"semibold",as:"span",textTransform:"uppercase",color:"bg-gradient-to-t from-[#6C47D2] to-[#516DF1] bg-clip-text text-transparent",children:(0,u.t)("messaging.agent")})]}),(0,r.jsx)("div",{className:"flex w-full items-start justify-between",children:(0,r.jsxs)("div",{className:"flex w-full items-center space-x-3",children:[S?(0,r.jsx)(o.In,{type:"36-ai-bot",size:36,className:"!h-[36px] !w-[36px] shrink-0"}):(0,r.jsx)(d.e,{isDirect:!0,otherParticipants:[O]}),(0,r.jsx)(b,{isDirect:!0,chatRoomName:O.name,timestamp:(0,a.z9)(j.created_at,{format:"short"}),lastMessage:j,isUnread:void 0!==h&&h,isAiSnoozed:w})]})})]},_)})}},218877(e,t,n){"use strict";
1var r=n(391426),o=n(570310),i=n(721226),a=n(417980),s=n(674251),l=function(){var e=(0,i.$)();return(0,r.jsxs)("div",{className:(0,o.x)("flex flex-col items-center justify-center",{"h-[calc(100dvh-160px)]":!e,"flex-1":e}),children:[(0,r.jsx)(s.o.LabelMd,{weight:"semibold",children:(0,a.t)("community_inbox.chats.no_conversations")}),(0,r.jsx)(s.o.LabelSm,{children:(0,a.t)("community_inbox.chats.no_conversations_description")})]})};n.d(t,{o:()=>l})},622977(e,t,n){"use strict";n.d(t,{b:()=>g});var r=n(391426),o=n(932252),i=n(678480),a=n(257957),s=n(201525),l=n(808877),c=n(677123),u=n(933578),d=n(325335),p=n(355104),f=n(910423),m=n(26470),b=n(504576),y=n(218877),h=function(e){var t=e.activeSort,n=e.activeChatType,o=e.activeAgent,i=(0,f.Q)({sort:t,filter:"has_member_interaction",chatType:n,agentId:o.id}),h=i.isChatsLoading,g=i.hasNextPage,v=i.fetchNextPage,x=(0,p.c)().isCircleV4,j=(0,u.useId)(),_=(0,c.IH)(),w=_.adminChats,O=_.currentChatId,S=(0,l.uc)().chatInboxPath;if((0,m.U)({activeChatType:n,agentId:o.id}),h)return(0,r.jsx)("div",{className:"h-full overflow-auto p-2",children:(0,r.jsx)(a.a,{})});var P=x?s.G:b.G;return(0,r.jsxs)(r.Fragment,{children:[0==w.length&&(0,r.jsx)(y.o,{}),(0,r.jsx)("div",{id:j,className:"h-full min-h-0 grow basis-0 overflow-auto",children:(0,r.jsx)(d.A,{scrollableTarget:j,className:"p-2",next:v,scrollThreshold:.8,hasMore:!!g,dataLength:w.length,loader:(0,r.jsx)(a.a,{center:!0}),children:w.map(function(e){var t=e.id==O;return(0,r.jsx)(P,{chat:e,path:S({id:e.id.toString()}),isUnread:!t&&e.has_unread_messages_for_admin},e.id)})})})]})},g=function(e){var t=e.activeSort,n=e.activeChatType,a=e.activeAgent;return(0,r.jsx)(o.t,{renderFunc:i.x,children:(0,r.jsx)(h,{activeSort:t,activeChatType:n,activeAgent:a})})}},907342(e,t,n){"use strict";n.d(t,{N:()=>m});var r=n(391426),o=n(231127),i=n(74175),a=n(417980),s=n(207800),l=function(e){var t=e.activeItem,n=e.dataTestId,o=e.localeScope,l=e.onItemClick,c=[{value:s.ZQ.ALL,label:(0,a.t)([o,s.ZQ.ALL])},{value:s.ZQ.UNREAD,label:(0,a.t)([o,s.ZQ.UNREAD])},{value:s.ZQ.AI_PAUSED,label:(0,a.t)([o,s.ZQ.AI_PAUSED])}],u=c.find(function(e){return e.value===t});return(0,r.jsx)(i.t,{options:c,value:u,align:"start",side:"bottom","data-testid":n,onValueChange:function(e){e&&l(e.value)}})},c=n(973646),u=n(529648),d=n(568316),p=function(e){var t=e.className,n=e.activeItem,o=e.localeScope,i=e.onItemClick,l=e.dataTestId;return(0,r.jsx)(u.ms,{direction:"bottom-start",className:t,buttonClassName:"w-full",menuItemsClassName:"!w-40",buttonDataTestId:l,button:(0,r.jsxs)(u.ms.MenuButton,{className:"hover:bg-secondary-dark border-primary flex justify-between !gap-1 rounded-md border bg-transparent !py-1.5 pl-3 pr-2 transition-colors",children:[(0,r.jsx)("div",{className:"flex gap-x-2",children:(0,r.jsx)(d.o.LabelSm,{weight:"medium",children:(0,a.t)([o,n])})}),(0,r.jsx)(c.In,{size:16,type:"16-chevron-triangle-down-small",className:"text-dark"})]}),children:s.yg.map(function(e){var t=e.value,s=e.icon;return(0,r.jsx)(u.ms.Item,{onClick:function(){return i(t)},children:(0,r.jsx)(u.ms.ItemLink,{type:"button",active:n===t,"aria-label":(0,a.t)([o,t]),children:(0,r.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,r.jsx)(c.In,{type:s,size:20}),(0,r.jsx)("span",{children:(0,a.t)([o,t])})]})})},t)})})};function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var m=function(e){return(0,o.T)("circle_v4_dropdown_enabled")?(0,r.jsx)(l,f({},e)):(0,r.jsx)(p,f({},e))}},622182(e,t,n){"use strict";n.d(t,{G:()=>_});var r=n(391426),o=n(257957),i=n(201525),a=n(570310),s=n(721226),l=n(808877),c=n(677123),u=n(872518),d=n(325335),p=n(417980),f=n(743021),m=n(355104),b=n(504576),y=n(218877),h=n(51730),g=n(913961),v=n(451430),x=n(258752),j=function(e){var t=(0,c.IH)().setChats,n=(0,x.qu)({initialPageParam:1,queryKey:["community-inbox-search",e],queryFn:function(t){var n,r=t.pageParam;return n=void 0===r?1:r,(0,h.i_)(g.i.search.communityInbox.chats({params:{page:n,query:e}}))},enabled:e.length>0,getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},select:function(e){var t=e.pages,n=void 0===t?[]:t;return{pages:(0,v.flatten)(n.map(function(e){return e.records})),pageParams:n.map(function(e){return e.page}),pagesList:n}},onSuccess:function(e){t((null==e?void 0:e.pages)||[],"admin")}});return{fetchNextPage:n.fetchNextPage,hasNextPage:n.hasNextPage,isLoading:n.isFetching}},_=function(e){var t=e.searchQuery,n=e.setSearchQuery,h=e.setIsSearchBarVisible,g=(0,m.c)().isCircleV4,v=(0,s.$)(),x=(0,u.o)(t,300),_=j(x),w=_.isLoading,O=_.fetchNextPage,S=_.hasNextPage,P=(0,l.uc)().chatInboxPath,C=(0,c.IH)(),
1k=C.adminChats,I=C.currentChatId,N=g?i.G:b.G;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"border-primary my-1 flex h-10 w-full items-center justify-center",children:(0,r.jsx)(f.D,{searchValue:t,onChange:n,onKeyPress:function(e){e.shiftKey||"Enter"!==e.key||e.preventDefault()},onClickCancel:function(){h(!1),n("")},placeholder:(0,p.t)("community_inbox.header.placeholder"),className:"!h-[34px] duration-500 ease-in",showCancelButton:!0,shouldAutoFocus:!0})}),t&&(w?(0,r.jsx)("div",{className:"h-auto overflow-auto p-2",children:(0,r.jsx)(o.a,{center:!0})}):(0,r.jsxs)(r.Fragment,{children:[0==k.length&&x.length>0&&(0,r.jsx)(y.o,{}),(0,r.jsx)(d.A,{className:(0,a.x)("overflow-auto px-2",{"!h-[calc(100dvh-160px)]":!v}),scrollThreshold:.8,next:O,hasMore:!!S,dataLength:k.length,loader:(0,r.jsx)(o.a,{center:!0}),height:"100%",children:k.map(function(e){var t=e.id==I;return(0,r.jsx)(N,{chat:e,path:P({id:e.id.toString()}),isUnread:!t&&e.has_unread_messages_for_admin},e.id)})})]}))]})}},636875(e,t,n){"use strict";var r=n(391426),o=n(34819),i=n(74175),a=n(417980),s=n(721226),l=function(e){var t,n=e.activeItem,l=e.align,c=e.dataTestId,u=e.items,d=e.localeScope,p=e.onItemClick,f=(0,s.$)(),m=u.map(function(e){return{value:e,label:(0,a.t)([d,e])}}),b=null!=(t=m.find(function(e){return e.value===n}))?t:null;return(0,r.jsx)(i.t,{options:m,value:b,align:void 0===l?"start":l,side:"bottom",trigger:(0,r.jsx)(o.K,{type:"button",icon:"arrow-bottom-top",variant:f?"outline":"ghost",size:f?"md":"sm","data-testid":c,"aria-label":(0,a.t)("community_inbox.header.sort")}),onValueChange:function(e){e&&p(e.value)}})};n.d(t,{q:()=>l})},240079(e,t,n){"use strict";n.d(t,{Y:()=>w});var r=n(391426),o=n(973646),i=n(529648),a=n(754309),s=n(933578),l=n(417980),c=n(898666),u=n(428266),d=n(570310),p=n(355104),f=n(367264),m=n(907342),b=n(207800),y=n(231127),h=n(636875),g=n(568316),v=function(e){var t=e.className,n=e.activeItem,a=e.localeScope,s=e.onItemClick,c=e.items,u=e.button,d=e.direction,p=e.dataTestId;return(0,r.jsx)(i.ms,{direction:void 0===d?"bottom-start":d,className:t,buttonClassName:"w-full",menuItemsClassName:"!w-40",buttonDataTestId:p,button:null!=u?u:(0,r.jsxs)(i.ms.MenuButton,{className:"hover:bg-secondary-dark border-primary flex justify-between rounded-md border bg-transparent !py-1.5 pl-3 pr-2 transition-colors",children:[(0,r.jsx)("div",{className:"flex gap-x-2",children:(0,r.jsx)(g.o.LabelSm,{weight:"medium",children:(0,l.t)([a,n])})}),(0,r.jsx)(o.In,{size:16,type:"16-chevron-triangle-down-small",className:"text-dark"})]}),children:c.map(function(e){return(0,r.jsx)(i.ms.Item,{onClick:function(){return s(e)},children:(0,r.jsx)(i.ms.ItemLink,{type:"button",active:n===e,"aria-label":(0,l.t)([a,e]),children:(0,r.jsx)("div",{className:"flex items-center gap-x-2",children:(0,r.jsx)("span",{children:(0,l.t)([a,e])})})})},e)})})},x=function(e){var t=e.activeItem,n=e.button,o=e.className,i=e.dataTestId,a=e.direction,s=e.items,l=e.localeScope,c=e.onItemClick;return(0,y.T)("circle_v4_dropdown_enabled")?(0,r.jsx)(h.q,{activeItem:t,align:"bottom-end"===a?"end":"start",dataTestId:i,items:s,localeScope:l,onItemClick:c}):(0,r.jsx)(v,{activeItem:t,button:n,className:o,dataTestId:i,direction:a,items:s,localeScope:l,onItemClick:c})};function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}}var w=function(e){var t,n=e.activeSort,y=e.setActiveSort,h=e.activeChatType,g=e.setActiveChatType,v=e.activeAgent,w=e.setActiveAgent,O=e.setIsSearchBarVisible,S=(0,p.c)().isCircleV4,P=function(e){if(Array.isArray(e))return e}(t=(0,s.useState)([b.yZ]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}
1(t)||_(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),C=P[0],k=P[1],I=(0,a.W7)({currentPage:1}).data;return(0,s.useEffect)(function(){var e;(null==I?void 0:I.records)&&I.records.length>0&&k([b.yZ].concat(function(e){if(Array.isArray(e))return j(e)}(e=I.records)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))},[I]),(0,r.jsx)("div",{className:(0,d.x)("sticky top-0 z-10 my-1 flex h-10 items-center justify-between gap-2 pl-2 pr-3",{"bg-primary dark:bg-secondary":S,"bg-primary":!S}),children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,r.jsx)("div",{className:"shrink-0",children:(0,r.jsx)(m.N,{activeItem:h,localeScope:"community_inbox.filters",onItemClick:g,dataTestId:"chat-types-dropdown"})}),(0,r.jsx)("div",{className:"grid min-w-0 flex-1 grid-cols-1",children:(0,r.jsx)(f.H,{activeItem:v,onItemClick:function(e){return w(e)},items:C,dataTestId:"agent-dropdown"})}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center",children:[(0,r.jsx)(x,{className:"min-w-fit",items:Object.values(b.TU),activeItem:n,localeScope:"community_inbox.filters",onItemClick:y,dataTestId:"sort-filter-dropdown",button:(0,r.jsx)(i.ms.MenuButton,{className:"hover:bg-tertiary flex justify-between rounded-full bg-transparent !py-1.5 px-1 transition-colors",children:(0,r.jsx)(o.In,{type:"16-sort-v2",className:"text-default",size:16})}),direction:"bottom-end"}),(0,r.jsx)(c.$,{interactive:!1,content:(0,l.t)("community_inbox.header.search_messages"),children:(0,r.jsx)(u.K,{iconSize:20,buttonSize:24,name:"20-search-v3",ariaLabel:(0,l.t)("community_inbox.header.search_messages"),className:"!rounded-full",onClick:function(){return O(!0)}})})]})]})})}},207800(e,t,n){"use strict";var r,o=n(417980);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a={LATEST:"latest",OLDEST:"oldest"},s={ALL:"all",UNREAD:"admin_unread",AI_PAUSED:"ai_paused"},l={get name(){return(0,o.t)("community_inbox.filters.all_agents")},id:0},c=Object.values((i(r={},s.ALL,{value:s.ALL,icon:"20-inbox"}),i(r,s.UNREAD,{value:s.UNREAD,icon:"20-inbox-unread"}),i(r,s.AI_PAUSED,{value:s.AI_PAUSED,icon:"20-inbox-snooze"}),r));n.d(t,{TU:()=>a,ZQ:()=>s,yZ:()=>l,yg:()=>c})},632343(e,t,n){"use strict";var r={FIRST_LOAD:"FIRST_LOAD",PAGINATION:"PAGINATION",NEW_MESSAGE:"NEW_MESSAGE"};n.d(t,{K:()=>"scrollableMessagesDiv",k:()=>r})},442379(e,t,n){"use strict";var r=n(51730),o=n(913961),i=n(933578),a=n(258752),s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=void 0===t?"":t,s=e.disabled,l=(0,a.IT)({queryKey:["community-inbox","chat-bot","profiles",n],queryFn:function(){return(0,r.i_)(o.i.communityInbox.botSearch({params:{name:n}}))},enabled:!(void 0!==s&&s),staleTime:3e5*(""===n),gcTime:6e5}),c=l.data,u=l.isInitialLoading;return{botProfiles:(0,i.useMemo)(function(){var e;return null!=(e=null==c?void 0:c.records)?e:[]},[null==c?void 0:c.records]),isBotsLoading:u}};n.d(t,{j:()=>s})},910423(e,t,n){"use strict";var r=n(51730),o=n(913961),i=n(933578),a=n(258752),s=n(207800),l=n(677123);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.filter,u=void 0===n?"":n,d=t.per_page,p=void 0===d?20:d,f=t.sort,m=void 0===f?s.TU.LATEST:f,b=t.chatType,y=void 0===b?s.ZQ.ALL:b,h=t.agentId,g=void 0===h?0:h,v=t.isPinned,x=void 0!==v&&v,j=(0,l.IH)(),_=j.setChats,w=j.appendChats,O=function(e){if(Array.isArray(e))return e}(e=(0,i.useState)(1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return c(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),S=O[0],P=O[1];(0,i.useEffect)(function(){P(1)},[y,u,x,g,m]);var C=function(e){var t={page:e,filter:u,per_page:p,sort:m,chat_type:y};return 0!==g&&(t.agent_id=g),(0,r.i_)(o.i.communityInbox.index({params:t}))},k=(0,a.IT)({queryKey:["community-inbox",u,p,m,y,g,x,S],queryFn:function(){return C(S)}}),I=k.data,N=void 0===I?{}:I,A=k.isLoading;(0,i.useEffect)(function(){if(!x&&!A){var e=N.page,t=N.records,n=void 0===t?[]:t,r="mine"===u?"member":"admin";1===(void 0===e?1:e)?_(n,r):w(n,r)}},[w,g,y,N,u,A,x,S,_,m]);var E=(null==N?void 0:N.records)||[],R=(null==N?void 0:N.has_next_page)||!1;return{chats:E,isChatsLoading:A&&1===S,hasNextPage:R,fetchNextPage:function(){R&&null!=N.page&&P(N.page+1)}}};n.d(t,{Q:()=>u})},26470(e,t,n){"use strict";var r=n(230763),o=n(677123),i=n(544819),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.activeChatType,n=e.agentId,a=void 0===n?0:n,s=(0,r.Od)().currentCommunity,l=null==s?void 0:s.id,c=(0,o.IH)(),u=c.appendMessage,d=c.updateMessage,p=c.destroyMessage,f=c.appendChat,m=c.updateChat,b=c.updateAgentChats,y=c.destroyChat,h=c.markAllAdminChatsAsRead,g=function(e){return 0===a||e.community_bot_profile.id===a};return(0,i.h)({channel:"CommunityInbox::AdminChannel",community_id:l,canCreateConnection:!!l,onMessageReceive:function(e){switch(e.event){case"createMessage":u(e.json_message,"admin");break;case"updateMessage":d(e.json_message);break;case"destroyMessage":p(e.json_message.id);break;case"createChat":var n=e.json_message;n.has_member_interaction&&g(n)&&f(n,"admin");break;case"updateChat":var r=e.json_message;r.has_member_interaction&&g(r)&&m(r,"admin");break;case"destroyChat":y(e.json_message.id,"admin");break;case"adminMarkAllChatsAsRead":h(t);break;case"updateAgentChats":b(e.json_message.agent_id,e.json_message.enabled,e.json_message.chats)}}},[l,t,a])};n.d(t,{U:()=>a})},103263(e,t,n){"use strict";var r=n(51730),o=n(913961),i=n(258752),a=function(){return{createChat:(0,i.n_)({mutationFn:function(e){return(0,r.oK)(o.i.communityInbox.create(),{community_bot_profile_id:e.id,body:e.body||null})},onError:function(e){console.error("Error while creating chat",e)}}).mutateAsync}};n.d(t,{T:()=>a})},571801(e,t,n){"use strict";var r=n(910423),o=function(){var e,t=(0,r.Q)({filter:"mine",per_page:1,isPinned:!0}),n=t.chats,o=void 0===n?[]:n,i=t.isChatsLoading;return{botChat:null==o||null==(e=o.filter(function(e){return!e.disabled}))?void 0:e[0],isLoading:i}};n.d(t,{N:()=>o})},914803(e,t,n){"use strict";var r=n(677123),o=n(442379),i=function(){var e=(0,o.j)({name:""}).botProfiles,t=(0,r.IH)().memberChats;return(null==e?void 0:e.length)>0||(null==t?void 0:t.length)>0};n.d(t,{D:()=>i})},625720(e,t,n){"use strict";var r=n(391426),o=n(51875),i=n(361971),a=function(e){if(e)return e.startsWith("#")?e:"#".concat(e)},s=function(e){var t=e.name,n=e.disabled,s=void 0!==n&&n,l=e.supportTransparency,c=void 0!==l&&l,u=e.label,d=e.description,p=e.error,f=e.invalid,m=e.layout,b=e.labelTooltip,y=e.rootProps,h=(0,i.xW)().control;return(0,r.jsx)(i.xI,{control:h,name:t,render:function(e){var t=e.field,n=t.value,i=t.onChange,l=a(n);return(0,r.jsx)(o.A,{defaultValue:l,value:l,onChange:i,disabled:s,supportTransparency:c,label:u,description:d,error:p,invalid:f,layout:m,labelTooltip:b,rootProps:y})}})};s.displayName="Form.ColorPicker",n.d(t,{s:()=>s})},143786(e,t,n){"use strict";var r=n(391426),o=n(343212),i=n(364473),a=n(231127);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var c=function(e){if(!(0,a.T)("circle_v4_form_elements_enabled"))return(0,r.jsx)(o.y,s({},e));var t=e.variant,n=e.addable,c=e.onChange,u=e.value,d=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["variant","addable","onChange","value"]);return"tags"===t?(0,r.jsx)(i.q,l(s({},d),{addable:!!n,multiple:!0,onChange:function(e){null==c||c({value:e})},value:Array.isArray(u)?u:[]})):(0,r.jsx)(i.q,l(s({},d),{addable:!!n,onChange:function(e){null==c||c({value:e})},value:"number"==typeof u?u:null}))};c.displayName="CommunityMemberSelect",n.d(t,{X:()=>o.X,y:()=>c})},962548(e,t,n){"use strict";var r=n(391426),o=n(791009),i=n(417980),a=n(735747),s=function(e){var t=e.cancelText,n=void 0===t?(0,i.t)("cancel"):t,s=e.children,l=e.confirmText,c=void 0===l?(0,i.t)("confirm"):l,u=e.confirmVariant,d=e.dataTestId,p=e.disabled,f=e.loading,m=e.formId,b=e.isOpen,y=e.onCancel,h=e.onClose,g=e.onConfirm,v=e.size,x=e.title,j=(0,a.$)(v),_=(0,a.n)(u);return(0,r.jsx)(o.a.Root,{open:b,onOpenChange:function(e){e||null==h||h()},size:j,children:(0,r.jsxs)(o.a.Content,{children:[(0,r.jsx)(o.a.Header,{title:x,showCloseButton:!!h&&!f}),(0,r.jsx)(o.a.Body,{children:s}),(0,r.jsx)(o.a.Footer,{secondaryAction:(y||h)&&!f?{label:n,onClick:function(){y?y():null==h||h()},shouldCloseModal:!1}:void 0,primaryAction:{label:c,variant:_,disabled:p,loading:f,onClick:function(){null==g||g()},type:m?"submit":"button",form:m,"data-testid":d}})]})})};n.d(t,{V:()=>s})},66108(e,t,n){"use strict";var r=n(391426),o=n(854843),i=n(231127),a=n(962548),s=function(e){if((0,i.T)("circle_v4_modals_enabled")){var t=e.cancelText,n=e.children,s=e.confirmText,l=e.confirmVariant,c=e.disabled,u=e.loading,d=e.formId,p=e.isOpen,f=e.onCancel,m=e.onClose,b=e.onConfirm,y=e.size,h=e.title,g=e.dataTestId;return(0,r.jsx)(a.V,{cancelText:t,confirmText:s,confirmVariant:l,disabled:c,loading:u,formId:d,isOpen:p,onCancel:f,onClose:m,onConfirm:b,size:y,title:h,dataTestId:g,children:n})}return(0,r.jsx)(o.R,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))};n.d(t,{R:()=>s})},106264(e,t,n){"use strict";n.d(t,{I:()=>g});var r=n(391426),o=n(595214),i=n(231127),a=n(125665),s=n(791009),l=n(417980),c=n(403603),u=n(933578),d=n(690210),p=n(735747);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var m=function(e){var t,n=e.confirmUserPrompt,r=e.confirmVariant,o=e.isDisabled,i=e.onCancel,a=e.onClose,s=e.onConfirm,l=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(""))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return f(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=l[0],m=l[1],b=(0,u.useMemo)(function(){return!(0,d.x)(c,n)||!!o},[c,n,o]),y=function(){m("")};return{userInput:c,setUserInput:m,shouldDisableButton:b,compassVariant:(0,p.n)(r),handleOpenChange:function(e){e||(y(),null==a||a())},handleCancel:function(){y(),null==i||i()},handleConfirm:function(){y(),null==s||s()}}},b="modals.secure_confirmation",y=function(e){var t=e.title,n=e.description,o=e.cancelText,i=void 0===o?(0,l.t)([b,"cancel"]):o,u=e.confirmText,d=void 0===u?(0,l.t)([b,"confirm"]):u,p=e.confirmUserPrompt,f=void 0===p?(0,l.t)([b,"confirm_prompt"]):p,y=e.confirmVariant,h=e.isDisabled,g=e.isOpen,v=e.onClose,x=e.onConfirm,j=e.onCancel,_=e.position,w=e.promptGrouping,O=e.size,S=e.children,P=m({confirmUserPrompt:f,confirmVariant:void 0===y?"primary":y,isDisabled:h,onCancel:j,onClose:v,onConfirm:x}),C=P.userInput,k=P.setUserInput,I=P.shouldDisableButton,N=P.compassVariant,A=P.handleOpenChange,E=P.handleCancel,R=P.handleConfirm,L=(0,r.jsx)(a.E,{content:(0,l.t)([b,"prompt_description"],{prompt:f})}),D=(0,r.jsx)(c.p,{type:"text",value:C,onChange:function(e){return k(e.target.value)},"data-testid":"secure-confirmation-input"});return(0,r.jsx)(s.a.Root,{open:g,onOpenChange:A,size:void 0===O?"md":O,position:_,children:(0,r.jsxs)(s.a.Content,{children:[(0,r.jsx)(s.a.Header,{title:t,description:n,showCloseButton:!0}),(0,r.jsx)(s.a.Body,{children:"inline"===(void 0===w?"default":w)?(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[S,(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[L,D]})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)("div",{children:S}),L]}),D]})}),(0,r.jsx)(s.a.Footer,{secondaryAction:{label:i,onClick:E,shouldCloseModal:!1},primaryAction:{label:d,variant:N,disabled:I,onClick:R,shouldCloseModal:!1}})]})})};function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var g=function(e){return(0,i.T)("circle_v4_modals_enabled")?(0,r.jsx)(y,h({},e)):(0,r.jsx)(o.I,h({},e))}},863148(e,t,n){"use strict";var r=n(391426),o=n(490391),i=n(89732),a=n(231127);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var l=function(e){if(!(0,a.T)("circle_v4_form_elements_enabled"))return(0,r.jsx)(o.s,s({},e));var t=e.name,n=e.rules,l=e.onChange,c=e.spaceGroups,u=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["name","rules","onChange","spaceGroups"]);return(0,r.jsx)(i.M,s({name:t,rules:n,onChange:l,spaceGroups:c},u))};l.displayName="SpaceGroupSelect",n.d(t,{s:()=>l})},429273(e,t,n){"use strict";var r=n(391426),o=n(901176),i=n(471600),a=n(231127);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function l(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}var c=function(e){var t=e.trigger,n=l(e,["trigger"]);if(!(0,a.T)("circle_v4_form_elements_enabled"))return(0,r.jsx)(o.r,s({},n));
1var c=n.name,u=n.rules,d=n.defaultValue,p=n.onChange,f=n.spaces,m=n.shouldDisplayHomepage,b=n.shouldShowEmoji,y=n.layout,h=l(n,["name","rules","defaultValue","onChange","spaces","shouldDisplayHomepage","shouldShowEmoji","layout"]);return(0,r.jsx)(i.$,s({name:void 0===c?"":c,rules:u,defaultValue:d,onChange:p,spaces:f,shouldDisplayHomepage:m,shouldShowEmoji:b,layout:y,trigger:t},h))};c.displayName="SpaceSelect",n.d(t,{r:()=>c})},632707(e,t,n){"use strict";var r=n(391426),o=n(739042),i=n(186784),a=n(927139),s=n.n(a),l=n(933578),c=n(837630),u=n(231127),d={secondary:"outline","secondary-light":"outline","danger-outline":"primary",danger:"primary"},p={secondary:"outline","secondary-light":"outline",danger:"destructive","danger-outline":"destructive"},f=function(e){var t;return null!=(t=d[null!=e?e:""])?t:"primary"},m=function(e){var t;return null!=(t=p[null!=e?e:""])?t:"primary"},b=function(e){var t=e.disabled,n=void 0!==t&&t,a=e.large,d=void 0!==a&&a,p=e.small,b=e.onChange,y=e.options,h=e.selectedAction,g=e.setSelectedAction,v=e.type,x=void 0===v?"button":v,j=e.variant,_=(0,u.T)("circle_v4_buttons_enabled"),w=(0,l.useMemo)(function(){var e;return null!=(e=y.find(function(e){return e.value===(null==h?void 0:h.value)}))?e:y[0]},[y,null==h?void 0:h.value]),O=(0,l.useMemo)(function(){return y.filter(function(e){return e.value!==(null==w?void 0:w.value)})},[y,null==w?void 0:w.value]),S=(0,l.useMemo)(function(){return O.map(function(e){return{label:e.label,onClick:function(){null==g||g(e),s()(b)?b(e):s()(e.onClick)&&e.onClick()}}})},[O,g,b]),P=(0,l.useCallback)(function(){s()(null==w?void 0:w.onClick)&&w.onClick()},[w]);if(!_)return(0,r.jsx)(c.u,{disabled:n,large:d,onChange:b,options:y,selectedAction:h,setSelectedAction:null!=g?g:function(){},type:x,variant:j});var C=d?"lg":void 0!==p&&p?"sm":"md";return 0===O.length?(0,r.jsx)(o.$,{variant:m(j),size:C,disabled:n,type:x,onClick:P,"data-testid":"perform-action-button",children:null==w?void 0:w.label}):(0,r.jsx)(i.f,{variant:f(j),size:C,disabled:n,type:x,onClick:P,menuOptions:S,"data-testid":"perform-action-button",children:null==w?void 0:w.label})};n.d(t,{f:()=>b,u:()=>b})},644348(e,t,n){"use strict";var r=n(391426),o=n(955015),i=n(692138),a=n(382762),s=n(231127);function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var u=function(e){switch(e){case"success":return"success";case"warning":return"warning";case"danger":return"destructive";case"info":return"info";default:return"secondary"}},d=function(e){if((0,s.T)("circle_v4_badges_enabled")){var t=e.variant,n=e.textTransform,d=e.children,p=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["variant","textTransform","children"]);if("string"!=typeof d&&"number"!=typeof d)return(0,r.jsx)(a.W,l({},e));var f=u(t),m=c(l({},p),{variant:f,label:String(d),textClassName:n?(0,i.e)("Badge",n):""});return(0,r.jsx)(o.E,c(l({},m),{"data-testid":"status-badge"}))}return(0,r.jsx)(a.W,l({},e))};n.d(t,{W:()=>d})},809061(e,t,n){"use strict";var r=n(391426),o=n(974618),i=n(231127);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=n.removeOnClose,l=void 0!==s&&s,c=o.PT.create(function(e){return(0,r.jsx)(t,a({},e))}),u=o.PT.create(function(t){var n,i,s=(0,o.hS)();return(0,r.jsx)(e,(n=a({},t),i=i={open:s.visible,onOpenChange:function(e){e||(l?s.remove():s.hide())}},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n))});return function(){var e=(0,i.T)("circle_v4_modals_enabled");return(0,o.hS)(e?u:c)}}n.d(t,{F:()=>s})},458339(e,t,n){"use strict";var r,o=n(690182),i=n(417980);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s={ALL:"all",DRAFT:"draft",SENT:"sent",PROCESSING:"processing",SCHEDULED:"scheduled",FAILED:"failed",SENDING:"sending"},l={TRIAL_LIMIT_REACHED:"trial_limit_reached",LIMIT_REACHED:"limit_reached",SYSTEM_UNAVAILABLE:"system_unavailable",EMAIL_HUB_NOT_ENABLED:"email_hub_not_enabled",BLOCKED:"blocked",UNKNOWN:"unknown",MAILER_ERROR:"mailer_error",NO_RECIPIENTS:"no_recipients",INVALID_SENDER_ADDRESS:"invalid_sender_address"},c={standard:"standard",workflow:"workflow"},u=[s.ALL,s.SENT,s.DRAFT,s.SCHEDULED],d=(a(r={},s.ALL,"default"),a(r,s.DRAFT,"default"),a(r,s.SENT,"success"),a(r,s.PROCESSING,"info"),a(r,s.SCHEDULED,"warning"),a(r,s.FAILED,"danger"),a(r,s.SENDING,"info"),r),p=[s.PROCESSING,s.SENT,s.FAILED,s.SENDING],f=function(){return(0,i.t)("dynamic_vars_groups.member")},m=function(){return(0,i.t)("dynamic_vars_groups.community")},b=[{get group(){return f()},isNullable:!0,get label(){return(0,i.t)("dynamic_vars.member_first_name")},value:"{{member.first_name}}"},{get group(){return f()},isNullable:!0,get label(){return(0,i.t)("dynamic_vars.member_last_name")},value:"{{member.last_name}}"},{get group(){return f()},isNullable:!0,get label(){return(0,i.t)("dynamic_vars.member_name")},value:"{{member.name}}"},{get group(){return f()},isNullable:!1,get label(){return(0,i.t)("dynamic_vars.member_email")},value:"{{member.email}}"},{get group(){return f()},isNullable:!1,get label(){return(0,i.t)("dynamic_vars.member_public_uid")},value:"{{member.public_uid}}"},{get group(){return m()},isNullable:!1,get label(){return(0,i.t)("dynamic_vars.community_name")},value:"{{community.name}}"},{get group(){return m()},isNullable:!1,get label(){return(0,i.t)("dynamic_vars.community_url")},value:"{{community.url}}"}],y=(0,o.A)(b);n.d(t,{Lg:()=>"status",N9:()=>l,Tf:()=>b,U1:()=>d,a0:()=>15e3,dW:()=>u,iZ:()=>c,kJ:()=>p,t5:()=>s,vu:()=>y})},934019(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(904781),a=n(258752),s=function(){return(0,a.IT)(i.NB.settings())},l=function(e){return(0,a.n_)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({mutationFn:function(e){return(0,r.$H)(o.iK.gamification.settings(),e)}},e))};n.d(t,{Y:()=>l,k:()=>s})},456806(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o,i,a={DETAILS:"details",ACCESS:"access",PAYWALLS:"paywalls"},s=Object.values(a),l=(r(o={},a.DETAILS,"/settings/invitation_links/new/details"),r(o,a.ACCESS,"/settings/invitation_links/new/access"),r(o,a.PAYWALLS,"/settings/invitation_links/new/paywalls"),o),c=(r(i={},a.DETAILS,"/settings/invitation_links/$id/edit/details"),r(i,a.ACCESS,"/settings/invitation_links/$id/edit/access"),r(i,a.PAYWALLS,"/settings/invitation_links/$id/edit/paywalls"),i),u=function(e){return s.includes(e)};n.d(t,{OA:()=>s,h:()=>l,lQ:()=>c,rL:()=>u,vG:()=>a})},281810(e,t,n){"use strict";var r=n(391426),o=n(933578);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a={disableRightSidebar:!1,disableSidebar:!1,hideAppBar:!1,shouldHideSidebarNestedNavBar:!1},s=(0,o.createContext)({config:{},setConfig:function(){},mergeConfig:function(){}});s.displayName="LayoutContext";var l=function(e){var t,n=e.children,l=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(a))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return i(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=l[0],u=l[1];return(0,r.jsx)(s.Provider,{value:{config:c,setConfig:u,resetToDefault:function(){u(a)},mergeConfig:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(function(t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t,e)})}},children:n})},c=function(){return(0,o.useContext)(s)};n.d(t,{L:()=>c,z:()=>l})},161434(e,t,n){"use strict";var r=n(501323),o=n(519104),i=n(451430),a=n(933578),s=n(243994);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function u(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var d=s.Ik().shape({page:s.ai().integer().min(1).nullable().transform(function(e){return"number"==typeof e&&Number.isFinite(e)?Math.max(e,1):null}),filter:s.Ik({closed:s.zM().optional(),live_at:s.Ik({gte:s.ai().optional(),lte:s.ai().optional()}).optional().default(void 0),name:s.Yj().optional(),recording:s.zM().optional(),room_type:s.Yj().optional(),status:s.Yj().optional()}).nullable().default(void 0),order:s.gl().nullable().transform(function(e){if(!e||(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)!="object")return null;var t={},n=!0,r=!1,o=void 0;try{for(var i,a=Object.entries(e)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s,c=(s=i.value,function(e){if(Array.isArray(e))return e}(s)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(s)||function(e){if(e){if("string"==typeof e)return l(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,2)}}(s)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=c[0],d=c[1];("asc"===d||"desc"===d)&&(t[u]=d)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return Object.keys(t).length>0?t:null})}),p=function(e){return d.cast(e,{stripUnknown:!0})},f=function(){var e,t,n,s=p((0,r.S)({strict:!1})),l=(0,o.Z)(),d=null!=(e=s.page)?e:1,f=null!=(t=s.filter)?t:{},m=!(0,i.isEmpty)((0,i.omit)(f,"closed")),b=null!=(n=s.order)?n:{},y=(0,a.useCallback)(function(e){l({from:"/settings/live_streams",search:function(t){return u(c({},t),{page:1===e?void 0:e})}})},[l]),h=(0,a.useCallback)(function(e){l({from:"/settings/live_streams",search:function(t){return u(c({},t),{page:void 0,filter:(0,i.isEmpty)(e)?void 0:e})}})},[l]),g=(0,a.useCallback)(function(e){var t={};e.forEach(function(e){e.id&&(t[e.id]=e.desc?"desc":"asc")}),l({from:"/settings/live_streams",search:function(e){return u(c({},e),{page:void 0,order:(0,i.isEmpty)(t)?void 0:t})}})},[l]),v=(0,a.useCallback)(function(){y(d+1)},[y,d]),x=(0,a.useCallback)(function(){y(Math.max(d-1,1))},[y,d]);return{page:d,filter:f,hasActiveFilters:m,order:b,updateOrder:g,updatePage:y,updateFilter:h,nextPage:v,prevPage:x}};n.d(t,{E:()=>f,u:()=>p})},397935(e,t,n){"use strict";var r,o=n(417980);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a={DETAILS:"details",ACCESS:"access",EMAILS:"emails",PAYWALLS:"paywalls"},s=Object.values(a),l=(i(r={},a.DETAILS,"/settings/members/invite/details"),i(r,a.ACCESS,"/settings/members/invite/access"),i(r,a.EMAILS,"/settings/members/invite/emails"),i(r,a.PAYWALLS,"/settings/members/invite/paywalls"),r),c=function(e){return s.includes(e)},u="email",d=[{get label(){return(0,o.t)("settings.invite_members.details_tab.invite_types.by_email")},icon:{type:"20-manual-invite",viewBox:"0 0 20 20",className:"!h-5 !w-5"},value:u},{get label(){return(0,o.t)("settings.invite_members.details_tab.invite_types.import_csv")},icon:{type:"20-folder-open",viewBox:"0 0 20 20",className:"!h-5 !w-5"},value:"csv"}];n.d(t,{J1:()=>l,KS:()=>a,VO:()=>"invite_type",XY:()=>c,Xn:()=>s,Ye:()=>"csv",lA:()=>d,oG:()=>u,yW:()=>"skip_invitation"})},722495(e,t,n){"use strict";var r,o=n(501323),i=n(961355),a=n(397935),s=n(600451);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=i.k5([a.oG,a.Ye]).catch(a.oG),u=i.vk(function(e){if("string"==typeof e&&(e===s.w||e.startsWith("/")&&!e.startsWith("//")))return e},i.Yj().optional()),d=i.Ik((l(r={}
1,a.VO,c),l(r,"from",u),l(r,"prefill_token",i.Yj().optional().catch(void 0)),r)),p=function(e){return d.parse(e)},f=function(){return p((0,o.S)({strict:!1}))};n.d(t,{FC:()=>p,_x:()=>d,ss:()=>f})},600451(e,t,n){"use strict";var r=n(915779),o=n(519104),i=n(393235),a="getting-started",s=function(e){var t=(0,o.Z)();return function(){e===a?t({href:i.aL.onboarding()}):(null==e?void 0:e.startsWith("/"))&&!e.startsWith("//")?t({href:e}):t({to:r.ty.members.manage})}};n.d(t,{Q:()=>s,w:()=>a})},37635(e,t,n){"use strict";n.d(t,{j:()=>l});var r=n(391426),o=n(722114),i=n(568316),a=n(146796),s=n(417980);function l(e){var t=e.memberId,n=e.className,l=e.shortDisabledLabel,c=e.shouldHideIfNoScore,u=(0,o.LH)(),d=u.data,p=u.isInitialLoading,f=(0,a.CV)();if(p)return null;if(f){var m={activityScore:{label:void 0!==l&&l?(0,s.t)("activity_score.view"):(0,s.t)("activity_score.view_score"),activity:"disabled"}};return(0,r.jsx)(o.hr,{activityScore:m.activityScore})}var b=null==d?void 0:d.get(t);return void 0!==c&&c&&!b?null:b?(0,r.jsx)(o.pP,{scoreDetail:b,className:n}):(0,r.jsx)(i.o.LabelSm,{color:"text-default",children:(0,s.t)("n/a")})}},919414(e,t,n){"use strict";var r=n(285834),o=n(933578),i=n(258752);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var s=n(126032).xe,l=function(e){var t,n,l,c=null!=e?e:{},u=c.from,d=c.content_type,p=c.flagged_by,f=c.order,m=c.query,b=c.perPage,y=c.initialPage,h=c.options,g=c.reason_type,v=c.status,x=r.oq.list({from:u,content_type:d,flagged_by:p,initialPage:void 0===y?1:y,order:f,perPage:void 0===b?s:b,query:void 0===m?"":m,reason_type:g,status:void 0===v?"inbox":v}),j=a({getNextPageParam:function(e){var t=e.has_next_page,n=e.page;return t?Number(n)+1:void 0},getPreviousPageParam:function(e){var t=e.page;return t>1?t-1:void 0},keepPreviousData:!0},void 0===h?{}:h),_=(0,i.qu)(a({},x,j)),w=(0,o.useMemo)(function(){var e,t;return null!=(e=null==(t=_.data)?void 0:t.pages)?e:[]},[null==(n=_.data)?void 0:n.pages]),O=null!=(t=null==(l=w[0])?void 0:l.count)?t:0;return{data:_.data,fetchNextPage:_.fetchNextPage,fetchPreviousPage:_.fetchPreviousPage,hasNextPage:_.hasNextPage,hasPreviousPage:_.hasPreviousPage,isFetching:_.isFetching,isFetchingNextPage:_.isFetchingNextPage,isFetchingPreviousPage:_.isFetchingPreviousPage,isLoading:_.isInitialLoading,pages:w,totalRecords:O}};n.d(t,{$:()=>l,y:()=>s})},273467(e,t,n){"use strict";n.d(t,{Y:()=>y});var r=n(391426),o=n(844842),i=n(892907),a=n(534529),s=n(417980),l=n(914704),c=n(22144),u=n(44773),d=n(477593),p=n(366376),f="settings.moderation.review_flagged_content_modal",m=function(e){var t=e.author,n=e.flagged_contentable,r=null!=n?n:{},o=r.id,i=r.initiator,a=r.post_slug,s=r.recipient,l=r.slug,p=r.space,f=r.title,m=r.type,b=r.is_embedded,y=r.parent_message_id,h=m===d.fE?i:t,g=null!=h?h:{},v=g.avatar_url,x=g.name,j=g.sqid,_=null!=p?p:{},w=_.slug,O=_.name,S=null==s?void 0:s.name,P=null==s?void 0:s.sqid,C="/c/".concat(w),k=m===d.Sk?C:"".concat(C,"/").concat(a||l);return{avatarUrl:v,chatMessageUrl:m===d.Sk&&o&&b&&w?(0,u.B9)({slug:w,uuid:""},{id:o,parent_message_id:null!=y?y:null,embedded:!!b}):null,communityMember:h,communityMemberUrl:(0,c.Cq)({sqid:j}).info,flaggedContentableId:o,memberName:x,postTitle:f,postUrl:k,recipientName:S,recipientUrl:P?(0,c.Cq)({sqid:P}).info:void 0,spaceName:O,spaceUrl:C}},b=function(e){var t,n=e.reported_at,r=e.reporter,o=e.status,i=(null==(t=e.flagged_contentable)?void 0:t.type)===d.fE,a=null==r?void 0:r.name;return r?i&&a?(0,s.t)([f,"reported_by"],{name:a}):"pending"===o?(0,s.t)([f,"awaiting_moderation"]):(0,s.t)([f,"reported"],{time:(0,p.PK)(void 0===n?"":n)}):(0,s.t)([f,"auto_flagged"])},y=function(e){var t,n,c,u=e.flaggedContent,d=e.onNavigate,p=(null!=(c=u.flagged_contentable)?c:{}).type;if(!p)return null;var f=m(u),y=f.avatarUrl,h=f.chatMessageUrl,g=f.communityMember,v=f.communityMemberUrl,x=f.flaggedContentableId,j=f.memberName,_=f.postTitle,w=f.postUrl,O=f.recipientName,S=f.recipientUrl,P=f.spaceName,C=f.spaceUrl,k={onClick:d,className:"font-semibold leading-5 text-dark"};return(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[g&&(0,r.jsx)(a.N_,{to:v,onClick:d,className:"flex self-start",children:(0,r.jsx)(o.t,{name:null!=j?j:"",src:y,size:"lg"})}),(0,r.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[g?(0,r.jsx)(a.N_,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({to:v},k),n=n={children:j},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)):(0,r.jsx)(i.o5,{component:"span",variant:"label-md",children:(0,s.t)(["settings.moderation.review_flagged_content_modal","deleted_member"])}),(0,r.jsx)(l.F,{chatMessageUrl:h,flaggedContentableId:x,navLinkProps:k,postTitle:_,postUrl:w,recipientName:O,recipientUrl:S,spaceName:P,spaceUrl:C,type:p})]}),(0,r.jsx)(i.o5,{variant:"caption",color:"secondary",children:b(u)})]})]})}},168330(e,t,n){"use strict";n.d(t,{U:()=>f});var r=n(391426),o=n(257957),i=n(892907),a=n(325335),s=n(417980),l=n(794073),c=n(477593),u=function(e){var t=e.title,n=e.items;return 0===n.length?null:(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(i.o5,{variant:"label-xs",children:t}),(0,r.jsx)("div",{className:"flex flex-col gap-6",children:n.map(function(e){var t,n;return(0,r.jsx)(l.w,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={showStatusBadge:!0,status:e.status},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t),e.id)})})]})},d="settings.moderation.review_flagged_content_modal",p="reports-list-scroll-container",f=function(e){var t=e.currentReportFallback,n=e.currentReportId,f=e.hasNextPage,m=e.isLoading,b=e.onLoadMore,y=e.reports,h=void 0===y?[]:y,g=e.type;if(void 0!==m&&m&&0===h.length)return(0,r.jsx)("div",{className:"flex items-center justify-center px-8 py-12",children:(0,r.jsx)(o.a,{center:!0})});if(0===h.length)return(0,r.jsx)("div",{className:"flex flex-col gap-6 pt-6",children:(0,r.jsx)(i.o5,{variant:"label-sm",children:(0,s.t)([d,"empty"])})});if(g===c.fE||g===c.Sk){var v,x=null!=(v=h.find(function(e){return e.id===n}))?v:t,j=h.filter(function(e){return e.id!==n});return(0,r.jsxs)("div",{id:p,className:"flex max-h-96 flex-col gap-6 overflow-y-auto pt-6",children:[(0,r.jsx)(u,{title:(0,s.t)([d,"this_report"]),items:x?[x]:[]}),j.length>0&&(0,r.jsx)(a.A,{style:{overflow:"initial"},scrollThreshold:.8,next:function(){return null==b?void 0:b()},hasMore:void 0!==f&&f,loader:(0,r.jsx)(o.a,{center:!0}),dataLength:j.length,scrollableTarget:p,children:(0,r.jsx)(u,{title:(0,s.t)([d,"other_reports"]),items:j})})]})}return(0,r.jsx)("div",{className:"flex flex-col gap-6 pt-6",children:h.map(function(e){return(0,r.jsx)(l.w,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),e.id)})})}},638608(e,t,n){"use strict";var r=n(391426),o=n(892907),i=n(148131),a=function(e){var t=e.content,n=(0,i.G)(t);return n?(0,r.jsx)("div",{className:"flex items-center gap-4 pt-4",children:(0,r.jsx)(o.o5,{variant:"label-sm",children:n})}):null};n.d(t,{T:()=>a})},617373(e,t,n){"use strict";var r=n(876823),o=n.n(r),i=n(933578),a=n(417980),s=n(477593);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function u(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var d="settings.moderation.review_flagged_content_modal",p={isActive:!1,reason:""},f=function(e){var t,n=e.flaggedContentId,r=e.isAuthorFlagged,f=e.isFlaggedForConnect,m=e.isEmbeddedChat,b=e.status,y=e.type,h=e.onApprove,g=e.onReject,v=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(p))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return l(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),x=v[0],j=v[1],_=(0,i.useCallback)(function(){j(p)},[]);(0,i.useEffect)(function(){j(u(c({},p),{isActive:"approved"===b}))},[n,b]);var w=(0,i.useCallback)(function(e){j(function(t){return u(c({},t),{isActive:!0,options:e})})},[]),O=(0,i.useCallback)(function(){g(x.reason||null,x.options)},[g,x.reason,x.options]),S=!b,P=y===s.fE,C=y===s.Sk,k=S&&P&&!f,I=S&&P,N=S&&C,A=S&&!P&&!C&&!r,E=function(e){return e.flatMap(function(e){var t=e.when,n=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["when"]);return t?[n]:[]})},R=(0,i.useMemo)(function(){return E([{when:k,label:(0,a.t)([d,"remove_and_flag_for_connect"]),onClick:function(){return w({flagForConnect:!0})}},{when:I,label:(0,a.t)([d,"remove_and_disable_connections"]),onClick:function(){return w({disableConnections:!0})}},{when:N&&m,label:(0,a.t)([d,"remove_and_disable_chat_messaging"]),onClick:function(){return w({flagForChat:!0})}},{when:N&&!m,label:(0,a.t)([d,"remove_and_disable_direct_messaging"]),onClick:function(){return w({disableDirectMessaging:!0})}},{when:A,label:(0,a.t)([d,"remove_and_flag_member"]),onClick:function(){return w({flagMember:!0})}}])},[k,I,N,A,m,w]);return{rejectState:x,setRejectState:j,handleRejectWithOptions:w,handleRejectWithReason:O,rejectMenuOptions:R,approveMenuOptions:(0,i.useMemo)(function(){return E([{when:k,label:(0,a.t)([d,"approve_and_flag_for_connect"]),onClick:function(){return h({flagForConnect:!0})}},{when:A,label:(0,a.t)([d,"approve_and_flag_member"]),onClick:function(){return h({flagMember:!0})}}])},[k,A,h]),rejectLabel:y?(0,a.t)([d,"reject_".concat(o()(y))]):"",resetRejectState:_}};n.d(t,{W:()=>f})},715644(e,t,n){"use strict";var r=n(391426),o=n(547570),i=n(417980),a="settings.moderation.review_flagged_content_modal",s=function(e){var t=e.authorName,n=e.contactSnapshot,s=n.post,l=void 0===s?0:s,c=n.comment,u=void 0===c?0:c,d=n.connect_connection,p=void 0===d?0:d,f=n.chat_room_message,m=void 0===f?0:f,b=l+u+p+m;if(0===b)return null;var y=b-1,h=[(0,i.t)([a,"contact_snapshot","posts"],{count:l}),(0,i.t)([a,"contact_snapshot","comments"],{count:u}),(0,i.t)([a,"contact_snapshot","connection_requests"],{count:p}),(0,i.t)([a,"contact_snapshot","chat_messages"],{count:m})].join(" \xb7 ");return(0,r.jsx)(o.F,{variant:"warning",iconColor:"warning",title:(0,i.t)([a,"contact_snapshot",y>0?"other_reports_title":"reports_title"],{name:t,count:y>0?y:b}),description:h,icon:"triangle-exclamation"})};n.d(t,{V:()=>s})},914704(e,t,n){"use strict";var r=n(391426),o=n(568316),i=n(534529),a=n(417980),s=n(477593);function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var u="settings.moderation.review_flagged_content_modal",d=function(e){var t=e.chatMessageUrl,n=e.flaggedContentableId,d=e.navLinkProps,p=e.postTitle,f=e.postUrl,m=e.recipientName,b=e.recipientUrl,y=e.spaceName,h=e.spaceUrl;switch(e.type){case s.M$:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.N_,c(l({to:f},d),{children:(0,a.t)([u,"posted"])})),(0,r.jsx)(o.o.LabelMd,{as:"span",children:(0,a.t)([u,"in"])}),(0,r.jsx)(i.N_,c(l({to:h},d),{children:y}))]});case s.lr:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.o.LabelMd,{as:"span",children:(0,a.t)([u,"commented"])}),(0,r.jsx)(o.o.LabelMd,{as:"span",children:(0,a.t)([u,"in"])}),(0,r.jsx)(i.N_,c(l({to:f,hash:"comment_wrapper_".concat(n)},d),{children:p}))]});case s.fE:if(!m)return null;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.o.LabelMd,{as:"span",color:"text-dark",children:(0,a.t)([u,"sent_to"])}),b?(0,r.jsx)(i.N_,c(l({to:b},d),{children:m})):(0,r.jsx)(o.o.LabelMd,{as:"span",color:"text-dark",weight:"semibold",children:m})]});case s.Sk:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.o.LabelMd,{as:"span",children:(0,a.t)([u,"chat_message_action"])}),y&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.o.LabelMd,{as:"span",children:(0,a.t)([u,"in"])}),(0,r.jsx)(i.N_,c(l({to:null!=t?t:h},d),{children:y}))]})]});default:return null}};n.d(t,{F:()=>d})},150679(e,t,n){"use strict";n.d(t,{a:()=>x});var r=n(391426),o=n(933578),i=n(202173),a=n(892907),s=n(713821),l=n(954467),c=n(577887),u=n(625049),d=n(617492),p=n(35
15104),f=n(674251),m=n(734527),b=function(e){var t,n=e.author,o=e.isFlagged,i=void 0!==o&&o,a=e.sentAt,u=e.tiptapBody,d=null!=(t=null==n?void 0:n.name)?t:"",p=null==n?void 0:n.avatar_url,b=(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("div",{className:"shrink-0",children:(0,r.jsx)(m.J,{name:d,src:p,size:"9"})}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(f.o.LabelSm,{color:"text-dark",weight:"semibold",children:d}),a&&(0,r.jsx)(f.o.LabelXs,{color:"text-secondary",children:(0,s.GP)(new Date(a),"h:mm a")}),i&&(0,r.jsx)(l.L,{shouldShowTooltip:!1})]}),(0,r.jsx)(c.u,{rich_text_body:u,shouldScrollIntoView:!1,isPinnedMessageAtTop:!1,editedAt:null,chatRoomAccessArr:[],shouldShowPreviewBlocks:!1,chatProps:{unfurlUrls:[]}})]})]});return i?(0,r.jsx)("div",{className:"rounded-lg bg-warning/10 p-2",children:b}):(0,r.jsx)("div",{className:"p-2",children:b})},y=function(e){var t;return{id:e.id,community_member_id:e.id,name:null!=(t=e.name)?t:"",avatar_url:e.avatar_url,user_public_uid:e.public_uid}},h=function(e){var t,n=e.author,o=e.isFlagged,i=void 0!==o&&o,f=e.sentAt,m=e.tiptapBody,h=(0,p.c)().isCircleV4,g=(0,d.g)();if(!h)return(0,r.jsx)(b,{author:n,isFlagged:i,sentAt:f,tiptapBody:m});var v=null!=(t=null==n?void 0:n.name)?t:"",x=n?y(n):void 0,j=(0,r.jsxs)("div",{className:"flex w-full justify-start",children:[(0,r.jsx)(u.b,{sender:x,isLoading:!1,onOpenProfile:function(){(null==x?void 0:x.user_public_uid)&&g.show({memberPublicId:x.user_public_uid})}}),(0,r.jsxs)("div",{className:"min-w-0 w-full flex-1 overflow-x-auto",children:[(0,r.jsxs)("div",{className:"mb-px flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,r.jsx)(a.o5,{variant:"heading-sm",children:v}),f&&(0,r.jsx)(a.o5,{variant:"body-sm",color:"disabled",children:(0,s.GP)(new Date(f),"h:mm a")}),i&&(0,r.jsx)(l.L,{shouldShowTooltip:!1})]}),(0,r.jsx)(c.u,{rich_text_body:m,shouldScrollIntoView:!1,isPinnedMessageAtTop:!1,editedAt:null,chatRoomAccessArr:[],shouldShowPreviewBlocks:!1,chatProps:{unfurlUrls:[]}})]})]});return i?(0,r.jsx)("div",{className:"rounded-lg bg-warning/10 p-2",children:j}):(0,r.jsx)("div",{className:"p-2",children:j})},g=function(e){if(e){var t=e.closest("[data-flagged-chat-scroll-container]");(0,i.A)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({block:"center",scrollMode:"if-needed",behavior:"auto"},t&&{boundary:t}))}},v=function(e){var t=e||{},n=t.id,o=t.author,i=t.sent_at,a=t.tiptap_body;return(0,r.jsx)(h,{author:o,sentAt:i,tiptapBody:a},n)},x=function(e){var t=e.flaggedContent,n=(0,o.useRef)(null),i=t.author,a=t.flagged_contentable,s=null!=a?a:{},l=s.sent_at,c=s.tiptap_body,u=s.context_messages_before,d=void 0===u?[]:u,p=s.context_messages_after,f=void 0===p?[]:p;(0,o.useLayoutEffect)(function(){var e=n.current,t=function(){return g(e)};t();var r=requestAnimationFrame(function(){requestAnimationFrame(t)}),o=e&&"u">typeof ResizeObserver?new ResizeObserver(function(){return g(e)}):null;return e&&o&&o.observe(e),function(){cancelAnimationFrame(r),null==o||o.disconnect()}},[null==t?void 0:t.id]);var m=d.length>0,b=f.length>0;return(0,r.jsxs)("div",{className:"relative flex flex-col gap-1 border border-primary rounded-md p-2",children:[m&&(0,r.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 z-10 h-18 rounded-t-md bg-gradient-to-b from-primary to-transparent"}),d.map(v),(0,r.jsx)("div",{ref:n,children:(0,r.jsx)(h,{author:i,isFlagged:!0,sentAt:l,tiptapBody:c})}),f.map(v),b&&(0,r.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 z-10 h-18 rounded-b-md bg-gradient-to-t from-primary to-transparent"})]})}},657720(e,t,n){"use strict";n.d(t,{w:()=>y});var r=n(391426),o=n(988269),i=n(568316),a=n(786158),s=n(257957),l=n(931639),c=n(398061),u=n(319143),d=n(328
1187),p=n(527374),f=n(498772),m=function(e){var t=e.postSlug,n=e.spaceId,o=(0,p.C)({spaceId:n,postSlug:t}),i=o.isInitialLoading,a=o.post,m=(0,d.AF)(a)?a:void 0;return i||!m?(0,r.jsx)(s.a,{}):(0,r.jsx)(c.Yy,{spaceId:n,children:(0,r.jsx)(u.U,{perPagePostIds:[[m.id]],children:(0,r.jsx)(l.m,{post:m,children:(0,r.jsx)(f.F,{})})})})},b=n(417980),y=function(e){var t,n,s=e.textBody,l=e.trixBody,c=e.tiptapBody,u=e.isImagePost,d=e.postSlug,p=e.spaceId;return void 0!==u&&u&&d&&p?(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[c&&(0,r.jsx)(a._,{tiptapBody:c}),(0,r.jsx)("div",{className:"-mt-2",children:(0,r.jsx)(m,{postSlug:d,spaceId:p})})]}):s?(0,r.jsx)(i.o.BodyMd,{children:s}):l?(0,r.jsx)(o.X,{content:l,disableFullScreenPreview:!0}):(null==c||null==(n=c.body)||null==(t=n.content)?void 0:t.length)?(0,r.jsx)(a._,{tiptapBody:c}):(0,r.jsx)(i.o.LabelSm,{color:"text-lightest",children:(0,b.t)(["settings.moderation.review_flagged_content_modal","empty"])})}},794073(e,t,n){"use strict";n.d(t,{w:()=>g});var r=n(391426),o=n(417980),i=n(644348),a=n(568316),s=n(125665),l=n(497184),c=n.n(l),u=function(e){var t=e.reported_reason_type,n=e.profanity_filter_matches,i=e.reported_reason_body;return t&&n||i?(0,r.jsxs)("div",{className:c()("bg-tertiary ml-12 flex flex-col gap-1.5 rounded-md px-4 py-3"),children:[t&&n&&(0,r.jsx)(a.o.LabelSm,{children:(0,r.jsx)(s.E,{content:(0,o.t)(["settings.moderation.review_flagged_content_modal","report_reasons",t],{matches:n}),as:"span"})}),i&&(0,r.jsx)(a.o.LabelSm,{as:"p","data-testid":"report-reason-body",children:i})]}):null},d=n(973646),p=n(734527),f=n(366376),m="settings.moderation.review_flagged_content_modal",b=function(e){var t,n=e.profanity_filter_matches,i=e.reported_at,s=void 0===i?"":i,l=e.reported_reason_type,c=e.reporter,u=null!=(t=null==c?void 0:c.name)?t:"";return c?(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)(p.J,{name:u,src:c.avatar_url,size:"8"}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(a.o.LabelSm,{weight:"semibold",children:u}),(0,r.jsx)(a.o.LabelSm,{color:"text-dark",children:(0,o.t)([m,"reason_labels.reported_for"])}),(0,r.jsx)(a.o.LabelSm,{color:"text-dark",weight:"semibold","data-testid":"report-reason-type",children:(0,o.t)([m,"report_reasons",void 0===l?"":l])})]}),(0,r.jsx)(a.o.LabelXs,{color:"text-dark",children:(0,f.PK)(s)})]})]}):(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)("div",{className:"flex size-8 items-center justify-center rounded-full bg-black",children:(0,r.jsx)(d.In,{type:"lightning",size:16,className:"text-white"})}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(a.o.LabelSm,{weight:"semibold","data-testid":"report-reason-type",children:(0,o.t)([m,"automatically_flagged"])}),(void 0===n?"":n)?(0,r.jsx)(a.o.LabelSm,{color:"text-dark",children:(0,o.t)([m,"reason_labels.profanity_filter"])}):(0,r.jsx)(a.o.LabelSm,{color:"text-dark",children:(0,o.t)([m,"reason_labels.for_approval"])})]}),(0,r.jsx)(a.o.LabelXs,{color:"text-dark",children:(0,f.PK)(s)})]})]})},y="settings.moderation.review_flagged_content_modal",h=function(e){switch(e){case"approved":return{label:(0,o.t)([y,"status_approved"]),variant:"success"};case"rejected":return{label:(0,o.t)([y,"status_rejected"]),variant:"danger"};default:return{label:(0,o.t)([y,"status_pending"]),variant:"default"}}},g=function(e){var t=e.id,n=e.profanity_filter_matches,o=void 0===n?"":n,a=e.reported_at,s=e.reported_reason_body,l=e.reported_reason_type,c=void 0===l?"":l,d=e.reporter,p=e.showStatusBadge,f=h(e.status),m=f.label,y=f.variant;return(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between",children:[(0,r.jsx)(b,{profanity_filter_matches:o,reported_at:void 0===a?"":a,reported_reason_type:c,reporter:d}),p&&(0,r.jsx)(i.W,{variant:y,children:m})]}),(0,r.jsx)(u,{profanity_filter_matches:o,reported_reason_body:s,reported_reason_type:c})]},t)}},200673(e,t,n){"use strict";var r=n(391426),o=n(257957),i=n(568316),a=n(325335),s=n(417980),l=n(477593),c=n(794073);function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var d="settings.moderation.review_flagged_content_modal",p="reports-list-scroll-container",f=function(e,t){return t.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(i.o.LabelXs,{color:"text-light",weight:"semibold",children:e}),(0,r.jsx)("div",{className:"flex flex-col gap-6",children:t.map(function(e){var t,n;return(0,r.jsx)(c.w,(t=u({},e),n=n={showStatusBadge:!0,status:e.status},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t),e.id)})})]})},m=function(e){var t=e.currentReportFallback,n=e.currentReportId,m=e.hasNextPage,b=e.isLoading,y=e.onLoadMore,h=e.reports,g=void 0===h?[]:h,v=e.type;if(void 0!==b&&b&&0===g.length)return(0,r.jsx)("div",{className:"flex items-center justify-center px-8 py-12",children:(0,r.jsx)(o.a,{center:!0})});if(0===g.length)return(0,r.jsx)("div",{className:"flex flex-col gap-6 px-8 py-6",children:(0,r.jsx)(i.o.LabelSm,{color:"text-lightest",children:(0,s.t)([d,"empty"])})});if(v===l.fE||v===l.Sk){var x,j=null!=(x=g.find(function(e){return e.id===n}))?x:t,_=g.filter(function(e){return e.id!==n});return(0,r.jsxs)("div",{id:p,className:"flex max-h-96 flex-col gap-6 overflow-y-auto px-8 py-6",children:[f((0,s.t)([d,"this_report"]),j?[j]:[]),(0,r.jsx)(a.A,{style:{overflow:"initial"},scrollThreshold:.8,next:function(){return null==y?void 0:y()},hasMore:void 0!==m&&m,loader:(0,r.jsx)(o.a,{center:!0}),dataLength:_.length,scrollableTarget:p,children:f((0,s.t)([d,"other_reports"]),_)})]})}return(0,r.jsx)("div",{className:"flex flex-col gap-6 px-8 py-6",children:g.map(function(e){return(0,r.jsx)(c.w,u({},e),e.id)})})};n.d(t,{U:()=>m})},519970(e,t,n){"use strict";var r=n(391426),o=n(568316),i=n(148131),a=function(e){var t=e.content,n=(0,i.G)(t);return n?(0,r.jsx)("div",{className:"flex items-center gap-4 px-8 py-0",children:(0,r.jsx)(o.o.LabelSm,{children:n})}):null};n.d(t,{T:()=>a})},251067(e,t,n){"use strict";n.d(t,{_:()=>ea});var r,o=n(391426),i=n(974618),a=n(231127),s=n(739042),l=n(791009),c=n(642400),u=n(519104),d=n(501323),p=n(933578),f=n(417980),m=n(201668),b=n(753135),y=n(941397),h=n(477593),g=n(905928),v=n(617373);function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){x(e,t,n[t])})}return e}function _(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var w="settings.moderation.review_flagged_content_modal",O=(x(r={},h.Sk,"message_review_title"),x(r,h.lr,"comment_review_title"),x(r,h.fE,"connection_review_title"),r),S=function(e){var t;return(0,f.t)([w,null!=(t=O[e])?t:"post_review_title"])},P=function(e){var t=e.flaggedContentId,n=e.shouldShowGoToModerationButton,r=e.open,i=e.onOpenChange,a=(0,g.D)(t),x=a.approveFlaggedContent,O=a.rejectFlaggedContent,P=a.flaggedContent,C=a.isApproving,k=a.isRejecting,I=(0,u.Z)(),N=(0,d.S)({strict:!1}),A=null!=P?P:{},E=A.author_is_flagged,R=A.flagged_contentable,L=A.id,D=A.initiator_is_flagged_for_connect,T=A.member_connection_reports_count,M=A.reports,F=void 0===M?[]:M,K=A.status,B=null==R?void 0:R.type,q=B===h.fE,U=B===h.Sk,z=q?void 0===T?0:T:F.length,W=(0,p.useRef)(i),$=(0,p.useCallback)(function(e){x({options:e}),W.current(!1)},[x]),V=(0,p.useCallback)(function(e,t){O({reason:e,options:t}),W.current(!1)},[O]),H=(0,v.W)({flaggedContentId:t,isAuthorFlagged:E,isFlaggedForConnect:D,isEmbeddedChat:U&&!!(null==R?void 0:R.is_embedded),status:K,type:B,onApprove:$,onReject:V}),G=H.rejectState,Z=H.setRejectState,Q=H.handleRejectWithOptions,Y=H.handleRejectWithReason,J=H.rejectMenuOptions,X=H.approveMenuOptions,ee=H.rejectLabel,et=H.resetRejectState,en=(0,p.useCallback)(function(e){e||(N.flagged_content_id&&I({to:".",search:function(e){return _(j({},e),{flagged_content_id:void 0})}}),et()),i(e)},[N.flagged_content_id,I,et,i]);if(W.current=en,!P||void 0===K||!B)return null;var er=!K,eo=er||"approved"===K,ei={label:(0,f.t)([w,"reject"]),variant:"primary",onClick:function(){return Q()},menuOptions:J.length>0?J:void 0},ea={label:(0,f.t)([w,"approve"]),disabled:C,onClick:function(){return $()},menuOptions:X.length>0?X:void 0},es=(er||"rejected"===K)&&eo?{label:(0,f.t)([w,"approve"]),onClick:function(){return $()}}:void 0;return(0,o.jsx)(l.a.Root,{open:r,onOpenChange:en,size:"lg",children:(0,o.jsxs)(l.a.Content,{children:[(0,o.jsx)(l.a.Header,{title:S(B),suffix:void 0!==n&&n&&(0,o.jsx)("div",{className:"flex justify-end",children:(0,o.jsx)(s.$,{type:"button",variant:"ghost",onClick:function(){window.open(y.t.content.moderation,"_blank")},startIcon:"square-arrow-top-right",title:(0,f.t)("flagged_contents.go_to_moderation"),children:(0,f.t)("flagged_contents.go_to_moderation")})})}),(0,o.jsxs)(l.a.Body,{children:[(0,o.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,o.jsx)(m.h,{flaggedContent:P,onNavigate:function(){return en(!1)}}),z>0&&(0,o.jsx)(b.I,{flaggedContent:P,flaggedContentId:t,currentReportId:L,currentReportFallback:P,reports:F,reportsCount:z,type:B})]}),G.isActive&&(0,o.jsx)("div",{className:"pt-4",children:(0,o.jsx)(c.f,{rows:3,placeholder:(0,f.t)([w,"rejection_note_placeholder"]),value:G.reason,onChange:function(e){return Z(function(t){return _(j({},t),{reason:e.target.value})})},label:(0,f.t)([w,"moderation_note"])})})]}),G.isActive?(0,o.jsx)(l.a.Footer,{primaryAction:{label:ee,variant:"primary",disabled:k,onClick:Y}}):(0,o.jsx)(l.a.Footer,{secondaryAction:es,primaryAction:eo?ei:ea})]})})},C=n(737225),k=n(560651),I=n(517338),N=n(674251),A=n(518757),E=n(973646),R=n(568316),L=n(59655),D=n(366376),T=n(715644),M=n(150679),F=n(657720),K=n(570310),B=n(22144),q=n(534529),U=n(44773),z=n(734527),W=n(914704),$="settings.moderation.review_flagged_content_modal",V=function(e){var t,n,r=e.flaggedContent,i=e.isInsideTabPanel,a=void 0!==i&&i,s=e.onNavigate,l=r.author,c=r.flagged_contentable,u=r.reported_at,d=r.reporter,p=r.status,m=null!=c?c:{},b=m.id,y=m.initiator,g=m.post_slug,v=m.recipient,x=m.slug,j=m.space,_=m.title,w=m.type,O=m.is_embedded,S=m.parent_message_id;if(!w)return null;var P=w===h.fE,C=P?y:l,k=null==d?void 0:d.name,I=null!=C?C:{},N=I.avatar_url,A=I.name,E=I.sqid,L=null!=j?j:{},T=L.slug,M=L.name,F=null==v?void 0:v.name,V=null==v?void 0:v.sqid,H="/c/".concat(T),G=w===h.Sk?H:"".concat(H,"/").concat(g||x),Z=w===h.Sk&&b&&O&&T?(0,U.B9)({slug:T,uuid:""},{id:b,parent_message_id:null!=S?S:null,embedded:!!O}):null,Q=(0,B.Cq)({sqid:E}).info,Y=V?(0,B.Cq)({sqid:V}).info:void 0,J={onClick:s,className:"font-semibold leading-5 text-dark"};return(0,o.jsxs)("div",{className:(0,K.x)("flex items-center gap-3",{"pb-4":a,"p-8 pb-4":!a}
1),children:[C&&(0,o.jsx)(q.N_,{to:Q,onClick:s,className:"flex self-start",children:(0,o.jsx)(z.J,{name:null!=A?A:"",src:N,size:"10"})}),(0,o.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,o.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[C?(0,o.jsx)(q.N_,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({to:Q},J),n=n={children:A},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)):(0,o.jsx)(R.o.LabelMd,{as:"span",children:(0,f.t)([$,"deleted_member"])}),(0,o.jsx)(W.F,{chatMessageUrl:Z,flaggedContentableId:b,navLinkProps:J,postTitle:_,postUrl:G,recipientName:F,recipientUrl:Y,spaceName:M,spaceUrl:H,type:w})]}),(0,o.jsx)(R.o.LabelXs,{color:"text-secondary",children:d?P&&k?(0,f.t)([$,"reported_by"],{name:k}):"pending"===p?(0,f.t)([$,"awaiting_moderation"]):(0,f.t)([$,"reported"],{time:(0,D.PK)(void 0===u?"":u)}):(0,f.t)([$,"auto_flagged"])})]})]})},H="settings.moderation.review_flagged_content_modal",G=function(e){var t,n,r,i=e.flaggedContent,a=e.onNavigate,s=i.action_by_community_member_name,l=i.action_reason_body,c=i.author,u=i.contact_snapshot,d=i.content_modified_since_report,p=i.content_snapshot,m=i.flagged_contentable,b=null!=m?m:{},y=b.initiator,g=b.is_image_post,v=b.post_slug,x=b.slug,j=b.space,_=b.title,w=b.type;if(!w)return null;var O=s&&(null==l?void 0:l.trim()),S=_&&!g&&w===h.M$,P=null!=(r=null==c?void 0:c.name)?r:null==y?void 0:y.name,C=w===h.Sk;return(0,o.jsxs)(k.o.Panel,{className:"flex min-h-0 flex-col p-6",children:[(0,D.te)(u,P)&&P&&(0,o.jsx)("div",{className:"mb-4",children:(0,o.jsx)(T.V,{authorName:P,contactSnapshot:u})}),(0,o.jsx)(V,{flaggedContent:i,isInsideTabPanel:!0,onNavigate:a}),O&&(0,o.jsx)(L.F,{type:"warning",title:(0,f.t)([H,"moderation_note_title"],{user:s}),description:l,className:"mb-4"}),d&&(0,o.jsxs)("div",{className:"bg-secondary mb-4 flex items-start gap-3 rounded-lg px-4 py-3",children:[(0,o.jsx)(E.In,{type:"20-info",size:16,className:"text-secondary mt-0.5 shrink-0"}),(0,o.jsx)(R.o.LabelSm,{color:"text-secondary",children:(0,f.t)([H,"content_modified_alert"])})]}),S&&(0,o.jsx)("div",{className:"mb-4",children:(0,o.jsx)(R.o.TitleMd,{color:"text-dark",children:_})}),C?(0,o.jsx)("div",{className:"min-h-0 min-w-0 flex-1 overflow-y-auto","data-flagged-chat-scroll-container":!0,children:(0,o.jsx)(M.a,{flaggedContent:i})}):(0,o.jsx)(F.w,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},(0,D.A0)(w,null==p?void 0:p.note,m)),n=n={isImagePost:g,postSlug:v||x,spaceId:null==j?void 0:j.id},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))]})},Z=n(387099),Q=function(e){var t=e.shouldShowGoToModerationButton,n=e.onClose;return(0,o.jsx)(C.aF.Header,{className:"!py-0",children:(0,o.jsxs)(C.aF.HeaderActions,{className:"absolute right-0 top-0 mr-6 mt-6 items-center",children:[t&&(0,o.jsxs)(Z.$,{type:"button",variant:"plain",onClick:function(){window.open(y.t.content.moderation,"_blank")},className:"flex items-center",children:[(0,o.jsx)(E.In,{type:"16-square-arrow-top-right",size:20,className:"!text-darkest mr-1"}),(0,o.jsx)(R.o.BodySm,{as:"span",color:"text-darkest",weight:"font-medium",children:(0,f.t)("flagged_contents.go_to_moderation")})]}),(0,o.jsx)(C.aF.CloseButton,{onClick:n})]})})},Y=n(200673),J=n(141954),X=n(519970),ee=function(e){var t=e.flaggedContent,n=e.flaggedContentId,r=e.currentReportId,i=e.currentReportFallback,a=e.reports,s=e.type,l=s===h.fE,c=(0,J.J)(l?n:void 0),u=c.reports,d=c.hasNextPage,p=c.fetchNextPage,f=c.isLoading;return(0,o.jsxs)(k.o.Panel,{children:[(0,o.jsx)("div",{className:"pt-2",children:(0,o.jsx)(X.T,{content:t})}),(0,o.jsx)(Y.U,{currentReportId:r,currentReportFallback:l||s===h.Sk?i:void 0,reports:l?u:a,type:s,hasNextPage:d,isLoading:f,onLoadMore:p})]})},et="settings.moderation.review_flagged_content_modal",en="inline-flex h-9 items-center justify-center rounded-xl border-none bg-transparent px-4 py-2",er="!bg-primary !border !border-solid !border-primary",eo=i.PT.create(function(e){var t=e.flaggedContentId,n=e.shouldShowGoToModerationButton,r=(0,i.hS)(),a=(0,g.D)(t),s=a.approveFlaggedContent,l=a.rejectFlaggedContent,c=a.flaggedContent,p=a.isApproving,m=a.isRejecting,b=(0,d.S)({strict:!1}),y=(0,u.Z)(),v=null!=c?c:{},x=v.author_is_flagged,j=v.flagged_contentable,_=v.id,w=v.initiator_is_flagged_for_connect,O=v.member_connection_reports_count,S=v.reports,P=void 0===S?[]:S,E=v.status,R=null==j?void 0:j.type,L=R===h.fE?void 0===O?0:O:P.length,D=function(){r.visible&&(b.flagged_content_id&&y({to:".",search:function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={flagged_content_id:void 0},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t}}),r.hide())};return c&&void 0!==E&&R?(0,o.jsxs)(C.aF,{isOpen:r.visible,onClose:D,contentPortalId:"review-modal-content",children:[(0,o.jsx)(C.aF.Overlay,{}),(0,o.jsxs)(C.aF.Content,{size:"lg",children:[(0,o.jsx)(Q,{shouldShowGoToModerationButton:void 0!==n&&n,onClose:D}),(0,o.jsxs)(C.aF.Body,{className:"flex flex-col !p-0",children:[(0,o.jsx)("div",{className:"px-6 pb-4 pt-6",children:(0,o.jsx)(N.o.TitleMd,{children:function(){switch(R){case h.Sk:return(0,f.t)([et,"message_review_title"]);case h.lr:return(0,f.t)([et,"comment_review_title"]);case h.fE:return(0,f.t)([et,"connection_review_title"]);default:return(0,f.t)([et,"post_review_title"])}}()})}),(0,o.jsxs)(k.o.Group,{className:"!min-h-0 !flex-1 !flex !flex-col !px-0",children:[(0,o.jsxs)(k.o.List,{className:"border-primary border-b px-6 pb-4",listClassName:"gap-1",children:[(0,o.jsx)(k.o,{className:en,activeClassName:er,textClassName:"!font-medium",hideInvisibleBlock:!0,children:(0,f.t)([et,"details"])}),(0,o.jsx)(k.o,{className:en,activeClassName:er,textClassName:"!font-medium",hideInvisibleBlock:!0,children:(0,o.jsxs)("span",{className:"flex items-center gap-2",children:[(0,f.t)([et,"reports"]),(0,o.jsx)(I.E,{label:String(L),truncate:!1,className:"!rounded-md",textSizeClassName:"text-xs",labelClassName:"!text-xs"})]})})]}),(0,o.jsxs)(k.o.Panels,{className:"!min-h-0 !flex-1 !flex !flex-col !overflow-hidden",children:[(0,o.jsx)(G,{flaggedContent:c,onNavigate:D}),(0,o.jsx)(ee,{flaggedContent:c,flaggedContentId:t,currentReportId:_,currentReportFallback:c,reports:P,type:R})]})]})]}),(0,o.jsx)(C.aF.Footer,{className:"!p-0",children:(0,o.jsx)(A.V,{type:R,i18nRoot:et,status:E,isApproving:p,isRejecting:m,isAuthorFlagged:x,isEmbeddedChat:R===h.Sk&&!!(null==j?void 0:j.is_embedded),isFlaggedForConnect:w,onApprove:function(e){s({options:e}),D()},onReject:function(e,t){l({reason:e,options:t}),D()}})})]})]}):null}),ei=i.PT.create(function(e){var t,n,r=(0,i.hS)();return(0,o.jsx)(P,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={open:r.visible,onOpenChange:function(e){e||r.hide()}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}),ea=function(){var e=(0,a.T)("circle_v4_modals_enabled");return(0,i.hS)(e?ei:eo)}},905928(e,t,n){"use strict";var r=n(285834),o=n(146917),i=n(258752),a=n(417980),s=n(717526),l=n(477593),c=n(643660),u="settings.moderation.review_flagged_content_modal",d=function(e){var t,n,d=(0,s.d)(),p=d.success,f=d.error,m=(0,c.Y)(),b=m.approve,y=m.reject,h=(0,i.IT)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},r.oq.detail(e)),n=n={enabled:!!e},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)),g=h.data,v=h.isInitialLoading,x=function(){r.nu.all()},j=function(){if(x(),(null==g||null==(e=g.flagged_contentable)?void 0:e.type)===l.M$){var e,t=g.flagged_contentable.id;t&&(o.w.allPosts(),o.w.postDetails(t))}},_=(0,i.n_)({mutationFn:function(t){return b(e,t.options)}
1,onSuccess:function(){j(),p((0,a.t)([u,"success_approving"]))},onError:function(){return f((0,a.t)([u,"error_approving"]))}}),w=_.mutate,O=_.isPending,S=(0,i.n_)({mutationFn:function(t){return y(e,t.reason,t.options)},onSuccess:function(){j(),p((0,a.t)([u,"success_rejecting"]))},onError:function(){return f((0,a.t)([u,"error_rejecting"]))}});return{approveFlaggedContent:w,isApproving:O,rejectFlaggedContent:S.mutate,isRejecting:S.isPending,isLoading:v,flaggedContent:g}};n.d(t,{D:()=>d})},141954(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(451430),a=n(933578),s=n(258752),l=function(e){var t,n,l,c,u=(0,s.qu)({queryKey:["member-connection-reports",e],initialPageParam:1,queryFn:function(t){var n,i,a=t.pageParam;return n=null!=e?e:"",i=void 0===a?1:a,(0,r.i_)(o.iK.flaggedContent.memberConnectionReports({id:n,params:{page:i,per_page:10}}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},enabled:!!e});return{reports:(0,a.useMemo)(function(){var e,t;return(0,i.flatMap)(null!=(e=null==(t=u.data)?void 0:t.pages)?e:[],function(e){return e.records})},[null==(n=u.data)?void 0:n.pages]),totalCount:null!=(t=null==(c=u.data)||null==(l=c.pages[0])?void 0:l.count)?t:0,hasNextPage:!!u.hasNextPage,fetchNextPage:u.fetchNextPage,isLoading:u.isInitialLoading}};n.d(t,{J:()=>l})},801392(e,t,n){"use strict";var r={INBOX:"inbox",APPROVED:"approved",REJECTED:"rejected"},o=["inbox","approved","rejected"],i="from",a="content_type",s="reason_type",l="flagged_by",c=[i,a,s,l];n.d(t,{Lg:()=>"status",Sc:()=>i,Sp:()=>o,WR:()=>l,cg:()=>a,er:()=>"settings.moderation",vP:()=>c,xZ:()=>r,xc:()=>s})},643660(e,t,n){"use strict";var r=n(51730),o=n(915779),i=function(){return{exportCsv:function(e){return(0,r.oK)(o.iK.flaggedContent.exportCsv(e))},approve:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.kS)(o.iK.flaggedContent.approve({id:e}),{flag_member:t.flagMember,flag_for_connect:t.flagForConnect})},reject:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,r.kS)(o.iK.flaggedContent.reject({id:e}),{action_reason_body:t,flag_member:n.flagMember,flag_for_connect:n.flagForConnect,flag_for_chat:n.flagForChat,disable_direct_messaging:n.disableDirectMessaging,disable_connections:n.disableConnections})}}};n.d(t,{Y:()=>i})},27202(e,t,n){"use strict";var r=n(801392),o=n(919414),i=function(){var e=(0,o.$)({status:r.xZ.INBOX}),t=e.totalRecords,n=e.isLoading,i=(0,o.$)({status:r.xZ.APPROVED}),a=i.totalRecords,s=i.isLoading,l=(0,o.$)({status:r.xZ.REJECTED}),c=l.totalRecords,u=l.isLoading;return{inboxCount:t,approvedCount:a,rejectedCount:c,totalReports:t+a+c,isLoading:n||s||u}};n.d(t,{I:()=>i})},366376(e,t,n){"use strict";var r=n(477593),o=n(826335),i=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return(0,o.B)(new Date(e),new Date,{addSuffix:t})},a=function(e){return(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"&&null!==e},s=function(e){var t,n,r,o;return(null!=(t=e.post)?t:0)+(null!=(n=e.comment)?n:0)+(null!=(r=e.connect_connection)?r:0)+(null!=(o=e.chat_room_message)?o:0)},l=function(e,t){return a(e)&&s(e)>0&&!!t},c=function(e,t,n){return e===r.fE?{textBody:null!=t?t:null==n?void 0:n.note}:{tiptapBody:null==n?void 0:n.tiptap_body,trixBody:null==n?void 0:n.body_trix_content}};n.d(t,{A0:()=>c,PK:()=>i,te:()=>l})},162906(e,t,n){"use strict";var r=n(243994),o=n(417980),i="settings.navigation.add_link_modal.form",a=["enabled","disabled","admin_only"],s="everyone",l="logged_in",c="logged_out",u=[s,l,c],d={name:"",url:"",open_in_new_window:"true",visibility:a[0]},p=r.Ik().shape({name:r.Yj().trim().required(function(){return(0,o.t)("".concat(i,".name.required"))}).max(20,function(){return(0,o.t)("".concat(i,".name.max_length"))}),url:r.Yj().url(function(){return(0,o.t)("".concat(i,".url.invalid"))}).required(function(){return(0,o.t)("".concat(i,".url.required"))}),open_in_new_window:r.Yj().required(),visibility:r.Yj().oneOf(["enabled","disabled","admin_only"]).required()});n.d(t,{CA:()=>s,H$:()=>d,IL:()=>a,JL:()=>l,OC:()=>p,gZ:()=>c,iz:()=>u})},571351(e,t,n){"use strict";var r=n(154097),o=n(258752),i=function(e){var t,n,i=e.id,a=e.audience;return(0,o.IT)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},r.G3.list(a)),n=n={enabled:!!i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{a:()=>i})},234008(e,t,n){"use strict";var r=n(391426),o=n(933578),i=n(689492),a=n(778169),s=n(242529),l=(0,o.createContext)({auxiliarySubscription:void 0,currentPlan:void 0,errorFetchingAuxiliarySubscription:null,errorFetchingCurrentPlan:null,isAuxiliarySubscriptionLoading:!1,isCurrentPlanLoading:!1,isCurrentPlanPlus:!1,refetchAuxiliarySubscription:function(){},refetchCurrentPlan:function(){},showAddons:!1,showBillingDetails:!1,showBillingPortal:!1});l.displayName="BillingContext";var c=function(e){var t=e.showAddons,n=e.showBillingDetails,c=e.showBillingPortal,u=e.children,d=(0,s.x)(),p=d.currentPlan,f=d.isCurrentPlanLoading,m=d.errorFetchingCurrentPlan,b=d.refetchCurrentPlan,y=(0,a.n)(),h=y.auxiliarySubscription,g=y.isAuxiliarySubscriptionLoading,v=y.errorFetchingAuxiliarySubscription,x=y.refetchAuxiliarySubscription,j=(0,o.useMemo)(function(){return{auxiliarySubscription:h,currentPlan:p,errorFetchingAuxiliarySubscription:v,errorFetchingCurrentPlan:m,isAuxiliarySubscriptionLoading:g,isCurrentPlanLoading:f,isCurrentPlanPlus:(0,i.KL)(null==p?void 0:p.tier),refetchAuxiliarySubscription:x,refetchCurrentPlan:b,showAddons:t,showBillingDetails:n,showBillingPortal:c}},[h,p,v,m,g,f,x,b,t,n,c]);return(0,r.jsx)(l.Provider,{value:j,children:u})},u=function(){return(0,o.useContext)(l)};n.d(t,{bN:()=>c,gc:()=>u})},287305(e,t,n){"use strict";var r=n(391426),o=n(568316),i=n(973646),a=n(570310),s=function(e){var t=e.feature,n=e.fontWeight,s=e.isHighlighted,l=e.isOnOffer,c=e.color,u=e.highlightColor,d=e.highlightIcon,p=e.LabelComponent,f=void 0===p?o.o.BodySm:p,m=s?d||"16-star-fill":"check";return(0,r.jsxs)("div",{className:"flex flex-row items-center gap-1",children:[s?(0,r.jsx)(i.In,{type:m,size:16,className:(0,a.x)("mr-1",s?void 0===u?"text-blue-highlight":u:"",void 0!==l&&l?"text-[#493B73]":""),useWithFillCurrentColor:!0,useWithStrokeCurrentColor:!0}):(0,r.jsx)(i.In,{type:m,size:16,useWithFillCurrentColor:!0,useWithStrokeCurrentColor:!0,className:"text-green-success mr-1"}),(0,r.jsx)(f,{color:void 0===c?"text-slate-700 dark:text-slate-300":c,weight:void 0===n?"normal":n,children:t},t)]},t)};n.d(t,{s:()=>s})},682037(e,t,n){"use strict";var r=n(417980),o="pricing_plans.plan_settings.plan_selection.plan_selector.plan_card.tier_highlights",i="text-slate-700 dark:text-slate-100",a=function(){return{basic:[{text:(0,r.t)("".concat(o,".basic.rich_member_profiles"))},{text:(0,r.t)("".concat(o,".basic.search_member_profiles"))},{text:(0,r.t)("".concat(o,".basic.discussions"))},{text:(0,r.t)("".concat(o,".basic.events"))},{text:(0,r.t)("".concat(o,".basic.paid_memberships"))},{text:(0,r.t)("".concat(o,".basic.weekly_digest"))},{text:(0,r.t)("".concat(o,".basic.gamification"))},{text:(0,r.t)("".concat(o,".basic.custom_domain"))}],professional:[{text:(0,r.t)("".concat(o,".professional.circle_ai"))},{text:(0,r.t)("".concat(o,".professional.courses"))},{text:(0,r.t)("".concat(o,".professional.website_builder"))},{text:(0,r.t)("".concat(o,".professional.live_events"))},{text:(0,r.t)("".concat(o,".professional.unlimited_members"))},{text:(0,r.t)("".concat(o,".professional.custom_branding"))},{text:(0,r.t)("".concat(o,".professional.reporting_and_analytics"))},{text:(0,r.t)("".concat(o,".professional.custom_snippets_and_tracking"))}],business:[{text:(0,r.t)("".concat(o,".business.workflows"))},{text:(0,r.t)("".concat(o,".business.custom_profile_fields"))},{text:(0,r.t)("".concat(o,".business.headless_member_api"))},{text:(0,r.t)("".concat(o,".business.admin_api"))},{text:(0,r.t)("".concat(o,".business.branded_email_notifications"))},{text:(0,r.t)("".concat(o,".business.content_co_pilot"))},{text:(0,r.t)("".concat(o,".business.automated_transcriptions"))},{text:(0,r.t)("".concat(o,".business.activity_scores"))}],enterprise:[{text:(0,r.t)("".concat(o,".enterprise.ai_agents"))},{text:(0,r.t)("".concat(o,".enterprise.ai_workflows"))},{text:(0,r.t)("".concat(o,".enterprise.unlimited_workflows"))},{text:(0,r.t)("".concat(o,".enterprise.custom_sso"))},{text:(0,r.t)("".concat(o,".enterprise.higher_limits"))},{text:(0,r.t)("".concat(o,".enterprise.priority_support"))},{text:(0,r.t)("".concat(o,".enterprise.concierge_onboarding"))}],plus:[{text:(0,r.t)("".concat(o,".plus.custom_branded_mobile_apps")),highlightColor:i},{text:(0,r.t)("".concat(o,".plus.in_app_purchases")),highlightColor:i},{text:(0,r.t)("".concat(o,".plus.unlimited_admins_moderators_spaces")),highlightColor:i},{text:(0,r.t)("".concat(o,".plus.email_hub")),highlightColor:i},{text:(0,r.t)("".concat(o,".plus.negotiable_limits")),highlightColor:i},{text:(0,r.t)("".concat(o,".plus.csm")),highlightColor:i},{text:(0,r.t)("".concat(o,".plus.priority_technical_support")),highlightColor:i},{text:(0,r.t)("".concat(o,".plus.priority_platform_migrations")),highlightColor:i},{text:(0,r.t)("".concat(o,".plus.concierge_onboarding")),highlightColor:i}]}};n.d(t,{M:()=>a})},785122(e,t,n){"use strict";n.d(t,{S:()=>v});var r=n(391426),o=n(257957),i=n(568316),a=n(230763),s=n(915779),l=n(933578),c=n(258752);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var d=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,l.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return u(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1],o=(0,c.IT)({queryKey:[s.iK.accountPaymentProcessors.invoice.show()],enabled:n});return{latestInvoice:o.data,isLoadingInvoice:o.isInitialLoading,onRetrieveLatestInvoice:function(){r(function(e){return!e})},shouldRetrieveInvoice:n}},p=n(355104),f=n(546244),m=n(417980),b=n(981416),y=n(387099),h=n(234008),g=n(198171),v=function(){var e=(0,a.Od)().currentCommunity,t=(0,h.gc)().isCurrentPlanPlus,n=(0,b.Q)().isSubscriptionCancelled,s=d(),l=s.isLoadingInvoice,c=s.onRetrieveLatestInvoice,u=s.latestInvoice,v=(0,p.c)().isCircleV4;return e&&t&&n?null:((null==u?void 0:u.hosted_invoice_url)&&window.location.replace(u.hosted_invoice_url),v)?(0,r.jsxs)(r.Fragment,{children:[l&&(0,r.jsx)(o.a,{variant:"fullscreen"}),(0,r.jsx)(f.l,{variant:"warning",icon:"triangle-exclamation",iconColor:"warning",title:(0,m.t)("subscription.incomplete_reactified.title"),description:(0,m.t)("subscription.incomplete_reactified.description"),actionProps:{variant:"outline",children:(0,m.t)("subscription.incomplete_reactified.action"),disabled:l,onClick:c}})]}):(0,r.jsxs)(g.a,{children:[l&&(0,r.jsx)(o.a,{variant:"fullscreen"}),(0,r.jsx)(i.o.LabelLg,{weight:"semibold",children:(0,m.t)("subscription.incomplete_reactified.title")}),(0,r.jsx)(i.o.BodyMd,{color:"text-default",children:(0,m.t)("subscription.incomplete_reactified.description")}),(0,r.jsx)("div",{className:"mt-2 inline-block",children:(0,r.jsx)(y.$,{variant:"secondary",disabled:l,onClick:c,children:(0,m.t)("subscription.incomplete_reactified.action")})})]})}},198171(e,t,n){"use strict";var r=n(391426);n(933578);var o=function(e){var t=e.children;return(0,r.jsx)("div",{className:"dark:bg-primary dark:border-primary rounded-xl border border-amber-200 bg-amber-100 p-6","data-testid":"plan-cancelled",children:t})};n.d(t,{a:()=>o})},549776(e,t,n){"use strict";var r=n(391426),o=n(568316);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function a(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var s=function(e){var t=e.description,n=e.value,s=e.descriptionProps,l=e.valueProps;return(0,r.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,r.jsx)(o.o.BodySm,a(i({},s),{children:t})),(0,r.jsx)(o.o.BodySm,a(i({},l),{children:n}))]})};n.d(t,{y:()=>s})},735203(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(983561),a=function(e){var t=e.children,n=(0,i.x)().isCompactLayout;return(0,r.jsx)("div",{className:(0,o.x)("border-primary bg-primary flex flex-col gap-y-5 rounded-xl border p-6",n?"w-[325px]":"w-[375px]"),children:t})};n.d(t,{f:()=>a})},20957(e,t,n){"use strict";var r=n(391426),o=n(983979),i=function(){return(0,r.jsxs)("div",{className:"border-primary mt-4 flex w-[375px] flex-col gap-y-3 rounded-xl border p-6",children:[(0,r.jsx)("div",{className:"bg-tertiary h-5 w-full animate-pulse rounded-md"}),(0,r.jsx)(o.f,{md:!0,half:!0}),(0,r.jsx)(o.f,{md:!0,half:!0}),(0,r.jsxs)("div",{className:"border-primary flex flex-col gap-y-2 border-t pt-4",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)(o.f,{md:!0,long:!0}),(0,r.jsx)(o.f,{md:!0,short:!0})]}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)(o.f,{md:!0,half:!0}),(0,r.jsx)(o.f,{md:!0,short:!0})]}),(0,r.jsx)("div",{className:"bg-tertiary mt-3 h-10 w-full animate-pulse rounded-3xl"})]})]})};n.d(t,{t:()=>i})},861541(e,t,n){"use strict";n.d(t,{I:()=>ni});var r=n(391426),o=n(257957),i=n(476283),a=n(511950),s=n(570310),l=n(933578),c=n(804939),u=n(230763),d=n(852362),p=n(983561),f=n(640668),m=n(973646),b=n(417980),y=n(75571),h=n(568316),g=function(){return(0,r.jsx)("div",{className:"mr-2",children:(0,r.jsx)(m.In,{type:"check",size:16,useWithFillCurrentColor:!0,useWithStrokeCurrentColor:!0,className:"text-green-success"})})},v=function(e){return e.value?(0,r.jsx)(g,{}
1):(0,r.jsx)(h.o.BodyMd,{color:"text-default",children:"–"})},x=function(e){var t=e.children;return(0,r.jsx)("div",{className:"border-primary flex items-center border-y border-t-0 py-4",children:t})},j=n(497184),_=n.n(j),w=function(e){var t=e.value,n=e.hideCheckIcon,o=e.className;return(0,r.jsxs)("div",{className:_()("flex items-center",o),children:[!(void 0!==n&&n)&&(0,r.jsx)(g,{}),(0,r.jsx)(h.o.BodyMd,{color:"text-default",children:t})]})};function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var P=function(e){var t=e.title,n=e.basic,o=e.professional,i=e.business,s=e.enterprise,l=e.plus,c=e.hideCheckIcon,u=void 0!==c&&c,d=(0,a.A)().c
1ompareTablePlanFeatures,p=Object.entries({basic:n,professional:o,business:i,enterprise:s,plus:l}).filter(function(e){var t=S(e,1)[0];return d&&Object.keys(d).some(function(e){return e===t})});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x,{children:(0,r.jsx)(w,{className:"pr-5",value:t,hideCheckIcon:!0})}),p.map(function(e){var t=S(e,2),n=t[0],o=t[1];return(0,r.jsx)(x,{children:"string"==typeof o?(0,r.jsx)(w,{value:o,hideCheckIcon:u}):(0,r.jsx)(v,{value:!!o})},n)})]})},C=function(e){var t=e.value;return(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(g,{}),(0,r.jsx)(h.o.BodyMd,{color:"text-default",children:t})]})},k=function(e){var t=e.value,n=e.suffix,o=0===t||!t;return(0,r.jsx)("div",{className:"flex items-center",children:o?(0,r.jsx)(h.o.BodyMd,{color:"text-default",children:"-"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g,{}),(0,r.jsx)(h.o.BodyMd,{color:"text-default",children:(0,y.RG)(t)?(0,b.t)("settings.billing.unlimited"):"".concat(t).concat(void 0===n?"":n)})]})})},I=n(898666),N=function(e){var t=e.tooltipKey,n=e.tooltipProps;return(0,r.jsx)(I.$,{content:(0,b.t)(t,n),children:(0,r.jsx)("span",{className:"flex items-center",children:(0,r.jsx)(m.In,{type:"16-info",size:16,className:"ml-2"})})})},A=function(e){var t=e.title,n=e.feature,o=e.suffix,i=e.mapper,s=e.tooltipKey,l=(0,a.A)().compareTablePlanFeatures;if(!l)return null;var c=Object.keys(l),u=function(e,t){var a,s=t[n];return(0,r.jsx)(x,{children:(a="number"==typeof s,i&&a?(0,r.jsx)(C,{value:i(s)}):a?(0,r.jsx)(k,{value:s,suffix:o}):(0,r.jsx)(v,{value:!!s}
1))},e)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(x,{children:[(0,r.jsx)(w,{className:"pr-5",value:t,hideCheckIcon:!0}),s&&(0,r.jsx)(N,{tooltipKey:s,tooltipProps:{}})]}),c.map(function(e){return u(e,l[e])})]})},E={2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6"},R=function(e){var t;return null!=(t=E[e])?t:E[4]},L=function(e){var t,n,o=e.sectionName,i=e.children,l=(0,a.A)().compareTablePlanFeatures;if(!l)return null;var c=R(Object.keys(l).length+1),u=(0,s.x)("grid",c,"bg-primary");return(0,r.jsxs)("div",{className:"bg-primary mb-12",children:[(0,r.jsx)("div",{className:u,children:(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsx)(h.o.LabelMd,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},{weight:"medium"}),n=n={children:o},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))})}),(0,r.jsx)("div",{className:(0,s.x)("grid",c),children:i})]})};function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function T(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var M=function(){var e,t=(0,a.A)().currentPlan;return(0,r.jsxs)(L,{sectionName:(0,b.t)("pricing_plans.section.features"),children:[(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.custom_domain"),feature:y.Lh.custom_domain}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.private_spaces"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.bulk_import_export"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.notifications"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.member_profiles_directory"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.moderation_basic"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.direct_messaging"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.group_chat"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.email_digest"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.events"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.gdpr_compliant"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.ios_app"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.chat_spaces"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.scheduled_posts"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.gamification"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.custom_snippets"),feature:y.Lh.custom_css}),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.zapier"),feature:y.Lh.zapier_token_automatic_creation}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.integrately"),basic:!1,professional:!1,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.embed"),basic:!1,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.white_labelling"),basic:!1,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.moderation_automated"),feature:y.Lh.automated_moderation}),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.advanced_reporting"),feature:y.Lh.advanced_reporting}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.color_themes"),basic:!1,professional:!0,business:!0,enterprise:!0,plus:!0}),(e={title:(0,b.t)("pricing_plans.feature.courses")},t.show_pro_grandfathered_for_courses?(0,r.jsx)(P,T(D({},e),{basic:!1,professional:!0,business:!0,enterprise:!0})):(0,r.jsx)(A,T(D({},e),{feature:y.Lh.courses}))),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.conversion_tracking_code"),feature:y.Lh.paywall_conversion_tracking_code}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.automated_workflows"),basic:!1,professional:!1,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.custom_profile_fields"),feature:y.Lh.profile_fields_enabled}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.sender_email_customization"),basic:!1,professional:!1,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.affiliates"),feature:y.Lh.affiliates}),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.analytics_filtering"),feature:y.Lh.analytics_filters}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.email_hub"),basic:(0,b.t)("pricing_plans.email_hub.addon"),professional:(0,b.t)("pricing_plans.email_hub.addon"),business:(0,b.t)("pricing_plans.email_hub.addon"),enterprise:(0,b.t)("pricing_plans.email_hub.addon"),plus:(0,b.t)("pricing_plans.email_hub.10k_included")})]})},F=function(e){var t=e.feature,n=e.value,o=(0,b.t)("settings.billing.".concat(t)),i=1e6===n;return(0,r.jsx)(x,{children:i?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w,{value:(0,b.t)("settings.billing.unlimited")}),t===y.Lh.max_member_count&&(0,r.jsx)(N,{tooltipKey:"settings.billing.unlimited_members_tooltip",tooltipProps:{total:n,resource:o}})]}):(0,r.jsx)(k,{value:n})})}
1,K=function(e){var t=e.featureFlagKeys,n=(0,a.A)().compareTablePlanFeatures;if(!n)return null;var o=Object.keys(n);return(0,r.jsx)(r.Fragment,{children:t.map(function(e){return(0,y.NG)(e)?null:(0,r.jsxs)(l.Fragment,{children:[(0,r.jsx)(x,{children:(0,r.jsx)(w,{hideCheckIcon:!0,value:(0,b.t)("pricing_plans.feature.".concat(e)),className:"pr-5"})}),o.map(function(t){return(0,r.jsx)(F,{value:n[t][e],feature:e},t)})]},e)})})},B=n(383308),q=function(){return(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.total_storage"),feature:y.Lh.included_storage_gigabytes,mapper:function(e){return(0,B.v)(0x40000000*e)}})},U=function(){var e,t,n,o=(0,a.A)().compareTablePlanFeatures;return o?(0,r.jsxs)(L,{sectionName:(0,b.t)("pricing_plans.section.community"),children:[(0,r.jsx)(K,{featureFlagKeys:[y.Lh.max_member_count,y.Lh.max_admin_count,y.Lh.max_moderator_count]}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.max_space_count"),professional:"".concat(null==(e=o.professional)?void 0:e.max_space_count),enterprise:"".concat(null==(t=o.enterprise)?void 0:t.max_space_count),business:"".concat(null==(n=o.business)?void 0:n.max_space_count),plus:(0,b.t)("pricing_plans.feature.flexible")}),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.transaction_fees"),feature:y.Lh.payments_fee_percentage,suffix:"%"}),(0,r.jsx)(q,{})]}):null},z="grid-cols-".concat(5),W=function(e){var t=e.children;return(0,r.jsx)("div",{className:"grid ".concat(z),children:(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(h.o.TitleSm,{weight:"bold",children:t})})})}
1,$=function(){var e,t,n,r,o=(0,a.A)().compareTablePlanFeatures,i=null==o||null==(e=o.professional)?void 0:e.live_stream_max_host_capacity,s=null==o||null==(t=o.professional)?void 0:t.live_stream_monthly_stream_hours,l=30===i?30:null==o||null==(n=o.business)?void 0:n.live_stream_max_host_capacity,c=20===s?20:null==o||null==(r=o.business)?void 0:r.live_stream_monthly_stream_hours;return{professionalHosts:i,businessHosts:l,professionalHours:s,businessHours:c}},V=function(){var e,t,n,o,i,s,l=(0,a.A)().compareTablePlanFeatures,c=$(),u=c.professionalHosts,d=c.businessHosts,p=c.professionalHours,f=c.businessHours;if(!l)return null;var m=(0,b.t)("pricing_plans.feature.flexible");return(0,r.jsxs)(L,{sectionName:(0,b.t)("pricing_plans.section.live_streams"),children:[(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.live_stream_max_spectator_capacity"),professional:"".concat(null==(e=l.professional)?void 0:e.live_stream_max_spectator_capacity),enterprise:"".concat(null==(t=l.enterprise)?void 0:t.live_stream_max_spectator_capacity),business:"".concat(null==(n=l.business)?void 0:n.live_stream_max_spectator_capacity),plus:m}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.live_room_participants"),professional:"".concat(u),business:"".concat(d),enterprise:"".concat(null==(o=l.enterprise)?void 0:o.live_room_participants_capacity),plus:m}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.live_stream_hosts"),professional:"".concat(u),business:"".concat(d),enterprise:"".concat(null==(i=l.enterprise)?void 0:i.live_stream_max_host_capacity),plus:m}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.live_stream_monthly_stream_hours"),professional:"".concat(p),business:"".concat(f),enterprise:"".concat(null==(s=l.enterprise)?void 0:s.live_stream_monthly_stream_hours),plus:m})]})},H=function(){var e=(0,b.t)("pricing_plans.feature.standard"),t=(0,b.t)("pricing_plans.feature.priority");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(L,{sectionName:(0,b.t)("pricing_plans.section.services"),children:[(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.concierge"),basic:!1,professional:!1,enterprise:(0,b.t)("pricing_plans.feature.concierge_enterprise"),business:!1,plus:(0,b.t)("pricing_plans.feature.concierge_plus")}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.support_dedicated"),basic:!1,professional:!1,enterprise:!1,business:!1,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.business_review"),basic:!1,professional:!1,enterprise:!1,business:!1,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.monthly_review"),basic:!1,professional:!1,enterprise:!1,business:!1,plus:(0,b.t)("pricing_plans.feature.flexible")}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.email_hub_migration"),basic:!1,professional:e,enterprise:e,business:e,plus:t}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.courses_migration"),basic:!1,professional:!1,business:e,enterprise:t,plus:t}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.payments_migration"),basic:!1,professional:!1,business:e,enterprise:t,plus:t}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.content_migration"),basic:!1,professional:!1,business:e,enterprise:t,plus:t})]}),(0,r.jsx)("div",{className:"-mt-6",children:(0,r.jsx)(h.o.BodySm,{weight:"normal",color:"tertiary",children:(0,b.t)("pricing_plans.comparison_table.footer")})})]})},G=function(){var e=[{title:(0,b.t)("pricing_plans.feature.facebook"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0},{title:(0,b.t)("pricing_plans.feature.twitter"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0},{title:(0,b.t)("pricing_plans.feature.memberstack"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0},{title:(0,b.t)("pricing_plans.feature.memberspace"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0},{title:(0,b.t)("pricing_plans.feature.teachable"),basic:!0,professional:!0,business:!0,enterprise:!0,plus:!0},{title:(0,b.t)("pricing_plans.feature.memberful"),basic:!1,professional:!0,business:!0,enterprise:!0,plus:!0},{title:(0,b.t)("pricing_plans.feature.wordpress"),basic:!1,professional:!0,business:!0,enterprise:!0,plus:!0},{title:(0,b.t)("pricing_plans.feature.bubble"),basic:!1,professional:!0,business:!0,enterprise:!0,plus:!0},{title:(0,b.t)("pricing_plans.feature.outseta"),basic:!1,professional:!0,business:!0,enterprise:!0,plus:!0},{title:(0,b.t)("pricing_plans.feature.auth0"),basic:!1,professional:!1,business:!1,enterprise:!0,plus:!0},{title:(0,b.t)("pricing_plans.feature.custom_oauth"),basic:!1,professional:!1,business:!1,enterprise:!0,plus:!0}];return(0,r.jsx)(L,{sectionName:(0,b.t)("pricing_plans.section.sso"),children:e.map(function(e){var t,n;return(0,l.createElement)(P,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={key:e.title},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))})})},Z=function(){return(0,r.jsxs)(L,{sectionName:(0,b.t)("pricing_plans.section.support"),children:[(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.support_tier"),basic:(0,b.t)("pricing_plans.feature.standard"),professional:(0,b.t)("pricing_plans.feature.standard"),business:(0,b.t)("pricing_plans.feature.standard"),enterprise:(0,b.t)("pricing_plans.feature.priority"),plus:(0,b.t)("pricing_plans.feature.premium"),hideCheckIcon:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.circle_community"),basic:!0,professional:!0,enterprise:!0,business:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.beta_features"),basic:!1,professional:!1,business:!1,enterprise:(0,b.t)("pricing_plans.annual_only"),plus:!0})]})},Q=function(){return(0,r.jsxs)(L,{sectionName:(0,b.t)("pricing_plans.section.workflows"),children:[(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.workflows.automations"),feature:y.Lh.max_dynamic_workflows_count}),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.workflows.scheduled_workflows"),feature:y.Lh.max_scheduled_workflows_count}),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.workflows.bulk_actions"),feature:y.Lh.max_bulk_action_workflows_count,suffix:(0,b.t)("pricing_plans.per_month")})]})},Y=n(387099),J=n(689492),X=function(e){return function(t){return t.tier===e}},ee=function(e,t){return function(n){if(Array.isArray(null==n?void 0:n.plan_addons_info)){var r=n.plan_addons_info.find(function(t){return Object.hasOwn(t,e)});if(r&&r[e])return r[e][t]}}},et=function(e,t,n){var r=e.find(X(t));if(!r)return"";var o=ee(n,"value")(r);return null!=o?o:""},en=function(e,t,n){var r=e.find(X(t));if(!r)return"";var o=ee(n,"monthly_amount")(r);return null!=o?o:""},er=function(){var e=(0,a.A)(),t=e.plans;if(e.isPlansLoading)return(0,r.jsx)(o.a,{center:!0});var n="settings.billing.add_ons.manage",i="settings.billing.add_ons.included";return(0,r.jsxs)(L,{sectionName:(0,b.t)("settings.billing.add_ons.title"),children:[(0,r.jsx)(P,{title:(0,b.t)("settings.billing.add_ons.manage.admins"),professional:(0,b.t)("".concat(n,".admins_description"),{amount:en(t,J.LQ.professional,y.Lh.max_admin_count)}),business:(0,b.t)("".concat(n,".admins_description"),{amount:en(t,J.LQ.business,y.Lh.max_admin_count)}),enterprise:(0,b.t)("".concat(n,".admins_description"),{amount:en(t,J.LQ.enterprise,y.Lh.max_admin_count)}),plus:(0,b.t)("".concat(n,".unlimited"))}),(0,r.jsx)(P,{title:(0,b.t)("settings.billing.add_ons.manage.moderators"),professional:(0,b.t)("".concat(n,".moderators_description"),{quantity:et(t,J.LQ.professional,y.Lh.max_moderator_count),amount:en(t,J.LQ.professional,y.Lh.max_moderator_count)}),business:(0,b.t)("".concat(n,".moderators_description"),{quantity:et(t,J.LQ.business,y.Lh.max_moderator_count),amount:en(t,J.LQ.business,y.Lh.max_moderator_count)}),enterprise:(0,b.t)("".concat(n,".moderators_description"),{quantity:et(t,J.LQ.enterprise,y.Lh.max_moderator_count),amount:en(t,J.LQ.enterprise,y.Lh.max_moderator_count)}),plus:(0,b.t)("".concat(n,".unlimited"))}),(0,r.jsx)(P,{title:(0,b.t)("settings.billing.add_ons.manage.spaces"),professional:(0,b.t)("".concat(n,".spaces_description"),{quantity:et(t,J.LQ.professional,y.Lh.max_space_count),amount:en(t,J.LQ.professional,y.Lh.max_space_count)}),business:(0,b.t)("".concat(n,".spaces_description"),{quantity:et(t,J.LQ.business,y.Lh.max_space_count),amount:en(t,J.LQ.business,y.Lh.max_space_count)}),enterprise:(0,b.t)("".concat(n,".spaces_description"),{quantity:et(t,J.LQ.enterprise,y.Lh.max_space_count),amount:en(t,J.LQ.enterprise,y.Lh.max_space_count)}),plus:(0,b.t)("pricing_plans.feature.talk_to_sales")}),(0,r.jsx)(P,{title:(0,b.t)("settings.billing.add_ons.manage.email_white_labeling"),professional:(0,b.t)("settings.billing.add_ons.manage.email_white_labeling_description",{amount:en(t,J.LQ.professional,y.Lh.email_whitelist)}),business:(0,b.t)(i),enterprise:(0,b.t)(i),plus:(0,b.t)(i)}),(0,r.jsx)(P,{title:(0,b.t)("settings.billing.add_ons.manage.profile_fields"),professional:(0,b.t)("settings.billing.add_ons.manage.profile_fields_description",{amount:en(t,J.LQ.professional,y.Lh.profile_fields_enabled)}),business:(0,b.t)(i),enterprise:(0,b.t)(i),plus:(0,b.t)(i)}),(0,r.jsx)(P,{title:(0,b.t)("settings.billing.add_ons.live_stream.live_attendees"),professional:(0,b.t)("settings.billing.add_ons.live_stream.live_attendees_professional",{amount:en(t,J.LQ.professional,y.Lh.live_stream_max_spectator_capacity)}),enterprise:(0,b.t)("settings.billing.add_ons.live_stream.live_attendees_enterprise"),business:(0,b.t)("settings.billing.add_ons.live_stream.live_attendees_business",{amount:en(t,J.LQ.business,y.Lh.live_stream_max_spectator_capacity)}),plus:(0,b.t)("settings.billing.add_ons.live_stream.live_attendees_plus")}),(0,r.jsx)(P,{title:(0,b.t)("settings.billing.add_ons.live_stream.hours"),professional:(0,b.t)("settings.billing.add_ons.live_stream.hours_professional",{amount:en(t,J.LQ.professional,y.Lh.live_stream_monthly_stream_hours)}),enterprise:(0,b.t)("settings.billing.add_ons.live_stream.hours_enterprise",{amount:en(t,J.LQ.enterprise,y.Lh.live_stream_monthly_stream_hours)}),business:(0,b.t)("settings.billing.add_ons.live_stream.hours_business",{amount:en(t,J.LQ.business,y.Lh.live_stream_monthly_stream_hours)}),plus:(0,b.t)("settings.billing.add_ons.live_stream.hours_plus")})]})},eo=n(41907),ei=function(){return(0,r.jsxs)(L,{sectionName:(0,b.t)("pricing_plans.section.ai"),children:[(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.circle_ai"),basic:!1,professional:!0,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(A,{title:(0,b.t)("pricing_plans.feature.circle_ai_credits"),tooltipKey:"pricing_plans.feature.circle_ai_credits_tooltip",feature:y.Lh.monthly_ai_credit_allotment,mapper:function(e){return"".concat((0,eo.Rt)(e)).concat((0,b.t)("pricing_plans.feature.circle_ai_credits_suffix"))}}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.content_co_pilot"),basic:!1,professional:!1,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.automated_transcriptions"),basic:!1,professional:!1,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.activity_scores"),basic:!1,professional:!1,business:!0,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.ai_agents"),basic:!1,professional:!1,business:!1,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.ai_moderation"),basic:!1,professional:!1,business:!1,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.knowledge_engine"),basic:!1,professional:!1,business:!1,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.ai_inbox"),basic:!1,professional:!1,business:!1,enterprise:!0,plus:!0}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.ai_workflows"),basic:!1,professional:!1,business:!1,enterprise:!0,plus:!0})]})},ea=n(867373);
1function es(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var el={admin:{business:"5,000",enterprise:"30,000",plus:"30,000"},headless:{business:"100",enterprise:"500",plus:"500"}},ec=function(e,t,n,r){var o,i=(t||"usd").toLowerCase();if("included"===r)return"admin"===n?"".concat(el[n][e]," ").concat((0,b.t)("pricing_plans.interval.abbreviation.month")):"".concat(el[n][e]," ").concat((0,b.t)("settings.developers.mau"));if("admin"===n){var a,s=(es(a={},ea.Y.USD.code.toLowerCase(),{business:.005,enterprise:.002,plus:.002,symbol:ea.Y.USD.symbol}),es(a,ea.Y.BRL.code.toLowerCase(),{business:.03,enterprise:.012,plus:.012,symbol:ea.Y.BRL.symbol}),a),l=s[i][e],c=s[i].symbol;return"".concat(c).concat(l," / ").concat((0,b.t)("pricing_plans.request"))}var u=(es(o={},ea.Y.USD.code.toLowerCase(),{business:.5,enterprise:.3,plus:.3,symbol:ea.Y.USD.symbol}),es(o,ea.Y.BRL.code.toLowerCase(),{business:3.5,enterprise:2,plus:2,symbol:ea.Y.BRL.symbol}),o),d=u[i][e],p=u[i].symbol;return"".concat(p).concat(d," / ").concat((0,b.t)("pricing_plans.mau"))},eu=function(){var e=(0,a.A)().billingCurrency;return(0,r.jsxs)(L,{sectionName:(0,b.t)("pricing_plans.section.api"),children:[(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.included_admin_api"),basic:!1,professional:!1,business:ec("business",e,"admin","included"),enterprise:ec("enterprise",e,"admin","included"),plus:ec("plus",e,"admin","included")}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.extra_admin_api"),basic:!1,professional:!1,business:ec("business",e,"admin","extra"),enterprise:ec("enterprise",e,"admin","extra"),plus:ec("plus",e,"admin","extra")}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.included_headless_api"),basic:!1,professional:!1,business:ec("business",e,"headless","included"),enterprise:ec("enterprise",e,"headless","included"),plus:ec("plus",e,"headless","included")}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.extra_headless_api"),basic:!1,professional:!1,business:ec("business",e,"headless","extra"),enterprise:ec("enterprise",e,"headless","extra"),plus:ec("plus",e,"headless","extra")})]})},ed=function(){var e=(0,b.t)("pricing_plans.feature.talk_to_sales");return(0,r.jsxs)(L,{sectionName:(0,b.t)("pricing_plans.section.branded_apps"),children:[(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.branded_apps.ios_and_android"),basic:!1,professional:!1,business:!1,enterprise:!1,plus:e}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.branded_apps.custom_app_builder"),basic:!1,professional:!1,business:!1,enterprise:!1,plus:e}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.branded_apps.custom_welcome_experience"),basic:!1,professional:!1,business:!1,enterprise:!1,plus:e}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.branded_apps.push_notifications"),basic:!1,professional:!1,business:!1,enterprise:!1,plus:e}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.branded_apps.native_payments"),basic:!1,professional:!1,business:!1,enterprise:!1,plus:e}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.branded_apps.app_store"),basic:!1,professional:!1,business:!1,enterprise:!1,plus:e}),(0,r.jsx)(P,{title:(0,b.t)("pricing_plans.feature.branded_apps.sdk"),basic:!1,professional:!1,business:!1,enterprise:!1,plus:e})]})},ep="pricing_plans.plan_settings.plan_selection.features",ef=function(){var e=(0,a.A)().compareTablePlanFeatures;if(!e)return null;var t=Object.keys(e);return(0,r.jsxs)("div",{className:(0,s.x)("mb-4 grid",R(t.length+1)),children:[(0,r.jsx)(h.o.LabelMd,{weight:"semibold",children:(0,b.t)([ep,"usage"])}),t.map(function(e){return(0,r.jsx)(h.o.LabelMd,{weight:"semibold",children:(0,b.t)([ep,"tiers",e])},e)})]})};function em(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}let eb=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,l.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return em(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return em(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],o=t[1];return(0,r.jsxs)("div",{className:"hidden sm:block",children:[(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsxs)(Y.$,{variant:"secondary",onClick:function(){return o(function(e){return!e})},className:"mb-6 !text-md","aria-expanded":n,"aria-controls":"features-content",large:!0,children:[(0,b.t)("pricing_plans.plan_settings.plan_selection.features.toggle_text"),(0,r.jsx)(m.In,{type:n?"20-chevron-up":"20-chevron-down",className:"ml-1"})]})}),n&&(0,r.jsxs)("div",{id:"features-content",children:[(0,r.jsx)(W,{children:(0,b.t)(["pricing_plans.plan_settings.plan_selection.features","title"])}),(0,r.jsx)(ef,{}),(0,r.jsx)(U,{}),(0,r.jsx)(Q,{}),(0,r.jsx)(V,{}),(0,r.jsx)(M,{}),(0,r.jsx)(ei,{}),(0,r.jsx)(ed,{}),(0,r.jsx)(eu,{}),(0,r.jsx)(W,{children:(0,b.t)("settings.billing.add_ons.title")}),(0,r.jsx)(er,{}),(0,r.jsx)(G,{}),(0,r.jsx)(Z,{}),(0,r.jsx)(H,{})]})]})};var ey=n(353271),eh=n(688720),eg=n(672963),ev=n(674251),ex=n(271908),ej=n(519104),e_=function(){var e=(0,a.A)(),t=e.shouldRenderBillingCurrency,n=e.billingCurrency,o=(0,ej.Z)();return t?(0,r.jsx)(ex.J,{billingCurrency:n,onCurrencyChange:function(e){o({to:".",replace:!0,search:function(t){var n,r;return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t),r=r={billing_currency:e},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n}})},useCurrencySymbol:!0}):null},ew=function(){return(0,r.jsxs)("div",{className:"border-primary flex items-center justify-between px-6 pb-5 pt-6",children:[(0,r.jsx)(h.o.LabelXl,{weight:"semibold",color:"text-dark",children:(0,b.t)(["pricing_plans.plan_settings.plan_selection","title"])}),(0,r.jsx)(e_,{})]})},eO=n(975900),eS=n(517338),eP=n(605274),eC="pricing_plans.plan_settings.plan_selection.plan_selector",ek=function(e){var t=e.plan;return t.annual_discount_amount_with_currency?(0,r.jsxs)(h.o.BodyXs,{weight:"light",children:[(0,b.t)("".concat(eC,".annual_amount"),{dollar_amount:t.annual_base_amount_with_currency}),(0,r.jsx)("span",{className:"text-green-success-dark ml-1 font-semibold",children:t.fetch_discount?(0,b.t)("".concat(eC,".saved_dollar_amount_with_percentage"),{dollar_amount:t.annual_discount_amount_with_currency,percentage:(0,J.zD)(t)}):(0,b.t)("".concat(eC,".saved_dollar_amount"),{dollar_amount:t.annual_discount_amount_with_currency})})]}):null},eI=n(235745),eN=n(291200),eA=function(e,t){var n=e===J.LQ.plus?"md:grid-rows-5":"md:grid-rows-4";return(0,s.x)(t?"grid grid-cols-1 gap-y-2":"grid auto-cols-max grid-flow-col gap-x-10 gap-y-2",n)},eE=function(e){var t=e.title,n=e.planTier,o=e.isOnOffer,i=e.shouldHighlightFeatures,a=e.containerClassName,s=(0,p.x)(),l=s.isCompactLayout,c=s.isMobileLayout,u=(0,eI.$)().isOpen;return(0,r.jsx)("div",{className:void 0===a?"mt-2 px-0 sm:mt-6 sm:px-11":a,children:(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("div",{className:"mb-2 sm:mb-4",children:(0,r.jsx)(ev.o.LabelXs,{weight:"semibold",children:t})}),(0,r.jsx)("div",{className:eA(n,l||c||u),children:(0,r.jsx)(eN.E,{planTier:n,isOnOffer:o,shouldHighlightFeatures:i})})]})})},eR="pricing_plans.plan_settings.plan_selection.plan_selector.plan_card",eL=function(e){var t=e.plan,n=(0,f.B)(),o=n.currentPlanTier,i=!!(n.isCommunityOnTrial||o&&(0,J.Cg)(o,t.tier)),a=(0,l.useMemo)(function(){var e;return t.tier===J.LQ.basic?(0,b.t)("".concat(eR,".core_features")):t.tier===J.LQ.professional?(0,b.t)("".concat(eR,".professional_features")):(0,b.t)("".concat(eR,".everything_plus"),{tier:(0,J.C0)(null!=(e=(0,J.wi)(t.tier))?e:"")})},[t]);return(0,r.jsx)(eE,{planTier:t.tier,title:a,isOnOffer:!!t.is_on_offer,shouldHighlightFeatures:i})},eD=function(e){var t,n,o=e.plan,i=(0,y.Oz)(o.plan_action),a=o.is_on_offer&&!i&&(null==(t=o.plan_coupon)?void 0:t.discounted_monthly_price),s=a?(0,J.Bm)((null==(n=o.plan_coupon)?void 0:n.discounted_monthly_price)||"",o.currency):o.display_base_monthly_amount;return(0,r.jsxs)("div",{className:"flex flex-row items-center gap-1 align-middle",children:[a&&(0,r.jsx)(h.o.BodyMd,{weight:"font-normal",color:"text-slate-400 dark:text-slate-400",size:"text-normal",textTransform:"line-through",children:o.display_base_monthly_amount}),(0,r.jsx)(h.o.TitleMd,{weight:"font-bold",children:s}),(0,r.jsx)(h.o.BodyMd,{weight:"font-normal",color:"text-slate-700 dark:text-slate-300",size:"text-sm",children:(0,b.t)("".concat("pricing_plans.plan_settings.plan_
1selection.plan_selector",".monthly_interval"))})]})},eT="pricing_plans.plan_settings.plan_selection.plan_selector",eM=function(e){var t,n,o,i=e.plan,l=e.selected,c=e.onClick,u=(0,y.Oz)(i.plan_action),d=(0,eP.wf)(),f=(0,a.A)().currentPlan,m=(null==f||null==(t=f.plan_trial)?void 0:t.active)&&(null==f||null==(n=f.plan_trial)?void 0:n.tier)===i.tier,h=(0,p.x)(),g=h.isDesktopLayout,v=h.isCompactLayout,x=(0,r.jsx)(ev.o.BodySm,{weight:"font-normal",children:(0,b.t)("".concat(eT,".tier_descriptions.").concat(i.tier))});return(0,r.jsxs)(eg.sx,{value:i.tier,as:"div",className:(0,s.x)("border-primary cursor-pointer border-b p-4 last:border-none sm:p-6",l?"bg-gray-50 dark:bg-gray-900":"bg-primary"),onClick:c,children:[(0,r.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,r.jsx)("div",{className:"flex items-center justify-between",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("div",{className:"flex items-start",children:(0,r.jsx)(eO.s,{value:i.tier,label:"",checked:l,onChange:function(){}})}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex flex-row items-center gap-1",children:[(0,r.jsx)(ev.o.LabelLg,{weight:"semibold",children:i.display_name}),u&&(0,r.jsx)(eS.E,{label:(0,b.t)("".concat(eT,".current_plan")),square:!0,variant:"secondary"}),i.is_on_offer&&!u&&(null==(o=i.plan_coupon)?void 0:o.display_discount_percentage)&&(0,r.jsx)(eS.E,{label:(0,b.t)([eT,"plan_card","discount_percentage"],{percentage:i.plan_coupon.display_discount_percentage}),className:"bg-gradient-to-r from-[#312F79] to-[#493B73] text-white",square:!0,variant:"secondary"}),m&&(0,r.jsx)(eS.E,{label:(0,b.t)("".concat(eT,".trialing_plan")),square:!0,truncate:!1,className:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",variant:"info"})]}),d&&(0,r.jsx)("div",{className:"hidden sm:block",children:x})]})]})}),(0,r.jsxs)("div",{className:"flex flex-col items-end",children:[!v&&(0,r.jsx)(eD,{plan:i}),d&&!g&&(0,r.jsx)("div",{className:"hidden sm:block",children:(0,r.jsx)(ek,{plan:i})})]})]}),(0,r.jsx)("div",{className:(0,s.x)("grid overflow-hidden transition-all duration-300 ease-in-out",l?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:(0,r.jsxs)("div",{className:"min-h-0 px-7 sm:px-0",children:[!d&&(0,r.jsx)("div",{className:"mt-2 block sm:hidden",children:(0,r.jsx)("div",{className:"mt-1",children:x})}),(0,r.jsx)(eL,{plan:i})]})})]},i.tier)},eF="pricing_plans.plan_settings.plan_selection.plan_selector",eK={year:"yearly_interval",biannual:"biannual_interval",quarter:"quarterly_interval"},eB=function(e){var t,n=e.selected,o=e.onClick,i=e.showPrice,l=(0,a.A)(),c=l.customPlanOfferPlan,u=l.customPlanOffer,d=!!c,p=d?c.display_total:null,f=d&&u&&null!=(t=eK[u.custom_plus_interval])?t:"monthly_interval";return(0,r.jsxs)(eg.sx,{value:"plus",as:"div",className:(0,s.x)("border-primary cursor-pointer border-b p-4 sm:p-6 flex items-start gap-3",n?"bg-gray-50 dark:bg-gray-900 border-t":"bg-primary"),onClick:o,children:[(0,r.jsx)("div",{className:"flex items-start",children:(0,r.jsx)(eO.s,{value:"plus",label:"",checked:n,onChange:function(){}})}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex flex-row items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex flex-row items-center gap-1",children:[(0,r.jsx)(ev.o.LabelLg,{weight:"semibold",children:(0,b.t)("".concat(eF,".tiers.plus.title"))}),(0,r.jsx)("div",{className:"hidden sm:flex items-center",children:(0,r.jsx)(eS.E,{variant:"indigo",label:(0,b.t)("".concat(eF,".tiers.plus.badge")),square:!0})})]}),i&&(0,r.jsxs)("div",{className:"flex flex-row items-center gap-1 align-middle",children:[!d&&(0,r.jsx)(ev.o.BodyMd,{weight:"font-normal",color:"text-slate-700 dark:text-slate-300",size:"text-sm",children:(0,b.t)("".concat(eF,".tiers.plus.from"))}),(0,r.jsx)(ev.o.TitleMd,{weight:"font-bold",children:null!=p?p:(0,b.t)("".concat(eF,".tiers.plus.starting_price"))}),(0,r.jsx)(ev.o.BodyMd,{weight:"font-normal",color:"text-slate-700 dark:text-slate-300",size:"text-sm",children:(0,b.t)("".concat(eF,".").concat(f))})]})]}),(0,r.jsx)("div",{className:"hidden sm:block",children:(0,r.jsx)(ev.o.BodySm,{weight:"font-normal",children:(0,b.t)("".concat(eF,".tiers.plus.description"))})}),(0,r.jsx)("div",{className:(0,s.x)("grid w-full overflow-hidden transition-all duration-300 ease-in-out",n?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:(0,r.jsx)("div",{className:"min-h-0 min-w-0",children:(0,r.jsx)(eE,{planTier:J.LQ.plus,isOnOffer:!1,shouldHighlightFeatures:!0,containerClassName:"mt-6"})})})]})]},"plus")};function eq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||ez(e,t)||function(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ez(e,t){if(e){if("string"==typeof e)return eq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eq(e,t)}}var eW=function(){var e=(0,a.A)(),t=e.plans,n=e.selectedPlan,o=e.selectedPlanTier,i=e.setSelectedPlanTier,s=e.customPlanOfferPlan,c=(0,f.B)(),u=c.isCommunityOnPaidPlan,y=c.currentPlanTier,h=c.isCommunityOnTrial,g=c.isCommunityOnBusiness,v=c.isCommunityOnEnterprise,x=(0,eh.j)(),j=eU((0,l.useState)(!1),2),_=j[0],w=j[1],O=(0,d.X)().trackEvent,S=(0,l.useCallback)(function(e){O("plan_settings.plan.clicked",{plan_tier:e}),i(e)},[O,i]),P=(0,l.useRef)(null),C=eU((0,l.useState)(0),2),k=C[0],I=C[1],N=(0,p.x)().isDesktopLayout,A=(0,l.useMemo)(function(){return((function(e){if(Array.isArray(e))return eq(e)})(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||ez(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).reverse()},[t]),E=(0,l.useMemo)(function(){if(_)return{visiblePlans:A,hiddenPlans:[]};var e=function(e){return h?e.tier===J.LQ.basic:!!u&&!!y&&(0,J.V5)(y,e.tier)};return{visiblePlans:A.filter(function(t){return!e(t)}),hiddenPlans:A.filter(function(t){return e(t)})}},[A,_,h,u,y]),R=E.visiblePlans,L=E.hiddenPlans;if((0,l.useEffect)(function(){_&&P.current?I(P.current.scrollHeight):I(0)},[_,L.length]),0===t.length||!o)return(0,r.jsx)(ey.l,{cardCount:3});var D=_?"see_less_plans":"see_more_plans";return(0,r.jsx)(eg.z6,{value:o,onChange:S,children:(0,r.jsx)("div",{className:"flex w-full justify-center",children:(0,r.jsxs)("ul",{className:"border-primary flex w-full flex-col overflow-hidden rounded-xl border",children:[N&&(0,r.jsx)(ew,{}),(x||g||v||!!s)&&(0,r.jsx)(eB,{selected:o===J.LQ.plus,onClick:function(){return S(J.LQ.plus)},showPrice:!x}),R.map(function(e){return(0,r.jsx)(eM,{plan:e,selected:e.tier===o,onClick:function(){return S(e.tier)}},e.id)}),L.length>0&&(0,r.jsx)("div",{ref:P,className:"overflow-hidden duration-300 ease-in-out",style:{height:"".concat(k,"px")},children:L.map(function(e){return(0,r.jsx)(eM,{plan:e,selected:e.tier===(null==n?void 0:n.tier),onClick:function(){return i(e.tier)}},e.id)})}),L.length>0&&(0,r.jsxs)("button",{type:"button",className:"bg-primary flex w-full cursor-pointer flex-row justify-start gap-0 px-6 py-4",onClick:function(){return w(!_)},children:[(0,r.jsx)(ev.o.BodyXs,{weight:"font-medium",children:(0,b.t)("".concat("pricing_plans.plan_settings.plan_selection.plan_selector",".").concat(D))}),(0,r.jsx)(m.In,{type:_?"16-chevron-up":"16-chevron-down",size:12,className:"ml-2"})]})]})})})},e$=n(125665),eV=n(198171),eH=function(e){var t=e.currentPlan,n=(0,f.B)().isLegacyEnterprisePlan?"pricing_plans.legacy_enterprise_banner.settings":(0,J.sj)(t.tier)||(0,J.PF)(t.tier)&&!t.public?"legacy_plan_downgrade_warning":t.show_pro_grandfathered_for_courses?"professional_downgrade_warning":"";return(0,r.jsx)(eV.a,{children:(0,r.jsx)(h.o.BodyMd,{color:"text-default",children:(0,r.jsx)(e$.E,{content:(0,b.t)(n,{name:(0,J.C0)(t.tier),price:t.base_amount,interval:t.interval})})})})},eG=function(){return(0,r.jsxs)("div",{className:"relative overflow-hidden rounded-lg bg-black px-10 py-8",children:[(0,r.jsx)("div",{className:"absolute left-[66px] top-[-336px] h-[380px] w-[947px] rounded-full bg-[#3655E5] blur-[107px]"}),(0,r.jsxs)("div",{className:"relative z-10 flex flex-row items-center gap-x-12",children:[(0,r.jsx)("div",{className:"text-7xl font-extrabold text-white",children:(0,b.t)("pricing_plans.marketing_campaign.banner.discount")}),(0,r.jsx)("div",{children:(0,r.jsx)(h.o.TitleXl,{color:"text-white",children:(0,b.t)("pricing_plans.marketing_campaign.banner.title")})})]})]})},eZ=n(423969),eQ=n(90955),eY=function(e){var t=e.children;return(0,r.jsx)("div",{className:"dark:border-primary dark:bg-primary rounded-xl border border-blue-200 bg-blue-100 p-6","data-testid":"plan-trial-info",children:t})},eJ=function(){var e=(0,eZ.h)(),t=e.isPlanTrialActive,n=e.planTrialEndDateFormatted,o=e.planTrialDaysLeft,i=e.planTrial,a=(0,d.X)().trackEvent,s=(0,eQ.n)();return t?(0,r.jsxs)(eY,{children:[(0,r.jsx)(h.o.LabelLg,{weight:"semibold",children:(0,b.t)("plan_trial_plans_page_banner.title",{date:n})}
1),(0,r.jsx)(h.o.BodyMd,{color:"text-default",children:(0,b.t)("plan_trial_plans_page_banner.description")}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(Y.$,{variant:"secondary",onClick:function(){a("trial_banner.plans_page.manage_trial.clicked",{days_left:o,is_plan_trial:!0,trial_type:null==i?void 0:i.trial_type}),s.show()},children:(0,b.t)("plan_trial_plans_page_banner.manage_trial")})})]}):null},eX=n(732873),e0=n(474811),e1=function(){var e=(0,eX.u)(),t=(0,d.X)().trackEvent;return(0,e0.f)()?(0,r.jsx)("div",{className:"dark:border-primary mb-4 rounded-md border border-blue-200 bg-gradient-to-b from-white to-[#F1F6FF] p-4 dark:bg-gradient-to-b dark:from-gray-800 dark:to-gray-900",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("div",{className:"mt-0.5 shrink-0",children:(0,r.jsx)("div",{className:"flex size-10 items-center justify-center",children:(0,r.jsx)(m.In,{type:"16-star-fill",size:16,className:"text-blue-600 dark:text-blue-400",useWithFillCurrentColor:!0})})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("div",{className:"mb-1",children:(0,r.jsx)(h.o.LabelMd,{weight:"bold",children:(0,b.t)("settings.billing.plans.trial_opt_in_banner.title")})}),(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsx)(h.o.BodySm,{color:"text-light",children:(0,b.t)("settings.billing.plans.trial_opt_in_banner.description")})}),(0,r.jsx)(Y.$,{variant:"secondary",onClick:function(){t("plan_trial_opt_in_banner.clicked",{page:"plan_settings"}),e.show({planTier:J.LQ.business,trialType:"business_thirty_day",onConfirm:function(){t("plan_trial_opt_in_modal.trial_started",{page:"plan_settings"})},onCancel:function(){t("plan_trial_opt_in_modal.cancelled",{page:"plan_settings"})}})},children:(0,b.t)("settings.billing.plans.trial_opt_in_banner.cta")})]})]})}):null},e2=n(915921),e3=n(729824),e4=n(306788),e5=function(e){var t=e.currentPlan,n=null==t?void 0:t.scheduled_downgrade_metadata,o=null==n?void 0:n.plan_downgrade,i=o?e3.il.PLAN_DOWNGRADE:e3.il.INTERVAL_DOWNGRADE,a="pricing_plans.downgrade_schedule_banner.".concat(i),s=(0,e2.M)();if(!(null==n?void 0:n.next_plan))return null;var l=(0,y.We)(n.next_plan).toLowerCase(),c=n.switch_date,u=n.annual_discount_amount_with_currency;return(0,r.jsx)(eV.a,{children:(0,r.jsxs)("div",{className:"flex items-start gap-4",children:[(0,r.jsx)("div",{className:"mr-2 mt-[2px]",children:(0,r.jsx)(m.In,{type:"information-outline",size:24})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("div",{className:"mb-1",children:(0,r.jsx)(h.o.LabelMd,{color:"text-default",weight:"semibold",children:(0,b.t)([a,"title"],{nextPlanName:l,switchDate:c})})}),(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsx)(h.o.BodySm,{color:"text-default",children:(0,b.t)([a,"body"],o?{nextPlanName:(0,y._6)(n.next_plan.tier),currentPlanName:(0,y._6)(t.tier)}:{discountAmount:u})})}),(0,r.jsx)(Y.$,{variant:"secondary",onClick:function(){s.show({source:e4.O.SCHEDULED_DOWNGRADE_BANNER,showPlanDetails:!1})},children:(0,b.t)([a,"cta_button"])})]})]})})},e6=n(340990),e8=n(355104),e9=n(242530),e7=n(547570),te=function(){var e,t=(0,u.Od)(),n=t.currentCommunity,o=t.currentCommunityMember,i=t.currentUser,a=(0,e8.c)().isCircleV4,s=(0,e9.M)(),c=s.handleAskCircleAi,d=s.isAskCircleAiLoading,p=(0,l.useRef)(null),f=null!=(e=null==n?void 0:n.is_sales_icp)&&e;return((0,l.useEffect)(function(){var e=p.current;if(e){var t=e.querySelector('a[data-chili-piper="expired-trial"]');if(t){var n=function(e){e.preventDefault(),(null==i?void 0:i.email)&&(0,e6.me)(i.email,e6.TI.TRIAL_EXPIRED_BANNER)};return t.addEventListener("click",n),function(){t.removeEventListener("click",n)}}}},[null==i?void 0:i.email]),a)?(0,r.jsx)(e7.F,{variant:"warning",icon:"triangle-exclamation",iconColor:"warning",title:(0,b.t)("subscription.expired_trial_title"),description:f?(0,b.t)("pricing_plans.expired_trial_sales_icp_description"):(0,b.t)("pricing_plans.expired_trial_non_icp_description"),secondaryActionProps:{children:f?(0,b.t)("pricing_plans.feature.talk_to_sales"):(0,b.t)("pricing_plans.chat_with_us"),onClick:f?function(){(null==o?void 0:o.email)&&(0,e6.me)(o.email,e6.TI.TRIAL_EXPIRED_BANNER)}:c,disabled:!f&&d}}):(0,r.jsxs)(eV.a,{children:[(0,r.jsx)(h.o.LabelLg,{weight:"semibold",children:(0,b.t)("subscription.expired_trial_title")}
1),(0,r.jsxs)(h.o.BodyMd,{color:"text-default",children:[(0,b.t)("pricing_plans.to_access_upgrade",{community_name:null==n?void 0:n.name}),(0,r.jsx)("div",{ref:p,children:(0,r.jsx)(e$.E,{content:(0,b.t)("pricing_plans.please_reach_out")})})]})]})},tt=n(775463),tn=function(){var e=(0,tt.V)();return(0,r.jsx)(e7.F,{"data-testid":"plan-cancelled",variant:"destructive",icon:"triangle-exclamation",iconColor:"danger",title:(0,b.t)("pricing_plans.plan_cancelled"),description:(0,b.t)("pricing_plans.to_access"),secondaryActionProps:{children:(0,b.t)("trial_banner.renew_plan"),onClick:function(){e.show()}}})},tr=n(546244),to=function(){return(0,e8.c)().isCircleV4?(0,r.jsx)(tr.l,{variant:"destructive",icon:"triangle-exclamation",iconColor:"danger",title:(0,b.t)("subscription.incomplete_expired_title"),description:(0,b.t)("subscription.incomplete_expired_description")}):(0,r.jsxs)(eV.a,{children:[(0,r.jsx)(h.o.LabelLg,{weight:"semibold",children:(0,b.t)("subscription.incomplete_expired_title")}),(0,r.jsx)(h.o.BodyMd,{color:"text-default",children:(0,b.t)("subscription.incomplete_expired_description")})]})},ti=n(199563),ta=function(){var e,t,n,o=(0,u.Od)().currentCommunity,i=(0,e8.c)().isCircleV4;return(null==o||null==(e=o.subscription)?void 0:e.ends_at)?i?(0,r.jsx)(tr.l,{variant:"warning",icon:"triangle-exclamation",iconColor:"warning",title:(0,b.t)("subscription.subscription_on_grace_period.title"),description:(0,b.t)("subscription.subscription_on_grace_period.description",{date:(0,ti.z9)(null==o||null==(n=o.subscription)?void 0:n.ends_at)})}):(0,r.jsxs)(eV.a,{children:[(0,r.jsx)(h.o.LabelLg,{weight:"semibold",children:(0,b.t)("subscription.subscription_on_grace_period.title")}),(0,r.jsx)(h.o.BodyMd,{color:"text-default",children:(0,b.t)("subscription.subscription_on_grace_period.description",{date:(0,ti.z9)(null==o||null==(t=o.subscription)?void 0:t.ends_at)})})]}):null},ts=n(785122),tl=function(){var e=(0,f.B)(),t=e.isExpiredTrial,n=e.isCommunitySubscriptionIncompleteExpired,o=e.isCommunitySubscriptionFullyCancelled,i=e.isCommunitySubscriptionOnGracePeriod,a=e.hasCommunityIncompletePayment;return t?(0,r.jsx)(te,{}):a?(0,r.jsx)(ts.S,{}):n?(0,r.jsx)(to,{}):o?(0,r.jsx)(tn,{}):i?(0,r.jsx)(ta,{}):null},tc=function(){return(0,f.B)().isCommunityOnTrial?(0,r.jsx)(e7.F,{variant:"info",layout:"horizontal",icon:"sparkle-filled",iconColor:"info",title:(0,b.t)("trial_credits_banner.title"),description:(0,b.t)("trial_credits_banner.description")}):null},tu=function(){var e=(0,a.A)().currentPlan,t=(0,u.Od)().currentCommunity,n=(0,f.B)(),o=n.isExpiredTrial,i=n.isCommunityOnTrial,s=n.hasActiveOffer,l=e&&(e.show_pro_grandfathered_for_courses||(0,J.PF)(e.tier)&&!e.public||(0,J.sj)(e.tier))&&!o&&!i;return t?(null==e?void 0:e.is_community_hub_downgrade_scheduled)?(0,r.jsx)(e5,{currentPlan:e}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e1,{}),(0,r.jsx)(eJ,{}),(0,r.jsx)(tc,{}),l&&(0,r.jsx)(eH,{currentPlan:e}),(0,r.jsx)(tl,{}),s&&(0,r.jsx)(eG,{})]}):null},td=n(138943),tp=n(62741),tf=n(648586),tm=n(976416),tb=function(e){var t=e.onExpand,n=e.selectedPlan;return(0,r.jsxs)("div",{className:"flex flex-col gap-y-4",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("button",{type:"button",onClick:t,children:(0,r.jsx)(h.o.LabelXs,{color:"text-default",textTransform:"underline",children:(0,b.t)(["pricing_plans.plan_settings.mobile_checkout_overlay","view_summary"])})}),(0,r.jsx)(h.o.LabelXs,{weight:"semibold",children:n.annual_base_amount_with_currency})]}),(0,r.jsx)(tm.b,{plan:n})]})},ty=n(660535),th=function(){var e=(0,a.A)(),t=e.billingCycle,n=e.currentPlan,r=e.selectedPlan,o=(0,u.Od)().currentCommunity,i=(0,ej.Z)(),s=!t&&n?!(null==o?void 0:o.is_on_trial):(0,J.cA)(t),l=(0,y.qK)(r),c=(null==n?void 0:n.id)===(null==r?void 0:r.id),d=function(e){i({to:".",replace:!0,search:function(t){var n,r;return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t),r=r={billing_cycle:e},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n}})};return{billingCycle:t,currentPlan:n,isYearly:s,shouldShowBillingCycleOptions:l,isCurrentPlanSelected:c,isSelected:function(e){return!t&&n?e===y.k$.year?!(null==o?void 0:o.is_on_trial):!!(null==o?void 0:o.is_on_trial):t===e},handleIntervalChange:function(e){d(e)},handleToggle:function(e){d(e?y.k$.year:y.k$.month)},planIntervals:y.k$}},tg=n(976838),tv=function(){var e=(0,a.A)(),t=e.billingCycle,n=e.billingCurrency,r=e.selectedPlan,o=e.selectedPlanTier,i=e.plans,s=e.isPlansLoading,l=t===y.k$.month?y.k$.year:y.k$.month,c=(0,tg.S)({billing_cycle:l,billing_currency:n,locale:null}),u=c.plans,d=c.isPlansLoading,p=o?u.find(function(e){return e.tier===o}):void 0,f=!s&&!d&&i.length>0&&u.length>0,m=t===y.k$.year?r:p,b=t===y.k$.month?r:p;return{auxiliaryPlans:u,auxiliarySelectedPlan:p,areBothIntervalsLoaded:f,auxiliaryBillingCycle:l,monthlyPlan:b,yearlyPlan:m}},tx=n(644348),tj="pricing_plans.plan_settings.plan_summary",t_=(0,l.memo)(function(e){var t=e.id,n=e.interval,o=e.isSelected,i=e.onIntervalChange,a=e.plan;return(0,r.jsx)(eO.s,{id:t,name:"billing-interval",label:(0,r.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,r.jsx)(h.o.LabelSm,{weight:"semibold",children:(0,b.t)([tj,"annual_billing"])}),a&&(0,r.jsx)(tx.W,{variant:"success",children:(0,b.t)([tj,"annual_savings"],{percentage:(0,J.zD)(a)})})]}),value:n,description:(0,r.jsx)(h.o.BodySm,{weight:"normal",children:(0,b.t)([tj,"plan_annual_amount"],{amount:null==a?void 0:a.display_base_monthly_amount})}),defaultChecked:o,onChange:function(){return i(n)}})});t_.displayName="AnnualRadioOption";var tw="pricing_plans.plan_settings.plan_summary",tO=(0,l.memo)(function(e){var t=e.id,n=e.interval,o=e.isSelected,i=e.onIntervalChange,a=e.plan;return(0,r.jsx)(eO.s,{id:t,name:"billing-interval",label:(0,r.jsx)(h.o.LabelSm,{weight:"semibold",children:(0,b.t)([tw,"monthly_billing"])}),value:n,description:(0,r.jsx)(h.o.BodySm,{weight:"normal",children:(0,b.t)([tw,"plan_monthly_amount"],{amount:null==a?void 0:a.display_base_monthly_amount})}),defaultChecked:o,onChange:function(){return i(n)}})});tO.displayName="MonthlyRadioOption";var tS=function(){var e=th(),t=e.isYearly,n=e.shouldShowBillingCycleOptions,o=e.currentPlan,i=e.handleIntervalChange,a=tv(),s=a.areBothIntervalsLoaded,l=a.monthlyPlan,c=a.yearlyPlan,u=n||(null==o?void 0:o.interval)===y.k$.year,d=n||(null==o?void 0:o.interval)===y.k$.month;if(!s||!u&&!d)return null;var p=!n,f=p||t,m=p||!t;return(0,r.jsxs)(ty.L,{legend:"Billing Cycle",children:[u&&(0,r.jsx)(t_,{id:"annual-billing",interval:y.k$.year,isSelected:f,plan:c,onIntervalChange:i}),d&&(0,r.jsx)(tO,{id:"monthly-billing",interval:y.k$.month,isSelected:m,plan:l,onIntervalChange:i})]})};tS.displayName="BillingIntervalRadio";var tP=function(){var e=(0,a.A)().selectedPlan;return e?(0,r.jsx)("div",{className:"flex flex-row gap-1",children:(0,J.cA)(e.interval)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.o.BodyXs,{textTransform:"line-through",color:"text-default",children:e.strike_through_price}),(0,r.jsx)(h.o.BodyXs,{color:"text-default",children:(0,b.t)(["pricing_plans.plan_settings.plan_summary","plan_annual_amount"],{amount:e.display_base_monthly_amount})})]})}):null},tC=n(596638),tk=n(549776),tI=function(e){var t=e.selectedPlan;return(0,r.jsx)(tk.y,{description:(0,b.t)(["pricing_plans.plan_settings.plan_summary","annual_savings"],{percentage:(0,J.zD)(t)}),value:"-".concat((0,J.e_)(t.annual_discount_amount_with_currency||"",t.currency)),valueProps:{color:"text-green-success"}})},tN=function(e){var t=e.currentPlanCredit;return(0,r.jsx)(tk.y,{description:(0,b.t)(["pricing_plans.plan_settings.plan_summary","current_plan_credit"]),value:t,valueProps:{color:"text-green-success"}})},tA=function(e){var t=e.discountCoupon;return(0,r.jsx)(tk.y,{description:(0,b.t)(["pricing_plans.plan_settings.plan_summary","discount_coupon"]),value:t,valueProps:{color:"text-green-success"}})},tE=function(e){var t=e.dueToday;return(0,r.jsx)(tk.y,{description:(0,b.t)(["pricing_plans.plan_settings.plan_
1summary","due_today"]),value:t,descriptionProps:{weight:"font-medium"},valueProps:{weight:"font-medium"}})},tR=function(e){var t=e.auxiliarySelectedPlan;return(0,r.jsx)(tk.y,{description:(0,b.t)(["pricing_plans.plan_settings.plan_summary","annual_savings"],{percentage:(0,J.zD)(t)}),value:"-".concat((0,J.e_)(t.annual_discount_amount_with_currency||"",t.currency)),descriptionProps:{color:"text-red-500",textTransform:"line-through"},valueProps:{color:"text-red-500",textTransform:"line-through"}})},tL=n(983979),tD=function(){return(0,r.jsxs)("div",{className:"border-primary flex flex-col gap-y-2 border-t pt-2",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)(tL.f,{md:!0,long:!0}),(0,r.jsx)(tL.f,{md:!0,short:!0})]}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)(tL.f,{md:!0,half:!0}),(0,r.jsx)(tL.f,{md:!0,short:!0})]})]})},tT=function(){var e=(0,a.A)(),t=e.selectedPlan,n=e.selectedPlanTier,o=e.customPlanOfferPlan,i=(0,f.B)().isCommunityOnTrial,s=!!o&&(0,J.KL)(n),l=tv(),c=l.auxiliarySelectedPlan,u=l.yearlyPlan,d=(0,tC.J)({plan:t,alternativePlan:s?void 0:c,isAnnualPlan:(0,J.cA)(null==t?void 0:t.interval),isCommunityOnTrial:!!s||i,isPlanLoading:!1}),p=d.pricing,m=d.isLoadingPricing;return!t||(0,y.Oz)(t.plan_action)?null:s?(0,r.jsx)("div",{className:"border-primary flex flex-col gap-y-1 border-t pt-4",children:(0,r.jsx)(tE,{dueToday:o.display_total_with_currency_code})}):!m&&c&&u?(0,r.jsxs)("div",{className:"border-primary flex flex-col gap-y-1 border-t pt-4",children:[(0,J.cA)(t.interval)&&(0,r.jsx)(tI,{selectedPlan:u}),(0,J.ku)(t.interval)&&(0,r.jsx)(tR,{auxiliarySelectedPlan:c}),p.currentPlanCredit&&(0,y.gm)(t)&&(0,r.jsx)(tN,{currentPlanCredit:p.currentPlanCredit}),p.discountCoupon&&(0,r.jsx)(tA,{discountCoupon:p.discountCoupon}),p.dueToday&&(0,r.jsx)(tE,{dueToday:p.dueToday})]}):(0,r.jsx)(tD,{})},tM=function(){var e=(0,a.A)().selectedPlan;return e?(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)(h.o.LabelSm,{weight:"semibold",children:(0,b.t)(["pricing_plans.plan_settings.plan_summary","plan_name"],{plan:e.display_name})}),(0,r.jsx)(h.o.LabelSm,{weight:"semibold",children:(0,J.cA)(e.interval)?(0,r.jsx)(h.o.LabelSm,{weight:"semibold",children:e.annual_base_amount_with_currency}):(0,r.jsx)(h.o.LabelSm,{weight:"semibold",children:e.display_base_monthly_amount})})]}):null},tF=n(20957),tK=(0,l.forwardRef)(function(e,t){var n=e.onCollapse,o=e.selectedPlan;return o?(0,r.jsxs)("div",{ref:t,className:"bg-primary absolute inset-x-0 bottom-0 flex max-h-[80vh] flex-col gap-y-5 overflow-y-auto rounded-t-xl p-5",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)(h.o.LabelLg,{weight:"semibold",children:(0,b.t)(["pricing_plans.plan_settings.mobile_checkout_overlay","summary"])}),(0,r.jsx)("button",{type:"button",onClick:n,children:(0,r.jsx)(m.In,{type:"20-close",size:20})})]}),(0,r.jsx)(tS,{}),(0,r.jsxs)("div",{children:[(0,r.jsx)(tM,{}),(0,r.jsx)(tP,{})]}),(0,r.jsx)(tT,{}),(0,r.jsx)(tm.b,{plan:o})]}):(0,r.jsx)(tF.t,{})});function tB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}tK.displayName="ExpandedCheckoutView";var tq=function(){var e,t,n,o=(0,a.A)(),i=o.selectedPlan,s=o.selectedPlanTier,c=function(e){if(Array.isArray(e))return e}(e=(0,l.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return tB(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tB(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=c[0],d=c[1];return i||s===J.LQ.plus?(0,r.jsxs)("div",{className:"fixed inset-x-0 bottom-0 z-50 md:hidden",children:[(0,r.jsx)(tp.e,{show:u,as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,r.jsx)("div",{className:"fixed inset-0 bg-black/50",onClick:function(){return d(!1)},"aria-hidden":"true"})}),(0,r.jsxs)("div",{className:"bg-primary border-primary relative border-t px-5 py-4 shadow-lg",children:[i&&(0,r.jsxs)(r.Fragment,{children:[!u&&(0,r.jsx)(tb,{onExpand:function(){return d(!0)},selectedPlan:i}),(0,r.jsx)(tp.e,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({show:u,as:l.Fragment},td.$S),n=n={children:(0,r.jsx)(tK,{onCollapse:function(){return d(!1)},selectedPlan:i})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))]}),!i&&s===J.LQ.plus&&(0,r.jsx)(tf.O,{source:"plans_page"})]})]}):null},tU=n(735203),tz=n(267344),tW=n(440500),t$="pricing_plans.plan_settings.plus_plan_summary",tV=function(){var e=(0,a.A)(),t=e.selectedPlan,n=e.selectedPlanTier,o=e.customPlanOffer;return n===J.LQ.plus?o?(0,r.jsx)(tz.k,{}):(0,r.jsx)(tW.Q,{title:(0,r.jsx)(h.o.LabelXl,{weight:"bold",color:"text-dark",children:(0,b.t)([t$,"title"])}),description:(0,b.t)([t$,"description"]),source:"plans_page"}):t?(0,r.jsxs)(tU.f,{children:[(0,r.jsx)(h.o.LabelXl,{weight:"semibold",children:(0,b.t)(["pricing_plans.plan_settings.plan_summary","title"])}),(0,r.jsx)(tS,{}),(0,r.jsxs)("div",{children:[(0,r.jsx)(tM,{}),(0,r.jsx)(tP,{})]}),(0,r.jsx)(tT,{}),(0,r.jsx)(tm.b,{plan:t})]}):(0,r.jsx)(tF.t,{})},tH=n(764631),tG=n(892236),tZ=n(644488),tQ=n(162005),tY=n(202090);let tJ=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/aliAbdaal-d7e833c4396422cd.svg",tX=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/aliAbdaalDark-b8ad2e41ae2c93b5.svg",t0=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/goodInside-f49c5daec35f65fa.svg",t1=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/goodInsideDark-3ace5f986e903033.svg",t2=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/harvard-f8892c672b6f3ddc.svg",t3=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/harvardDark-c4d0153fe4346be5.svg",t4=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/lovable-1d8785e301257c74.png",t5=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/lovableDark-5e87d9ad86629e4a.png",t6=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/miro-01e4d6960a9d6a43.svg",t8=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/miroDark-bbbc62550e889bb0.svg",t9=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/obama-50c045f87603867d.svg",t7=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/obamaDark-ef6d32c8efebf685.svg";function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nt=[{name:"Miro",light:t6,dark:t8,width:80,height:30},{name:"Ali Abdaal",light:tJ,dark:tX,width:128,height:30},{name:"Harvard University",light:t2,dark:t3,width:90,height:24},{name:"Tim Ferriss",light:n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/timFerriss-b58cfe0815b8ed19.svg",dark:n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/socialProofLogos/timFerrissDark-b77d1d2c56549693.svg",width:120,height:30},{name:"Obama Foundation",light:t9,dark:t7,width:111,height:26},{name:"Lovable",light:t4,dark:t5,width:111,height:30},{name:"Good Inside",light:t0,dark:t1,width:70,height:30}],nn=nt.reduce(function(e,t){return e+t.width},0)+40*nt.length,nr=function(e){var t=e.isDarkAppearance;return(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-x-10 pr-10",children:nt.map(function(e){return(0,r.jsx)("img",{className:"shrink-0",src:t?e.dark:e.light,alt:e.name,width:e.width,height:e.height,draggable:!1},e.name)})})},no=function(){var e,t=(0,tY.wR)().isDarkAppearance,n=(0,tH.I)(),o=(0,tG.d)(0),i=(0,l.useRef)(!1),a=(0,l.useRef)(null),s=function(e){if(Array.isArray(e))return e}(e=(0,l.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return ne(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ne(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=s[0],u=s[1];(0,l.useLayoutEffect)(function(){var e=a.current;if(e){var t=function(){u(e.getBoundingClientRect().width>=nn)};t();var n=new ResizeObserver(t);return n.observe(e),function(){return n.disconnect()}}},[]);var d=function(){var e=o.get();o.set((e%nn+nn)%nn-nn)};return(0,tZ.N)(function(e,t){c||n||i.current||(o.set(o.get()-36*t/1e3),d())}),(0,r.jsx)("div",{ref:a,className:c?"opacity-60":"overflow-hidden opacity-60 ".concat("[mask-image:linear-gradient(to_right,transparent,black_40px,black_calc(100%-40px),transparent)] [-webkit-mask-image:linear-gradient(to_right,transparent,black_40px,black_calc(100%-40px),transparent)]"),children:c?(0,r.jsx)("div",{className:"flex items-center justify-between",children:nt.map(function(e){return(0,r.jsx)("img",{src:t?e.dark:e.light,alt:e.name,width:e.width,height:e.height,draggable:!1},e.name)})}):(0,r.jsxs)(tQ.P.div,{className:"flex w-max cursor-grab items-center active:cursor-grabbing",style:{x:o},drag:"x",dragMomentum:!1,onDragStart:function(){i.current=!0},onDrag:d,onDragEnd:function(){i.current=!1},children:[(0,r.jsx)(nr,{isDarkAppearance:t}),(0,r.jsx)(nr,{isDarkAppearance:t}),(0,r.jsx)(nr,{isDarkAppearance:t})]})})},ni=function(){var e=(0,u.Od)().isLoading,t=(0,a.A)(),n=t.isCurrentPlanLoading,m=t.selectedPlan,b=(0,f.B)().isCommunityOnTrial,y=(0,i.sO)(),h=y.hideFab,g=y.showFab,v=(0,p.x)(),x=v.isCompactLayout,j=v.isDesktopLayout,_=v.isMobileLayout,w=(0,c.P)(),O=(0,d.X)().trackEvent;return((0,l.useEffect)(function(){O("plan_settings.plans_page.visited",{})},[O]),(0,l.useEffect)(function(){return m&&_?h():g(),function(){g()}},[m,_,h,g]),n||e)?(0,r.jsx)(o.a,{variant:"fullscreen"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:(0,s.x)("flex flex-col gap-6",{"pt-4":w&&b,"pb-32":_}),children:[(0,r.jsx)(tu,{}),(0,r.jsxs)("div",{className:"flex flex-col gap-10 md:gap-20",children:[(0,r.jsxs)("div",{className:"flex md:gap-6",children:[(0,r.jsx)("div",{className:(0,s.x)("flex flex-col gap-10",x?"w-[550px]":"w-[681px]",{"w-full":_}),children:(0,r.jsx)(eW,{})}),(0,r.jsx)("div",{children:j&&(0,r.jsx)(tV,{})})]}),(0,r.jsx)(no,{}),(0,r.jsx)(eb,{})]})]}),(0,r.jsx)(tq,{})]})}},267344(e,t,n){"use strict";n.d(t,{k:()=>b});var r=n(391426),o=n(568316),i=n(417980),a=n(517338),s=n(511950),l=n(976416),c=n(549776),u=n(735203),d=n(20957),p="pricing_plans.plan_settings.plan_summary",f={year:"annual_billing",biannual:"biannual_billing",quarter:"quarterly_billing"},m={year:"plan_annual_total",biannual:"plan_biannual_total",quarter:"plan_quarterly_total"},b=function(){var e,t,n=(0,s.A)(),b=n.selectedPlan,y=n.customPlanOfferPlan;if(!b||!y)return(0,r.jsx)(d.t,{});var h=b.interval,g=null!=(e=f[h])?e:"annual_billing",v=null!=(t=m[h])?t:"plan_annual_total",x=y.discount_percentage,j=y.display_annual_total,_=y.display_annual_total_before_discount,w=y.display_annual_savings,O=y.display_total,S=x>0;return(0,r.jsxs)(u.f,{children:[(0,r.jsx)(o.o.LabelXl,{weight:"semibold",children:(0,i.t)([p,"title"])}),(0,r.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,r.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,r.jsx)(o.o.LabelSm,{weight:"semibold",children:(0,i.t)([p,g])}),S&&(0,r.jsx)(a.E,{variant:"secondary",label:(0,i.t)([p,"discount_savings_badge"],{percentage:x}),className:"border-green-200 bg-green-50 text-xs text-green-700"})]}),(0,r.jsxs)(o.o.BodySm,{color:"text-default",children:[S&&(0,r.jsx)("span",{className:"mr-1 line-through",children:_}),(0,i.t)([p,v],{amount:S?j:_})]})]}),(0,r.jsxs)("div",{className:"border-primary flex flex-col gap-y-1 border-t pt-4",children:[S&&(0,r.jsx)(c.y,{description:(0,i.t)([p,"discount_savings_badge"],{percentage:x}),value:"-".concat(w),valueProps:{color:"text-green-success"}}),(0,r.jsx)(c.y,{description:(0,i.t)([p,"due_today"]),value:O,descriptionProps:{weight:"font-medium"},valueProps:{weight:"font-medium"}})]}),(0,r.jsx)(l.b,{plan:b}),(0,r.jsxs)(o.o.BodyXs,{color:"text-light",children:[(0,i.t)([p,"terms_prefix"])," ",(0,r.jsx)("a",{href:"https://circle.so/creator-terms",target:"_blank",rel:"noreferrer",className:"underline",children:(0,i.t)([p,"terms_link"])}),". ",(0,i.t)([p,"terms_suffix"])]})]})}}
1,648586(e,t,n){"use strict";var r=n(391426),o=n(340990),i=n(640668),a=n(417980),s=n(387099),l=n(230763),c=n(852362),u=n(818185),d=function(e){var t=e.source,n=e.ctaHref,d=(0,l.Od)().currentCommunityMember,p=(0,c.X)().trackEvent,f=(0,i.B)().isCommunityOnPaidPlan,m=(0,u.a)().sales_utm_campaign;return(0,r.jsx)(s.$,{variant:"marketing-gradient-blue",extraLarge:!0,full:!0,className:"rounded-xl",onClick:function(){if(p("enterprise_plus.talk_to_sales.clicked",{source:t}),n)return void window.open(n,"_blank","noopener");var e=(null!=d?d:{}).email;if(e){var r=(0,o.a1)(m)?m:"plans_page"===t?f?o.TI.UPGRADE_PLAN_EXP:o.TI.UPGRADE_PLAN:f?o.TI.USAGE_MODAL_EXP:o.TI.USAGE_MODAL;(0,o.me)(e,r)}},children:(0,a.t)(["pricing_plans.plan_settings.plus_plan_summary","cta_button"])})};n.d(t,{O:()=>d})},440500(e,t,n){"use strict";n.d(t,{Q:()=>p});var r=n(391426),o=n(568316),i=n(735203),a=n(648586),s=n(417980);let l=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/PlusPlanSummary/assets/[email protected]",c=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/PlusPlanSummary/assets/[email protected]",u=n.p+"static/react/components/SettingsApp/Plan/PlanSettings/experiment/PlusPlanSummary/assets/[email protected]";var d=function(){return(0,r.jsx)("img",{src:c,srcSet:"".concat(l," 1x, ").concat(c," 2x, ").concat(u," 3x"),alt:(0,s.t)(["pricing_plans.plan_settings.plus_plan_summary.illustration","image_alt"]),className:"size-full object-cover",loading:"lazy"})},p=function(e){var t=e.title,n=e.description,s=e.source,l=e.ctaHref;return(0,r.jsxs)(i.f,{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[t,(0,r.jsx)(o.o.BodySm,{color:"text-default",children:n})]}),(0,r.jsx)(d,{}),(0,r.jsx)(a.O,{source:s,ctaHref:l})]})}},369574(e,t,n){"use strict";var r=n(391426),o=n(568316),i=n(66108),a=function(e){var t=e.showModal,n=e.onClose,a=e.onConfirm,s=e.title,l=e.confirmText,c=e.description,u=e.isLoading;return(0,r.jsx)(i.R,{isOpen:t,onClose:n,confirmVariant:"circle",size:"md",onConfirm:a,title:s,confirmText:l,disabled:void 0!==u&&u,children:(0,r.jsx)(o.o.LabelMd,{children:c})})};n.d(t,{y:()=>a})},291200(e,t,n){"use strict";var r=n(391426),o=n(287305),i=n(682037),a=function(e){var t=e.planTier,n=e.isOnOffer,a=e.shouldHighlightFeatures,s=(0,i.M)()[t];return(0,r.jsx)(r.Fragment,{children:s.map(function(e){return(0,r.jsx)(o.s,{feature:e.text,isOnOffer:n,isHighlighted:a,highlightColor:e.highlightColor,highlightIcon:e.highlightIcon,color:e.color,fontWeight:e.fontWeight},e.text)})})};n.d(t,{E:()=>a})},732873(e,t,n){"use strict";n.d(t,{u:()=>$});var r=n(809061),o=n(391426),i=n(817751),a=n(791009),s=n(417980),l=n(689492),c=n(568316),u="settings.billing.plans.trial_opt_in_modal",d=function(){return(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)(c.o.BodyMd,{children:(0,s.t)([u,"blocked_downgrade_scheduled.description"])}),(0,o.jsx)(c.o.BodyMd,{color:"text-light",children:(0,s.t)([u,"blocked_downgrade_scheduled.explanation"])})]})},p=n(973646),f=function(e){var t=e.errorMessage;return(0,o.jsxs)("div",{className:"mx-auto mt-16 max-w-sm text-center",children:[(0,o.jsx)(p.In,{type:"68-error-grey",size:68,className:"mb-10 !w-14"}),(0,o.jsx)(c.o.TitleLg,{color:"text-darkest",children:(0,s.t)([u,"error.title"])}),(0,o.jsx)("div",{className:"mt-3",children:(0,o.jsx)(c.o.BodyMd,{color:"text-subtle",weight:"normal",size:"text-md",children:t||(0,s.t)([u,"error.subtitle"])})})]})},m=n(387099),b=function(e){var t=e.icon,n=e.title,r=e.description;return(0,o.jsxs)("div",{className:"flex gap-3",children:[(0,o.jsx)("div",{className:"mt-1 shrink-0",children:(0,o.jsx)("div",{className:"flex size-5 items-center justify-center",children:t})}),(0,o.jsxs)("div",{children:[(0,o.jsx)(c.o.LabelMd,{weight:"semibold",children:n}),(0,o.jsx)(c.o.BodySm,{color:"text-subtle",children:r})]})]})},y=n(983979),h=function(e){var t=e.plan,n=e.isPlanLoading,r=e.className,i=n||!(null==t?void 0:t.display_base_monthly_amount),a=null==t?void 0:t.display_name,l=i?(0,o.jsx)(y.f,{md:!0,long:!0}):(0,s.t)("".concat(u,".plan_card.trial_period_dynamic"),{price:t.display_base_monthly_amount});return(0,o.jsxs)("div",{className:"bg-primary border-primary rounded-lg border p-4 ".concat(void 0===r?"":r),children:[(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)("div",{className:"text-white",children:(0,o.jsx)(c.o.LabelMd,{weight:"semibold",children:n||!a?(0,o.jsx)(y.f,{md:!0,long:!0}):(0,s.t)("".concat(u,".plan_card.title"),{plan_name:a})})}),(0,o.jsx)("div",{className:"flex flex-row items-center gap-1 align-middle",children:(0,o.jsx)("div",{className:"text-white",children:(0,o.jsx)(c.o.LabelMd,{weight:"bold",children:n?(0,o.jsx)(y.f,{md:!0,short:!0}):(0,s.t)("".concat(u,".plan_card.price"))})})})]}),(0,o.jsx)("div",{className:"text-white/70",children:(0,o.jsx)(c.o.LabelXs,{children:l})})]})},g=[{key:"community_ai",iconType:"16-thunder"}
1,{key:"workflows_apis",iconType:"sw-thunder"},{key:"custom_fields",iconType:"16-character-square"},{key:"built_for_scale",iconType:"16-trending-circle-boost"}],v=function(e){var t=e.ctaLabel,n=e.onConfirm,r=e.plan,i=e.isPlanLoading,a=e.renderIcon,l="".concat(u,".left_pane.features");return(0,o.jsxs)("div",{className:"flex h-full flex-col pb-6 lg:pb-0",children:[(0,o.jsxs)("div",{className:"flex-1",children:[(0,o.jsx)("div",{className:"mb-6",children:(0,o.jsxs)(c.o.BodyMd,{color:"text-subtle",children:[(0,s.t)("".concat(u,".left_pane.description_start")),(0,o.jsx)("strong",{children:(0,s.t)("".concat(u,".left_pane.description_bold"))}),(0,s.t)("".concat(u,".left_pane.description_end"))]})}),(0,o.jsx)("div",{className:"space-y-4",children:g.map(function(e){return(0,o.jsx)(b,{icon:a(e.iconType),title:(0,s.t)("".concat(l,".").concat(e.key,".title")),description:(0,s.t)("".concat(l,".").concat(e.key,".description"))},e.key)})})]}),(0,o.jsxs)("div",{className:"mt-auto",children:[(0,o.jsx)("div",{className:"mb-4 lg:hidden",children:(0,o.jsx)(h,{plan:r,isPlanLoading:i})}),(0,o.jsx)(m.$,{variant:"marketing-gradient",large:!0,full:!0,onClick:n,children:null!=t?t:(0,s.t)("".concat(u,".start_trial"))})]})]})},x=n(812857),j=function(){return(0,o.jsx)("div",{className:"my-28",children:(0,o.jsx)(x.Q,{title:(0,s.t)([u,"loading.title"]),subtitle:(0,s.t)([u,"loading.subtitle"])})})};Object.freeze({DETAILS:"/details",LOADING:"/loading",SUCCESS:"/success",ERROR:"/error",BLOCKED_DOWNGRADE_SCHEDULED:"/blocked_downgrade_scheduled"});var _="details",w="loading",O="success",S="error",P="blocked_downgrade_scheduled";let C=n.p+"static/images/features/profile-fields/en/value-prop_1x-5db9801db4299f04.png",k=n.p+"static/images/features/profile-fields/en/value-prop_2x-23353bb38bc7b604.png";var I=function(e){var t=e.plan,n=e.isPlanLoading,r="".concat(C," 1x, ").concat(k," 2x");return(0,o.jsxs)("div",{className:"hidden flex-col lg:flex",children:[(0,o.jsx)("img",{src:C,srcSet:r,alt:(0,s.t)("".concat(u,".image_alt")),loading:"eager",className:"size-full rounded-tr-md object-cover"}),(0,o.jsx)(h,{plan:t,isPlanLoading:n,className:"rounded-t-none"})]})},N=function(e){var t=e.planName,n=e.currentPlan,r=e.trialEndDate;return(0,o.jsxs)("div",{className:"mx-auto max-w-sm text-center",children:[(0,o.jsx)("div",{className:"mb-6 flex justify-center",children:(0,o.jsx)(c.o.TitleXxl,{children:(0,s.t)([u,"success.icon"])})}),(0,o.jsx)("div",{className:"mb-4",children:(0,o.jsx)(c.o.TitleLg,{color:"text-darkest",children:(0,s.t)([u,"success.title"])})}),(0,o.jsx)("div",{children:(0,o.jsx)(c.o.BodyMd,{color:"text-subtle",weight:"normal",size:"text-md",leading:"leading-relaxed",children:(0,s.t)([u,"success.subtitle"],{planName:void 0===t?"Business":t,currentPlan:void 0===n?"Professional":n,trialEndDate:r||"30 days"})})})]})},A=n(51730),E=n(915779),R=n(258752);function L(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var D=function(e){var t,n;return(0,R.n_)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={mutationFn:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){return[2,(0,A.oK)(E.iK.planTrials.create(),e)]})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){L(i,r,o,a,s,"next",e)}function s(e){L(i,r,o,a,s,"throw",e)}a(void 0)})})()}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},T=n(933578),M=n(498302),F=n(356428);function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var U=function(e){var t=e.planTier,n=void 0===t?l.LQ.business:t,r=e.onConfirm,o=e.onCancel,i=e.onSuccess,a=e.trialType,c=void 0===a?"business_thirty_day":a,d=e.closeModal,p=(0,F.u)(),f=p.refetchCurrentPlan,m=p.currentPlan,b=null==m?void 0:m.is_community_hub_downgrade_scheduled,y=q((0,T.useState)(b?P:_),2),h=y[0],g=y[1],v=q((0,T.useState)(),2),x=v[0],j=v[1],C=(0,M.P)({planTier:n}),k=C.plan,I=C.isPlanLoading,N=null==k?void 0:k.display_name,A=D({onSuccess:function(){f(),g(O),null==r||r()},onError:function(e){g(S),j(e.message||(0,s.t)([u,"error.subtitle"]))}});return{modalState:h,errorMessage:x,plan:k,isPlanLoading:I,displayPlanName:N,handleClose:function(){null==o||o(),d()},handleSuccessClose:function(){null==i||i(),d()},handleConfirm:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:if(b)return g(P),[2];return g(w),[4,A.mutateAsync({trial_type:c})];case 1:return e.sent(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){B(i,r,o,a,s,"next",e)}function s(e){B(i,r,o,a,s,"throw",e)}a(void 0)})})()}}},z=n(737225),W=n(974618),$=(0,r.F)(function(e){var t=e.ctaLabel,n=e.planTier,r=void 0===n?l.LQ.business:n,c=e.onConfirm,p=e.onCancel,m=e.onSuccess,b=e.title,y=e.trialType,h=e.open,g=e.onOpenChange,x=U({planTier:r,onConfirm:c,onCancel:p,onSuccess:m,trialType:void 0===y?"business_thirty_day":y,closeModal:function(){return g(!1)}}),C=x.modalState,k=x.errorMessage,A=x.plan,E=x.isPlanLoading,R=x.displayPlanName,L=x.handleClose,D=x.handleSuccessClose,T=x.handleConfirm,M={"16-thunder":"sparkle","sw-thunder":"zap","16-character-square":"square-a","16-trending-circle-boost":"trending-circle"},F=function(e){var t;return(0,o.jsx)(i.t,{name:null!=(t=M[e])?t:"zap",size:"md",color:"secondary"})};return(0,o.jsx)(a.a.Root,{open:h,onOpenChange:g,size:C===_?"xl":"md",children:(0,o.jsx)(a.a.Content,{children:function(){switch(C){case P:return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.a.Header,{title:(0,s.t)([u,"blocked_downgrade_scheduled.title"]),showCloseButton:!0}),(0,o.jsx)(a.a.Body,{children:(0,o.jsx)(d,{})}),(0,o.jsx)(a.a.Footer,{primaryAction:{label:(0,s.t)([u,"blocked_downgrade_scheduled.button"]),onClick:L}})]});case w:return(0,o.jsx)(a.a.Body,{children:(0,o.jsx)(j,{})});case O:return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.a.Body,{children:(0,o.jsx)(N,{planName:R})}
1),(0,o.jsx)(a.a.Footer,{primaryAction:{label:(0,s.t)([u,"success.button"]),onClick:D}})]});case S:return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.a.Body,{children:(0,o.jsx)(f,{errorMessage:k})}),(0,o.jsx)(a.a.Footer,{primaryAction:{label:(0,s.t)([u,"error.close_button"]),onClick:L}})]});default:return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.a.Header,{title:null!=b?b:(0,s.t)([u,"title"]),showCloseButton:!0}),(0,o.jsx)(a.a.Body,{children:(0,o.jsxs)("div",{className:"flex h-full",children:[(0,o.jsx)("div",{className:"w-full pr-4 lg:w-1/2",children:(0,o.jsx)(v,{ctaLabel:t,onConfirm:T,plan:A,isPlanLoading:E,renderIcon:F})}),(0,o.jsx)("div",{className:"hidden w-1/2 pl-4 lg:block",children:(0,o.jsx)(I,{plan:A,isPlanLoading:E})})]})})]})}}()})})},function(e){var t=e.ctaLabel,n=e.planTier,r=void 0===n?l.LQ.business:n,i=e.onConfirm,a=e.onCancel,c=e.onSuccess,b=e.title,y=e.trialType,h=(0,W.hS)(),g=U({planTier:r,onConfirm:i,onCancel:a,onSuccess:c,trialType:void 0===y?"business_thirty_day":y,closeModal:function(){h.hide(),h.remove()}}),x=g.modalState,C=g.errorMessage,k=g.plan,A=g.isPlanLoading,E=g.displayPlanName,R=g.handleClose,L=g.handleSuccessClose,D=g.handleConfirm,T=function(e){return(0,o.jsx)(p.In,{type:e,size:16,className:"text-blue-600",useWithFillCurrentColor:!0})};return(0,o.jsxs)(z.aF,{isOpen:h.visible,onClose:R,children:[(0,o.jsx)(z.aF.Overlay,{}),(0,o.jsxs)(z.aF.Content,{size:x===_?"2xl":"md",children:[x!==O&&x!==S&&x!==w&&x!==P&&(0,o.jsxs)(z.aF.Header,{children:[(0,o.jsx)(z.aF.Title,{children:function(){switch(x){case P:return(0,s.t)([u,"blocked_downgrade_scheduled.title"]);case O:return(0,s.t)([u,"success.modal_title"]);case S:return(0,s.t)([u,"error.modal_title"]);default:return null!=b?b:(0,s.t)([u,"title"])}}()}),(0,o.jsx)(z.aF.HeaderActions,{children:(0,o.jsx)(z.aF.CloseButton,{onClick:R})})]}),function(){switch(x){case P:return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(z.aF.Header,{children:[(0,o.jsx)(z.aF.Title,{children:(0,s.t)([u,"blocked_downgrade_scheduled.title"])}),(0,o.jsx)(z.aF.HeaderActions,{children:(0,o.jsx)(z.aF.CloseButton,{onClick:R})})]}),(0,o.jsx)(z.aF.Body,{children:(0,o.jsx)(d,{})}),(0,o.jsx)(z.aF.Footer,{children:(0,o.jsx)("div",{className:"flex flex-row justify-end",children:(0,o.jsx)(m.$,{variant:"primary",onClick:R,children:(0,s.t)([u,"blocked_downgrade_scheduled.button"])})})})]});case w:return(0,o.jsx)(z.aF.Body,{children:(0,o.jsx)(j,{})});case O:return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(z.aF.Body,{className:"px-12 py-8",children:(0,o.jsx)(N,{planName:E,currentPlan:"Professional"})}),(0,o.jsx)(z.aF.Footer,{className:"border-t-0 px-12 pb-8 pt-0",children:(0,o.jsx)("div",{className:"flex justify-center",children:(0,o.jsx)(m.$,{variant:"primary",large:!0,onClick:L,className:"min-w-[200px]",children:(0,s.t)([u,"success.button"])})})})]});case S:return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(z.aF.Body,{children:(0,o.jsx)(f,{errorMessage:C})}),(0,o.jsx)(z.aF.Footer,{className:"mt-5",children:(0,o.jsx)("div",{className:"flex justify-center",children:(0,o.jsx)(m.$,{variant:"circle",large:!0,full:!0,onClick:R,children:(0,s.t)([u,"error.close_button"])})})})]});default:return(0,o.jsx)(z.aF.Body,{className:"p-0 py-6",children:(0,o.jsxs)("div",{className:"flex h-full",children:[(0,o.jsx)("div",{className:"w-full pr-4 lg:w-1/2",children:(0,o.jsx)(v,{ctaLabel:t,onConfirm:D,plan:k,isPlanLoading:A,renderIcon:T})}),(0,o.jsx)("div",{className:"hidden w-1/2 pl-4 lg:block",children:(0,o.jsx)(I,{plan:k,isPlanLoading:A})})]})})}}()]})]})})},511950(e,t,n){"use strict";n.d(t,{S:()=>j,A:()=>x});var r=n(391426),o=n(688720),i=n(867373),a=n(75571),s=n(7072),l=n(640668),c=n(501323),u=n(933578),d=n(689492),p=n(339792),f=n(356428),m=n(976838),b=function(e,t){var n,r,o=e.find(function(e){return e.tier===(null==t?void 0:t.tier)});return null!=(n=null==o?void 0:o.tier)?n:null==(r=e[0])?void 0:r.tier},y=function(e){var t=e.plans,n=e.currentPlan,r=e.customPlanOfferPlan,o=e.isCommunityOnTrial,i=e.isExpiredTrial,a=e.isCommunityOnPaidPlan,s=e.isICP;if(t.length){var l=t.find(function(e){return"renew"===e.plan_action});if(l)return l.tier;if(r||(o||i)&&s)return"plus";if(o||i){var c=t.find(function(e){return(0,d.rT)(e.tier)});if(c)return c.tier}if(a&&n&&!(0,d.PF)(n.tier)){var u=t.find(function(e){return e.tier===(0,d.ax)(n.tier)});if(u)return u.tier}return b(t,n)}};function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v=(0,u.createContext)(void 0);v.displayName="PlansContext";var x=function(){var e=(0,u.useContext)(v);if(!e)throw Error("usePlans must be used within a PlansProvider");return e},j=function(e){var t,n=e.children,b=null!=(t=(0,c.S)({strict:!1}))?t:{},h=b.billing_cycle,x=b.billing_currency,j=b.locale,_=(0,f.u)(),w=_.currentPlan,O=_.isCurrentPlanLoading,S=_.refetchCurrentPlan,P=(0,l.B)(),C=P.isCommunityOnPaidPlan,k=P.isCommunityOnTrial,I=P.isExpiredTrial,N=P.canChooseCurrency,A=(0,o.j)(),E=(0,u.useCallback)(function(){return k||I?a.k$.year:!O&&w?w.interval:a.k$.year},[k,O,w,I]),R=g((0,u.useState)(null),2),L=R[0],D=R[1],T=g((0,u.useState)(null),2),M=T[0],F=T[1],K=g((0,u.useState)(null),2),B=K[0],q=K[1],U=(0,s.q)(),z=U.renewSubscription,W=U.isRenewLoading,$=U.updateSubscription,V=U.isUpdatingSubscription,H=(0,p.x)(),G=H.scheduleDowngrade,Z=H.isSchedulingDowngrade,Q=(0,m.S)({billing_cycle:L,billing_currency:B,locale:M}),Y=Q.plans,J=Q.compareTablePlanFeatures,X=Q.customPlanOffer,ee=Q.customPlanOfferPlan,et=Q.isPlansLoading,en=Q.refetchPlans;(0,u.useEffect)(function(){x?q(x):w&&q(null),j&&F(j),h&&(h===a.k$.month||h===a.k$.year)?D(h):w&&D(E())},[h,x,j,E,w]);var er=et||O,eo=Y.length>0&&!et?Y[0].currency:null,ei=N&&(!!x||eo===i.Y.BRL.code.toLowerCase()),ea=eo||B,es=g((0,u.useState)(void 0),2),el=es[0],ec=es[1],eu=(0,u.useMemo)(function(){return y({plans:Y,currentPlan:w,isCommunityOnTrial:k,customPlanOfferPlan:ee,isExpiredTrial:I,isCommunityOnPaidPlan:C,isICP:A})},[Y,w,ee,k,I,C,A]);(0,u.useEffect)(function(){void 0===el&&eu&&ec(eu)},[el,eu]);var ed=(0,u.useMemo)(function(){return el===d.LQ.plus&&ee?ee:Y.find(function(e){return e.tier===el})},[el,Y,ee]);return(0,r.jsx)(v.Provider,{value:{plans:Y,isPlansLoading:et,selectedPlanTier:el,selectedPlan:ed,currentPlan:w,isCurrentPlanLoading:O,billingCycle:L,billingCurrency:ea,renewSubscription:z,isRenewLoading:W,shouldRenderBillingCurrency:ei,updateSubscription:$,isUpdatingSubscription:V,refetchPlans:en,refetchCurrentPlan:S,isListingPlans:er,setSelectedPlanTier:ec,setBillingCycle:D,scheduleDowngrade:G,isSchedulingDowngrade:Z,compareTablePlanFeatures:J,customPlanOffer:X,customPlanOfferPlan:ee},children:n})}},976416(e,t,n){"use strict";n.d(t,{b:()=>j});var r=n(391426),o=n(387099),i=n(570310),a=n(75571),s=n(417980),l=function(e){var t=e.plan_action;return(0,a.Cg)(t)||(0,a.V5)(t)?"pricing_plans.variant_c_actions.".concat(t):(0,a.eu)(e)?"pricing_plans.variant_c_actions.switch_to_annual":(0,a.Pu)(e)?"pricing_plans.variant_c_actions.switch_to_monthly":"pricing_plans.actions.".concat(t)},c=function(e){var t=e.plan_action;return(0,a.Cg)(t)||(0,a.eu)(e)?"marketing-gradient":(0,a.Pu)(e)?"secondary":(0,a.x)(t)||(0,a.sU)(t)||(0,a.Oz)(t)?"circle":(0,a.V5)(t)?"secondary":void 0},u=function(e){if((0,a.v1)(e.plan_action))return{disabled:!1,shouldShowContactSupport:!0,testId:"submit-button-".concat(e.plan_action),text:(0,s.t)("pricing_plans.actions.contact_cx"),variant:"secondary",className:""};var t=c(e),n=e.is_on_offer&&!(0,a.Oz)(e.plan_action)?"bg-[linear-gradient(135deg,#3655E5_0%,#1a2870_60%,#000000_100%)] text-white":"";return{disabled:(0,a.Oz)(e.plan_action),shouldShowContactSupport:!1,testId:"submit-button-".concat(e.plan_action),text:(0,s.t)(l(e),{plan_name:e.display_name}),className:n,variant:t||"secondary"}},d=n(915921),p=n(519104),f=n(640668),m=n(511950);function b(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function y(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,s,"next",e)}function s(e){b(i,r,o,a,s,"throw",e)}a(void 0)})}}function h(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var g=function(e){var t=(0,m.A)(),n=t.updateSubscription,r=t.refetchPlans,o=t.refetchCurrentPlan,i=(0,p.Z)(),a=(0,d.M)(),l=(0,f.B)(),c=l.shouldShowProration,u=l.isCommunityOnTrial,b=function(){return e.professional_grandfathered_id||e.id},g=function(){r(),o()},v=function(){return y(function(){return h(this,function(e){switch(e.label){case 0:return i({to:"/feed"}),[4,a.hide()];case 1:return e.sent(),[2]}})})()},x=function(){var t=!u&&!c(e);return{planId:b(),onSuccess:v,successButtonLabel:(0,s.t)("pricing_plans.change_plan.go_to_community"),showPlanDetails:t,onCloseModal:g}},j=function(){return y(function(){return h(this,function(e){switch(e.label){case 0:return[4,a.show(x())];case 1:return e.sent(),[2]}})})()};return{handleChangePlanButtonClick:function(){return y(function(){return h(this,function(e){switch(e.label){case 0:return[4,j()];case 1:return e.sent(),[2]}})})()},handleRedeemOfferButtonClick:function(){return y(function(){return h(this,function(e){switch(e.label){case 0:return[4,j()];case 1:return e.sent(),[2]}})})()},handleResumeButtonClick:function(){n(b())},handleRenewButtonClick:function(){return a.show({planId:b(),onSuccess:function(){return v()},successButtonLabel:(0,s.t)("pricing_plans.change_plan.go_to_community"),onCloseModal:g,isRenewal:!0})},handleCurrentPlanButtonClick:function(){},handleContactSupportOnClick:function(){window.open("mailto:[email protected]","emailWindow")}}};function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e){var t,n,r,o=u(e),i=g(e),s=(v(r={},a.li.upgrade,i.handleChangePlanButtonClick),v(r,a.li.change_plan,i.handleChangePlanButtonClick),v(r,a.li.downgrade,i.handleChangePlanButtonClick),v(r,a.li.resume,i.handleResumeButtonClick),v(r,a.li.renew,i.handleRenewButtonClick),v(r,a.li.current_plan,i.handleCurrentPlanButtonClick),v(r,a.li.redeem_offer,i.handleRedeemOfferButtonClick),v(r,a.li.contact_support,i.handleContactSupportOnClick),r),l=o.shouldShowContactSupport?i.handleContactSupportOnClick:function(e){var t=s[e];if(!t)throw Error("No handler found for plan action: ".concat(e));return t}(e.plan_action);return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){v(e,t,n[t])})}return e}({},o),n=n={handler:l,plan:e},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t},j=function(e){var t=x(e.plan);return(0,r.jsx)(o.$,{variant:t.variant,extraLarge:!0,full:!0,onClick:t.handler,disabled:t.disabled,"data-testid":t.testId,className:(0,i.x)("w-full",t.className),children:t.text})}},596638(e,t,n){"use strict";var r=n(933578),o=n(90749),i=function(e,t){return e.amount&&"number"==typeof e.amount?"$".concat((e.amount/100).toFixed(0)):t?e.annual_base_amount_with_currency||"":e.display_base_monthly_amount||""},a=function(e){var t=parseFloat(e.split(" ")[0].replace(/[$,]/g,""));return{amount:isNaN(t)?0:t}},s=function(e){var t=Math.round(e);return"$".concat(t.toLocaleString("en-US"))},l=function(e,t){var n=a(e).amount;if(0===n)return{discountAmount:"",finalAmount:e};var r=Math.round(n*t/100);return{discountAmount:"-".concat(s(r)),finalAmount:s(n-r)}},c=function(e){var t=e.plan,n=e.alternativePlan,c=e.isAnnualPlan,u=e.isCommunityOnTrial,d=e.planCouponId,p=e.isPlanLoading,f=!u&&!!(null==t?void 0:t.id),m=(0,o.i)({new_plan_id:(null==t?void 0:t.id)||0,plan_coupon_id:d,only_ch:!0,enabled:f}),b=m.prorationData,y=m.isProrationLoading,h=m.errorFetchingProration;return{pricing:(0,r.useMemo)(function(){if(!t)return{};var e={};if(b&&!h&&(e={currentPlanCredit:b.display_prorated_charges_credit_amount_compact,discountCoupon:b.display_total_discount_compact,dueToday:b.display_total_due_today_compact}),!e.annualSavings){var r=c?t:n;(null==r?void 0:r.annual_discount_amount_with_currency)&&(e.annualSavings="-".concat(r.annual_discount_amount_with_currency))}if(e.dueToday||(e.dueToday=i(t,c)),t.is_on_offer){var o,u,d=l(i(t,c),25),p=d.discountAmount,f=d.finalAmount;e.discountCoupon=p,e.dueToday&&(null==b?void 0:b.display_total_due_today)?e.dueToday=(o=e.dueToday,u=p,s(a(o).amount-a(u.replace("-","")).amount)):e.dueToday=f}return e.isAnnualPlan=c,e},[t,n,c,b,h]),isLoadingPricing:!!(p||f&&y)}};n.d(t,{J:()=>c})},778169(e,t,n){"use strict";n.d(t,{n:()=>u});var r=n(230763),o=n(51730),i=n(915779),a=n(649942);n(75132);var s=n(792515),l=(0,a.y)("community-billing-auxiliary-subscription"),c=n(258752),u=function(){var e,t,n,a,u,d=(0,r.Od)().currentCommunityMember,p=!!(null==d?void 0:d.is_admin),f=(0,c.IT)((e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},(0,s.j)({queryKey:l.key("show"),queryFn:function(){return(0,o.i_)(i.iK.communities.billing.auxiliarySubscription.show())}})),t=t={retry:2,enabled:p,gcTime:36e5,staleTime:6e5},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e)),m=f.data,b=f.isInitialLoading,y=f.error,h=f.refetch,g=f.isRefetching;return{auxiliarySubscription:m,storageBilling:null!=(n=null==m?void 0:m.storage)?n:null,emailHubBilling:null!=(a=null==m?void 0:m.email_hub)?a:null,aiActionsBilling:null!=(u=null==m?void 0:m.ai_actions)?u:null,isAuxiliarySubscriptionLoading:b,errorFetchingAuxiliarySubscription:y,refetchAuxiliarySubscription:h,isRefetchingAuxiliarySubscription:g}}},242529(e,t,n){"use strict";var r=n(230763),o=n(915779),i=n(258752),a=n(51730),s=["community-billing-details"],l=function(){var e=(0,r.Od)().currentCommunityMember,t=!!(null==e?void 0:e.is_admin),n=(0,i.IT)({queryKey:s,queryFn:function(){return(0,a.i_)(o.iK.communities.billing.communitySubscription.show())},retry:2,enabled:t,gcTime:36e5,staleTime:6e5});return{currentPlan:n.data,isCurrentPlanLoading:n.isInitialLoading,errorFetchingCurrentPlan:n.error,refetchCurrentPlan:n.refetch,isRefetchingCurrentPlan:n.isRefetching}};n.d(t,{U:()=>s,x:()=>l})},356428(e,t,n){"use strict";var r=n(230763),o=n(915779),i=n(258752),a=n(51730),s=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).refetchInterval,n=(0,r.Od)().currentCommunityMember,s=!!(null==n?void 0:n.is_admin),l=(0,i.IT)(["community-current-plan"],function(){return(0,a.i_)(o.iK.communities.plans.show({forceFromSubscription:e}))},{retry:2,enabled:s,gcTime:36e5,staleTime:6e5,refetchInterval:t});return{currentPlan:l.data,isCurrentPlanLoading:l.isInitialLoading,errorFetchingCurrentPlan:l.error,refetchCurrentPlan:l.refetch,isRefetchingCurrentPlan:l.isRefetching}};n.d(t,{u:()=>s})},976838(e,t,n){"use strict";var r=n(258752),o=n(374412),i=n(270530),a=function(e){var t,n,a=e.billing_cycle,s=e.billing_currency,l=e.locale,c=(0,i.K)(),u=(0,r.IT)(["plans",a,s,l,c],function(){return o.u.fetchPlans({billing_cycle:a,billing_currency:s,locale:l,isPriceTestingEnabled:c})},{enabled:!!a,gcTime:6e5,staleTime:6e4}
1),d=u.data,p=u.isInitialLoading,f=u.error,m=u.refetch,b=u.isRefetching,y="month"===a?"year":"month";return(0,r.IT)(["plans",y,s,l,c],function(){return o.u.fetchPlans({billing_cycle:y,billing_currency:s,locale:l,isPriceTestingEnabled:c})},{enabled:!!a,gcTime:6e5,staleTime:6e4}),{plans:null!=(t=null==d?void 0:d.plans)?t:[],isPlansLoading:p,errorFetchingPlans:f,refetchPlans:m,isRefetchingPlans:b,compareTablePlanFeatures:null!=(n=null==d?void 0:d.compare_table_plan_features)?n:{},customPlanOffer:null==d?void 0:d.custom_plan_offer,customPlanOfferPlan:null==d?void 0:d.custom_plan_offer_plan}};n.d(t,{S:()=>a})},382193(e,t,n){"use strict";var r=n(29401);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var i=function(e){var t,n,r;return(null==e?void 0:e.id)?(t={},n=e.id,r=e.desc?"desc":"asc",n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t):void 0},a=function(e){var t,n,i=function(e){if(Array.isArray(e))return e}(t=null!=(n=Object.entries(null!=e?e:r.DJ)[0])?n:[])||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return o(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1];return a?[{id:a,desc:"desc"===s}]:[]},s=function(e){return e?{order:e}:{}};n.d(t,{cx:()=>s,f4:()=>a,l4:()=>i})},29401(e,t,n){"use strict";var r,o=n(417980),i="draft",a="scheduled",s={updated_at:"desc"},l={published_at:"asc"},c="settings.posts",u={},d=Object.freeze((r={},u.all=u.all||{},u.all.get=function(){return(0,o.t)([c,"tabs","all"])},u[i]=u[i]||{},u[i].get=function(){return(0,o.t)([c,"tabs","drafts"])},u[a]=u[a]||{},u[a].get=function(){return(0,o.t)([c,"tabs","scheduled"])},function(e,t){for(var n in t){var r=t[n];r.configurable=r.enumerable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n,r)}if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(t),i=0;i<o.length;i++){var a=o[i],r=t[a];r.configurable=r.enumerable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a,r)}}(r,u),r));n.d(t,{BY:()=>20,DF:()=>d,DJ:()=>s,FW:()=>l,M1:()=>"published",P:()=>"all",Xy:()=>i,vu:()=>a})},648397(e,t,n){"use strict";var r=n(915779),o=n(258752),i=n(274685),a=n(51730),s=n(29401),l=n(382193);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var d=["settings","posts"],p=function(e){var t,n,i=e.page,p=void 0===i?1:i,f=e.filter,m=e.order,b=(0,o.IT)({queryKey:((function(e){if(Array.isArray(e))return c(e)})(d)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(d)||function(e){if(e){if("string"==typeof e)return c(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,void 0)}}(d)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([f,p,m]),queryFn:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){return[2,(0,a.i_)(r.iK.settings.posts.index({params:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({filter:f,page:p,per_page:s.BY},(0,l.cx)(m))}))]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,s,"next",e)}function s(e){u(i,r,o,a,s,"throw",e)}a(void 0)})})()},keepPreviousData:!0}),y=b.data,h=b.isLoading,g=b.refetch;return{posts:null!=(t=null==y?void 0:y.records)?t:[],postsCount:null!=(n=null==y?void 0:y.count)?n:0,isLoadingPosts:h,refetchPosts:g}},f=function(){var e=(0,i.jE)();
1return{invalidatePostsApiQueries:function(){return e.invalidateQueries({queryKey:d})}}};n.d(t,{f:()=>p,o:()=>f})},170722(e,t,n){"use strict";var r,o=n(33139);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a={LABEL:"label",FIELD_TYPE:"field_type",KEY:"key",PLACEHOLDER:"placeholder",DESCRIPTION:"description"},s={REQUIRED:"required",HIDDEN:"hidden"},l=Object.values(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}({},a,s)),c=(i(r={},o.bh.TEXT,{}),i(r,o.bh.SELECT,{CHOICES_ATTRIBUTES:"choices_attributes"}),i(r,o.bh.CHECKBOX,{CHOICES_ATTRIBUTES:"choices_attributes"}),i(r,o.bh.TEXTAREA,{}),i(r,o.bh.LINK,{}),i(r,o.bh.LOCATION,{}),i(r,o.bh.NUMBER,{NUMBER_OPTIONS:"number_options_attributes"}),r),u=["twitter","facebook","instagram","linkedin"],d=[0,1,2,3,4,5],p={ACTIVE:"active",ARCHIVED:"archived"};n.d(t,{$I:()=>u,DF:()=>p,Od:()=>o.Od,TQ:()=>o.TQ,Vz:()=>c,bh:()=>o.bh,do:()=>d,fI:()=>s,l4:()=>"pages_attributes",t2:()=>l,uj:()=>a})},238350(e,t,n){"use strict";var r=n(243994),o=r.Ik().shape({prefill_token:r.Yj().optional()}),i=function(e){return o.cast(e,{stripUnknown:!0})},a=function(e,t){e.choices&&Array.isArray(e.choices)&&(t.choices_attributes=e.choices.map(function(e){return{value:e}}),delete t.choices)},s=function(e,t){(e.number_format||void 0!==e.number_decimal||e.number_custom_text||e.number_custom_position)&&(t.number_options_attributes={format:e.number_format||"number",decimal:void 0!==e.number_decimal?e.number_decimal
1:0,text:e.number_custom_text||"",position:e.number_custom_position||"right"},delete t.number_format,delete t.number_decimal,delete t.number_custom_text,delete t.number_custom_position)},l=function(e,t){(void 0!==e.signup||void 0!==e.edit_profile||void 0!==e.profile_view||void 0!==e.community_view)&&(t.pages_attributes=[{visible:void 0===e.signup||e.signup},{visible:void 0===e.edit_profile||e.edit_profile},{visible:void 0===e.profile_view||e.profile_view},{visible:void 0===e.community_view||e.community_view}],delete t.signup,delete t.edit_profile,delete t.profile_view,delete t.community_view)},c=function(e){if(!e)return{};var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e);return a(e,t),s(e,t),l(e,t),t};n.d(t,{Kf:()=>i,ur:()=>c})},470187(e,t,n){"use strict";var r="settings-workspace-header",o="#".concat(r);n.d(t,{n:()=>o,y:()=>r})},61098(e,t,n){"use strict";n.d(t,{A:()=>"max-w-3xl",Y:()=>"max-w-5xl"})},126032(e,t,n){"use strict";var r=n(804939),o=n(721818),i="px-4 md:px-6 lg:px-9",a="flex min-h-0 flex-1 flex-col",s=function(){return(0,o.m)()},l=function(){var e=(0,r.P)();if(s())return e?"px-0":i},c=function(){return s()?a:void 0};n.d(t,{QI:()=>c,V9:()=>i,Yo:()=>s,_w:()=>l,hI:()=>a,xe:()=>20})},55383(e,t,n){"use strict";var r=(0,n(698804).vt)(function(e){return{isDesignPanelOpen:!1,triggerEl:null,openDesignPanel:function(){return e({isDesignPanelOpen:!0,triggerEl:"u"<typeof document?null:document.activeElement})},closeDesignPanel:function(){return e({isDesignPanelOpen:!1})}}});n.d(t,{Z:()=>r})},826023(e,t,n){"use strict";var r=n(243994),o=r.Ik().shape({prefill_token:r.Yj().optional()}),i=function(e){var t=["default_notification_setting","default_in_app_notification_setting","default_mobile_notification_setting"].filter(function(t){return!0===e[t]});return t.length>0?t:void 0},a=function(e){var t={},n=i(e);return n&&(t.notification_type=n),"auto_rsvp_invited_attendees"in e&&"boolean"==typeof e.auto_rsvp_invited_attendees&&(t.event_auto_rsvp_enabled=e.auto_rsvp_invited_attendees),t},s=function(e){var t={};return e.notification_type&&(t.notification_type=e.notification_type),t},l=function(e,t){var n={};switch(e.name&&(n.name=e.name),e.access&&(n.visibility=e.access),e.space_group_id&&(n.space_group_id=e.space_group_id),t){case"basic":case"post":case"image":case"event":("default_notification_setting"in e||"auto_rsvp_invited_attendees"in e)&&Object.assign(n,a(e));break;case"chat":"notification_type"in e&&Object.assign(n,s(e))}return n},c=function(e){return e.space_type&&({posts:"basic",events:"event",chat:"chat",course:"course",members:"members",images:"image"})[e.space_type]||"basic"};n.d(t,{FU:()=>l,N$:()=>c,_x:()=>o})},466335(e,t,n){"use strict";var r=n(417980),o=n(406912),i=[o.dU.DYNAMIC,o.dU.BULK_ACTION,o.dU.SCHEDULED],a=[{value:o.dU.DYNAMIC,get label(){return(0,r.t)("settings.workflows.table.type.automations")}},{value:o.dU.BULK_ACTION,get label(){return(0,r.t)("settings.workflows.table.type.bulk_actions")}},{value:o.dU.SCHEDULED,get label(){return(0,r.t)("settings.workflows.table.type.scheduled")}}];n.d(t,{K:()=>a,u:()=>i})}
1,552120(e,t,n){"use strict";var r=n(961355),o=n(406912),i=n(466335),a=r.k5(i.u),s=r.k5(o.SW),l=r.KC([r.Yj(),r.ai()]).optional().catch(void 0),c=r.Ik({workflow_type:a.catch(o.dU.DYNAMIC),page:r.ai().int().min(1).catch(1),workflow_name:l,status:s.optional().catch(void 0),run_id:l,run_at_filter_type:l,run_at_value:l,member_id:r.ai().optional().catch(void 0),contact_sqid:r.Yj().optional().catch(void 0)});n.d(t,{j:()=>c,s:()=>"workflow_type"})},406912(e,t,n){"use strict";var r=n(689492),o=n(451430),i={ALL:"all",ACTIVE:"active",INACTIVE:"inactive",DRAFT:"draft",PUBLISHED:"published",ARCHIVED:"archived",IN_PROGRESS:"in_progress"},a={SUCCESS:"success",PARTIAL_SUCCESS:"partial_success",IN_PROGRESS:"in_progress",FAILED:"failed",SKIPPED:"skipped",DUPLICATE_SKIPPED:"duplicate_skipped"},s={DYNAMIC:"dynamic",BULK_ACTION:"bulk_action",SCHEDULED:"scheduled",ALL:"all"},l={ONE_TIME:"one_time",RECURRING:"recurring"},c={DYNAMIC:"dynamic",BULK_ACTION:"bulk_action",SCHEDULED:"scheduled",ARCHIVED:"archived"},u=[c.DYNAMIC,c.BULK_ACTION,c.SCHEDULED,c.ARCHIVED],d={SUCCESS:"success",PARTIAL_SUCCESS:"partial_success",IN_PROGRESS:"in_progress",SKIPPED:"skipped",DUPLICATE_SKIPPED:"duplicate_skipped",FAILED:"failed",CANCELLED:"cancelled"},p=function(e){return{action_type:null!=e?e:"",id:(0,o.uniqueId)("action_"),api_params:{}}},f={ACCESS_GROUP:"AccessGroup",SPACE:"Space",PAYWALL:"Paywall",PAYWALL_PRICE:"PaywallPrice",PAYWALL_COUPON:"PaywallCoupon",EVENT:"Posts::Event",MEMBER_TAG:"MemberTag",SPACE_GROUP:"SpaceGroup",POST_BASIC:"Posts::Basic",COMMUNITY:"Community",COURSE:"Space",PROFILE_FIELD:"ProfileField",RECURRING_EVENT_SETTING:"RecurringEventSetting",LESSON:"Lesson",QUIZ:"Lesson",SECTION:"Section",GAMIFICATION_LEVEL:"Gamification::Level",FORM:"Form",COMMUNITY_MEMBER_ADMIN:"CommunityMember",BROADCAST:"Broadcast",POLL:"Poll"},m={BASIC:"basic",EVENT:"event",IMAGE:"image",MEMBERS:"members",COURSE:"course",CHAT:"chat"},b=[r.LQ.business,r.LQ.plus,r.LQ.enterprise],y={ALL:"all",MH_ONLY:"mh_only",MH_WITH_LOWER_OR_HIGHER_TIER_PLAN:"mh_with_lower_or_higher_tier_plan",HIGHER_TIER_PLAN_ONLY:"higher_tier_plan_only",ENTERPRISE_AND_PLUS_ONLY:"enterprise_and_plus_only"},h={STANDARD:"standard",WORKFLOW:"workflow"};n.d(t,{BF:()=>u,BW:()=>a,Bz:()=>b,HV:()=>h,N4:()=>c,SW:()=>d,US:()=>m,ZO:()=>l,dU:()=>s,hi:()=>f,k_:()=>p,oV:()=>y,vC:()=>i})},913207(e,t,n){"use strict";n.d(t,{S:()=>C});var r=n(391426),o=n(111582),i=n(337162),a=n(339551),s=n(231127),l=n(298463),c=n(292626),u=n(927139),d=n.n(u),p=n(258752),f=n(417980),m=n(106264),b=n(717526),y=n(215676),h=n(424607),g=n(5219),v=n(674251),x=function(e){var t=e.description,n=e.spaces,o=e.spaceGroupId;return(0,r.jsxs)("div",{className:"flex flex-col gap-y-5",children:[(0,r.jsx)(v.o.BodyMd,{children:t}),n.length>0&&(0,r.jsx)(y.$,{title:(0,f.t)("space_groups.delete.spaces_count",{count:n.length}),defaultExpanded:n.length<=5,children:(0,r.jsx)(y.$.BulletedList,{items:n.map(function(e){return e.name})})}),(0,r.jsx)(h.c,{contentSpecType:g.E.SpaceGroup,contentSpecId:o})]})},j=n(116240),_=n(892907),w=function(e){var t=e.spaces;return 0===t.length?null:(0,r.jsx)(j.n.Root,{isBoxed:!0,defaultValue:t.length<=5?["spaces-in-group"]:void 0,children:(0,r.jsxs)(j.n.Item,{value:"spaces-in-group",children:[(0,r.jsx)(j.n.Trigger,{children:(0,f.t)("".concat("space_groups.delete",".spaces_count"),{count:t.length})}),(0,r.jsx)(j.n.Content,{children:(0,r.jsx)("ul",{className:"list-disc pl-5",children:t.map(function(e){return(0,r.jsx)("li",{children:(0,r.jsx)(_.o5,{variant:"label-sm",component:"span",children:e.name})},e.id)})})})]})})};function O(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function P(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var C=function(e){var t=e.show,n=e.spaceGroupId,u=e.onClose,y=e.onSuccess,h=(0,s.T)("circle_v4_modals_enabled"),g=(0,b.d)(),v=g.error,j=g.success,_=(0,l.J)().goToCommunityRootPath,C=(0,a.E)(),k=C.records,I=C.actions.refresh,N=(0,i.t)().actions.refresh,A=(0,p.n_)({mutationFn:function(){return o.K.destroy(n)},onSuccess:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return j((0,f.t)("space_groups.form.delete.success")),[4,Promise.all([I(),N()])];case 1:return e.sent(),[4,c.Qg.all()];case 2:return e.sent(),_(),d()(u)&&u(),d()(y)&&y(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,s,"next",e)}function s(e){O(i,r,o,a,s,"throw",e)}a(void 0)})})()},onError:function(){v((0,f.t)("space_groups.form.delete.failed"))}}),E=A.mutate,R=A.isPending,L=k.filter(function(e){return e.space_group_id===n}),D={title:(0,f.t)("space_groups.delete.title"),isOpen:t,confirmUserPrompt:(0,f.t)("space_groups.delete.confirm_prompt"),onClose:u,onCancel:u,onConfirm:E,confirmVariant:"danger",isDisabled:R,confirmText:R?(0,f.t)("deleting"):(0,f.t)("confirm")},T=(0,f.t)("space_groups.delete.description",{content_hard_deletion_delay:(0,f.t)("spaces.delete.content_hard_deletion_delay")});if(h)return(0,r.jsx)(m.I,P(S({},D),{description:T,position:"top",promptGrouping:"inline",size:"lg",children:(0,r.jsx)(w,{spaces:L})}));var M=[T,L.length>0&&(0,f.t)("space_groups.delete.this_includes")].filter(Boolean).join(" ");return(0,r.jsx)(m.I,P(S({},D),{children:(0,r.jsx)(x,{description:M,spaces:L,spaceGroupId:n})}))}},70899(e,t,n){"use strict";var r=n(391426),o=n(927561),i=n(568316),a=n(230763),s=n(417980),l=n(517338),c=n(898666),u=n(905001);function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function p(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var f={translationRoot:"space_groups.form.create",hiddenField:!0,hideDescription:!0,className:"flex flex-row-reverse justify-end m-0",labelClassName:"ml-4 mb-0",labelWrapperClassName:"flex items-center",shouldToggleValueOnLabelClick:!0},m=function(){var e=(0,a.Od)().currentCommunitySettings;return(0,r.jsxs)("div",{className:"mt-8 space-y-5",children:[(0,r.jsx)(i.o.TitleSm,{weight:"semibold",children:(0,s.t)("space_groups.form.create.permissions")}),(0,r.jsx)(o.l.Item,p(d({},f),{name:"hide_members_count",tooltipText:(0,s.t)("space_groups.form.create.hide_members_count_tooltip"),children:(0,r.jsx)(o.l.ToggleSwitch,{variant:"small"})})),(0,r.jsx)(o.l.Item,p(d({},f),{name:"is_hidden_from_non_members",tooltipText:(0,s.t)("space_groups.form.create.is_hidden_from_non_members_tooltip"),children:(0,r.jsx)(o.l.ToggleSwitch,{variant:"small"})})),(0,r.jsx)(o.l.Item,p(d({},f),{name:"hide_non_member_spaces_from_sidebar",tooltipText:(0,s.t)("space_groups.form.create.hide_non_member_spaces_from_sidebar_tooltip"),children:(0,r.jsx)(o.l.ToggleSwitch,{variant:"small"})})),(0,r.jsx)(o.l.Item,p(d({}
1,f),{name:"allow_members_to_create_spaces",tooltipText:(0,s.t)("space_groups.form.create.allow_members_to_create_spaces_tooltip"),children:(0,r.jsx)(o.l.ToggleSwitch,{variant:"small"})})),(0,u.Gs)(e)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex gap-1 pt-4",children:[(0,r.jsx)(i.o.TitleSm,{weight:"semibold",children:(0,s.t)("settings.access_groups.admin.legacy_access.title")}),(0,r.jsx)("div",{children:(0,r.jsx)(c.$,{role:"tooltip",content:(0,s.t)("settings.access_groups.admin.legacy_access.legacy_tooltip"),interactive:!1,children:(0,r.jsx)(l.E,{square:!0,label:(0,s.t)("settings.access_groups.admin.legacy_access.legacy_badge")})})})]}),(0,r.jsx)(o.l.Item,p(d({},f),{name:"automatically_add_members_to_new_spaces",tooltipText:(0,s.t)("space_groups.form.create.automatically_add_members_to_new_spaces_tooltip"),children:(0,r.jsx)(o.l.ToggleSwitch,{variant:"small"})})),(0,r.jsx)(o.l.Item,p(d({},f),{name:"add_members_to_space_group_on_space_join",tooltipText:(0,s.t)("space_groups.form.create.add_members_to_space_group_on_space_join_tooltip"),children:(0,r.jsx)(o.l.ToggleSwitch,{variant:"small"})}))]})]})};n.d(t,{D:()=>m})},348413(e,t,n){"use strict";var r=n(391426),o=n(927561),i=n(933578),a=n(361971),s=n(940204),l=n.n(s),c=n(417980);function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function d(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var p={replacement:"-",remove:/[*+~.;()'"!:@#]/g,lower:!0},f={translationRoot:"space_groups.form.create",hideBorder:!0,hideDescription:!0,fullWidth:!1},m=function(){var e=(0,a.xW)(),t=e.watch,n=e.setValue,s=e.formState,m=t("name"),b=!!s.dirtyFields.name,y=!!s.dirtyFields.slug;return(0,i.useEffect)(function(){m&&!y&&b&&n("slug",l()(m,p))},[n,m,y,b]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"w-full",children:(0,r.jsx)(o.l.Item,d(u({},f),{isFirstChild:!0,name:"name",rules:{required:(0,c.t)("space_groups.form.create.name_is_required"),maxLength:255},variant:"extra-bottom-margin",children:(0,r.jsx)(o.l.Input,{})}))}),(0,r.jsx)(o.l.Item,d(u({},f),{name:"slug",rules:{maxLength:255},variant:"extra-bottom-margin",transformValue:function(e){return l()(e,p)},tooltipText:(0,c.t)("space_groups.form.create.slug_tooltip",{host:window.location.origin}),children:(0,r.jsx)(o.l.Input,{})}))]})};n.d(t,{h:()=>m})},334696(e,t,n){"use strict";n.d(t,{h:()=>h});var r=n(391426),o=n(914829),i=n(933578),a=n(361971),s=n(940204),l=n.n(s),c=n(417980),u=n(634893),d=n(605274),p=function(){var e=(0,d.V0)();return{layout:e?"horizontal":"vertical",horizontalLayoutInputProps:e?{horizontalLayoutRatio:"40/60"}:{}}};function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function m(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var b="space_groups.form.create",y={replacement:"-",remove:/[*+~.;()'"!:@#]/g,lower:!0},h=function(){var e=(0,a.xW)(),t=e.control,n=e.watch,s=e.setValue,d=e.formState,h=p(),g=h.horizontalLayoutInputProps,v=h.layout,x=n("name"),j=!!d.dirtyFields.name,_=!!d.dirtyFields.slug;return(0,i.useEffect)(function(){x&&!_&&j&&s("slug",l()(x,y))},[x,j,_,s]),(0,r.jsx)(u.y,{title:(0,c.t)("".concat(b,".general")),children:(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(a.xI,{control:t,name:"name",rules:{required:(0,c.t)("".concat(b,".name_is_required")),maxLength:{value:255,message:(0,c.t)("".concat(b,".name_max_length_error"))}},render:function(e){var t,n=e.field,i=e.fieldState;return(0,r.jsx)(o.k,m(f({},n,g),{layout:v,label:(0,c.t)("".concat(b,".space_group_name")),placeholder:(0,c.t)("".concat(b,".name_placeholder")),invalid:!!i.error,error:null==(t=i.error)?void 0:t.message}))}}),(0,r.jsx)(a.xI,{control:t,name:"slug",rules:{maxLength:{value:255,message:(0,c.t)("".concat(b,".slug_max_length_error"))}},render:function(e){var t,n=e.field,i=e.fieldState;return(0,r.jsx)(o.k,m(f(m(f({},n),{onChange:function(e){return n.onChange(l()(e.target.value,y))}}),g),{layout:v,label:(0,c.t)("".concat(b,".slug")),labelProps:{className:"opacity-80"},labelTooltip:(0,c.t)("".concat(b,".slug_tooltip"),{host:window.location.origin}),placeholder:(0,c.t)("".concat(b,".slug_placeholder")),invalid:!!i.error,error:null==(t=i.error)?void 0:t.message}))}})]})})}},634893(e,t,n){"use strict";var r=n(391426),o=n(892907),i=function(e){var t=e.title,n=e.titleAdornment,i=e.children;return(0,r.jsxs)("section",{className:"bg-primary border-primary flex w-full flex-col gap-6 rounded-2xl border p-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(o.o5,{variant:"label-md",component:"h3",children:t}),n]}),i]})};n.d(t,{y:()=>i})},453602(e,t,n){"use strict";var r=n(391426),o=n(417980),i=n(634893),a=n(323050),s="space_groups.form.create",l=function(){return(0,r.jsx)(i.y,{title:(0,o.t)("".concat(s,".permissions")),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(a.b,{name:"hide_members_count",label:(0,o.t)("".concat(s,".hide_members_count")),labelTooltip:(0,o.t)("".concat(s,".hide_members_count_tooltip"))}),(0,r.jsx)(a.b,{name:"is_hidden_from_non_members",label:(0,o.t)("".concat(s,".is_hidden_from_non_members")),labelTooltip:(0,o.t)("".concat(s,".is_hidden_from_non_members_tooltip"))}),(0,r.jsx)(a.b,{name:"hide_non_member_spaces_from_sidebar",label:(0,o.t)("".concat(s,".hide_non_member_spaces_from_sidebar")),labelTooltip:(0,o.t)("".concat(s,".hide_non_member_spaces_from_sidebar_tooltip"))}
1),(0,r.jsx)(a.b,{name:"allow_members_to_create_spaces",label:(0,o.t)("".concat(s,".allow_members_to_create_spaces")),labelTooltip:(0,o.t)("".concat(s,".allow_members_to_create_spaces_tooltip"))})]})})};n.d(t,{x:()=>l})},526842(e,t,n){"use strict";var r=n(391426),o=n(230763),i=n(955015),a=n(417980),s=n(898666),l=n(905001),c=n(634893),u=n(323050),d="space_groups.form.create",p="settings.access_groups.admin.legacy_access",f=function(){var e=(0,o.Od)().currentCommunitySettings;return(0,l.Gs)(e)?(0,r.jsx)(c.y,{title:(0,a.t)("".concat(p,".title")),titleAdornment:(0,r.jsx)(s.m,{content:(0,a.t)("".concat(p,".legacy_tooltip")),children:(0,r.jsx)(i.E,{variant:"secondary",label:(0,a.t)("".concat(p,".legacy_badge"))})}),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(u.b,{name:"automatically_add_members_to_new_spaces",label:(0,a.t)("".concat(d,".automatically_add_members_to_new_spaces")),labelTooltip:(0,a.t)("".concat(d,".automatically_add_members_to_new_spaces_tooltip"))}),(0,r.jsx)(u.b,{name:"add_members_to_space_group_on_space_join",label:(0,a.t)("".concat(d,".add_members_to_space_group_on_space_join")),labelTooltip:(0,a.t)("".concat(d,".add_members_to_space_group_on_space_join_tooltip"))})]})}):null};n.d(t,{X:()=>f})},323050(e,t,n){"use strict";var r=n(391426),o=n(958498),i=n(361971),a=function(e){var t=e.name,n=e.label,a=e.labelTooltip,s=(0,i.xW)().control;return(0,r.jsx)(i.xI,{control:s,name:t,render:function(e){var i=e.field;return(0,r.jsx)(o.d,{checked:!!i.value,label:n,labelPosition:"end",labelTooltip:a,name:t,onBlur:i.onBlur,onCheckedChange:i.onChange,ref:i.ref})}})};n.d(t,{b:()=>a})},623373(e,t,n){"use strict";var r=n(391426),o=n(428266),i=n(570310),a=n(355104),s=n(417980),l=n(674251),c=n(973646),u=n(258743);function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var p=function(e){return(0,a.c)().isCircleV4?(0,r.jsx)(u.q,d({},e)):(0,r.jsx)(f,d({},e))},f=function(e){var t=e.onCollapseClick;return(0,r.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center p-6",children:[(0,r.jsx)(o.K,{name:"20-close",iconSize:20,onClick:t,variant:"secondary",ariaLabel:(0,s.t)("collapse"),className:(0,i.x)("bg-primary !border-primary absolute right-5 top-5 z-50 rounded-full border")}),(0,r.jsx)("div",{className:"animate-fade-in-slow flex h-full items-center justify-center p-6 opacity-0",children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-4 text-center",children:[(0,r.jsx)(c.In,{type:"48-sun",size:48,className:"scale-[2.5]"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.o.TitleMd,{children:(0,s.t)("ai_spaces_summaries.all_caught_up")}),(0,r.jsx)("div",{className:"max-w-[280px]",children:(0,r.jsx)(l.o.BodySm,{color:"text-default dark:text-dark",children:(0,s.t)("ai_spaces_summaries.no_posts_found")})})]})]})})]})};n.d(t,{q:()=>p})},258743(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(34819),a=n(892907),s=n(417980),l=n(803123),c=function(e){var t=e.onCollapseClick;return(0,r.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center p-6",children:[(0,r.jsx)(i.K,{icon:"cross",size:"sm",variant:"secondary","aria-label":(0,s.t)("collapse"),onClick:t,className:"absolute right-5 top-5 z-50"}),(0,r.jsx)("div",{className:"flex h-full items-center justify-center p-6",children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-4 text-center",children:[(0,r.jsx)("div",{className:"animate-fade-in-slow opacity-0",style:{animationDelay:(0,l.GF)(1),animationFillMode:"forwards"},children:(0,r.jsx)(o.In,{type:"48-sun",size:48,className:"scale-[2.5]"})}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("div",{className:"animate-fade-in-slow opacity-0",style:{animationDelay:(0,l.GF)(2),animationFillMode:"forwards"}
1,children:(0,r.jsx)(a.o5,{variant:"heading-md",children:(0,s.t)("ai_spaces_summaries.all_caught_up")})}),(0,r.jsx)("div",{className:"animate-fade-in-slow max-w-[280px] opacity-0",style:{animationDelay:(0,l.GF)(3),animationFillMode:"forwards"},children:(0,r.jsx)(a.o5,{variant:"body-sm",color:"secondary",children:(0,s.t)("ai_spaces_summaries.no_posts_found")})})]})]})})]})};n.d(t,{q:()=>c})},987237(e,t,n){"use strict";n.d(t,{r:()=>F});var r=n(391426),o=n(381301),i=n(314729),a=n(803123),s=n(471977),l=n(41907),c=n(570310),u=n(355104),d=n(830981),p=n(718606),f=n(148546),m=n(933578),b=n(417980),y=n(684245),h=n(623373),g=n(852787),v=n(991303),x=n(794713),j=n(274685),_=n(258752),w=n(51730),O=n(915779);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}}var k=function(e){var t,n,r,o,i=e.space,a=e.dateFrom,s=e.enabled,l=e.type,c=e.firstUnreadMessageId,u=e.dateRange,d=function(e){if(Array.isArray(e))return e}(t=(0,m.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||C(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=d[0],f=d[1],b=["post"===l?"post-space-summary":"chat-space-summary",i.id].concat(P("post"===l?[i.posts_count]:[]),[u],P(u===v.a.FROM_UNREAD&&c?[c]:[])),y=(0,j.jE)(),h=(0,_.IT)(b,function(){var e={};return a&&(e.date_from=a),c&&(e.first_unread_message_id=c),(0,w.i_)(O.iK.spaces.aiSummaries.index({spaceId:String(i.id),params:e}))},{enabled:s,staleTime:6e5,retry:function(e,t){return(null==t?void 0:t.status)!==404&&(null==t?void 0:t.status)!==401&&(null==t?void 0:t.status)!==400}}),g=h.data,S=h.isInitialLoading,k=h.error,I=h.refetch;return(0,m.useEffect)(function(){var e,t;(null==k||null==(t=k.body)||null==(e=t.error_details)?void 0:e.noDataToSummarize)?(0,x.at)(Promise.resolve(),3e3).then(function(){f(!0)}):f(!1)},[k]),{spaceSummary:g,isLoadingSpaceSummary:S,refetchSpaceSummary:I,clearSpaceSummary:function(){y.resetQueries({queryKey:b,exact:!0})},isNoDataError:p,contentCutOffMessage:(null==k||null==(o=k.body)||null==(r=o.error_details)?void 0:r.isContentCutOff)&&null!=(n=k.body.message)?n:null}},I=n(694812),N=n(698532),A=n(993465),E=n(258743);function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var L=function(e){var t,n,o=e.isOpen,i=e.onClose,c=e.space,u=e.dateRange,h=e.type,x=e.firstUnreadMessageId,j=(0,m.useMemo)(function(){if(u!==v.a.FROM_UNREAD){var e=(0,d.R)();return u===v.a.LAST_7_DAYS?(0,p.e)(e,7).toISOString():(0,f.a)(e,1).toISOString()}},[u]),_=k({space:c,dateFrom:u===v.a.FROM_UNREAD?void 0:j,enabled:o,type:h,firstUnreadMessageId:u===v.a.FROM_UNREAD?x:void 0,dateRange:u}),w=_.spaceSummary,O=_.isLoadingSpaceSummary,S=_.isNoDataError,P=_.contentCutOffMessage,C=function(e){if(Array.isArray(e))return e}(t=(0,m.useState)(0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return R(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return R(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),L=C[0],D=C[1],T=j?(0,g.WO)(new Date(j),new Date):(0,b.t)("ai_spaces_summaries.from_unread"),M=c.name;(0,m.useEffect)(function(){D(function(e){return e+1})},[u]);var F=function(){i()},K=(0,A.a)(),B=(w||{}).topics,q=void 0===B?[]:B,U=null!=(n=q.flatMap(function(e){return e.relevant_posts}).filter(function(e){return void 0!==e}))?n:[],z=null==w?void 0:w.total_records,W=S&&!O,$=(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)(y.B,{onCollapseClick:F,children:[(0,r.jsx)(s.Q,{spaceSummary:w,sourceName:M,formattedDateRange:T,isLoadingSpaceSummary:O,allSources:U,topics:q,contentCutOffMessage:P}),"number"==typeof z&&z>0&&(0,r.jsx)(y.B.Footer,{children:(0,r.jsx)("div",{className:"animate-fade-in-slow opacity-0",style:{animationDelay:(0,a.GF)(5,q.length),animationFillMode:"forwards"},children:(0,r.jsx)(y.B.FooterNote,{children:(0,b.t)("ai_spaces_summaries.".concat("chat"===h?"messages":"posts","_summarized"),{count:z,formatted_count:(0,l.Rt)(z)})})})})]})},L);return K?(0,r.jsx)(I._s.Root,{open:o,onOpenChange:function(e){e||F()},snapTo:"full",children:(0,r.jsx)(I._s.Content,{"aria-label":(0,b.t)("ai_spaces_summaries.panel_label"),children:W?(0,r.jsx)("div",{className:"relative min-h-screen",children:(0,r.jsx)(E.q,{onCollapseClick:F})}):(0,r.jsx)("div",{className:"-m-4 p-5",children:$})})}):(0,r.jsx)(N.$.Root,{open:o,onOpenChange:function(e){e||F()},noBackdrop:!0,position:"right",size:"sm",children:(0,r.jsx)(N.$.Content,{"aria-label":(0,b.t)("ai_spaces_summaries.panel_label"),children:(0,r.jsx)(N.$.Body,{children:W?(0,r.jsx)(E.q,{onCollapseClick:F}):(0,r.jsx)("div",{className:"-m-4 p-5",children:$})})})})};function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var F=function(e){return(0,u.c)().isCircleV4?(0,r.jsx)(L,T({},e)):(0,r.jsx)(K,T({},e))},K=function(e){var t,n=e.isOpen,u=e.onClose,x=e.space,j=e.dateRange,_=e.type,w=e.shouldHideRailbarDragger,O=e.firstUnreadMessageId,S=(0,m.useMemo)(function(){if(j!==v.a.FROM_UNREAD){var e=(0,d.R)();return j===v.a.LAST_7_DAYS?(0,p.e)(e,7).toISOString():(0,f.a)(e,1).toISOString()}},[j]),P=k({space:x,dateFrom:j===v.a.FROM_UNREAD?void 0:S,enabled:n,type:_,firstUnreadMessageId:j===v.a.FROM_UNREAD?O:void 0,dateRange:j}),C=P.spaceSummary,I=P.isLoadingSpaceSummary,N=P.isNoDataError,A=P.contentCutOffMessage,E=M((0,m.useState)(!1),2),R=E[0],L=E[1],D=M((0,m.useState)(0),2),T=D[0],F=D[1],K=S?(0,g.WO)(new Date(S),new Date):(0,b.t)("ai_spaces_summaries.from_unread"),B=x.name;(0,m.useEffect)(function(){F(function(e){return e+1})},[j]);var q=function(){L(!0),setTimeout(function(){L(!1),u()},a.fB)},U="#rail-bar-header",z=M((0,m.useState)(null),2),W=z[0],$=z[1];if((0,m.useEffect)(function(){$(document.querySelector(U))},[U]),!W)return null;var V=(C||{}).topics,H=void 0===V?[]:V,G=null!=(t=H.flatMap(function(e){return e.relevant_posts}).filter(function(e){return void 0!==e}))?t:[],Z=null==C?void 0:C.total_records;return(0,r.jsx)(i.E,{shouldShowRailBar:n,shouldHideRailbarDragger:void 0===w||w,children:(0,r.jsx)(o.h.Content,{heightGap:16,children:(0,r.jsxs)("div",{className:(0,
1c.x)("transition-opacity duration-300",{"opacity-0":R,"opacity-100":!R}),children:[(0,r.jsx)("div",{className:"bg-ai-summary absolute inset-0 bg-cover bg-center bg-no-repeat"}),N&&!I?(0,r.jsx)(h.q,{onCollapseClick:q}):(0,r.jsx)("div",{className:"relative",children:(0,r.jsxs)(y.B,{onCollapseClick:q,children:[(0,r.jsx)(s.Q,{spaceSummary:C,sourceName:B,formattedDateRange:K,isLoadingSpaceSummary:I,allSources:G,topics:H,contentCutOffMessage:A}),"number"==typeof Z&&Z>0&&(0,r.jsx)(y.B.Footer,{children:(0,r.jsx)("div",{className:"animate-fade-in-slow opacity-0",style:{animationDelay:(0,a.GF)(5,H.length),animationFillMode:"forwards"},children:(0,r.jsx)(y.B.FooterNote,{children:(0,b.t)("ai_spaces_summaries.".concat("chat"===_?"messages":"posts","_summarized"),{count:Z,formatted_count:(0,l.Rt)(Z)})})})})]})},T)]})})})}},471977(e,t,n){"use strict";n.d(t,{Q:()=>w});var r=n(391426),o=n(59655),i=n(355104),a=n(417980),s=n(684245),l=n(730530),c=n(803123),u=n(547570),d=n(674251),p=n(892907),f=function(e){var t=e.formattedDateRange,n=e.sourceName;return(0,r.jsxs)("div",{className:"animate-fade-in-slow mb-2 opacity-0",style:{animationDelay:(0,c.GF)(0),animationFillMode:"forwards"},children:[(0,r.jsxs)(p.o5,{variant:"body-sm",color:"tertiary",children:[t," ",(0,a.t)("ai_spaces_summaries.bullet")," ",(0,a.t)("ai_spaces_summaries.summary_of")]}),(0,r.jsx)("div",{className:"animate-fade-in-slow opacity-0",style:{animationDelay:(0,c.GF)(1),animationFillMode:"forwards"},children:(0,r.jsx)(p.o5,{variant:"heading-lg",children:n})})]})};function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var b=function(e){return(0,i.c)().isCircleV4?(0,r.jsx)(f,m({},e)):(0,r.jsx)(y,m({},e))},y=function(e){var t=e.formattedDateRange,n=e.sourceName;return(0,r.jsxs)("div",{className:"text-tertiary animate-fade-in-slow mb-2 text-sm opacity-0",style:{animationDelay:(0,c.GF)(0),animationFillMode:"forwards"},children:[t," ",(0,a.t)("ai_spaces_summaries.bullet")," ",(0,a.t)("ai_spaces_summaries.summary_of"),(0,r.jsx)("div",{className:"animate-fade-in-slow opacity-0",style:{animationDelay:(0,c.GF)(1),animationFillMode:"forwards"},children:(0,r.jsx)(d.o.TitleMd,{children:n})})]})},h=function(e){var t=e.topics;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"animate-fade-in-slow mb-2 opacity-0",style:{animationDelay:(0,c.GF)(3),animationFillMode:"forwards"},children:(0,r.jsx)(p.o5,{variant:"label-sm",children:(0,a.t)("ai_spaces_summaries.takeaways")})}),(0,r.jsx)("ul",{className:"space-y-2",children:t.map(function(e,t){return(0,r.jsx)("li",{className:"animate-fade-in-slow flex items-baseline opacity-0",style:{animationDelay:(0,c.GF)(t+4),animationFillMode:"forwards"},children:(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("div",{className:"pt-1",children:(0,r.jsx)("strong",{children:(0,r.jsx)(p.o5,{variant:"label-sm",component:"span",children:e.topic_name})})}),(0,r.jsx)(s.B.TextWithUserLinks,{text:e.summary,relevantPosts:e.relevant_posts}),e.summary_subcategories_by_author&&e.summary_subcategories_by_author.length>0&&(0,r.jsx)("ul",{className:"space-y-1",children:e.summary_subcategories_by_author.map(function(n){return(0,r.jsxs)("li",{className:"animate-fade-in-slow flex items-baseline pl-2 opacity-0",style:{animationDelay:(0,c.GF)(t+4),animationFillMode:"forwards"},children:[(0,r.jsx)("span",{className:"mr-2",children:(0,r.jsx)(p.o5,{variant:"body-sm",component:"span",children:(0,a.t)("ai_spaces_summaries.bullet")})}),(0,r.jsx)(s.B.TextWithUserLinks,{text:n})]},"".concat(e.topic_name,"-").concat(n))})})]})},e.topic_name)})})]})};function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var v=function(e){return(0,i.c)().isCircleV4?(0,r.jsx)(h,g({},e)):(0,r.jsx)(x,g({},e))},x=function(e){var t=e.topics;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"animate-fade-in-slow mb-2 opacity-0",style:{animationDelay:(0,c.GF)(3),animationFillMode:"forwards"},children:(0,r.jsx)(d.o.BodySm,{weight:"medium",as:"strong",children:(0,a.t)("ai_spaces_summaries.takeaways")})}),(0,r.jsx)("ul",{className:"space-y-2",children:t.map(function(e,t){return(0,r.jsx)("li",{className:"animate-fade-in-slow flex items-baseline opacity-0",style:{animationDelay:(0,c.GF)(t+4),animationFillMode:"forwards"},children:(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("div",{className:"pt-1",children:(0,r.jsx)(d.o.BodySm,{weight:"bold",as:"strong",children:e.topic_name})}),(0,r.jsx)(s.B.TextWithUserLinks,{text:e.summary,relevantPosts:e.relevant_posts}),e.summary_subcategories_by_author&&e.summary_subcategories_by_author.length>0&&(0,r.jsx)("ul",{className:"space-y-1",children:e.summary_subcategories_by_author.map(function(n){return(0,r.jsxs)("li",{className:"animate-fade-in-slow flex items-baseline pl-2 opacity-0",style:{animationDelay:(0,c.GF)(t+4),animationFillMode:"forwards"},children:[(0,r.jsx)("span",{className:"mr-2",children:(0,r.jsx)(d.o.BodySm,{as:"span",children:(0,a.t)("ai_spaces_summaries.bullet")})}),(0,r.jsx)(s.B.TextWithUserLinks,{text:n})]},"".concat(e.topic_name,"-").concat(n))})})]})},e.topic_name)})})]})},j=function(e){var t=e.spaceSummary,n=e.sourceName,o=e.formattedDateRange,i=e.isLoadingSpaceSummary,d=e.allSources,p=e.topics,f=e.contentCutOffMessage,m=e.events;return(0,r.jsxs)(s.B.Content,{children:[(0,r.jsx)(s.B.Header,{animate:i,isHidden:!i&&(!!t||!!f),children:(0,a.t)("ai_spaces_summaries.generating")}),f&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{formattedDateRange:o,sourceName:n}),(0,r.jsx)(u.F,{variant:"warning",description:f})]}),t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{formattedDateRange:o,sourceName:n}),(0,r.jsx)("div",{className:"animate-fade-in-slow opacity-0",style:{animationDelay:(0,c.GF)(2),animationFillMode:"forwards"},children:(0,r.jsx)(s.B.TextWithUserLinks,{text:t.overview||""})}),(0,r.jsx)("div",{className:"mt-2",children:p.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v,{topics:p}),d.length>0&&(0,r.jsx)("div",{className:"animate-fade-in-slow mt-4 opacity-0",style:{animationDelay:(0,c.GF)(4,p.length),animationFillMode:"forwards"},children:(0,r.jsx)(l.j,{sources:d})})]})}),m&&(0,r.jsx)("div",{className:"animate-fade-in-slow opacity-0",style:{animationDelay:(0,c.GF)(5,p.length),animationFillMode:"forwards"},children:(0,r.jsx)(s.B.Section,{title:(0,a.t)("ai_spaces_summaries.events"),text:m})})]})]})};function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var w=function(e){return(0,i.c)().isCircleV4?(0,r.jsx)(j,_({},e)):(0,r.jsx)(O,_({},e))},O=function(e){var t=e.spaceSummary,n=e.sourceName,i=e.formattedDateRange,u=e.isLoadingSpaceSummary,d=e.allSources,p=e.topics,f=e.contentCutOffMessage,m=e.events;return(0,r.jsxs)(s.B.Content,{children:[(0,r.jsx)(s.B.Header,{animate:u,isHidden:!u&&(!!t||!!f),children:(0,a.t)("ai_spaces_summaries.generating")}),f&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{formattedDateRange:i,sourceName:n}),(0,r.jsx)(o.F,{type:"alert",description:f,className:"text-dark !rounded-xl !border-2 !border-red-200 bg-red-50 !py-2 !pl-4 !pr-3 text-ju
1stify dark:!border-red-800 dark:bg-red-900/20",showIcon:!1})]}),t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{formattedDateRange:i,sourceName:n}),(0,r.jsx)("div",{className:"animate-fade-in-slow opacity-0",style:{animationDelay:(0,c.GF)(2),animationFillMode:"forwards"},children:(0,r.jsx)(s.B.TextWithUserLinks,{text:t.overview||""})}),(0,r.jsx)("div",{className:"mt-2",children:p.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v,{topics:p}),d.length>0&&(0,r.jsx)("div",{className:"animate-fade-in-slow mt-4 opacity-0",style:{animationDelay:(0,c.GF)(4,p.length),animationFillMode:"forwards"},children:(0,r.jsx)(l.j,{sources:d})})]})}),m&&(0,r.jsx)("div",{className:"animate-fade-in-slow opacity-0",style:{animationDelay:(0,c.GF)(5,p.length),animationFillMode:"forwards"},children:(0,r.jsx)(s.B.Section,{title:(0,a.t)("ai_spaces_summaries.events"),text:m})})]})]})}},803123(e,t,n){"use strict";var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;switch(e){case 0:return"0ms";case 1:return"300ms";case 2:return"600ms";case 3:return"900ms";case 4:return"".concat(1200+(t+1)*300,"ms");case 5:return"".concat(1200+(t+2)*300,"ms");default:return"".concat(1200+(e-4)*300,"ms")}};n.d(t,{GF:()=>r,fB:()=>200})},678480(e,t,n){"use strict";var r=n(391426),o=n(417980),i=function(){return(0,r.jsx)("div",{className:"text-dark px-8 font-medium",children:(0,o.t)("chat_space.error_message")})};n.d(t,{x:()=>i})},783550(e,t,n){"use strict";n.d(t,{U:()=>U});var r=n(391426),o=n(230763),i=n(933578),a=n(325335),s=n(417980),l=n(327006),c=n(104938),u=n(66108),d=n(674251),p=n(570310),f=n(745323),m=n(51730),b=n(915779),y=n(258752),h=n(717526);function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var x=function(e){var t,n=e.refetchSpaceMembers,r=e.spaceId,o=e.setIsConfirmationModalOpen,a=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return g(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=a[0],c=a[1],u=(0,h.d)(),d=(0,y.n_)({mutationFn:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,(0,m.Dc)(b.iK.spaceMembers.leaveSpace({spaceId:r,memberId:null==l?void 0:l.community_member_id}))];case 1:return e.sent(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,s,"next",e)}function s(e){v(i,r,o,a,s,"throw",e)}a(void 0)})})()},onError:function(e){u.error(e.message)},onSuccess:function(){u.success((0,s.t)("members_directory.community_members.actions.space.successfully_removed")),n()},onSettled:function(){o(!1)}});return{leaveSpaceMutation:d.mutate,isLeaving:d.isPending,memberToDelete:l,setMemberToDelete:c}},j=n(355104),_=n(964925),w=n(844842),O=n(955015),S=n(892907),P=n(10457),C=function(){var e=(0,o.Od)().currentCommunityMember;return{shouldShowRemoveOption:function(t){return(null==e?void 0:e.id)!==t.community_member_id&&(null==e?void 0:e.is_admin)}}}
1,k=n(525462),I=n(159200),N=function(e){var t=e.isViewOnlyMasquerading,n=e.onBlockMemberDm,i=e.onRemoveMember,a=e.onUnblockMemberDm,l=e.participantList,c=(0,_.n)(),u=(0,o.Od)().currentCommunityMember,d=(0,P.r)().canBlockMemberDm,p=C().shouldShowRemoveOption,f=function(e){var t=e.is_blocked_by_current_community_member,r=[{icon:"eye-open",label:(0,s.t)("view_profile"),onClick:function(){return c(e.user_public_uid||"")}}];return d({community_member_id:e.community_member_id,admin:e.community_admin})&&r.push({icon:t?"message-check":"message-cross",label:(0,s.t)(t?"messaging.unblock_direct_messages":"messaging.block_direct_messages"),onClick:function(){return t?a(e):n(e)},danger:!t}),p({community_member_id:e.community_member_id,messaging_enabled:!!e.can_send_message_in_room})&&r.push({icon:"cross",label:(0,s.t)("remove"),onClick:function(){return i(e)},danger:!0}),r};return(0,r.jsx)("div",{className:"flex flex-col gap-0.5 -mx-2",children:l.map(function(e){return(0,r.jsxs)("button",{type:"button",className:"hover:bg-hover dark:hover:bg-primary group flex w-full cursor-pointer justify-between flex-row items-center rounded-2xl px-3 py-2 h-10 has-[[data-popup-open]]:bg-hover dark:has-[[data-popup-open]]:bg-primary",onClick:function(){return c((null==e?void 0:e.user_public_uid)||"")},children:[(0,r.jsxs)("div",{className:"flex w-[90%] items-center text-left",children:[(0,r.jsx)("div",{className:"mr-3",children:(0,r.jsx)(w.t,{name:null==e?void 0:e.name,src:null==e?void 0:e.avatar_url,status:(0,k.K)(null==e?void 0:e.status),size:"sm"})}),(0,r.jsx)(S.o5,{variant:"label-sm",truncate:!0,children:(null==u?void 0:u.id)===e.community_member_id?(0,s.t)("messaging.you"):null==e?void 0:e.name}),(null==e?void 0:e.community_admin)?(0,r.jsx)("div",{className:"ml-2",children:(0,r.jsx)(O.E,{label:(0,s.t)("admin"),variant:"secondary"})}):(null==e?void 0:e.moderator)&&(0,r.jsx)("div",{className:"ml-2",children:(0,r.jsx)(O.E,{label:(0,s.t)("moderator"),variant:"secondary"})})]}),!t&&(0,r.jsx)(I.B,{options:f(e)})]},null==e?void 0:e.id)})})},A=n(938301),E=n(428266),R=n(529648),L=n(617492),D=n(734527);function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var M=function(e){var t=e.isViewOnlyMasquerading,n=e.onBlockMemberDm,i=e.onRemoveMember,a=e.onUnblockMemberDm,l=e.participantList,c=(0,L.g)(),u=(0,o.Od)().currentCommunityMember,d=(0,P.r)().canBlockMemberDm,p=C().shouldShowRemoveOption,f=function(e){var t=e.is_blocked_by_current_community_member,r={iconClassName:"text-feedback-error",color:"text-feedback-error"},o=[{value:"profile",icon:"20-eye-open",iconSize:20,className:"!py-2.5 !px-3",label:(0,s.t)("view_profile"),onClick:function(){return c.show({memberPublicId:e.user_public_uid||""})}}];return d({community_member_id:e.community_member_id,admin:e.community_admin})&&o.push(T({value:"block-dm",icon:t?"20-message-check":"20-block-dms",className:"!py-2.5 !px-3",iconSize:20,label:(0,s.t)(t?"messaging.unblock_direct_messages":"messaging.block_direct_messages"),onClick:function(){return t?a(e):n(e)}},t?{}:r)),p({community_member_id:e.community_member_id,messaging_enabled:!!e.can_send_message_in_room})&&o.push(T({value:"remove",icon:"20-close",iconSize:20,className:"!py-2.5 !px-3",label:(0,s.t)("remove"),onClick:function(){return i(e)}},r)),o};return(0,r.jsx)(r.Fragment,{children:l.map(function(e){return(0,r.jsxs)("button",{type:"button",className:"hover:bg-tertiary group flex w-full cursor-pointer justify-between text-darkest -mx-2 flex-row items-center rounded-md p-2 text-sm",onClick:function(){(null==e?void 0:e.user_public_uid)&&c.show({memberPublicId:e.user_public_uid})},children:[(0,r.jsxs)("div",{className:"text-dark flex w-[90%] items-center text-left",children:[(0,r.jsx)("div",{className:"mr-3",children:(0,r.jsx)(D.J,{name:null==e?void 0:e.name,src:null==e?void 0:e.avatar_url,status:null==e?void 0:e.status,size:"8"})}),(0,r.jsx)("div",{className:"truncate font-medium",children:(null==u?void 0:u.id)===e.community_member_id?(0,s.t)("messaging.you"):null==e?void 0:e.name}),(null==e?void 0:e.community_admin)?(0,r.jsx)("div",{className:"ml-3",children:(0,r.jsx)(A.$,{label:(0,s.t)("admin"),isAdmin:!0})}):(null==e?void 0:e.moderator)&&(0,r.jsx)("div",{className:"ml-3",children:(0,r.jsx)(A.$,{label:(0,s.t)("moderator")})})]}),(0,r.jsx)("button",{type:"button",onClick:function(e){e.stopPropagation()},children:!t&&(0,r.jsx)(R.ms,{direction:"bottom-start",menuButtonEl:"div",className:"group-hover:block lg:hidden",menuItemsClassName:"!p-2 !w-60",button:(0,r.jsx)(R.ms.MenuButton,{id:"action-block",children:(0,r.jsx)(E.K,{name:"20-menu-dots-horizontal",iconSize:20,ariaLabel:(0,s.t)("chat_space.view_member_actions")})}),options:f(e)})})]},null==e?void 0:e.id)})})};function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var K=function(e){return(0,j.c)().isCircleV4?(0,r.jsx)(N,F({},e)):(0,r.jsx)(M,F({},e))},B=n(803831);function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var U=function(e){var t,n=e.spaceMembers,m=e.space,b=e.refetchSpaceMembers,y=e.hasMoreSpaceMembers,h=e.fetchNextPage,g=e.className,v=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return q(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return q(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),j=v[0],_=v[1],w=(0,o.Od)().isViewOnlyMasquerading,O=(0,f.b)({onSuccess:function(){b()}}),S=O.blockMember,P=O.isBlocking,C=O.memberToBlock,k=O.toggleBlockDmsModal,I=O.handleUnblockMember,N=O.isBlockDmsModalOpen,A=O.setIsBlockDmsModalOpen,E=x({refetchSpaceMembers:b,spaceId:m.id,setIsConfirmationModalOpen:_}),R=E.leaveSpaceMutation,L=E.isLeaving,D=E.memberToDelete,T=E.setMemberToDelete,M=(0,i.useCallback)(function(e){T(e),_(!0)},[T]),F=(0,l.WQ)(n),U=F.onlineParticipants,z=F.offlineParticipants,W=(0,i.useCallback)(function(){C&&S({memberId:C.community_member_id})},[C,S]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{id:"scrollableDiv",className:"p-0 md:pb-4",style:{height:"100%",overflow:"auto"},children:(0,r.jsxs)(a.A,{scrollThreshold:.8,next:h,hasMore:void 0!==y&&y,dataLength:n.length,className:(0,p.x)("p-0 sm:px-5 pb-12 bg-primary dark:bg-secondary",void 0===g?"":g),scrollableTarget:"scrollableDiv",loader:(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(d.o.LabelXxs,{children:(0,s.t)("toggle_with_loader.loading")})}),children:[U.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(B.Y,{title:(0,s.t)("chat_space.online")}),(0,r.jsx)(K,{participantList:U,isViewOnlyMasquerading:w,onBlockMemberDm:k,onRemoveMember:M,onUnblockMemberDm:I})]}),z.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(B.Y,{title:(0,s.t)("chat_space.offline")}),(0,r.jsx)(K,{participantList:z,isViewOnlyMasquerading:w,onBlockMemberDm:k,onRemoveMember:M,onUnblockMemberDm:I})]})]})}),(0,r.jsx)(u.R,{isOpen:j,title:(0,s.t)("remove"),onClose:function(){return _(!1)},onCancel:function(){return _(!1)},onConfirm:R,confirmText:L?(0,s.t)("removing"):(0,s.t)("remove"),disabled:L,confirmVariant:"danger",children:(0,s.t)("members_directory.community_members.actions.space.confirm_remove",{community_member:null==D?void 0:D.name,space:m.name})}),(0,r.jsx)(c.B,{showModal:N,onClose:function(){return A(!1)},onConfirm:W,memberName:(null==C?void 0:C.name)||"",isLoading:P})]})}},159200(e,t,n){"use strict";var r=n(391426),o=n(34819),i=n(70719),a=n(417980),s=function(e){var t=e.options;return(0,r.jsx)("div",{className:"hidden group-hover:block has-[[data-popup-open]]:block",onClick:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()},"aria-hidden":"true",children:(0,r.jsx)(i.t,{align:"start",side:"bottom",options:t,trigger:(0,r.jsx)(o.K,{icon:"dot-menu",variant:"ghost",size:"sm","aria-label":(0,a.t)("chat_space.view_member_actions")})})})};n.d(t,{B:()=>s})},525462(e,t,n){"use strict";var r=function(e){switch(e){case"online":case"idle":return e;default:return"none"}};n.d(t,{K:()=>r})},803831(e,t,n){"use strict";var r=n(391426),o=n(892907),i=n(674251),a=n(355104),s=function(e){var t=e.title;return(0,a.c)().isCircleV4?(0,r.jsx)("div",{className:"my-2",children:(0,r.jsx)(o.o5,{variant:"label-xs",color:"tertiary",children:t})}):(0,r.jsx)("div",{className:"my-2",children:(0,r.jsx)(i.o.LabelXxs,{weight:"bold",color:"text-default",children:t})})};n.d(t,{Y:()=>s})},745323(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(933578),a=n(258752),s=n(417980),l=n(717526);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,s,"next",e)}function s(e){u(i,r,o,a,s,"throw",e)}a(void 0)})}}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onSuccess,n=e.memberName,c=p((0,i.useState)(null),2),u=c[0],m=c[1],b=p((0,i.useState)(!1),2),y=b[0],h=b[1],g=(0,l.d)(),v=(0,a.n_)({mutationFn:function(e){var t=e.memberId;return d(function(){return f(this,function(e){switch(e.label){case 0:return[4,(0,r.oK)(o.iK.blockedMembers.create({params:{blocked_member_id:t}}))];case 1:return e.sent(),[2]}})})()},onError:function(e){g.error(e.message)},onSuccess:function(){g.success((0,s.t)("messaging.block_direct_messages_modal.success",{name:(null==u?void 0:u.name)||n})),h(!1),null==t||t()}}),x=v.mutate,j=v.isPending,_=(0,a.n_)({mutationFn:function(e){var t=e.memberId;return d(function(){return f(this,function(e){switch(e.label){case 0:return[4,(0,r.Dc)(o.iK.blockedMembers.destroy({id:t}))];case 1:return e.sent(),[2]}})})()},onError:function(e){g.error(e.message)},onSuccess:function(e,r){var o=r.name;g.success((0,s.t)("messaging.unblock_direct_messages_success",{name:o||n})),null==t||t()}}),w=_.mutate,O=_.isPending,S=(0,i.useCallback)(function(e){m(e),h(!0)},[m,h]),P=(0,i.useCallback)(function(){u&&x({memberId:u.community_member_id})},[u,x]),C=(0,i.useCallback)(function(e){O||w({memberId:null==e?void 0:e.community_member_id,name:null==e?void 0:e.name})},[O,w]);return{blockMember:x,isBlocking:j,memberToBlock:u,setMemberToBlock:m,unBlockMember:w,isUnblocking:O,toggleBlockDmsModal:S,handleBlockMember:P,handleUnblockMember:C,isBlockDmsModalOpen:y,setIsBlockDmsModalOpen:h}};n.d(t,{b:()=>m})},168090(e,t,n){"use strict";var r=n(391426),o=n(973646),i=n(927561),a=n(417980),s=[{get label(){return(0,a.t)("spaces.form.create.course_types.self_paced")},value:"self_paced",get description(){return(0,a.t)("spaces.form.create.course_types.self_paced_info")}},{get label(){return(0,a.t)("spaces.form.create.course_types.structured")},value:"structured",get description(){return(0,a.t)("spaces.form.create.course_types.structured_info")}},{get label(){return(0,a.t)("spaces.form.create.course_types.scheduled")},value:"scheduled",get description(){return(0,a.t)("spaces.form.create.course_types.scheduled_info")}}],l=function(e){var t=e.hideLabel;return(0,r.jsx)(i.l.Item,{name:"course_setting[course_type]",hideDescription:!0,rules:{required:(0,a.t)("spaces.form.create.choose_course_type"),maxLength:255},hideBorder:!0,fullWidth:!0,variant:"extra-bottom-margin",label:(0,a.t)("spaces.form.create.course_types.label"),hideLabel:t,children:(0,r.jsx)(i.l.RadioGroup,{variant:"box",name:"visibility",options:s,optionAlignment:"left",checkedIcon:(0,r.jsx)(o.In,{type:"20-checkmark-circle",size:16})})})};n.d(t,{M:()=>l})},560640(e,t,n){"use strict";var r={self_paced:"self_paced",scheduled:"scheduled",structured:"structured"},o=r.self_paced;n.d(t,{X:()=>o,q:()=>r})},293481(e,t,n){"use strict";var r=n(398061),o=n(815505),i=n(274685),a=n(258752),s=n(417980),l=n(71
17526),c=n(51730),u=n(915779),d=n(684859),p=function(e){var t=e.forEdition,n=void 0!==t&&t,p=(0,d.V)(),f=p.lessonId,m=p.sectionId,b=(0,i.jE)(),y=(0,r.Ir)().data,h=(0,l.d)(),g=(0,a.IT)({queryKey:["lesson",f,null==y?void 0:y.id,m],queryFn:function(){return(0,c.i_)(u.iK.courses.getLesson({courseId:y.id,lessonId:f,sectionId:m,params:{for_edition:n}}))},enabled:!!f&&!!y&&!!m,refetchOnWindowFocus:!1,retry:0,onError:function(e){(null==e?void 0:e.status)===401&&(window.location.href="/")}}),v=g.data,x=g.isInitialLoading,j=g.remove,_=(0,a.n_)({mutationFn:function(e){return(0,c.$H)(u.iK.courses.updateLesson({courseId:y.id,lessonId:f,sectionId:m}),{course_lesson:e})},onSuccess:function(){j(),b.removeQueries({queryKey:(0,o.md)(null==y?void 0:y.id,f)}),h.success(s.Ay.t("courses.edit.lesson.changes_saved"))},onError:function(e){h.error(e.errorDetails)}}),w=_.mutate,O=_.isPending,S=(0,a.n_)({mutationFn:function(e){var t=e.spaceId,n=e.sectionId,r=e.lessonId;return(0,c.oK)(u.iK.courses.duplicateLesson({courseId:t,sectionId:n,lessonId:r}))},onError:function(){return h.error(s.Ay.t("courses.edit.lesson.duplication_error"))}}).mutateAsync;return{currentLesson:v,isLoading:x,updateLesson:w,isUpdatingLesson:O,updateFilesOrder:(0,a.n_)({mutationFn:function(e){var t=e.filesOrder;return(0,c.$H)(u.iK.courses.updateLesson({courseId:y.id,lessonId:f,sectionId:m}),{course_lesson:{files_order:t}})}}).mutate,duplicateLesson:S}};n.d(t,{H:()=>p})},544756(e,t,n){"use strict";n.d(t,{Y:()=>T});var r=n(391426),o=n(224444),i=n(801113),a=n(568316),s=n(938372),l=n.n(s),c=n(325335),u=n(417980),d=n(973646),p=function(e){var t=e.onAdd;return(0,r.jsxs)("button",{type:"button",className:"hover:bg-secondary flex h-12 w-full flex-row items-center rounded-md",onClick:t,children:[(0,r.jsx)("div",{className:"bg-secondary ml-4 mr-3 inline-flex size-8 items-center justify-center rounded-md text-gray-600",children:(0,r.jsx)(d.In,{type:"16-account",size:16})}),(0,r.jsx)(a.o.LabelSm,{weight:"semibold",children:(0,u.t)("spaces.form.edit.members.add_members")})]})},f=n(605274),m=n(933578),b=function(e){var t=e.dataLength,n=e.searchTerm,r=e.members,o=e.shouldHideAddMemberButton,i=0===r.length&&!n,a=0===r.length&&n,s=(0,f.qI)(),l=r[0];return{isSpaceMembersEmpty:0===t,isResultEmpty:i,isResultEmptyWithSearch:a,shouldShowAddMember:!n&&!o,columnsToRender:(0,m.useMemo)(function(){var e=null==l?void 0:l.currentSpaceMember,t=(null==l?void 0:l.currentSpaceMember)&&!s,n=(null==l?void 0:l.lastActive)&&!s;return{member:{title:(0,u.t)("spaces.form.edit.members.columns.name"),key:"name",className:"w-80"},memberRole:{title:(0,u.t)("spaces.form.edit.members.columns.role"),key:"memberRole"},joinedAt:t?{title:(0,u.t)("spaces.form.edit.members.columns.joined"),key:"joinedAt"}:null,paywall:e?{title:(0,u.t)("spaces.form.edit.members.columns.paywall"),key:"paywall"}:null,lastActive:n?{title:(0,u.t)("spaces.form.edit.members.columns.last_active"),key:"lastActive"}:null,dropdown:{title:"",key:"dropdown",className:"w-12"}}},[l,s])}},y=n(529648),h=n(230763),g=n(6418),v=function(e){var t=e.member,n=e.cellVariant,o=e.onEdit,a=e.onRemove,s=e.tableVariant,l=t.id,c=(0,h.Od)().currentCommunityMember,p=(0,g.V8)(c);return(0,r.jsx)(i.nA,{variant:n,className:"w-12 pr-4 text-right",children:(0,r.jsxs)(y.ms,{direction:"bottom-end",button:(0,r.jsx)(y.ms.MenuButton,{className:"invisible group-hover:visible",children:(0,r.jsx)(d.In,{type:"20-menu-dots-horizontal",size:20,className:"text-dark"})}),children:[p&&(0,r.jsx)(y.ms.Item,{children:(0,r.jsx)(y.ms.ItemLink,{type:"button",onClick:function(){return o(t)},children:(0,u.t)("spaces.form.edit.members.edit_member")})}),(0,r.jsx)(y.ms.Item,{onClick:function(){return a(l)},children:(0,r.jsx)(y.ms.ItemLink,{type:"button",children:"space-group-members"==s?(0,u.t)("space_groups.form.edit.members.remove_from_space_group"):(0,u.t)("spaces.form.edit.members.remove_from_space")})})]})})},x=n(889828),j=function(e){var t,n=e.member,o=e.cellVariant;if(e.hideColumn)return null;var s=(null==n||null==(t=n.currentSpaceMember)?void 0:t.created_at)?(0,x.w)({dateTime:new Date(n.currentSpaceMember.created_at),format:"long_date"}):"";return(0,r.jsx)(i.nA,{variant:o,className:"",children:(0,r.jsx)(a.o.LabelSm,{color:"text-selector-active",children:s})})},_=function(e){var t=e.member,n=e.cellVariant;if(e.hideColumn)return null;var o=(null==t?void 0:t.lastActive)?(0,x.w)({dateTime:new Date(t.lastActive),format:"long_date"}):"";return(0,r.jsx)(i.nA,{variant:n,className:"",children:(0,r.jsx)(a.o.LabelSm,{color:"text-selector-active",children:o})})},w=n(451251),O=n(398061),S=n(517338),P=n(734527),C=n(341409),k=function(e){var t=e.member,n=t.id,o=t.name,s=t.email,l=t.avatarUrl,c=t.role,d=t.publicUid,p=e.cellVariant,f=(0,O.Ir)();return(0,r.jsx)(i.nA,{variant:p,className:"w-80",children:(0,r.jsxs)("div",{className:"inline-flex items-center",children:[(0,r.jsx)(w.C,{communityMemberId:n,name:o,publicUid:d,avatarURL:l,children:(0,r.jsx)(P.J,{name:o,src:l,size:"10"})}),(0,r.jsxs)("div",{className:"w-60 pl-3",children:[(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)(a.o.LabelSm,{truncate:!0,weight:"semibold",color:"text-selector-active",children:o}),(0,C.KB)(null==f?void 0:f.data)&&(0,g.NB)(c)&&(0,r.jsx)(S.E,{label:(0,u.t)("spaces.form.edit.members.waitlist"),square:!0,variant:"secondary"})]}),(0,r.jsx)("div",{className:"w-60 truncate",children:(0,r.jsx)(a.o.LabelSm,{color:"text-default",children:s})})]})]})})},I=n(474330),N=function(e){var t=e.cellVariant,n=e.member,o=e.onRoleChange,a=n.role,s=n.id;return(0,r.jsx)(i.nA,{variant:t,className:"w-32",children:(0,r.jsx)(I.V,{id:s,role:a,onRoleChange:o})})},A=function(e){var t,n,o,s=e.member,l=e.cellVariant,c=e.hideColumn,u=null==s||null==(t=s.currentSpaceMember)?void 0:t.community_member_paywall_content_granted;if(c)return null;var p=(null==u||null==(n=u.paywall)?void 0:n.name)||(null==u||null==(o=u.paywall)?void 0:o.display_name),f=!!p,m=(0,r.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,r.jsx)(d.In,{type:"20-payments",className:"text-selector-active !w-4",size:20}),(0,r.jsx)("div",{className:"w-36 truncate",children:(0,r.jsx)(a.o.LabelSm,{color:"text-selector-active",children:p})})]});return(0,r.jsx)(i.nA,{variant:l,className:"",children:f?m:"-"})},E=function(e){var t=e.member,n=e.onRemove,o=e.onEdit,a=e.onRoleChange,s=e.cellVariant,l=void 0===s?"no-padding":s,c=e.tableVariant,u=e.columns,d=(0,f.qI)();return(0,r.jsxs)(i.Hj,{className:"border-primary hover:bg-secondary group h-14 border-b",children:[(0,r.jsx)(k,{member:t,cellVariant:l}),(0,r.jsx)(N,{member:t,cellVariant:l,onRoleChange:a}),(0,r.jsx)(j,{member:t,cellVariant:l,hideColumn:!u.joinedAt||d}),(0,r.jsx)(A,{member:t,cellVariant:l,hideColumn:!u.paywall}),(0,r.jsx)(_,{member:t,cellVariant:l,hideColumn:!u.lastActive||d}),(0,r.jsx)(v,{member:t,cellVariant:l,onEdit:o,onRemove:n,tableVariant:c})]})},R=function(e){var t=e.columnsToRender,n=e.shouldShowHeader;return void 0!==n&&n?(0,r.jsx)(i.xY,{children:Object.keys(t).map(function(e){var n,o=t[e];return o&&(0,r.jsx)(i.T0,{className:"!px-0 ".concat(null!=(n=o.className)?n:""),children:(0,r.jsx)(a.o.LabelXs,{leading:"leading-tight",color:"text-default",weight:"semibold",children:o.title.toUpperCase()})},o.key)})}):null},L=n(387099),D=function(e){var t=e.onAddMember;return(0,r.jsxs)("div",{className:"flex min-h-[600px] flex-col items-center pt-44",children:[(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsx)(a.o.TitleSm,{weight:"semibold",children:(0,u.t)("spaces.form.edit.members.no_members")})}),(0,r.jsx)("div",{className:"mb-8",children:(0,r.jsx)(a.o.BodySm,{children:(0,u.t)("spaces.form.edit.members.there_are_no_members")})}),(0,r.jsx)(L.$,{type:"button",variant:"secondary",large:!0,onClick:t,children:(0,u.t)("spaces.form.edit.members.add_members")})]})},T=function(e){var t,n,s=e.dataLength,l=e.members,d=e.onAdd,f=e.onEdit,m=e.onRemove,y=e.onRoleChange,h=e.searchTerm,g=void 0===h?"":h,v=e.shouldHideAddMemberButton,x=e.shouldShowHeader,j=e.cellVariant,_=void 0===j?"no-border":j,w=e.variant,O=void 0===w?"space-members":w,S=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["dataLength","members","onAdd","onEdit","onRemove","onRoleChange","searchTerm","shouldHideAddMemberButton","shouldShowHeader","cellVariant","variant"]),P=b({dataLength:s,members:l,searchTerm:g,shouldHideAddMemberButton:void 0!==v&&v}),C=P.isSpaceMembersEmpty,k=P.isResultEmpty,I=P.isResultEmptyWithSearch,N=P.shouldShowAddMember,A=P.columnsToRender;return C||k?(0,r.jsx)(D,{onAddMember:d}
1):I?(0,r.jsx)(a.o.BodyMd,{children:(0,u.t)("spaces.form.edit.members.no_members_found_for_term",{member_search_term:g})}):(0,r.jsxs)(c.A,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({loader:(0,r.jsx)(o.y,{}),dataLength:s,style:{overflow:"initial"},scrollThreshold:.5},S),n=n={children:[N&&(0,r.jsx)(p,{onAdd:d}),(0,r.jsxs)(i.XI,{variant:"no-border",className:"w-full min-w-[600px]",tableClassName:"w-full table-fixed",children:[(0,r.jsx)(R,{columnsToRender:A,shouldShowHeader:void 0!==x&&x}),(0,r.jsx)(i.BF,{variant:"no-divider",children:l.map(function(e){return(0,r.jsx)(E,{cellVariant:_,member:e,onEdit:f,onRemove:m,onRoleChange:y,columns:A,tableVariant:O},e.id)})})]})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};T.propTypes={dataLength:l().number.isRequired,members:l().arrayOf(l().shape({id:l().number,avatarUrl:l().string,name:l().string,email:l().string,role:l().string})).isRequired,onAdd:l().func,onEdit:l().func,onRemove:l().func,onRoleChange:l().func,searchTerm:l().string,shouldHideAddMemberButton:l().bool,variant:l().oneOf(["space-members","space-group-members"])}},890783(e,t,n){"use strict";var r=n(391426),o=n(568316),i=function(e){var t=e.children,n=e.truncate;return(0,r.jsx)(o.o.TitleSm,{as:"h1","data-testid":"space-title-name",weight:"semibold",truncate:void 0!==n&&n,children:t})};n.d(t,{J:()=>i})},498772(e,t,n){"use strict";n.d(t,{F:()=>G});var r=n(391426),o=n(931639),i=n(398061),a=n(497184),s=n.n(a),l=n(451430),c=n(933578),u=n(783560),d=n(361287),p=n(754539),f=n(737225),m=n(974618),b=n(319143),y=function(e){var t=e.post,n=e.spaceId,a=e.startingImageIndex,s=(0,m.hS)(),l=[[null==t?void 0:t.id]];return(0,r.jsx)(i.Yy,{spaceId:n,children:(0,r.jsx)(b.U,{perPagePostIds:l,children:(0,r.jsx)(o.m,{post:t,usedIn:"mobile-full-carousel-modal",children:(0,r.jsxs)(f.aF,{isOpen:s.visible,onClose:s.remove,contentPortalId:"mobile-full-carousel-modal-portal",children:[(0,r.jsx)(f.aF.Overlay,{}),(0,r.jsx)(f.aF.Content,{size:"full",className:"h-full",children:(0,r.jsx)(G,{startingImageIndex:a})})]})})})})},h=m.PT.create(function(e){return(0,r.jsx)(y,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))}),g=n(973646),v=n(758777),x=n(417980),j=function(e){var t=e.image,n=e.canDownload,o=(0,m.hS)();return(0,r.jsxs)("div",{className:"flex justify-end gap-2 pr-2 pt-2",children:[n&&(0,r.jsx)("a",{href:t.original_url,download:!0,"aria-label":(0,x.t)("download"),className:"text-dark hover:text-dark focus:text-dark",children:(0,r.jsx)(g.In,{type:"16-download",size:16,useWithFillCurrentColor:!0})}),(0,r.jsx)(v.s,{onClick:o.remove})]})},_=n(605274);function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var P=function(e){var t,n;return"clientX"in e&&"clientY"in e?(t=e.clientX,n=e.clientY):"touches"in e&&e.touches.length>0&&(t=e.touches[0].clientX,n=e.touches[0].clientY),[t,n]},C=function(e,t,n){if(void 0===t||1===t||!O(e.target,HTMLImageElement))return n;var r=e.target,o=r.parentNode;if(!O(o,HTMLDivElement))return n;var i=o.getBoundingClientRect(),a=r.getBoundingClientRect(),s=i.left+i.width/2,l=i.top+i.height/2,c=S(P(e),2),u=c[0],d=c[1];if(void 0===u||void 0===d)return n;var p=(s-u)*(t-1),f=(l-d)*(t-1),m=p-n[0],b=f-n[1];return(a.left+m>i.left||a.right+m<i.right)&&(p=n[0]),(a.top+b>i.top||a.bottom+b<i.bottom)&&(f=n[1]),[p,f]},k=function(e){var t=S((0,c.useState)(e?1:void 0),2),n=t[0],r=t[1],o=S((0,c.useState)([0,0]),2),i=o[0],a=o[1],s=(0,c.useMemo)(function(){return(0,l.throttle)(function(e){a(function(t){return C(e,n,t)})},50)},[n,a]);return{zoomLevel:n,resetZoom:function(){a([0,0]),r(1)},cycleZoom:function(){r(function(e){return 1===e?2:2===e?3:1})},zoomPosition:i,setZoomPosition:a,onMouseMove:(0,c.useCallback)(function(e){e.persist(),s(e)},[s])}},I=n(570310),N=n(568316),A=function(e){var t=e.positionClassName;return(0,r.jsx)("div",{className:(0,I.x)("bg-secondary relative flex shrink-0 grow-0 basis-full items-center justify-center",t),children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center p-6 text-center",children:[(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(g.In,{type:"16-trash-bin-2",size:20})}),(0,r.jsx)(N.o.BodySm,{color:"light",children:(0,x.t)("image_space.file_not_found")})]})})},E=function(e,t){var n;return e&&t&&(n=e>t?"w-full":e<t?"h-full":"h-full w-full"),n};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var D=16/9,T=function(e,t,n){var r,o=L((0,c.useState)(),2),i=o[0],a=o[1],s=L((0,c.useState)(),2),l=s[0],u=s[1],d=L((0,c.useState)(),2),p=d[0],f=d[1];return(0,c.useEffect)(function(){if(e&&t.current){var r=t.current,o=r.clientWidth,i=r.clientHeight,s=e>D?D:e,l=o/s;"full-post-modal"===n?(a("100%"),f(o/i)):l>
1678?(a(678),f(o/678)):(a(l),f(s)),u(o)}},[t,e,n,null==(r=t.current)?void 0:r.clientWidth]),{containerCalculatedHeight:i,containerWidth:l,containerRatio:p}},M=n(288513),F=function(e){var t,n=e.image,i=(0,o.a)().record,a=(0,_.A5)();return(0,r.jsx)("div",{className:s()("absolute right-4 top-4 z-[2] flex",{"hidden group-hover:flex":a}),children:(null==i||null==(t=i.gallery)?void 0:t.downloadable_images)&&(0,r.jsx)("a",{href:n.original_url,download:!0,"aria-label":(0,x.t)("download"),className:"flex size-8 justify-center rounded-full bg-black p-1 text-white transition-transform hover:text-white focus:text-white",children:(0,r.jsx)(g.In,{type:"16-download",size:16,useWithFillCurrentColor:!0})})})};function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var q=function(e){var t=e.image,n=e.positionClassName,o=e.containerWidth,i=e.currentImageIndex,a=e.index,s=e.usedIn,l=e.shouldAnimate,u=e.zoomLevel,d=e.zoomPosition,p=B((0,c.useState)(),2),f=p[0],m=p[1],b=B((0,c.useState)("lazy"),2),y=b[0],h=b[1];return!f&&i+1>=a&&(m(t.url),a>1&&h("eager")),f&&f!==t.url&&m(t.url),(0,r.jsxs)("div",{className:(0,I.x)("relative flex size-full shrink-0 grow-0 basis-full items-center justify-center",{"transition-transform duration-300":l,"z-[1]":i===a}),style:{transform:o?"translateX(-".concat(o*i,"px)"):void 0},children:["full-post-modal"===s&&i===a&&(0,r.jsx)(F,{image:t}),"mobile-full-carousel-modal"!==s&&(0,r.jsx)("div",{className:(0,I.x)((0,M._h)("carousel-image"),"absolute inset-0 scale-110 bg-cover bg-center blur-lg"),style:{backgroundImage:f&&'url("'.concat(f,'")')}}),(0,r.jsx)("img",{className:(0,I.x)((0,M._h)("carousel-image"),"relative select-none",{"transition-transform":u},n),draggable:!1,loading:y,alt:"",src:f,style:{transform:u&&u>1?"translate(".concat(d[0],"px, ").concat(d[1],"px) scale(").concat(u,")"):void 0}})]})},U=n(428266),z=function(e){var t=e.direction,n=e.onClick;return(0,r.jsx)(U.K,{name:"20-chevron-".concat("prev"===t?"left":"right"),iconSize:20,onClick:n,iconClassName:"!text-gray-600",className:(0,I.x)("absolute top-1/2 z-[2] -translate-y-1/2 !rounded-full border border-gray-300 bg-white opacity-0 pointer-events-none hover:!bg-[#F7F9FA] focus:!bg-[#F7F9FA] sm:group-hover:opacity-100 sm:group-hover:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto",{"left-4":"prev"===t,"right-4":"next"===t}),ariaLabel:"prev"===t?(0,x.t)("previous"):(0,x.t)("next")})},W=function(e){var t=e.images,n=e.currentImageIndex,o=e.onPrevImage,i=e.onNextImage,a=e.usedIn,s=e.shouldAnimate,l=e.zoomLevel,u=e.zoomPosition,d=e.shouldHaveRoundedBottomCorners,p=(0,c.useRef)(null),f=t.length>0?t[0].width/t[0].height:1,m=T(f,p,a),b=m.containerRatio,y=m.containerCalculatedHeight,h=m.containerWidth,g=E(f,b);return(0,r.jsxs)("div",{className:(0,I.x)("group relative flex items-center overflow-hidden",{"lg:h-full":"full-post-modal"===a,"md:rounded-b-md":void 0!==d&&d}),style:{height:"full-post-modal"!==a?y:void 0},ref:p,children:[t.length>0?t.map(function(e,t){return(0,r.jsx)(q,{image:e,currentImageIndex:n,index:t,positionClassName:g,containerWidth:h,usedIn:a,shouldAnimate:s,zoomLevel:l,zoomPosition:u},e.id)}):(0,r.jsx)(A,{positionClassName:g}),t.length>0&&n>0&&(0,r.jsx)(z,{onClick:o,direction:"prev"}),t.length>0&&n<t.length-1&&(0,r.jsx)(z,{onClick:i,direction:"next"})]})},$=function(e){var t=e.images,n=e.currentImageIndex,o=e.setCurrentImageIndex,i=e.usedIn,a=(0,_.A5)(),l=(0,d.W)().isPostBodyEmpty;return t.length<2?"mobile-full-carousel-modal"===i?(0,r.jsx)("div",{className:"!pt-0 pb-12"}):null:(0,r.jsx)("div",{className:s()("z-[2] w-full justify-center pt-5",{"absolute bottom-4 left-1/2 flex w-auto -translate-x-1/2 !pt-0":a,"pb-5":!a&&("full-post-modal"===i||l),"!pt-0 pb-12":"mobile-full-carousel-modal"===i}),children:(0,r.jsx)("div",{className:s()("bg-primary flex justify-center gap-1 rounded-lg p-0",{"!bg-white !p-2":a}),children:t.map(function(e,i){return(0,r.jsx)("button",{type:"button","aria-label":(0,x.t)("image_space.carousel.indicator_button",{image_index:i+1,total_images:t.length}),onClick:function(){return o(i)},className:s()("border-3 size-1.5 rounded-full",{"border-dark":!a&&i!==n,"border-gray-300":a&&i!==n,"border-darkest":!a&&i===n,"border-gray-900":a&&i===n})},e.id)})})})};function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var G=function(e){var t,n,a,f,b=e.onPostChange,y=void 0===b?l.noop:b,g=e.onPostDestroy,v=void 0===g?l.noop:g,x=e.startingImageIndex,w=void 0===x?0:x,O=e.className,S=(0,o.a)(),P=S.record,C=S.usedIn,I="full-post-modal"===C,N="mobile-full-carousel-modal"===C,A="full-post-modal"!==C&&"mobile-full-carousel-modal"!==C,E=(0,d.W)().isPostBodyEmpty,R=A&&(null==P?void 0:P.is_liking_disabled)&&(null==P?void 0:P.is_comments_disabled)&&E,L=H((0,c.useState)(w),2),D=L[0],T=L[1],M=k(I),F=M.zoomLevel,K=M.onMouseMove,B=M.resetZoom,q=M.cycleZoom,U=M.zoomPosition,z=H((0,c.useState)(0===w),2),V=z[0],G=z[1],Z=(0,i.Ir)().data,Q=(0,p.k)(),Y=(0,m.hS)(h),J=(0,_.wf)(),X=!(0,_.wf)(),ee=I||N,et=(0,d.W)(),en=et.isSharedPostView,er=et.isSharedPostWithTeaserLayout,eo=null==P||null==(a=P.gallery)?void 0:a.images,ei=er&&eo?eo.slice(0,1):eo,ea=function(){I&&B(),G(!0),T(function(e){return Math.min(e+1,ei?ei.length-1:e+1)})},es=function(){I&&B(),G(!0),T(function(e){return Math.max(e-1,0)})},el=(0,u.uh)({onSwipedRight:F&&F>1?void 0:es,onSwipedLeft:F&&F>1?void 0:ea,onTap:function(e){e.event.target.classList.contains("carousel-image")&&!er&&(I?q():X?Y.show({post:P,spaceId:null==Z?void 0:Z.id,startingImageIndex:D}):J&&Q.show({post:P,spaceId:null==Z?void 0:Z.id,onPostChange:y,onPostDestroy:v,isSharedPostView:en,startingImageIndex:D}))},trackMouse:!0});return P&&ei?(0,r.jsxs)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:s()("group relative w-full cursor-pointer px-0 pt-5",{"!py-0 lg:h-full":I,"flex h-full flex-col justify-between !py-0":N,"!cursor-zoom-in":I,"!pt-0":!E,"mb-5":!E&&!ee},void 0===O?"":O),onMouseMove:I?K:void 0,onTouchMove:I?K:void 0},el),n=n={children:[N&&(0,r.jsx)(j,{canDownload:null==P||null==(f=P.gallery)?void 0:f.downloadable_images,image:ei[D]}),(0,r.jsx)(W,{images:ei,currentImageIndex:D,onPrevImage:es,onNextImage:ea,usedIn:C,shouldAnimate:V,zoomLevel:F,zoomPosition:U,shouldHaveRoundedBottomCorners:R}),(0,r.jsx)($,{images:ei,currentImageIndex:D,setCurrentImageIndex:function(e){I&&B(),T(e)},usedIn:C})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)):null}},754539(e,t,n){"use strict";n.d(t,{k:()=>O});var r=n(391426),o=n(737225),i=n(974618),a=n(931639),s=n(398061),l=n(319143),c=n(497184),u=n.n(c),d=n(933578),p=n(274685),f=n(545923),m=n(527374),b=n(498772),y=n(758777),h=n(568316),g=n(417980),v=n(540795),x=function(e){var t=e.onPostChange,n=e.onPostDestroy,o=e.autofocusReplyForm,s=e.scrollableTarget,l=(0,i.hS)(),c=(0,a.a)().record,u=(0,p.jE)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"border-primary flex justify-between border-y p-6 pb-5 sm:border-t-0",children:[(0,r.jsx)(h.o.TitleSm,{weight:"semibold",children:(0,g.t)("image_space.grid_view.post_details")}),(0,r.jsx)(y.s,{onClick:function(){u.invalidateQueries({queryKey:[f.W,c.id]}),l.remove()}})]}),(0,r.jsx)(v.T,{defaultShowComment:!0,autofocusReplyForm:o,onPostChange:t,onPostDestroy:function(e){l.remove(),n(e)},hideShareLink:!0,hidePinnedToTopIcon:!0,hideBookmarkButton:!0,tagsLimit:1,tagsShowMoreLabelVariant:"numbers",metaInfoWrapperClassName:"!pr-0",scrollableTarget:s})]})},j=function(e){var t=e.onPostChange,n=e.onPostDestroy,o=e.startingImageIndex,i=e.autofocusReplyForm,a=(0,d.useRef)(null);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex max-h-full w-full flex-col overflow-auto lg:h-full lg:w-3/5 xl:w-2/3",children:(0,r.jsx)(b.F,{startingImageIndex:o})}),(0,r.jsx)("div",{className:"border-primary flex w-full flex-col lg:h-full lg:w-2/5 lg:overflow-scroll lg:border-l xl:w-1/3",ref:a,children:(0,r.jsx)(x,{onPostChange:t,onPostDestroy:n,autofocusReplyForm:i,scrollableTarget:a})})]})},_=function(e){var t=e.post,n=e.spaceId,c=e.onPostChange,b=e.onPostDestroy,y=e.startingImageIndex,h=e.autofocusReplyForm,g=e.isSharedPostView,v=(0,i.hS)(),x=(0,d.useRef)(null),_=(0,m.C)({spaceId:null==t?void 0:t.space_id,spaceSlug:null==t?void 0:t.space_slug,postSlug:null==t?void 0:t.slug}),w=_.post,O=_.onPostChange,S=(0,p.jE)(),P=[[null==t?void 0:t.id]];return(0,r.jsx)(s.Yy,{spaceId:n,children:(0,r.jsx)(l.U,{perPagePostIds:P,isSharedPostView:void 0!==g&&g,children:(0,r.jsx)(a.m,{post:w||t,usedIn:"full-post-modal",children:(0,r.jsxs)(o.aF,{initialFocus:x,isOpen:v.visible,onClose:function(){S.invalidateQueries({queryKey:[f.W,null==t?void 0:t.id]}),v.remove()},contentPortalId:"full-post-modal-portal",children:[(0,r.jsx)(o.aF.Overlay,{}),(0,r.jsxs)(o.aF.Content,{size:"full",className:u()("flex !flex-row flex-wrap content-start sm:!max-h-[836px] sm:!max-w-[1256px]"),children:[(0,r.jsx)("div",{ref:x,tabIndex:-1}),(0,r.jsx)(j,{onPostChange:function(e,t){c(e),O(e,t)},onPostDestroy:b,startingImageIndex:y,autofocusReplyForm:void 0!==h&&h})]})]})})})})},w=i.PT.create(function(e){return(0,r.jsx)(_,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))}),O=function(){return(0,i.hS)(w)}},194825(e,t,n){"use strict";n.d(t,{U:()=>tA});var r=n(391426),o=n(931639),i=n(398061),a=n(319143),s=n(451430),l=n(417980),c=n(791009),u=n(933578),d=n(804939),p=n(786639),f=n(698804);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return m(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
1var y=function(e){return e.selectedFiles.forEach(function(e){return URL.revokeObjectURL(e.preview)}),{selectedFiles:[]}},h=(0,f.vt)(function(e){return{currentStep:p.UT.UPLOAD_IMAGES,isSubmitting:!1,isFormDirty:!1,isImagesDirty:!1,galleryAspectRatio:null,selectedFiles:[],uploadedImages:[],setCurrentStep:function(t){return e({currentStep:t})},setIsSubmitting:function(t){return e({isSubmitting:t})},setIsFormDirty:function(t){return e({isFormDirty:t})},setIsImagesDirty:function(t){return e({isImagesDirty:t})},updateImage:function(t){e(function(e){var n=e.selectedFiles.findIndex(function(e){return e.preview===t.preview});return -1===n?{}:{selectedFiles:e.selectedFiles.map(function(e,r){return r===n?t:e})}})},addSelectedFiles:function(t){e(function(e){return{selectedFiles:b(e.selectedFiles).concat(b(t))}})},setSelectedFiles:function(t){e({selectedFiles:t})},addUploadedImages:function(t){e(function(e){return{uploadedImages:b(e.uploadedImages).concat(b(t))}})},setUploadedImages:function(t){e({uploadedImages:t})},setGalleryAspectRatio:function(t){t<(p.C1.portrait+p.C1.square)/2?e({galleryAspectRatio:p.C1.portrait}):t>(p.C1.landscape+p.C1.square)/2?e({galleryAspectRatio:p.C1.landscape}):e({galleryAspectRatio:p.C1.square})},resetSelectedFiles:function(){e(y)},reset:function(){e(function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},y(e)),n=n={currentStep:null,uploadedImages:[],galleryAspectRatio:null,isSubmitting:!1,isFormDirty:!1,isImagesDirty:!1},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t})}}}),g=n(570310),v=n(892907),x=function(e){var t=e.percentage,n=e.size,o=void 0===n?22:n,i=e.strokeWidth,a=void 0===i?2:i,s=Math.min(Math.max(t,0),100),l=(o-a)/2,c=2*Math.PI*l;return(0,r.jsxs)("span",{className:"inline-flex items-center",children:[(0,r.jsx)("progress",{className:"sr-only",max:100,value:s}),(0,r.jsxs)("svg",{"aria-hidden":!0,height:o,viewBox:"0 0 ".concat(o," ").concat(o),width:o,children:[(0,r.jsx)("circle",{cx:o/2,cy:o/2,fill:"none",r:l,stroke:"var(--color-border-primary)",strokeWidth:a}),(0,r.jsx)("circle",{cx:o/2,cy:o/2,fill:"none",r:l,stroke:"var(--color-text-primary)",strokeDasharray:c,strokeDashoffset:c-s/100*c,strokeLinecap:"round",strokeWidth:a,transform:"rotate(-90 ".concat(o/2," ").concat(o/2,")")})]})]})},j=n(34819),_=n(314054);function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var O=[{format:p.hR.SQUARE,iconName:"aspect-ratio-11"},{format:p.hR.PORTRAIT,iconName:"aspect-ratio-34"},{format:p.hR.LANDSCAPE,iconName:"aspect-ratio-169"}],S=function(){var e,t=h(),n=t.galleryAspectRatio,o=t.setGalleryAspectRatio,i=null==(e=Object.entries(p.C1).find(function(e){return(function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return w(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return w(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1]===n}))?void 0:e[0],a="image_space.post_modal.steps.adjust_images.cropping_options";return(0,r.jsx)("div",{className:"flex justify-between",children:O.map(function(e){var t=e.format,n=e.iconName,s=i===t;return(0,r.jsx)(_.m,{content:(0,l.t)("".concat(a,".").concat(t)),children:(0,r.jsx)(j.K,{"aria-label":(0,l.t)("".concat(a,".").concat(t)),"aria-pressed":s,icon:n,onClick:function(){o(p.C1[t])},size:"sm",type:"button",variant:s?"outline":"ghost"})},t)})})},P=n(266090);function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function I(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var N=function(e){var t,n=e.currentImage,o=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return C(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return C(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1],l=h(),c=l.updateImage,d=l.galleryAspectRatio,p=l.setGalleryAspectRatio;return((0,u.useEffect)(function(){var e=new Image;e.src=n.preview,e.onload=function(){a(e)}},[n.preview]),(0,u.useEffect)(function(){!d&&i&&p(i.width/i.height)},[d,i,p]),i&&d)?(0,r.jsx)("div",{className:"relative flex min-h-0 aspect-video max-w-full grow cursor-pointer",children:(0,r.jsx)(P.Ay,{image:n.preview,crop:n.crop,aspect:d,zoom:n.zoom,onCropChange:function(e){e!==n.crop&&c(I(k({},(0,s.cloneDeep)(n)),{crop:e}))},onZoomChange:function(e){e!==n.zoom&&c(I(k({},(0,s.cloneDeep)(n)),{zoom:e}))},onCropComplete:function(e,t){c(I(k({},(0,s.cloneDeep)(n)),{croppedAreaPixels:t}))}})}):null},A=n(817751),E=n(835860),R=n(574795),L=n(795317),D=n(605274),T=function(e){var t=e.onClick,n=e.index,o=e.currentImageIndex,i=(0,D.A5)();return(0,r.jsx)("button",{"aria-label":(0,l.t)("delete_image"),onClick:t,type:"button",className:(0,g.x)("bg-tertiary border-secondary outline-tertiary absolute -right-0.5 -top-0.5 z-10 hidden size-4 items-center justify-center rounded-full border outline outline-2",{"group-hover:flex":!0},{flex:!i&&n===o}),children:(0,r.jsx)(A.t,{name:"cross",size:"sm",width:10,height:10})})},M=function(e){var t,n=e.direction,r=e.scrollableContainerRef;null==r||null==(t=r.current)||t.scroll({left:(null==r?void 0:r.current.scrollLeft)+("left"===n?-200:200),behavior:"smooth"})},F=function(e){var t=e.direction,n=e.scrollableContainerRef,o="left"===t,i="right"===t;return(0,r.jsxs)("div",{className:(0,g.x)("absolute z-30 flex h-full items-center",{"left-0":o,"right-0":i}),children:[i&&(0,r.jsx)("div",{className:"from-primary h-full w-8 bg-gradient-to-l to-transparent"}),(0,r.jsx)("button",{type:"button",onClick:function(){return M({direction:t,scrollableContainerRef:n})},className:"bg-primary group flex h-full cursor-pointer items-center px-2 py-1",children:(0,r.jsx)(A.t,{size:"sm",className:(0,g.x)({"-rotate-90":i,"rotate-90":o}),color:"secondary",name:"chevron-down"})}),o&&(0,r.jsx)("div",{className:"from-primary h-full w-8 bg-gradient-to-r to-transparent"})]})},K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.noop,t=h().addSelectedFiles;return{handleFileSelection:function(n){t(n.map(function(e){return{file:e,preview:URL.createObjectURL(e),crop:{x:0,y:0},zoom:1}})),e()}}},B=n(562986),q=n(717526),U=function(e){var t=e.handleFileSelection,n=e.selectedFiles,r=e.uploadedFilesCount,o=(0,q.d)(),i="image_space.post_modal.steps.upload_images.errors",a=10-r,s=function(e){c(e.reduce(function(e,t){var n=t.errors[0].code;return e.includes(n)||e.push(n),e},[]))},c=function(e){e.forEach(function(e){var t={shouldShowCloseButton:!0,shouldUseProgress:!1};switch(e){case"file-invalid-type":return o.error((0,l.t)("".concat(i,".file_invalid_type")),t);case"file-too-large":return o.error((0,l.t)("".concat(i,".file_too_large")),t);case"too-many-files":return o.error((0,l.t)("".concat(i,".too_many_files"),{max_images:10}),t);default:return o.error((0,l.t)("".concat(i,".something_went_wrong")),t)}})},u=(0,B.VB)({onDrop:function(e,r){r.length>0?s(r):n.length+e.length>a?c(["too-many-files"]):t(e)},noClick:!0,accept:{"image/*":[".jpg",".jpeg",".png"]},maxFiles:a,maxSize:2e7,multiple:!0}),d=u.getRootProps,p=u.getInputProps,f=u.isDragAccept,m=u.isDragReject;return{getRootProps:d,getInputProps:p,isDragActive:f||m,open:u.open}},z=function(){var e=h(),t=e.setSelectedFiles,n=e.selectedFiles;return{removeImage:function(e){t(n.filter(function(t){return t!==e}))}}},W=function(e){var t=e.fileStates[e.index];return t?(0,r.jsx)("div",{className:"shrink-0 p-1",children:(0,r.jsxs)("div",{className:"bg-tertiary flex size-12 items-center justify-center rounded-md",children:["completed"===t.status&&(0,r.jsx)(A.t,{name:"circle-check-filled",size:"sm"}),"uploading"===t.status&&(0,r.jsx)(x,{percentage:t.progress,size:18,strokeWidth:1.5}),"error"===t.status&&(0,r.jsx)(v.o5,{variant:"label-xs",color:"primary",children:(0,l.t)("image_space.post_modal.steps.adjust_images.file_error")})]})}):null},$=function(e){var t=e.image,n=e.index,o=e.setCurrentImageIndex,i=e.currentImageIndex;return(0,r.jsx)("button",{type:"button",onPointerDown:function(){return o(n)},onClick:function(){return o(n)},className:(0,g.x)("shrink-0 cursor-pointer touch-none select-none rounded-md border-2 border-transparent p-0.5",{"border-secondary":n===i}),children:(0,r.jsx)("img",{loading:"eager",src:t.preview,className:"size-12 rounded-md object-cover",alt:t.file.name})},t.preview)};function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function G(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Q=function(e){var t=e.selectedFiles,n=e.setCurrentImageIndex,o=e.currentImageIndex,i=e.status,a=e.fileStates,s=e.editingImageSignedId,l=e.onDeleteAllImages,c=(0,u.useRef)(null),d=Z((0,L.Z)(),2),p=d[0],f=d[1],m=Z((0,L.Z)(),2),b=m[0],y=m[1],g=h(),v=g.uploadedImages,x=g.setSelectedFiles,j=U({handleFileSelection:K(function(){setTimeout(function(){return M({direction:"right",scrollableContainerRef:c})},200)}).handleFileSelection,selectedFiles:t,uploadedFilesCount:v.length}),_=j.getInputProps,w=j.open,O=z().removeImage,S=t.map(function(e){return G(H({},e),{id:e.preview})}),P=S[o],C=!s&&t.length+v.length<10;return(0,r.jsxs)("div",{className:"relative mt-6 flex w-full min-w-0 overflow-hidden px-1",children:[!f&&(0,r.jsx)(F,{direction:"left",scrollableContainerRef:c}),(0,r.jsxs)("div",{className:"scrollbar-hide m-auto flex items-center overflow-x-scroll px-1 pt-1",ref:c,"data-testid":"thumbnails-list",children:[(0,r.jsx)("div",{className:"size-px",ref:p}),"uploading"===i||"completed"===i?t.map(function(e,t){return(0,r.jsx)(W,{fileStates:a,index:t},e.preview)}):(0,r.jsx)(E.b,{axis:"horizontal",className:"flex shrink-0 items-center",draggingClassName:"opacity-60",items:S,mode:"flat",onItemsChange:function(e){var t=e.findIndex(function(e){return e.preview===(null==P?void 0:P.preview)});t>=0&&t!==o&&(0,R.flushSync)(function(){n(t)}),x(e.map(function(e){return{crop:e.crop,croppedAreaPixels:e.croppedAreaPixels,file:e.file,preview:e.preview,zoom:e.zoom}}))},restrictToContainer:!0,renderItem:function(e){var i=t.findIndex(function(t){return t.preview===e.preview}),a=t[i];return a?(0,r.jsxs)("div",{className:"group relative shrink-0","data-testid":"thumbnail-item",children:[(0,r.jsx)(T,{onClick:function(){O(a),1===t.length&&l()},index:i,currentImageIndex:o}),(0,r.jsx)(E.t,{render:function(e){var t=e.ref,s=e.style;return(0,r.jsx)("div",{ref:t,style:s,className:"cursor-grab active:cursor-grabbing",children:(0,r.jsx)($,{image:a,index:i,setCurrentImageIndex:n,currentImageIndex:o})})}})]}):(0,r.jsx)("div",{})}}),C&&(0,r.jsxs)("button",{type:"button",className:"hover:bg-secondary text-default ml-1 flex size-12 shrink-0 cursor-pointer items-center justify-center rounded-md border border-dashed",onClick:function(){return"uploading"!==i&&w()},children:[(0,r.jsx)("input",G(H({},_()),{"data-testid":"upload_more_images"})),(0,r.jsx)(A.t,{name:"plus",size:"sm"})]}),(0,r.jsx)("div",{className:"size-px",ref:b})]}),!y&&(0,r.jsx)(F,{direction:"right",scrollableContainerRef:c})]})},Y=n(136253);function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function X(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var ee=function(e){var t=e.currentImage,n=h().updateImage;return(0,r.jsxs)("div",{className:"text-light flex items-center justify-between",children:[(0,r.jsx)(j.K,{"aria-label":(0,l.t)("zoom_out"),icon:"minus",onClick:function(){var e=X(J({},(0,s.cloneDeep)(t)),{zoom:t.zoom-.1});e.zoom>=1&&n(e)},className:"mr-3",size:"sm",type:"button",variant:"ghost"}),(0,r.jsx)("div",{className:"flex h-4 w-32 items-center",children:(0,r.jsx)(Y.A,{value:[Math.round(10*t.zoom)/10],max:5,min:1,step:.1,onValueChange:function(e){var r="number"==typeof e?e:Number(e[0]);Number.isFinite(r)&&r!==t.zoom&&n(X(J({},(0,s.cloneDeep)(t)),{zoom:r}))}})}),(0,r.jsx)(j.K,{onClick:function(){var e=X(J({},(0,s.cloneDeep)(t)),{zoom:t.zoom+.1});e.zoom<=5&&n(e)},"aria-label":(0,l.t)("zoom_in"),className:"ml-3",icon:"plus",size:"sm",type:"button",variant:"ghost"})]})};function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var en=function(e){switch(e){case"completed":case"error":case"idle":case"uploading":return e;default:return"idle"}},er=function(e){var t,n=e.status,o=e.overallProgress,i=e.fileStates,a=e.editingImageSignedId,s=e.onDeleteAllImages,c=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return et(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return et(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=c[0],p=c[1],f=h(),m=f.selectedFiles,b=f.uploadedImages,y=m[d],j=en(n),_=(0,u.useRef)(m.length),w=_.current,O=m.length,P=0===b.length&&0===d;return(O>0&&d>O-1?p(m.length-1):O>w&&p(w),_.current=O,y)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:(0,g.x)("border-primary flex min-h-0 grow flex-col overflow-hidden rounded-md border",{"bg-tertiary":"uploading"===j}),children:["idle"===j&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N,{currentImage:y}),(0,r.jsxs)("div",{className:(0,g.x)("border-primary bg-secondary flex border-t px-4 py-3",{"justify-between":P,"justify-end":!P}),children:[P&&(0,r.jsx)(S,{}),(0,r.jsx)(ee,{currentImage:y})]})]}),("uploading"===j||"completed"===j)&&(0,r.jsxs)("div",{className:"mb-12 mt-1 flex aspect-video flex-col items-center justify-center gap-4",children:[(0,r.jsx)(x,{percentage:o,size:22,strokeWidth:1.75}),(0,r.jsx)(v.o5,{variant:"body-sm",color:"secondary",children:(0,l.t)("image_space.post_modal.steps.adjust_images.uploading")})]}),"error"===j&&(0,r.jsx)("div",{className:"mb-12 mt-1 flex aspect-video flex-col items-center justify-center gap-4",children:(0,r.jsx)(v.o5,{variant:"label-md",color:"primary",children:(0,l.t)("image_space.post_modal.steps.adjust_images.files_error")})})]}),(0,r.jsx)(Q,{currentImageIndex:d,selectedFiles:m,setCurrentImageIndex:p,fileStates:i,status:j,editingImageSignedId:a,onDeleteAllImages:s})]}):null},eo=n(172676);function ei(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var ea=function(e,t){var n,r,o,i;return e.width/e.height>t?(o=Math.round(e.height*t),i=e.height,n=Math.round((e.width-o)/2),r=0):(o=e.width,i=Math.round(e.width/t),n=0,r=Math.round((e.height-i)/2)),{x:n,y:r,width:o,height:i}},es=function(){var e=(0,u.useRef)([]),t=h(),n=t.selectedFiles,r=t.setSelectedFiles,o=t.galleryAspectRatio,i=t.setUploadedImages,a=t.addUploadedImages,s=t.uploadedImages,l=t.setIsImagesDirty,c=(0,eo.C)(),d=c.status,p=c.overallProgress,f=c.reset,m=c.fileStates,b=c.uploadFiles,y=(0,u.useCallback)(function(t){var r,o=e.current[t]||(null==(r=n[t])?void 0:r.croppedAreaPixels);if(!o)throw Error("Cropped area not found");return o},[n]),g=function(e,t){return{signed_id:e.response.signed_id,url:e.response.blob_url,original_url:e.response.blob_url,filename:e.response.filename,width:t.width,height:t.height}},v=(0,u.useCallback)(function(e){if(e){var t=m[0];if(!t)throw Error("Uploaded image not found");var n=g(t,y(0));i(s.map(function(t){return t.signed_id===e?ei({},t,n):t}))}else a(m.map(function(e,t){return g(e,y(t))}));l(!0)},[a,m,y,l,i,s]);return{uploadImages:function(){if(!o)throw Error("Gallery aspect ratio not set");Promise.all(n.map(function(e){return new Promise(function(t,n){var r=new Image,i=document.createElement("canvas"),a=i.getContext("2d"),s=e.croppedAreaPixels;if(!a)return void n(Error("Canvas context could not be created"));s&&parseFloat((s.width/s.height).toFixed(2))!==parseFloat(o.toFixed(2))&&(s=void 0);var l=URL.createObjectURL(e.file);r.onload=function(){URL.revokeObjectURL(l);var c=s||ea(r,o);i.width=c.width,i.height=c.height,a.drawImage(r,c.x,c.y,c.width,c.height,0,0,c.width,c.height),i.toBlob(function(r){r?t({croppedImage:new File([r],e.file.name,{type:"image/jpeg",lastModified:new Date().getTime()}),croppedArea:c}):n(Error("Image could not be cropped"))},"image/jpeg")},r.onerror=function(){URL.revokeObjectURL(l),n(Error("Image could not be loaded"))},r.src=l})})).then(function(t){e.current=t.map(function(e){return e.croppedArea}),r(n.map(function(e,n){var r,o;return r=ei({},e),o=o={croppedAreaPixels:t[n].croppedArea},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r})),b(t.map(function(e){return e.croppedImage}))}).catch(function(e){var t,n=(null!=(t=Error)&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t)?e.message:String(e);throw Error("Error processing images: ".concat(n))})},overallProgress:p,resetUploads:f,status:d,fileStates:m,updateStoredImages:v}},el=function(e){var t=e.onClose,n=e.onCompleted,o=void 0===n?s.noop:n,i=e.isOnTop,a=void 0!==i&&i,f=e.editingImageSignedId,m=e.open,b=(0,d.P)(),y=(0,u.useRef)(null),g=h(),v=g.setCurrentStep,x=g.resetSelectedFiles,j=es(),_=j.uploadImages,w=j.overallProgress,O=j.resetUploads,S=j.status,P=j.fileStates,C=j.updateStoredImages,k=function(){x(),t()},I=function(){x(),a?t():v(p.UT.UPLOAD_IMAGES)};return(0,u.useEffect)(function(){if("completed"!==S&&"error"!==S){y.current=null;return}y.current!==S&&(y.current=S,"completed"===S?(C(f),O(),x(),v(p.UT.CREATE_POST),o(),a&&t()):"error"===S&&O())},[f,a,t,o,x,O,v,S,C]),(0,r.jsx)(c.a.Root,{open:void 0===m||m,onOpenChange:function(e){e||k()},size:b?"full-screen":"lg",children:(0,r.jsxs)(c.a.Content,{children:[(0,r.jsx)(c.a.Header,{title:(0,l.t)("image_space.post_modal.steps.adjust_images.title")}),(0,r.jsx)(c.a.Body,{customLayout:!0,children:(0,r.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:(0,r.jsx)(er,{status:S,fileStates:P,overallProgress:w,editingImageSignedId:f,onDeleteAllImages:I})})}),(0,r.jsx)(c.a.Footer,{secondaryAction:{label:(0,l.t)("cancel"),onClick:I,shouldCloseModal:!1},primaryAction:{label:a?(0,l.t)("save"):(0,l.t)("next"),onClick:function(){return _()},disabled:"uploading"===S,loading:"uploading"===S}})]})})},ec=n(668345),eu=n(519104),ed=n(361971),ep=n(361287),ef=n(258752),em=n(68176);function eb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function ey(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var eh=function(e){var t;return{tiptap_body:e.tiptap_body,hide_meta_info:e.hide_meta_info,is_comments_disabled:e.is_comments_disabled,is_comments_closed:e.is_comments_closed,is_liking_disabled:e.is_liking_disabled,is_truncation_disabled:e.is_truncation_disabled,pin_to_top:e.pin_to_top,pinned_at:e.pinned_at,hide_from_featured_areas:e.hide_from_featured_areas,gallery:{downloadable_images:null==(t=e.gallery)?void 0:t.downloadable_images},slug:e.slug,user_id:e.user_id,status:e.status,published_at:e.published_at,topics:ej(e.topics)}},eg=function(e){var t=e.payload,n=e.space,r=e.uploadedImages;return{post:ey(eb({},(0,s.omit)(t,["gallery"])),{space_id:n.id,gallery_attributes:ey(eb({},t.gallery||{}),{images_attributes:r.map(function(e){return{id:e.id,image:e.signed_id,width:e.width,height:e.height}})})})}},ev=function(e){if(e){if(null!=(t=Date)&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t)return Number.isNaN(e.getTime())?void 0:e;if("string"==typeof e||"number"==typeof e){var t,n=new Date(e);return Number.isNaN(n.getTime())?void 0:n}}},ex=function(e){return(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"&&null!==e},ej=function(e){return Array.isArray(e)?e.flatMap(function(e){return"number"==typeof e?[e]:ex(e)&&"number"==typeof e.id?[e.id]:[]}):[]},e_=function(e){return ex(e)&&"id"in e&&"gallery"in e?e:void 0},ew=function(e){var t=e_(e);if(!t)throw Error("Image post not found");return t},eO=function(e){var t=e.space,n=e.post,r=e.onSuccess,o=(0,q.d)(),i=h(),a=i.setIsSubmitting,s=i.uploadedImages,c=!!n.slug,u=(0,ef.n_)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({mutationFn:function(e){if(!t)throw Error("Space not found");return n.slug?(0,em.h7)({spaceId:t.id,postSlug:n.slug,payload:e}):(0,em.Ql)({spaceId:t.id,payload:e})}},{onSuccess:function(e){a(!1),r(e),o.success((0,l.t)(c?"quick_post.toasts.changes_saved":"quick_post.toasts.".concat(e.status,"_saved")))},onError:function(e){a(!1);var t="string"==typeof e.errorDetails?e.errorDetails:e.message;o.error(t,{shouldShowCloseButton:!0,shouldUseProgress:!1})}})).mutate;return{onSubmit:function(e){t?(a(!0),u(eg({payload:e,space:t,uploadedImages:s}))):o.error((0,l.t)("something_went_wrong"),{shouldShowCloseButton:!0,shouldUseProgress:!1})}}},eS=n(328187),eP=n(714638),eC=function(e){var t=e.onClose,n=e.onCompleted,o=void 0===n?s.noop:n,i=e.isOnTop,a=e.editingImageSignedId;return(0,r.jsx)(el,{open:!0,onClose:t,onCompleted:o,isOnTop:void 0!==i&&i,editingImageSignedId:a})};function ek(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function eI(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var eN=function(e){var t=e.isDragActive,n=e.getRootProps,o=e.getInputProps,i=e.open,a=e.className,s="image_space.post_modal.steps.upload_images",c=(0,l.t)("".concat(s,".drag_and_drop_up_to_n_images"),{max_images:10});return(0,r.jsx)("div",eI(ek({},n()),{className:"group flex min-h-0 flex-1 size-full",children:(0,r.jsxs)("button",{type:"button",className:(0,g.x)("border-primary flex p-6 flex-1 flex-col items-center justify-center rounded-xl border border-dashed text-center",{"bg-secondary":t},a),onClick:i,children:[(0,r.jsx)("input",eI(ek({},o()),{"data-testid":"upload_multi_image"})),(0,r.jsx)("div",{className:"bg-secondary mb-4 flex size-11 items-center justify-center rounded-full",children:(0,r.jsx)(A.t,{name:"arrow-box-up",size:"sm"})}),(0,r.jsx)(v.o5,{variant:"label-md",color:"primary",children:c}),(0,r.jsx)("div",{className:"mt-1",children:(0,r.jsx)(v.o5,{variant:"body-sm",color:"tertiary",children:(0,l.t)("".concat(s,".recommendation"))})})]})}))};function eA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eE=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,u.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return eA(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eA(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],o=t[1],i=h(),a=i.selectedFiles,s=i.uploadedImages,l=U({handleFileSelection:K(function(){return o(!0)}).handleFileSelection,selectedFiles:a,uploadedFilesCount:s.length}),c=l.isDragActive,d=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(l,["isDragActive"]);return(0,r.jsxs)("div",{className:"flex size-full flex-col items-center justify-center rounded-md text-center",children:[(0,r.jsx)(eN,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({isDragActive:c},d)),n&&(0,r.jsx)(eC,{onClose:function(){return o(!1)},isOnTop:!0})]})},eR=n(70719),eL=function(){var e=h(),t=e.setUploadedImages,n=e.uploadedImages,r=e.setIsImagesDirty;return{removeImage:function(e){t(n.filter(function(t){return t!==e})),r(!0)}}};function eD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eT(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function eM(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){eT(i,r,o,a,s,"next",e)}function s(e){eT(i,r,o,a,s,"throw",e)}a(void 0)})}}function eF(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var eK=function(e){var t=e.url,n=e.fileName,r=e.contentType;return eM(function(){return eF(this,function(e){switch(e.label){case 0:return[4,fetch(t,{cache:"no-store"})];case 1:return[4,e.sent().blob()];case 2:return[2,new File([e.sent()],n,{type:r,lastModified:new Date().getTime()})]}})})()},eB=function(e){var t,n=e.currentImage,o=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eD(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eD(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1],s=eL().removeImage,c=K(function(){return a(!0)}).handleFileSelection,d="image_space.post_modal.steps.create_post.image_options",p=[{label:(0,l.t)("".concat(d,".crop_image")),icon:"image",onClick:function(){eM(function(){return eF(this,function(e){switch(e.label){case 0:return[4,eK({url:n.original_url,fileName:n.filename,contentType:"image/jpeg"})];case 1:return c([e.sent()]),[2]}})})()}},{label:(0,l.t)("".concat(d,".remove")),icon:"trash-can",onClick:function(){s(n)}}];return(0,r.jsxs)(r.Fragment,{children:[i&&(0,r.jsx)(eC,{onClose:function(){return a(!1)},isOnTop:!0,editingImageSignedId:n.signed_id}),(0,r.jsx)("div",{className:"absolute right-4 top-4",children:(0,r.jsx)(eR.t,{align:"end",options:p,side:"bottom",trigger:(0,r.jsx)(j.K,{"aria-label":(0,l.t)("".concat(d,".label")),icon:"dot-menu",size:"sm",type:"button",variant:"outline"})})})]})};function eq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eq(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ez="flex w-full items-center justify-center overflow-hidden lg:h-auto lg:min-h-0 lg:flex-1",eW=function(e){var t=e.currentImageIndex,n=eU((0,u.useState)(!0),2),o=n[0],i=n[1],a=eU((0,u.useState)(),2),s=a[0],l=a[1],c=(0,u.useRef)(null),d=h(),p=d.uploadedImages,f=d.galleryAspectRatio,m=d.setGalleryAspectRatio,b=p[t],y=b?b.width/b.height:void 0;if((0,u.useEffect)(function(){!f&&y&&m(y)},[f,y,m]),(0,u.useEffect)(function(){i(!0)},[null==b?void 0:b.url]),(0,u.useEffect)(function(){var e=c.current;if(e){var t=function(){var t=e.getBoundingClientRect(),n=t.width,r=t.height;n>0&&r>0&&l(n/r)};t();var n=new ResizeObserver(t);return n.observe(e),function(){return n.disconnect()}}},[]),!b)return(0,r.jsx)("div",{className:ez,children:(0,r.jsx)(eE,{})});var v=null!=y?y:1,x=s?v>=s:v>=1;return(0,r.jsx)("div",{ref:c,className:ez,children:(0,r.jsxs)("div",{className:(0,g.x)("relative max-h-full max-w-full",{"w-full":x,"h-full":!x}),style:{aspectRatio:v},children:[!o&&(0,r.jsx)(eB,{currentImage:b}),(0,r.jsx)("img",{loading:"eager",src:b.url,alt:b.filename,onLoad:function(){return i(!1)},className:(0,g.x)("block size-full rounded-md object-contain",{invisible:o})})]})})},e$=n(617593);function eV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eH=function(e){var t,n=e.image,o=e.index,i=e.currentImageIndex,a=e.onClick,s=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(!0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eV(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eV(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1];return(0,r.jsxs)("button",{type:"button",onPointerDown:function(){return a(o)},onClick:function(){return a(o)},className:(0,g.x)("relative cursor-pointer touch-none select-none rounded-md border-2 border-transparent p-0.5",{"size-12":l,"border-secondary":o===i&&!l}),children:[l&&(0,r.jsx)(e$.E,{shape:"square",className:"absolute inset-0 size-full rounded-md"}),(0,r.jsx)("img",{loading:"eager",src:n.url,className:(0,g.x)("size-12 rounded-md object-cover",{hidden:l}),onLoad:function(){return c(!1)},onError:function(){return c(!1)},alt:n.filename})]})};function eG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function eQ(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function eY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eG(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eJ=function(e){var t=e.setCurrentImageIndex,n=e.currentImageIndex,o=eY((0,u.useState)(!1),2),i=o[0],a=o[1],s=(0,u.useRef)(null),l=eY((0,L.Z)(),2),c=l[0],d=l[1],p=eY((0,L.Z)(),2),f=p[0],m=p[1],b=h(),y=b.uploadedImages,g=b.setUploadedImages,v=b.selectedFiles,x=b.resetSelectedFiles,j=b.setIsImagesDirty,_=U({handleFileSelection:K(function(){return a(!0)}).handleFileSelection,selectedFiles:v,uploadedFilesCount:y.length}),w=_.getInputProps,O=_.open,S=eL().removeImage,P=y.map(function(e){return eQ(eZ({},e),{id:e.signed_id,originalId:e.id})}),C=P[n];return(0,r.jsxs)("div",{className:"relative mt-6 flex w-full min-w-0 shrink-0 overflow-hidden px-1",children:[!d&&(0,r.jsx)(F,{direction:"left",scrollableContainerRef:s}),(0,r.jsxs)("div",{className:"scrollbar-hide m-auto flex max-w-full items-center overflow-x-auto px-1 pt-1",ref:s,children:[(0,r.jsx)("div",{className:"size-px",ref:c}),(0,r.jsx)(E.b,{axis:"horizontal",className:"flex shrink-0 items-center",draggingClassName:"opacity-60",items:P,mode:"flat",onItemsChange:function(e){var r=e.findIndex(function(e){return e.signed_id===(null==C?void 0:C.signed_id)});r>=0&&r!==n&&(0,R.flushSync)(function(){t(r)}),g(e.map(function(e){var t=e.originalId;return eQ(eZ({},function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["originalId"])),{id:t})})),j(!0)},restrictToContainer:!0,renderItem:function(e){var o=y.findIndex(function(t){return t.signed_id===e.signed_id}),i=y[o];return i?(0,r.jsxs)("div",{className:"group relative shrink-0","data-testid":"thumbnail-item",children:[(0,r.jsx)(T,{onClick:function(){return S(i)},index:o,currentImageIndex:n}),(0,r.jsx)(E.t,{render:function(e){var a=e.ref,s=e.style;return(0,r.jsx)("div",{ref:a,style:s,className:"cursor-grab active:cursor-grabbing",children:(0,r.jsx)(eH,{image:i,index:o,currentImageIndex:n,onClick:t})})}})]}):(0,r.jsx)("div",{})}}),y.length<10&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",className:"hover:bg-secondary text-default ml-1 flex size-12 shrink-0 cursor-pointer items-center justify-center rounded-md border border-dashed",onClick:function(){x(),O()},children:[(0,r.jsx)("input",eZ({},w())),(0,r.jsx)(A.t,{name:"plus",size:"sm"})]}),i&&(0,r.jsx)(eC,{onClose:function(){return a(!1)},onCompleted:function(){return setTimeout(function(){return M({direction:"right",scrollableContainerRef:s})},200)},isOnTop:!0})]}),(0,r.jsx)("div",{className:"size-px",ref:f})]}),!m&&(0,r.jsx)(F,{direction:"right",scrollableContainerRef:s})]})};function eX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var e0=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,u.useState)(0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return eX(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eX(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],o=t[1],i=h().uploadedImages,a=(0,u.useRef)(i.length),s=a.current,l=i.length;return l>0&&n>l-1?o(i.length-1):l>s&&o(s),a.current=l,(0,r.jsxs)("div",{className:"flex w-full min-w-0 flex-col lg:h-full lg:min-h-0",children:[(0,r.jsx)(eW,{currentImageIndex:n}),i.length>0&&(0,r.jsx)(eJ,{currentImageIndex:n,setCurrentImageIndex:o})]})},e1=n(341409),e2=n(603229),e3=n(735815);function e4(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var e5=function(e){var t,n,o=e.onCancel,a=e.post,s=e.setValue,c=e.watch,d=(0,u.useRef)(null),p=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return e4(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e4(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),f=p[0],m=p[1],b=h(),y=b.isSubmitting,g=b.uploadedImages,v=(0,i.Ir)().data,x=c(),j=x.published_at,_=x.status,w=x.topics,O=ev(j),S=(null==v?void 0:v.require_topic_selection)&&(null!=(n=null==w?void 0:w.length)?n:0)<=0,P=!!(null==a?void 0:a.id),C=(0,eS.Rj)(a),k=g.length>0&&!y&&!S&&("scheduled"!==_||!!O),I=(0,u.useMemo)(function(){return{before:new Date}},[]),N=(0,u.useCallback)(function(){m(!0)},[]),A=(0,u.useCallback)(function(e){var t;s("published_at",null!=(t=null==e?void 0:e.toISOString())?t:null,{shouldDirty:!0})},[s]),E=(0,u.useCallback)(function(e){"scheduled"===e.value?N():(s("status",e.value,{shouldDirty:!0}),m(!1),A(null))},[N,s,A]),R=(0,e2.P)({isSubmitting:y,onSelectAction:E,status:_}).getModalPrimaryAction,L=!!(v&&(0,e1.WY)(v)&&!C),D="scheduled"===_&&!!O,T=L&&!D,M=(0,r.jsxs)(r.Fragment,{children:[L&&(0,r.jsx)("div",{ref:d,"aria-hidden":!0,className:"absolute bottom-4 right-6 size-px"}),T&&(0,r.jsx)(e3.s,{anchor:d,disabledDays:I,onOpenChange:m,onSave:function(e){A(e),s("status","scheduled",{shouldDirty:!0})},open:f,value:O})]});return{footerProps:{secondaryAction:{label:(0,l.t)("cancel"),onClick:o,shouldCloseModal:!1},primaryAction:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},R({disabled:!k,isEdit:P,shouldShowActionSelector:L,type:"submit"}))},supportContent:M}},e6=n(927561),e8=n(723781),e9=n(531404),e7=n(187028),te=function(e){var t=e.children,n=e.selectorQuery;if("u"<typeof document)return null;var r=document.querySelector(n);return r?(0,R.createPortal)(t,r):null},tt=function(e){var t=e.editor,n=e.portalId;return t?(0,r.jsx)(te,{selectorQuery:"#".concat(n),children:(0,r.jsx)("div",{className:"flex items-center md:pt-2",children:(0,r.jsx)(e7.x,{as:"button",buttonAriaLabel:(0,l.t)("emoji_picker"),onEmojiSelect:function(e){e.emoji&&t.chain().focus().insertContent(e.emoji).run()},target:(0,r.jsx)(A.t,{name:"emoji-smiley",size:"md","aria-hidden":"true"}),targetWrapperClassName:"size-9 items-center justify-center rounded-lg text-primary transition-colors hover:bg-secondary focus-visible:shadow-focus"})})}):null},tn=["blockquote","poll","embeds","slash_commands","file","image","horizontal_rule","code_block","headings","cta"],tr=function(e){return(0,r.jsx)(tt,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))},to=function(e){var t,n=e.space,o=e.post,i=h().setIsFormDirty,a=(0,ed.xW)().formState.isDirty;return(0,u.useEffect)(function(){i(a)},[a,i]),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.o5,{variant:"label-sm",color:"primary",children:(0,l.t)("image_space.post_modal.steps.create_post.caption_label")}),(0,r.jsxs)("div",{className:"!border-solid !border-primary !mt-3 !min-w-full !rou
1nded-md !border !p-3",children:[(0,r.jsx)(e9.P,{placeholder:(0,l.t)("image_space.post_modal.steps.create_post.caption_placeholder"),name:"tiptap_body.body",sgidToObjectMap:(null==o||null==(t=o.tiptap_body)?void 0:t.sgids_to_object_map)||{},spaceId:null==n?void 0:n.id,editorClassName:"min-w-full h-20 overflow-y-auto",disabledExtensions:tn,shouldShowTextModifiersMenu:!1,toolbars:[{portalId:"create-image-post-toolbar",component:tr}]}),(0,r.jsx)("div",{id:"create-image-post-toolbar"})]})]})},ti=n(116240),ta=n(143786),ts=function(e){var t=e.space,n=(0,ed.xW)().control,o=!!t&&(0,e1.WY)(t);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e6.l.Item,{variant:"extra-bottom-margin",className:"!pt-3",hideBorder:!0,name:"slug",fullWidth:!0,translationRoot:"post",hidePlaceholder:!0,hideDescription:!0,tooltipText:(0,l.t)("post.slug_description"),children:(0,r.jsx)(e6.l.Input,{name:"slug",autoComplete:"off"})}),o&&(0,r.jsx)(e6.l.Item,{variant:"extra-bottom-margin",className:"!pt-4",hideBorder:!0,name:"user_id",labelClassName:"!text-label-sm mb-2",translationRoot:"post",fullWidth:!0,hideDescription:!0,tooltipText:(0,l.t)("post.user_id_description"),children:(0,r.jsx)(ed.xI,{control:n,name:"user_id",render:function(e){var t=e.field,n=t.onChange,o=t.value;return(0,r.jsx)(ta.y,{direction:"up",name:"user_id",onChange:function(e){return n(e.value)},value:"number"==typeof o?o:null,valueField:"user_id"})}})})]})},tl=n(737721);function tc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tu=function(e){var t=e.space,n=e_((0,ep.W)().post),o=Object.entries({hide_meta_info:!0,is_comments_disabled:!0,is_comments_closed:!(0,(0,ed.xW)().watch)("is_comments_disabled"),is_liking_disabled:!0,is_truncation_disabled:!0,pin_to_top:!!((null==n?void 0:n.id)&&(0,eS.Rj)(n)),hide_from_featured_areas:!(null==t?void 0:t.hide_from_featured_areas),"gallery.downloadable_images":!0}).flatMap(function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return tc(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tc(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0];return t[1]?[n]:[]});return(0,r.jsx)(r.Fragment,{children:o.map(function(e){return(0,r.jsx)(e6.l.Item,{id:"post_".concat(e),name:e,label:(0,l.t)("post.".concat(e)),labelClassName:"!font-normal !p-0",className:"mb-3 !p-0",hideBorder:!0,hideDescription:!0,inlineReverse:!0,children:(0,r.jsx)(tl.B,{name:e,variant:"small"})},e)})})},td=function(e){var t=e.space;return(0,r.jsx)(e8.a,{className:"[&_[data-options-content]>div>div]:!pb-0 [&_[data-options-trigger]]:!py-0",children:(0,r.jsx)(ti.n.Root,{children:(0,r.jsxs)(ti.n.Item,{value:"more-options",style:{borderBottomWidth:0},children:[(0,r.jsx)(ti.n.Trigger,{"data-options-trigger":"",children:(0,l.t)("image_space.post_modal.steps.create_post.more_options_label")}),(0,r.jsx)(ti.n.Content,{"data-options-content":"",children:(0,r.jsxs)("div",{className:"pt-6",children:[(0,r.jsx)(tu,{space:t}),(0,r.jsx)(ts,{space:t})]})})]})})})},tp=n(889828);function tf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tm=function(e){var t,n=e.post,o=e.space,i=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return tf(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tf(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1],c=(0,ed.xW)().setValue,d=(0,ed.FH)({name:"status"}),p=ev((0,ed.FH)({name:"published_at"})),f=(0,u.useMemo)(function(){return{before:new Date}},[]),m=(0,e1.WY)(o)&&!(0,eS.Rj)(n),b=(0,u.useCallback)(function(e){var t;c("published_at",null!=(t=null==e?void 0:e.toISOString())?t:null,{shouldDirty:!0})},[c]);if("scheduled"!==d||!p)return null;var y=(0,tp.w)({dateTime:p,format:"short_date_at_short_time"});return(0,r.jsx)(e8.a,{children:(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(A.t,{name:"clock-dash",size:"sm"}),(0,r.jsx)(v.o5,{variant:"label-sm",color:"primary",children:(0,l.t)("quick_post_v2.post_scheduled")})]}),m&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(e3.s,{disabledDays:f,onOpenChange:s,onSave:function(e){b(e),c("status","scheduled",{shouldDirty:!0})},open:a,side:"bottom",trigger:(0,r.jsx)(j.K,{"aria-label":(0,l.t)("edit"),icon:"edit",size:"sm",type:"button",variant:"ghost"}),value:p}),(0,r.jsx)(j.K,{"aria-label":(0,l.t)("delete"),icon:"trash-can",onClick:function(){b(null),c("status","draft",{shouldDirty:!0})},size:"sm",type:"button",variant:"ghost"})]})]}),(0,r.jsx)(v.o5,{variant:"body-sm",color:"primary",children:y})]})})},tb=n(928327),ty=n(570465),th=n(345115);function tg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tg(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tx=function(e){var t=e.spaceId,n=e.creatable,o=e.inline,i=(0,ed.xW)().control,a=(0,ed.as)({control:i,name:"topics"}).field,s=tv((0,u.useState)(""),2),c=s[0],d=s[1],p=tv((0,u.useState)(!1),2),f=p[0],m=p[1],b=ej(a.value),y=(0,ty.h)({spaceId:t,value:b,onChange:a.onChange,creatable:void 0!==n&&n}),h=y.createTopic,v=y.creatable,x=y.dropdownOptions,j=y.handleValueChange,_=y.isLoading,w=y.onInputValueChange,O=y.selectedOptions,S=y.shouldShow,P=c.trim().length>0,C=_||x.length>0||P;(0,u.useEffect)(function(){f&&!C&&m(!1)},[C,f]);var k=(0,u.useCallback)(function(e){d(e),w(e),e.trim().length>0&&m(!0)},[w]),I=(0,u.useCallback)(function(e){m(e&&C)},[C]);return S?(0,r.jsx)("div",{className:(0,g.x)("flex w-full min-w-0",!(void 0!==o&&o)&&"py-2","[&_[data-closed]]:hidden"),onKeyDownCapture:function(e){"Enter"!==e.key||f||e.preventDefault()},children:(0,r.jsx)(th.K,{"data-testid":"topics-list",className:"flex-1",naked:!0,icon:"tag",open:f,onOpenChange:I,side:"top",align:"start",options:x,value:O,onValueChange:j,inputValue:c,onInputValueChange:k,isLoading:_,maxSelections:tb.P,placeholder:(0,l.t)("quick_post_v2.topics.search",{count:tb.P}),searchPlaceholder:(0,l.t)("search_v2.filters.search_topics"),emptyMessage:(0,l.t)("quick_post_v2.topics.no_results"),creatable:v,onCreateOption:function(e){return h(e,{onSuccess:function(){return d("")}})},loadingMessage:(0,l.t)("quick_post_v2.topics.loading")})}):null},tj=function(e){var t=e.post,n=e.showScheduledPostBox,o=e.space,i=!!o&&(0,e1.wp)(o);if(!o)return null;var a=Number(o.topics_count)>0||i;return(0,r.jsxs)("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[(void 0===n||n)&&(0,r.jsx)(tm,{post:t,space:o}),(0,r.jsxs)(e8.a,{children:[(0,r.jsx)(to,{space:o,post:t}),a&&(0,r.jsx)(e6.l.Item,{name:"topics",hideDescription:!0,hideBorder:!0,label:(0,l.t)("image_space.post_modal.steps.create_post.topics_label"),labelClassName:"!mb-3 !text-label-sm",children:(0,r.jsx)("div",{className:"rounded-md border border-primary px-2 py-1.5",children:(0,r.jsx)(tx,{spaceId:String(o.id),creatable:i,inline:!0})})})]}),(0,e1.wp)(o)&&(0,r.jsx)(td,{space:o})]})};function t_(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function tw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function tO(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var tS="image-post-modal-create-post-form",tP=function(e){var t=e.open,n=e.onClose,o=e.onPostChange,a=e.shouldSkipRedirectAfterSubmit,s=ew((0,ep.W)().post),u=(0,i.Ir)().data,d=(0,ec.q)(),p=(0,D.d_)(),f=(0,D.J6)(),m=(0,ed.mN)({defaultValues:eh(s)}),b=(0,eP.Z)({isLgScreen:f,isXlScreen:p}),y=(0,eu.Z)(),h=eO({space:u,post:s,onSuccess:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return o(e),[4,d(e.id)];case 1:return t.sent(),n(!0),a||y({href:(0,eS.Lo)({post:e})}),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){t_(i,r,o,a,s,"next",e)}function s(e){t_(i,r,o,a,s,"throw",e)}a(void 0)})})()}}).onSubmit,g=e5({post:s,onCancel:function(){return n(!1)},watch:m.watch,setValue:m.setValue}),v=g.footerProps,x=g.supportContent;return(0,r.jsx)(c.a.Root,{open:t,onOpenChange:function(e){e||n(!1)},size:b,children:(0,r.jsxs)(c.a.Content,{children:[x,(0,r.jsx)(c.a.Header,{title:(0,l.t)("".concat("image_space.post_modal.steps.create_post",".").concat(s.id?"edit":"create","_title"))}),(0,r.jsx)(c.a.Body,{customLayout:f,children:(0,r.jsx)(ed.Op,tO(tw({},m),{children:(0,r.jsxs)("form",{id:tS,className:"flex min-h-0 flex-1 flex-col gap-3 lg:gap-0",onSubmit:m.handleSubmit(h),children:[!f&&u&&(0,r.jsx)(tm,{post:s,space:u}),(0,r.jsxs)("div",{className:"grid min-h-0 gap-6 lg:h-[455px] lg:grid-cols-[minmax(0,35fr)_minmax(0,75fr)] xl:h-[568px] xl:grid-cols-[minmax(0,30fr)_minmax(0,70fr)]",children:[(0,r.jsx)("div",{className:"w-full min-w-0 pb-4 lg:order-2 lg:flex lg:min-h-0 lg:pb-0",children:(0,r.jsx)(e0,{})}),(0,r.jsx)("div",{className:"w-full min-w-0 pb-4 lg:order-1 lg:min-h-0 lg:overflow-y-auto lg:pb-0",children:(0,r.jsx)(tj,{post:s,space:u,showScheduledPostBox:f})})]})]})}))}),(0,r.jsx)(c.a.Footer,tO(tw({},v),{primaryAction:tO(tw({},v.primaryAction),{form:tS})}))]})})},tC=function(e,t){var n=h(),r=n.setCurrentStep,o=n.setUploadedImages,i=null==e?void 0:e.gallery;(0,u.useEffect)(function(){var e;t&&(r(i?p.UT.CREATE_POST:p.UT.UPLOAD_IMAGES),o(null!=(e=null==i?void 0:i.images)?e:[]))},[i,t,r,o])},tk=n(527374),tI=function(e){var t=(0,tk.C)({spaceId:null==e?void 0:e.space_id,postSlug:null==e?void 0:e.slug,disabled:!!(e&&"gallery"in e&&e.gallery)}),n=t.post,r=t.isInitialLoading,o=(0,eS.AF)(n)?n:void 0,i=(0,eS.AF)(e)?e:void 0;return r?null:o||i||{id:null,gallery:null}},tN=function(e){var t=e.open,n=e.onClose,o=e.onSelection,i=(0,d.P)(),a=h(),s=a.selectedFiles,u=a.uploadedImages,p=U({handleFileSelection:K(o).handleFileSelection,selectedFiles:s,uploadedFilesCount:u.length}),f=p.isDragActive,m=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(p,["isDragActive"]);return(0,r.jsx)(c.a.Root,{open:t,onOpenChange:function(e){e||n()},size:i?"full-screen":"lg",children:(0,r.jsxs)(c.a.Content,{children:[(0,r.jsx)(c.a.Header,{title:(0,l.t)("image_space.post_modal.steps.create_post.create_title")}),(0,r.jsx)(c.a.Body,{customLayout:!0,children:(0,r.jsx)("div",{className:"flex h-[min(32rem,calc(100vh-8rem))] min-h-0 cursor-pointer flex-col rounded-b-lg",children:(0,r.jsx)(eN,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({isDragActive:f},m))})})]})})},tA=function(e){var t=e.spaceId,n=e.open,c=e.onOpenChange,u=e.onClose,d=void 0===u?s.noop:u,f=e.currentPost,m=e.onPostChange,b=void 0===m?s.noop:m,y=e.shouldSkipRedirectAfterSubmit,g=h(),v=g.currentStep,x=g.setCurrentStep,j=g.reset,_=g.isFormDirty,w=g.isImagesDirty,O=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||!(_||w)||confirm((0,l.t)("quick_post_v2.accidental_leave_confirmation")))&&(j(),c(!1),d())},S=tI(f);if(tC(S,n),!n||!S)return null;var P=S.id?[[S.id]]:[];return(0,r.jsx)(i.Yy,{spaceId:t,children:(0,r.jsx)(a.U,{perPagePostIds:P,children:(0,r.jsxs)(o.m,{post:S,children:[v===p.UT.UPLOAD_IMAGES&&(0,r.jsx)(tN,{open:n,onClose:O,onSelection:function(){return x(p.UT.ADJUST_IMAGES)}}),v===p.UT.ADJUST_IMAGES&&(0,r.jsx)(el,{open:n,onClose:O}),v!==p.UT.UPLOAD_IMAGES&&v!==p.UT.ADJUST_IMAGES&&(0,r.jsx)(tP,{open:n,onClose:O,onPostChange:b,shouldSkipRedirectAfterSubmit:void 0!==y&&y})]})})})}},786639(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o,i={UPLOAD_IMAGES:"upload_images",ADJUST_IMAGES:"adjust_images",CREATE_POST:"create_post"},a={SQUARE:"square",LANDSCAPE:"landscape",PORTRAIT:"portrait"},s=(r(o={},a.SQUARE,1),r(o,a.LANDSCAPE,16/9),r(o,a.PORTRAIT,.8),o);n.d(t,{C1:()=>s,UT:()=>i,hR:()=>a})},714638(e,t,n){"use strict";var r=function(e){var t=e.isLgScreen;return e.isXlScreen?"2xl":t?"xl":"full-screen"};n.d(t,{Z:()=>r})},668345(e,t,n){"use strict";var r=n(398061),o=n(230763),i=n(146917),a=n(933578),s=n(648397);function l(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var c=function(){var e=(0,r.Ir)().data,t=(0,o.Il)(),n=(0,s.o)().invalidatePostsApiQueries;return(0,a.useCallback)(function(r){var o;return(o=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(o){switch(o.label){case 0:return(null==e?void 0:e.id)&&i.w.spacePosts(e.id),i.w.feedPosts(),(null==t?void 0:t.public_uid)&&i.w.profilePosts(t.public_uid),[4,i.w.postDetails(r)];case 1:return o.sent(),[4,n()];case 2:return o.sent(),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,r){var i=o.apply(e,t);function a(e){l(i,n,r,a,s,"next",e)}function s(e){l(i,n,r,a,s,"throw",e)}a(void 0)})})()},[null==e?void 0:e.id,null==t?void 0:t.public_uid,n])};n.d(t,{q:()=>c})},619956(e,t,n){"use strict";var r=n(391426),o=n(927561),i=n(230763),a=n(361971),s=n(417980),l=n(3898),c=function(){var e=(0,a.FH)({name:"post_type"}),t=(0,i.Od)().currentCommunity,n=!!((null==t?void 0:t.ios_app_enabled)||(null==t?void 0:t.has_branded_app));if("chat"==e&&!n||"course"==e||"members"==e)return null;var c=[{label:(0,s.t)("spaces.form.create.notification_types.email"),description:(0,s.t)("spaces.form.create.notification_by_space_type.".concat(e,".email_description")),value:"default_notification_setting"},{label:(0,s.t)("spaces.form.create.notification_types.inapp"),description:(0,s.t)("spaces.form.create.notification_by_space_type.".concat(e,".inapp_description")),value:"default_in_app_notification_setting"},{label:(0,s.t)("spaces.form.create.notification_types.mobile"),description:(0,s.t)("spaces.form.create.notification_by_space_type.".concat(e,".mobile_description")),value:"default_mobile_notification_setting"}],u="chat"==e?(0,s.t)("spaces.form.create.notification_types.chat_label"):(0,s.t)("spaces.form.create.notification_types.label");return(0,r.jsx)(o.l.Item,{name:"notification_type",label:u,hideDescription:!0,hideBorder:!0,fullWidth:!0,variant:"extra-bottom-margin",children:"chat"==e?(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(o.l.RadioGroup,{variant:"radio",name:"notification_type",verticalSpacing:"normal",options:l.E})}):(0,r.jsx)(o.l.CheckboxGroup,{name:"notification_type",options:c})})};n.d(t,{U:()=>c})},778380(e,t,n){"use strict";n.d(t,{v:()=>w});var r=n(391426),o=n(974618),i=n(231127),a=n(125665),s=n(257957),l=n(791009),c=n(417980),u=n(933578),d=n(254209),p=n(717526);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var y="spaces.spaces_limit_addon_modal",h=function(e){var t=(0,p.d)(),n=b((0,u.useState)(null),2),r=n[0],o=n[1],i=b((0,u.useState)(!0),2),a=i[0],s=i[1],l=b((0,u.useState)(!1),2),f=l[0],h=l[1];return(0,u.useEffect)(function(){d.v.index().then(function(e){var t;o(null!=(t=e.find(function(e){return"spaces"===e.slug}))?t:null)}).catch(function(){t.error((0,c.t)("something_went_wrong"))}).finally(function(){s(!1)})},[]),{addon:r,isLoading:a,isSubmitting:f,handleConfirm:function(){var n;return(n=function(){var n;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(o){switch(o.label){case 0:if(!r)return[2];h(!0),o.label=1;case 1:var i,a;return o.trys.push([1,3,4,5]),n=r.quantity+r.unit_size,[4,d.v.create((i={},a=r.id.toString(),a in i?Object.defineProperty(i,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):i[a]=n,i))];case 2:return o.sent(),t.success((0,c.t)("".concat(y,".success"))),e(),[3,5];case 3:return o.sent(),t.error((0,c.t)("something_went_wrong")),[3,5];case 4:return h(!1),[7];case 5:return[2]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){m(i,r,o,a,s,"next",e)}function s(e){m(i,r,o,a,s,"throw",e)}a(void 0)})})()},buildDescription:function(){if(!r)return"";var e="year"===r.interval?"".concat(y,".description_yearly"):"".concat(y,".description");return(0,c.t)(e,{count:r.unit_size,price:r.formatted_base_monthly_amount})},i18nRoot:y}},g=function(e){var t=e.open,n=e.onOpenChange,o=h(function(){return n(!1)}),i=o.addon,u=o.isLoading,d=o.isSubmitting,p=o.handleConfirm,f=o.buildDescription,m=o.i18nRoot;return(0,r.jsx)(l.a.Root,{open:t,onOpenChange:n,children:(0,r.jsxs)(l.a.Content,{children:[(0,r.jsx)(l.a.Header,{title:(0,c.t)("".concat(m,".title"))}),(0,r.jsx)(l.a.Body,{children:u?(0,r.jsx)(s.a,{center:!0}):(0,r.jsx)(a.E,{content:f()})}),(0,r.jsx)(l.a.Footer,{secondaryAction:{label:(0,c.t)("cancel"),onClick:function(){return n(!1)}},primaryAction:{label:(0,c.t)("".concat(m,".confirm")),onClick:function(){p()},loading:d,disabled:u||!i}})]})})},v=n(854843),x=function(){var e=(0,o.hS)(),t=h(function(){e.hide()}),n=t.addon,i=t.isLoading,l=t.isSubmitting,u=t.handleConfirm,d=t.buildDescription,p=t.i18nRoot;return(0,r.jsx)(v.R,{title:(0,c.t)("".concat(p,".title")),isOpen:e.visible,onClose:function(){e.hide()},onConfirm:function(){u()},confirmText:(0,c.t)("".concat(p,".confirm")),disabled:i||!n||l,children:i?(0,r.jsx)(s.a,{center:!0}):(0,r.jsx)(a.E,{content:d()})})},j=o.PT.create(function(){return(0,r.jsx)(x,{})}),_=o.PT.create(function(){var e=(0,o.hS)();return(0,r.jsx)(g,{open:e.visible,onOpenChange:function(t){t||e.hide()}})}),w=function(){var e=(0,i.T)("circle_v4_modals_enabled"),t=(0,o.hS)(_),n=(0,o.hS)(j);return e?t:n}},825697(e,t,n){"use strict";n.d(t,{z:()=>nj});var r=n(391426),o=n(105836),i=n(230763),a=n(337162),s=n(339551),l=n(51730),c=n(909250),u=n(341409),d=n(605274),p=n(806124),f=n(936224),m=n(933578),b=n(355104),y=n(776577),h=n(618817),g=n(973646),v=n(497184),x=n.n(v),j=n(417980),_=n(898467),w=n(6418),O=n(737225),S=n(974618),P=n(927561),C=n(915779),k=n(117211),I=n(258752),N=n(243994),A=n(387099),E=N.Ik().shape({name:N.Yj().required(j.Ay.t("link_name_required")),url:N.RZ(function(e){return e.startsWith("mailto:")?N.Yj().trim().test("mailto-email",j.Ay.t("link_url_invalid"),function(e){return!!e&&N.Yj().email().isValidSync(e.replace(/^mailto:/,""))}).required(j.Ay.t("link_url_required")):N.Yj().url(j.Ay.t("link_url_invalid")).required(j.Ay.t("link_url_required"))})}),R=function(e){var t=e.isEdit,n=e.link,o=T(),i=function(){k.b.all(),o.hide()},a=(0,I.n_)({mutationFn:function(e){return(0,l.oK)(C.iK.communities.communityLinks.
1create(),e)},onSuccess:i}),s=a.mutate,c=a.isPending,u=(0,I.n_)({mutationFn:function(e){return(0,l.$H)(C.iK.communities.communityLinks.update({communityLinkId:n.id}),e)},onSuccess:i}),d=u.mutate,p=u.isPending;return(0,r.jsxs)(P.l,{onSubmit:function(e){t?d(e):s(e)},validationSchema:E,defaultValues:t?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},n):{name:"",url:""},children:[(0,r.jsxs)(O.aF.Body,{children:[(0,r.jsx)(P.l.Item,{name:"name",variant:"extra-bottom-margin",label:j.Ay.t("link_name"),description:j.Ay.t("link_name_description"),hideBorder:!0,children:(0,r.jsx)(P.l.Input,{})}),(0,r.jsx)(P.l.Item,{variant:"extra-bottom-margin",name:"url",label:j.Ay.t("link_url"),description:j.Ay.t("link_url_description"),hideBorder:!0,children:(0,r.jsx)(P.l.Input,{})})]}),(0,r.jsx)(O.aF.Footer,{children:t?(0,r.jsx)(A.$,{full:!0,disabled:p,type:"submit",variant:"primary",children:p?j.Ay.t("link_updating"):j.Ay.t("link_update")}):(0,r.jsx)(A.$,{full:!0,disabled:c,type:"submit",variant:"primary",children:c?j.Ay.t("link_creating"):j.Ay.t("link_create")})})]})},L=function(e){var t=e.isEdit,n=e.link,o=(0,S.hS)();return(0,r.jsxs)(O.aF,{title:(0,j.t)("add_link"),isOpen:o.visible,onClose:o.hide,children:[(0,r.jsx)(O.aF.Overlay,{}),(0,r.jsxs)(O.aF.Content,{children:[(0,r.jsxs)(O.aF.Header,{children:[(0,r.jsx)(O.aF.Title,{className:"text-center",size:"md",children:(0,j.t)("add_link")}),(0,r.jsx)(O.aF.HeaderActions,{className:"absolute right-0 top-0 mr-6 mt-6",children:(0,r.jsx)(O.aF.CloseButton,{onClick:o.hide})})]}),(0,r.jsx)(R,{isEdit:void 0!==t&&t,link:n})]})]})},D=S.PT.create(function(e){var t=e.isEdit,n=e.link;return(0,r.jsx)(L,{isEdit:t,link:n})}),T=function(){return(0,S.hS)(D)},M=n(930260),F=function(){var e=T();return(0,r.jsx)(M.F,{children:(0,r.jsxs)("button",{type:"button",className:"text-c-sidebar hover:text-c-sidebar hover:bg-c-sidebar-hover focus:bg-c-sidebar-hover text-sm h-8.5 flex w-full items-center rounded-md px-4 font-medium transition-colors duration-200",onClick:function(){return e.show()},children:[(0,r.jsx)(g.In,{type:"16-add-new",size:16}),(0,r.jsx)("span",{className:"ml-2",children:(0,j.t)("add_link")})]})})},K=n(529648),B=n(14930),q=n(66108),U=function(e){var t=e.isOpen,n=e.onClose,o=e.link,i=(0,I.n_)({mutationFn:function(e){return(0,l.Dc)(C.iK.communities.communityLinks.delete({communityLinkId:o.id}),e)},onSuccess:function(){k.b.all(),n()}}),a=i.mutate,s=i.isPending;return(0,r.jsx)(q.R,{isOpen:t,title:(0,j.t)("delete_link"),onClose:n,onCancel:n,onConfirm:function(){return a(void 0)},cancelText:(0,j.t)("cancel"),confirmText:s?(0,j.t)("deleting"):(0,j.t)("delete"),disabled:s,confirmVariant:"danger",children:(0,j.t)("delete_link_confirmation",{name:o.name})})},z=function(e){var t=e.link,n=e.children;return(0,r.jsxs)("a",{href:t.url,target:"_blank",rel:"noreferrer",draggable:"false",title:t.name,className:"text-c-sidebar hover:text-c-sidebar focus:text-c-sidebar active:text-c-sidebar hover:bg-c-sidebar-hover focus:bg-c-sidebar-hover text-sm h-8.5 group !m-0 flex w-full items-center gap-2 rounded-md px-4 font-medium transition-colors duration-200",children:[(0,r.jsx)("span",{className:"flex !h-5 !w-5 items-center justify-center",children:(0,r.jsx)(g.In,{type:"16-external-link",className:"!h-4 !w-4",size:16})}),(0,r.jsx)("h4",{className:"text-sm flex-1 truncate font-medium text-current",children:t.name}),n]})};function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var V=function(e){var t=e.link,n=e.isAdmin,o=$((0,B.C)(!1),2),i=o[0],a=o[1],s=$((0,B.C)(!1),2),l=s[0],c=s[1],u=(0,d.A5)(),p=T();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z,{link:t,children:n&&(0,r.jsx)("div",{className:x()("flex gap-0.5",{"hidden group-hover:flex":u&&l}),onClick:function(e){e.preventDefault(),e.stopPropagation()},children:(0,r.jsxs)(K.ms,{buttonClassName:"flex py-0.5 w-5 h-5 rounded hover:bg-black/10 transition-colors",button:(0,r.jsx)(g.In,{type:"16-menu-dots-horizontal",size:16}),buttonLabel:(0,j.t)("community_sidebar.view_sidebar_link_options"),onToggle:c,appendTo:document.body,children:[(0,r.jsx)(K.ms.ItemWithLink,{onClick:function(){p.show({isEdit:!0,link:t})},children:(0,j.t)("edit")}),(0,r.jsx)(K.ms.ItemWithLink,{onClick:a,children:(0,j.t)("delete")})]})})}),(0,r.jsx)(U,{link:t,isOpen:i,onClose:a})]})},H=function(){var e=(0,_.Gv)().item;return(0,r.jsx)(z,{link:e})},G=function(e){var t=e.links,n=e.onSort,o=(0,i.Od)().currentCommunityMember,a=(0,w.V8)(o),s=(0,d.t2)(),l=!a||!s;return(0,r.jsxs)(_.bH,{items:t,onSort:n,distance:5,lockedVerticalAxis:!0,shouldUseKeyboardSensor:!1,children:[(0,r.jsxs)(_.bH.List,{gap:0,className:"flex flex-col gap-y-1",children:[t.map(function(e){return(0,r.jsx)(_.bH.Item,{tabIndex:-1,item:e,disabled:l,children:(0,r.jsx)(V,{link:e,isAdmin:a})},e.id)}),a&&(0,r.jsx)(F,{})]}),(0,r.jsx)(_.bH.DragOverlay,{adjustScale:!1,children:(0,r.jsx)(H,{})})]})};function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Y=function(){var e=(0,i.Od)(),t=e.currentCommunity,n=e.currentCommunityMember,r=Q((0,B.C)(!0),2),o=r[0],a=r[1],s=Q((0,m.useState)((null==t?void 0:t.links)||[]),2),c=s[0],u=s[1],d=(0,w.V8)(n),p=(0,I.n_)({mutationFn:function(e){var t=e.links_order_array;return(0,l.$H)(C.iK.communities.communityLinks.reorder(),{links_order_array:t})},onSuccess:function(){k.b.all()}}).mutate;(0,m.useEffect)(function(){var e=(null==t?void 0:t.links)||[];(null==e?void 0:e.length)!==c.length?u((null==t?void 0:t.links)||[]):(e.some(function(e){return e.name!==c.find(function(t){return t.id===e.id}).name})||e.some(function(e){return e.url!==c.find(function(t){return t.id===e.id}).url}))&&u((null==t?void 0:t.links)||[])},[null==t?void 0:t.links,c]);var f=(null==t?void 0:t.links)||[];return{canSeeLinks:d||f.length>0,shouldShowLinks:o,toggleLinks:a,orderedList:c,onSort:function(e){var t=e.map(function(e){return e.id.toString()});u(e),p({links_order_array:t})}}},J=function(){var e=Y(),t=e.canSeeLinks,n=e.shouldShowLinks,o=e.toggleLinks,i=e.orderedList,a=e.onSort,s=(0,d.A5)();return t?(0,r.jsxs)("div",{id:"links-section",className:"mb-8 mt-6 flex flex-col gap-1 px-3 lg:px-6",children:[(0,r.jsxs)("button",{type:"button",className:"text-c-sidebar hover:bg-c-sidebar-hover focus-visible:bg-c-sidebar-hover group flex w-full items-center space-x-px rounded-md px-4 py-1.5 text-sm font-semibold transition-colors duration-200",onClick:o,children:[(0,r.jsx)("span",{children:(0,j.t)("links")}),(0,r.jsx)("div",{className:x()("flex rounded-sm py-0.5 transition-transform",{"hidden group-hover:flex":s,"rotate-0":!n,"rotate-90":n}),"aria-label":n?(0,j.t)("community_sidebar.expand_group",{group_name:"links"}):(0,j.t)("community_sidebar.collapse_group",{group_name:"links"}),children:(0,r.jsx)(g.In,{type:"cheveron-right",size:16})})]}),n&&(0,r.jsx)(G,{links:i,onSort:a})]}):null},X=n(79501),ee=n(839188),et=n(953805),en=n(373761),er=n(570310),eo=n(495118),ei=function(e){var t,n,o=e.children,i=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children"]);return(0,r.jsx)("button",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({type:"button",className:"text-c-sidebar hover:text-c-sidebar w-full hover:bg-c-sidebar-hover focus:bg-c-sidebar-hover my-px flex cursor-pointer items-center justify-start rounded-md px-2 py-1.5 text-sm"},i),n=n={children:o},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},ea=function(e){var t,n;return(0,r.jsxs)(ei,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={children:[(0,r.jsx)(g.In,{size:16,type:"16-add-new"}),(0,r.jsx)("span",{"data-testid":"add-space",className:"mx-2",children:(0,j.t)("add_space")})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},es=function(e){var t=e.spaceGroupId,n=(0,ee.c)();return(0,r.jsx)(ea,{onClick:function(){n.show({spaceGroupId:t})}})},el=n(519104);function ec(){return(ec=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var eu=function(e){var t=e;if(null==t)throw TypeError("Cannot destructure "+t);var n,o,i=ec({},e);return(0,r.jsxs)(ei,(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},i),o=o={children:[(0,r.jsx)(g.In,{size:16,type:"16-add-new"}),(0,r.jsx)("span",{className:"mx-2",children:(0,j.t)("join_a_space")})]},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n))},ed=function(e){var t=e.spaceGroupSlug,n=(0,el.Z)();return(0,r.jsx)(eu,{onClick:function(){n({to:"/s/$spaceGroupSlug",params:{spaceGroupSlug:t}})}})},ep=function(e){var t=e.spaceGroup;return(0,c._V)({spaceGroup:t})?(0,r.jsx)(es,{spaceGroupId:t.id}):t.hide_non_member_spaces_from_sidebar?(0,r.jsx)(ed,{spaceGroupSlug:t.slug}):null},ef=n(424668),em=n(361537);let eb=function(e){var t,n,o=e.space,a=(0,u._N)()(o),s=(0,i.Od)().currentCommunityMember,l=(0,d.t2)(),c=(0,w.V8)(s),p=(0,X.gl)({id:"space-".concat(o.id),disabled:!c||!l,data:{type:"space",id:o.id,spaceGroupId:o.space_group_id}}),f=p.attributes,m=p.listeners,b=p.setNodeRef,y=p.transform,h=p.transition,g=p.isDragging,v={transform:en.Ks.Transform.toString(y),transition:h},x=(0,ef.F$)().spaces.find(function(e){return e.id===o.id});return(0,r.jsx)(em.G,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:b,style:v},f,m),n=n={space:o,buttonLink:a,spaceNotificationDetail:x,className:(0,er.x)({"pointer-events-none opacity-50":g})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};var ey=n(97193),eh=function(e){var t=e.spaceGroup,n=t.spaces;return n.length>0?(0,r.jsx)(X.gB,{items:n.map(function(e){return"space-".concat(e.id)}),strategy:X._G,children:(0,r.jsx)(ey.g,{children:n.map(function(e){return(0,r.jsx)(eb,{space:e},e.id)})})}):(0,r.jsx)(ep,{spaceGroup:t})};eh.displayName="SpaceList";var eg=n(918842);function ev(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ex=function(e){var t,n,o,a=e.spaceGroup,s=e.position,u=(0,i.Od)().currentCommunityMember,p=function(e){if(Array.isArray(e))return e}(t=(0,B.C)(a.collapsed))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return ev(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ev(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),f=p[0],m=p[1],b=(0,et.c)(),y=(0,ee.c)(),h=(0,eo.c)().toggleSpaceGroupDrawer,g=(0,w.V8)(u),v=(0,d.t2)(),x=(0,X.gl)({id:"space-group-".concat(a.id),disabled:!g||!v,data:{type:"spaceGroup",id:a.id}}),j=x.attributes,_=x.listeners,O=x.setNodeRef,S=x.transform,P=x.transition,k=x.setActivatorNodeRef,N=x.isDragging,A=(0,I.n_)({mutationFn:function(){return(0,l.oK)(C.y4.toggleVisibility({spaceGroupId:String(a.id)}))}}).mutate,E=(0,c.ot)({spaceGroup:a}),R={transform:en.Ks.Translate.toString(S),transition:P};return(0,r.jsx)(eg.T,(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({id:a.slug,position:s,isCollapsed:f,isDragging:N,canManage:E,onCollapseToggle:function(){m(),A()},spaceGroup:a,onEditSpaceGroupClick:function(){return b.show({spaceGroup:a,tab:"Details"})},onCreateSpaceClick:function(){return y.show({spaceGroupId:a.id})},onCreateSpaceGroupClick:h,isAdmin:g,onAddMembersClick:function(){return b.show({spaceGroup:a,tab:"Members"})},ref:O,viewWrapperRef:k,style:R,className:(0,er.x)({"pointer-events-none opacity-50":N})},j,_),o=o={children:(0,r.jsx)(eh,{spaceGroup:a})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n))},ej=n(495617),e_=function(e){var t=e.spaceGroupWithSpaces;return(0,r.jsx)(X.gB,{items:t.map(function(e){return"space-group-".concat(e.id)}),strategy:X._G,children:(0,r.jsx)(ej.Z,{children:t.map(function(e,t){return(0,r.jsx)(ex,{position:t,spaceGroup:e},e.id)})})})},ew=n(253344),eO=n(223578),eS=n(419320),eP=n(559574),eC=n(934019),ek=n(393235),eI=n(178905),eN=n(367090),eA=n(947331),eE=n(185182),eR=n(451430),eL=n(52381),eD=n(492776),eT=n(56237),eM=n(988484),eF=n(977375),eK=n(599639),eB=n(445365),eq=function(e){var t=e.handleClose,n=(0,i.Od)().isViewOnlyMasquerading,o=(0,eB.s)().resizeNotificationWindow,a=(0,eT.a)(),s=a.tabsContainerRef,l=a.tabsContainerWidth;return(0,eM.G)(o),(0,r.jsx)(eD.ph,{onClose:t,children:(0,r.jsxs)("div",{className:(0,er.x)("h-full w-fit",{"pointer-events-none":n}),id:"notifications-drawer","data-testid":"notifications-drawer",children:[(0,r.jsx)(eK.Y,{onClose:t}),(0,r.jsx)(eF.n,{tabsContainerRef:s,tabsContainerWidth:l})]})})},eU=n(790389),ez=n(310860),eW=n(231127),e$=n(555169),eV=n(395123),eH=n(805950);function eG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eZ(e){if(Array.isArray(e))return e}function eQ(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function eY(e,t){if(e){if("string"==typeof e)return eG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eG(e,t)}}var eJ=(0,m.forwardRef)(function(e,t){var n,o,i,a=eZ(n=[e,t])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||eY(n)||eQ(),s=a[0],l=a.slice(1),c=s.badgeText,u=s.className,d=s.dataTestId,p=s.iconName,f=s.isActive,m=s.label,b=s.onClick,y=s.rightSideContent,h=s.isGray,v=s.shouldBold,x=void 0!==v&&v,j=s.ariaLabel,_=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(s,["badgeText","className","dataTestId","iconName","isActive","label","onClick","rightSideContent","isGray","shouldBold","ariaLabel"]),w=(eZ(l)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(l)||eY(l,1)||eQ())[0],O=(0,eV.o)().getActiveInactiveClasses,S=!(0,eR.isUndefined)(c)&&Number(c)>0&&!y;return(0,r.jsxs)("button",(o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},_),i=i={ref:w,type:"button","data-testid":d,onClick:b,className:(0,er.x)("my-px flex w-full items-center px-2 py-1.5 text-sm",O(void 0!==f&&f),u),"aria-labelledby":m,children:[(0,r.jsx)(g.In,{type:p,size:16,"aria-hidden":!0}),(0,r.jsx)("div",{className:"ml-2 flex-1 text-left",children:(0,r.jsx)("h3",{className:(0,er.x)("max-w-full truncate text-sm text-current",{"font-normal":!x,"font-bold":x}),children:m})}),S&&(0,r.jsx)(eH.M,{ariaLabel:j,isGray:void 0!==h&&h,children:c}),!c&&y&&y]}
1,Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(i)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))}),o))});function eX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}eJ.displayName="PlatformMenuItem";var e0=function(e){var t,n=e.allDMsBadgeText,o=e.disabled,i=e.isMessagingEnabled,a=e.notificationBadgeText,s=e.onNotificationClick,l=e.resetNewNotificationsCount,c=e.shouldShowChatThreadsTab,u=e.unreadThreadsCount,p=e.connectBadgeText,f=(0,el.Z)(),b=(0,ez.z)({select:function(e){return e.pathname}}),y=(0,d.NT)(),h=(0,d.J6)(),g=(0,d.nZ)(),v=(0,e$.V)(),x=(0,eW.T)("circle_v4_popover_enabled"),_=b.includes((0,C.ce)()),w=b.includes((0,C.lx)()),O=b.includes((0,C.wl)()),S=b.includes((0,C.xF)()),P=b.includes((0,C.jb)()),k=function(e){if(Array.isArray(e))return e}(t=(0,m.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return eX(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eX(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),I=k[0],N=k[1],A=(0,ez.z)(),E=(0,m.useMemo)(function(){return{onClose:function(){return N(!1)}}},[]);return(0,m.useEffect)(function(){N(!1)},[A]),(0,r.jsxs)(r.Fragment,{children:[!h&&(g?(0,r.jsx)(eJ,{dataTestId:"notifications-menu",label:(0,j.t)("notifications.page_title"),iconName:"sidebar-bell",badgeText:a,ariaLabel:(0,j.t)("community_sidebar.unread_notifications",{count:Number(a)}),onClick:function(){null==l||l(),f({to:(0,C.Z1)()})},isActive:O}):x?(0,r.jsx)(eU.A,{trigger:(0,r.jsx)(eJ,{dataTestId:"notifications-menu",label:(0,j.t)("notifications.page_title"),iconName:"sidebar-bell",badgeText:a,ariaLabel:(0,j.t)("community_sidebar.unread_notifications",{count:Number(a)}),onClick:function(){y&&(0,eR.isFunction)(s)&&!o&&s()},isActive:O}),open:I,onOpenChange:function(e){N(e),e&&(null==l||l())},disabled:o||!(0,eR.isFunction)(s),side:"bottom",align:"start",children:(0,r.jsx)(eL.nQ.Provider,{value:E,children:(0,r.jsx)("div",{className:"flex size-full flex-col","data-testid":"notifications-drawer",children:(0,r.jsx)(eq,{})})})}):(0,r.jsx)(eL.i0,{button:(0,r.jsx)(eJ,{dataTestId:"notifications-menu",label:(0,j.t)("notifications.page_title"),iconName:"sidebar-bell",badgeText:a,ariaLabel:(0,j.t)("community_sidebar.unread_notifications",{count:Number(a)}),onClick:function(){y&&(0,eR.isFunction)(s)&&!o&&s()},isActive:O}),onOpen:l,disabled:o||!(0,eR.isFunction)(s),children:(0,r.jsx)("div",{className:"flex size-full flex-col","data-testid":"notifications-drawer",children:(0,r.jsx)(eq,{})})})),i&&!h&&(0,r.jsx)(eJ,{dataTestId:"chat-menu",label:(0,j.t)("sidebar_all_dms"),iconName:"16-messages",badgeText:n,ariaLabel:(0,j.t)("community_sidebar.unread_messages",{count:Number(n)}),onClick:function(){var e=(0,C.GT)({url:(0,C.ce)()});f({to:e.pathname,state:e.state})},isActive:_}),c&&!h&&(0,r.jsx)(eJ,{dataTestId:"chat-threads-menu",label:(0,j.t)("chat_threads"),iconName:"16-chat-threads",onClick:function(){f({to:(0,C.lx)()})},isActive:w,badgeText:String(u),ariaLabel:(0,j.t)("community_sidebar.unread_messages",{count:Number(u)})}),v&&!h&&(0,r.jsx)(eJ,{dataTestId:"connections-menu",label:(0,j.t)("header_v3.connect.title"),iconName:"20-connections",onClick:function(){f({to:(0,C.xF)()})},isActive:S,badgeText:p,ariaLabel:(0,j.t)("community_sidebar.new_connections",{count:Number(p)})}),y&&(0,r.jsx)(eJ,{dataTestId:"bookmarks-menu",label:(0,j.t)("header_v3.bookmarks"),iconName:"16-bookmark",onClick:function(){f({to:(0,C.jb)()})},isActive:P})]})},e1=function(e){var t=e.dataTestId,n=e.disabled,o=void 0!==n&&n,i=e.iconName,a=e.label,s=e.linkTo,l=e.show;return void 0===l||l?(0,r.jsxs)("a",{"data-testid":t,href:s,className:"text-c-sidebar focus:text-c-sidebar hover:text-c-sidebar hover:bg-c-sidebar-hover focus:bg-c-sidebar-hover my-px flex w-full cursor-pointer items-center rounded-md bg-transparent px-2 py-1.5 text-sm",onClick:function(e){o&&e.preventDefault()},title:a,children:[(0,r.jsx)(g.In,{type:i,size:16,"aria-hidden":!0}),(0,r.jsx)("div",{className:"ml-2 flex-1",children:(0,r.jsx)("h3",{className:"max-w-full truncate text-sm font-normal text-current",children:a})})]}):null},e2=n(534529),e3=function(e){var t=e.badgeText,n=e.isGrayBadge,o=e.show,a=e.dataTestId,s=e.iconName,l=e.label,c=e.linkTo,u=e.disabled,d=void 0!==u&&u,p=e.isActive,f=(0,eV.o)().getActiveInactiveClasses,m=(0,i.Od)(),b=m.currentCommunity,y=m.currentCommunityMember;return void 0===o||o?(0,r.jsxs)(e2.N_,{"data-testid":a,to:c,className:"my-px flex w-full cursor-pointer items-center px-2 py-1.5 text-sm",activeProps:{className:f(!0)},inactiveProps:{className:f(void 0!==p&&p)},onClick:function(e){d?e.preventDefault():!y&&(null==b?void 0:b.is_private)&&(e.preventDefault(),window.location.assign(c))},title:l,children:[(0,r.jsx)(g.In,{type:s,size:16,"aria-hidden":!0}),(0,r.jsx)("div",{className:"ml-2 flex-1",children:(0,r.jsx)("h3",{className:"max-w-full truncate text-sm font-normal text-current",children:l})}),t&&(0,r.jsx)(eH.M,{isGray:void 0!==n&&n,children:t})]}):null},e4=function(e){var t=e.link,n=e.disabled,o=e.isHomePageEnabled,i=e.shouldShowActiveHomeLink,a=e.shouldShowMemberDirectory,s=e.shouldShowAllEventsPage,l=e.shouldShowCoursesDirectory,c=e.shouldShowLeaderboard;return"home"===t.kind?(0,r.jsx)(e3,{label:(0,j.t)("feed"),linkTo:"/feed",iconName:"home-v2",disabled:n,isActive:i,show:o}):"members"===t.kind?(0,r.jsx)(e3,{label:t.label||(0,j.t)("members_directory.menu.title"),linkTo:(0,ek.zF)(),iconName:"members-v2",disabled:n,show:a}):"events"===t.kind?(0,r.jsx)(e3,{label:t.label||(0,j.t)("events.title"),linkTo:"/events",iconName:"16-calendar",disabled:n,show:s}):"courses"===t.kind?(0,r.jsx)(e3,{label:t.label||(0,j.t)("courses.directory.title"),linkTo:"/courses",iconName:"16-book",disabled:n,isGrayBadge:!0,show:l}):"leaderboard"===t.kind?(0,r.jsx)(e3,{label:t.label||(0,j.t)("leaderboard.title"),linkTo:"/leaderboard?period=7_days",iconName:"16-analytics",disabled:n,isGrayBadge:!0,show:c}):"custom"===t.kind?(0,r.jsx)(e1,{disabled:n,iconName:"16-site-link",label:t.label,linkTo:t.linkTo,show:!t.isDisabled}):null},e5=function(e){var t=e.allDMsBadgeText,n=e.disabled,o=void 0!==n&&n,a=e.hasCurrentCommunityMember,s=e.isHomePageEnabled,l=void 0!==s&&s,c=e.isMessagingEnabled,u=e.isOnboardingActive,p=e.notificationBadgeText,f=e.onGettingStartedClick,m=e.onGettingStartedClose,b=e.onNotificationClick,y=e.onSearchClick,h=e.resetNewNotificationsCount,v=e.shouldShowActiveHomeLink,x=void 0!==v&&v,_=e.shouldShowAllEventsPage,w=void 0!==_&&_,O=e.shouldShowChatThreadsTab,S=e.shouldShowCoursesDirectory,P=void 0!==S&&S,C=e.shouldShowLeaderboard,k=void 0!==C&&C,I=e.shouldShowMemberDirectory,N=void 0!==I&&I,A=e.shouldShowOnboarding,E=e.unreadThreadsCount,R=e.links,L=e.connectBadgeText,D=(0,d.J6)(),T=(0,i.Od)(),M=T.currentCommunity,F=!!(!T.currentCommunityMember&&(null==M?void 0:M.is_private));return(0,r.jsxs)("div",{className:"mt-2.5 px-3",children:[!D&&!F&&(0,r.jsx)(eJ,{label:(0,j.t)("search_item"),onClick:function(){return(0,eR.isFunction)(y)&&y()},iconName:"16-search"}),void 0!==A&&A&&(0,r.jsx)(eJ,{label:(0,j.t)("getting_started"),iconName:"lightning",isActive:void 0!==u&&u,onClick:function(){(0,eR.isFunction)(f)&&!o&&f()},rightSideContent:(0,r.jsx)("button",{type:"button",className:"flex size-5 rounded-sm py-0.5 transition-colors hover:bg-black/10 focus:bg-black/10",onClick:function(){(0,eR.isFunction)(m)&&!o&&m()},"aria-label":(0,j.t)("close"),children:(0,r.jsx)(g.In,{type:"16-close",size:16})})}),void 0!==a&&a&&(0,r.jsx)(e0,{notificationBadgeText:void 0===p?"":p,onNotificationClick:b,disabled:o,resetNewNotificationsCount:h,allDMsBadgeText:void 0===t?"":t,isMessagingEnabled:void 0!==c&&c,unreadThreadsCount:E,shouldShowChatThreadsTab:void 0!==O&&O,connectBadgeText:void 0===L?"":L}),R.map(function(e){return(0,r.jsx)(e4,{link:e,disabled:o,isHomePageEnabled:l,shouldShowActiveHomeLink:x,shouldShowMemberDirectory:N,shouldShowAllEventsPage:w,shouldShowCoursesDirectory:P,shouldShowLeaderboard:k},e.linkTo)})]})},e6=n(336372),e8=function(){var e,t,n=(0,el.Z)(),o=(0,eP.r)(),i=o.links,a=o.adminVisiblePlatformLinks,s=o.memberVisiblePlatformLinks,l=(0,eo.c)(),c=l.shouldShowOnboarding,u=l.isOnboardingActive,d=l.hideOnboardingConfirmationModal,p=l.currentCommunity,f=l.currentCommunitySettings,m=l.currentCommunityMember,b=l.showSpotlightSearch,y=l.shouldShowAllEventsPage,h=(0,e6.Y)(),g=h.newNotificationCount,v=h.resetNewNotificationsCount,x=(0,eN.s)().unreadThreadsCount,j=(0,eI.h)().unreadChatCount,_=(0,eC.k)().data,O=(0,w.V8)(m),S=(0,eA.UF)().shouldShowMessagingRoutes,P=(null==m||null==(e=m.policies)?void 0:e.can_access_threads_tab)||x>0,k=O?a:s,I=function(e){return k.some(function(t){return t.kind===e})},N=(0,w.OM)(m,f)&&I("members"),A=(null==p||null==(t=p.policies)?void 0:t.can_view_courses_directory)&&I("courses"),E=y&&I("events"),R=((null==_?void 0:_.enabled)||O)&&I("leaderboard"),L=(0,eE.X)().count;return(0,r.jsx)(e5,{allDMsBadgeText:String(j),hasCurrentCommunityMember:!!m,isHomePageEnabled:null==p?void 0:p.home_page_enabled,isMessagingEnabled:S,isOnboardingActive:u,notificationBadgeText:String(g),onGettingStartedClick:function(){n({to:ek.aL.onboarding()})},onGettingStartedClose:d.show,onNotificationClick:function(){v(),n({to:(0,C.Z1)()})},onSearchClick:b,shouldShowMemberDirectory:N,shouldShowOnboarding:c,shouldShowCoursesDirectory:A,shouldShowChatThreadsTab:P,resetNewNotificationsCount:v,unreadThreadsCount:x,shouldShowAllEventsPage:E,shouldShowLeaderboard:R,links:i,connectBadgeText:String(L)})},e9=n(853456),e7=n(454776),te=function(e){var t=e.variant,n=e.small,o=(0,i.Od)(),a=o.currentCommunityMember,s=o.isLoading,l=(0,e7.H)();return s||!(0,w.V8)(a)?null:(0,r.jsx)(A.$,{variant:void 0===t?"primary":t,onClick:function(){l.
1show()},small:void 0===n||n,children:(0,r.jsx)("span",{children:(0,j.t)("live_streams.now_live.go_live")})})},tt=n(865386),tn=n(617492),tr=n(734527),to=function(e){var t=e.headline,n=e.name;return(0,r.jsxs)("div",{className:"flex max-w-[128px] flex-col text-left",children:[(0,r.jsx)("span",{className:"text-c-sidebar truncate text-sm font-medium",children:void 0===n?"":n}),(0,r.jsx)("span",{className:"text-c-sidebar truncate text-sm font-normal",children:void 0===t?"":t})]})},ti={strategy:"absolute",modifiers:[{name:"offset",options:{offset:[0,8]}}]},ta=function(e){var t=e.imageUrl,n=e.name,o=void 0===n?"":n,i=e.onEditProfileClick,a=e.onSignOutClick,s=e.publicUid,l=void 0===s?"":s,c=e.headline,u=e.showMemberBilling,d=e.canAccessAuthenticationPage,p=e.canShowPaywallsAffiliate,f=(0,ez.z)({select:function(e){return{pathname:e.pathname,search:e.searchStr}}}),m=(0,tn.g)().show,b=[];return b.push({value:(0,j.t)("view_profile"),label:(0,j.t)("view_profile"),onClick:function(){return m({memberPublicId:l})},icon:"16-account",dataTestId:"profile-link"},{value:(0,j.t)("edit_profile"),label:(0,j.t)("edit_profile"),onClick:function(){return(0,eR.isFunction)(i)&&i()},icon:"16-edit",dataTestId:"edit-profile-link"},{value:(0,j.t)("notification"),label:(0,j.t)("notification"),pathTo:C.Qr.notifications(f),icon:"sidebar-bell",dataTestId:"notification-link"}),void 0!==d&&d&&b.push({value:(0,j.t)("authentication"),label:(0,j.t)("authentication"),pathTo:C.Qr.authentication(f),icon:"16-lock-unlocked",dataTestId:"authentication-link"}),void 0!==u&&u&&b.push({value:(0,j.t)("billing"),label:(0,j.t)("billing"),pathTo:C.Qr.billing(f),icon:"credit-card",dataTestId:"member-billing-link"}),void 0!==p&&p&&b.push({value:(0,j.t)("member_profile_modal.affiliate_dashboard.title"),label:(0,j.t)("member_profile_modal.affiliate_dashboard.title"),pathTo:C.Qr.affiliate(f),icon:"16-paywalls-affiliates",dataTestId:"member-affiliate-link"}),b.push({value:"separator"},{value:(0,j.t)("sign_out"),label:(0,j.t)("sign_out"),onClick:function(){return(0,eR.isFunction)(a)&&a()},icon:"16-sign-out"}),(0,r.jsx)(K.ms,{size:"full",direction:"top-start",dataTestId:"user-profile-dropdown",className:"inline-flex",buttonWrapperClassName:"inline-flex",button:(0,r.jsxs)("div",{className:"flex items-center gap-[14px]","data-testid":"user-profile-button",children:[(0,r.jsx)(tr.J,{name:o,src:void 0===t?"":t,size:"10"}),(0,r.jsx)(to,{headline:void 0===c?"":c,name:o})]}),popperOptions:ti,children:(0,r.jsxs)("div",{"data-testid":"user-profile-menu",children:[(0,r.jsx)(K.ms.Header,{children:(0,j.t)("sidebar_account")}),(0,r.jsx)(K.ms.IconWithBadgeList,{options:b})]})})},ts=function(e){var t=e.headline,n=e.imageUrl,o=e.name,i=e.onEditProfileClick,a=e.onSignOutClick,s=e.publicUid,l=e.showMemberBilling,c=e.canAccessAuthenticationPage,u=e.canShowPaywallsAffiliate;return(0,r.jsx)(ta,{imageUrl:void 0===n?"":n,headline:void 0===t?"":t,name:void 0===o?"":o,onEditProfileClick:i,onSignOutClick:a,publicUid:void 0===s?"":s,showMemberBilling:void 0!==l&&l,canAccessAuthenticationPage:void 0!==c&&c,canShowPaywallsAffiliate:void 0!==u&&u})},tl=n(906532),tc=function(e){var t=e.children,n=e.className,o=(0,tl.mg)();return(0,r.jsx)("div",{className:x()("border-c-sidebar bg-c-sidebar bottom-0 w-[inherit] border-t px-4 py-3",n),"data-testid":"profile-section",style:o,children:(0,r.jsx)("div",{className:"flex items-center justify-between",children:t})})},tu=function(e){var t=e.headline,n=e.imageUrl,o=e.name,i=e.onEditProfileClick,a=e.onSignOutClick,s=e.publicUid,l=e.showMemberBilling,c=e.canAccessAuthenticationPage,u=e.canShowPaywallsAffiliate,d=e.children,p=e.className;return(0,r.jsxs)(tc,{className:p,children:[(0,r.jsx)(ts,{headline:void 0===t?"":t,imageUrl:void 0===n?"":n,name:void 0===o?"":o,onEditProfileClick:i,onSignOutClick:a,publicUid:void 0===s?"":s,showMemberBilling:void 0!==l&&l,canAccessAuthenticationPage:void 0!==c&&c,canShowPaywallsAffiliate:void 0!==u&&u}),d]})},td=function(){var e=(0,el.Z)(),t=(0,ez.z)(),n=(0,i.Od)().currentCommunityMember,o=null==n?void 0:n.policies,a=(0,tt.d)().room;return n?(0,r.jsx)(tu,{headline:n.headline,imageUrl:n.avatar_url,name:n.name,onEditProfileClick:function(){e({to:"/account",state:{from:{pathname:t.pathname,search:t.searchStr}}})},onSignOutClick:function(){window.location.href=(0,C.Nb)()},publicUid:null==n?void 0:n.public_uid,showMemberBilling:null==o?void 0:o.can_access_billing,canAccessAuthenticationPage:null==o?void 0:o.can_access_authentication_page,canShowPaywallsAffiliate:null==o?void 0:o.can_show_paywalls_affiliate,children:!a&&(0,r.jsx)("div",{className:"ml-5",children:(0,r.jsx)(te,{})})}):null},tp=n(739754),tf=n(228823),tm=n(741835),tb=function(e){var t,n=e.spaceGroupWithSpaces,o=(0,h.R)(),a=(0,i.Od)(),s=a.currentCommunityMember,l=a.data,c=(0,d.J6)(),u=(0,d.Ub)("(max-width: 1023px)"),f=(0,p.s)().refetchSpaceNotifications;(0,m.useEffect)(function(){s&&f()},[s,f]);var b=!!s||(null==l||null==(t=l.current_community)?void 0:t.is_private)===!1;return(0,r.jsxs)(tm.a,{children:[!c&&(0,r.jsx)(eS.e,{}),(0,r.jsxs)(eO.l,{children:[u&&(0,r.jsx)(e8,{}),c&&(0,r.jsx)(e9.q,{}),b&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e_,{spaceGroupWithSpaces:n}),(0,r.jsx)(J,{})]})]}),b&&!o&&(0,r.jsxs)(tp.D,{children:[(0,r.jsx)(tf.m,{}),!c&&(0,r.jsx)(td,{}),(0,r.jsx)(ew.u,{})]})]})},ty=n(345451),th=n(392573),tg=n(288513),tv=n(489364),tx=n(654030),tj=n(916855),t_=function(){var e=(0,tj.S)();return(0,r.jsx)(M.F,{children:(0,r.jsx)(tx.u,{onClick:function(){e.show()},children:(0,r.jsx)(tx.u.Content,{label:(0,j.t)("add_link"),startIcon:"plus"})})})},tw=n(34819),tO=n(70719),tS=n(892002);function tP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tC=function(e){var t,n=e.link,o=e.onOpenChange,i=function(e){if(Array.isArray(e))return e}(t=(0,B.C)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return tP(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tP(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1],l=(0,tj.S)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:tS.Wm,children:(0,r.jsx)(tO.t,{align:"start",options:[{label:(0,j.t)("edit"),onClick:function(){l.show({isEdit:!0,link:n})}},{danger:!0,label:(0,j.t)("delete"),onClick:s}],onOpenChange:o,trigger:(0,r.jsx)(tw.K,{"aria-label":(0,j.t)("community_sidebar.view_sidebar_link_options"),icon:"dot-menu",size:"sm",type:"button",variant:"ghost",onClick:function(e){e.preventDefault(),e.stopPropagation()}})})}),(0,r.jsx)(U,{isOpen:a,link:{id:String(n.id),name:n.name},onClose:s})]})};function tk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tI=function(e){var t,n=e.isAdmin,o=e.link,i=(0,d.A5)(),a=function(e){if(Array.isArray(e))return e}(t=(0,m.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return tk(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tk(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=a[0],l=a[1];return(0,r.jsx)(tx.u,{rootElement:(0,r.jsx)("a",{href:o.url,target:"_blank",rel:"noreferrer noopener",draggable:"false",title:o.name}),hoverScope:"scoped",children:(0,r.jsx)(tx.u.Content,{label:o.name,startIcon:"arrow-up-right",endContent:void 0!==n&&n&&(0,r.jsx)(tC,{link:o,onOpenChange:l}),showEndContentOnlyOnHover:i&&!s})})},tN=n(618445),tA=function(){var e=(0,_.Gv)().item,t=(0,tN.X)();return(0,r.jsx)("div",{style:t,children:(0,r.jsx)(tx.u,{rootElement:(0,r.jsx)("div",{}),children:(0,r.jsx)(tx.u.Content,{label:e.name,startIcon:"arrow-up-right"})})})},tE=function(e){var t=e.isAdmin,n=e.links,o=e.onSort,i=(0,d.t2)(),a=!t||!i;return(0,r.jsxs)(_.bH,{items:n,onSort:o,distance:5,lockedVerticalAxis:!0,shouldUseKeyboardSensor:!1,children:[(0,r.jsxs)(_.bH.List,{className:"flex flex-col gap-y-1",gap:0,children:[n.map(function(e){return(0,r.jsx)(_.bH.Item,{disabled:a,item:e,tabIndex:-1,children:(0,r.jsx)(tI,{isAdmin:t,link:e})},e.id)}),t&&(0,r.jsx)(t_,{})]}),(0,r.jsx)(_.bH.DragOverlay,{adjustScale:!1,children:(0,r.jsx)(tA,{})})]})},tR=n(892666);function tL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tD=function(){var e,t,n,o=function(e){if(Array.isArray(e))return e}(e=(0,B.C)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return tL(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tL(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1],s=(0,tR.J)(),l=s.canSeeLinks,c=s.isAdmin,u=s.onSort,d=s.orderedList;return l?(0,r.jsxs)(tv.i,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({id:"links-section"},(0,tg.Bs)({anchor:"app-sidebar-links"})),n=n={children:[(0,r.jsx)(tv.i.Header,{isCollapsed:i,title:(0,j.t)("links"),onCollapseToggle:a}),(0,r.jsx)(tv.i.Content,{isCollapsed:i,children:(0,r.jsx)(tE,{isAdmin:c,links:d,onSort:u})})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)):null},tT=n(460248),tM=n(49851),tF=n(983413),tK="sidebar_v3.error_boundary",tB=function(e){var t=e.error,n=e.resetState;return(0,r.jsx)(tF.j,{title:(0,j.t)([tK,"title"]),description:(0,j.t)([tK,"description"]),error:t,resetState:n,titleVariant:"heading-sm",className:"h-full justify-center p-4"})},tq=n(202090),tU=n(593703);function tz(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tW(e){return function(e){if(Array.isArray(e))return tz(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return tz(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tz(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var t$=function(e){var t=e.canCreateSpace,n=e.isAdmin,o=e.onOpenChange,i=e.position,a=e.spaceGroup,s=(0,ee.c)(),l=(0,tU.A)(),c=tW(t?[{label:(0,j.t)("add_space"),onClick:function(){s.show({spaceGroupId:a.id})}}]:[]).concat(tW(n?[{label:(0,j.t)("add_space_group"),onClick:function(){l.show({position:i})}}]:[]));return(0,r.jsx)(M.F,{children:(0,r.jsx)(tO.t,{options:c,align:"start",onOpenChange:o,trigger:(0,r.jsx)(tw.K,{"aria-label":(0,j.t)("community_sidebar.add_space_or_space_group"),"data-testid":"spacegroup-add-button",icon:"plus",size:"sm",type:"button",variant:"ghost"})})})},tV=n(340479);function tH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tG(e){return function(e){if(Array.isArray(e))return tH(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return tH(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tH(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tZ=function(e){var t=e.canManage,n=e.onToggle,o=e.spaceGroup,a=(0,i.Od)().isViewOnlyMasquerading,s=(0,el.Z)(),l=(0,et.c)(),c=C.y4.show({spaceGroupSlug:o.slug}),u=C.y4.members({spaceGroupSlug:o.slug}),d=function(e){return function(t){(0,tV.s6)(t)?window.open(e,"_blank","noopener,noreferrer"):s({href:e})}},p=[{label:(0,j.t)("space_groups.see_spaces"),onClick:d(c)}].concat(tG(t?[{label:(0,j.t)("space_groups.see_members"),onClick:d(u)}]:[]),tG(t&&!a?[{label:(0,j.t)("space_groups.add_members"),onClick:function(){return l.show({spaceGroup:o,tab:"Members"})}},{label:(0,j.t)("space_groups.edit_space_group"),onClick:function(){return l.show({spaceGroup:o,tab:"Details"})}}]:[]));return(0,r.jsx)(tO.t,{align:"start",options:p,onOpenChange:n,trigger:(0,r.jsx)(tw.K,{"aria-label":(0,j.t)("space_groups.view_space_group_options"),"data-testid":"spacegroup-options-button",icon:"dot-menu",size:"sm",variant:"ghost",type:"button"})})},tQ=function(e){var t=e.spaceGroup,n=(0,ee.c)(),o=(0,el.Z)();return(0,c._V)({spaceGroup:t})?(0,r.jsx)(tx.u,{"data-testid":"add-space",onClick:function(){n.show({spaceGroupId:t.id})},children:(0,r.jsx)(tx.u.Content,{label:(0,j.t)("add_space"),startIcon:"plus"})}):t.hide_non_member_spaces_from_sidebar?(0,r.jsx)(tx.u,{onClick:function(){o({to:"/s/$spaceGroupSlug",params:{spaceGroupSlug:t.slug}})},children:(0,r.jsx)(tx.u.Content,{label:(0,j.t)("join_a_space"),startIcon:"plus"})}):null},tY=n(269131),tJ=n(258920),tX=n(817751),t0=n(16876),t1=n(803846),t2=n(225712),t3=function(e){var t,n=(0,ef.F$)().spacesById,r=null!=(t=void 0===e?void 0:n[e])?t:{},o=r.unread_content_count,i=void 0===o?0:o,a=r.unread_notifications_count,s=void 0===a?0:a,l=i>0,c=s>0;return{badgeCount:(0,t2.J)(i,s),hasNotifications:c,hasUnreadContent:l}},t4=function(e){var t,n,o,i,a=e.currentAppearance,s=e.isAdmin,l=e.isLargeScreen,c=e.space,u=C.qj.update({spaceSlug:null!=(o=c.slug)?o:""}),d=(0,t0._f)(),f=!!(u&&d({to:u,fuzzy:!0}
1)),m=!s||!l,b=t3(c.id),y=b.badgeCount,h=b.hasNotifications,g=b.hasUnreadContent,v=(0,p.p)(c.id).resetUnreadCount,x=!!(0,tJ.O)({shouldShowLockIconForNonMembers:c.show_lock_icon_for_non_members&&!c.is_space_member,isPrivate:c.is_private,isAdmin:s}),j=(0,X.gl)({id:"space-".concat(c.id),disabled:m,data:{type:"space",id:c.id,spaceGroupId:c.space_group_id}}),_=j.attributes,w=j.listeners,O=j.setNodeRef,S=j.transform,P=j.transition,k=j.isDragging,I={transform:en.Ks.Translate.toString(S),transition:P};return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:O,style:I,className:(0,er.x)({"pointer-events-none opacity-50":k}),draggable:"false"},_,w),n=n={tabIndex:-1,children:(0,r.jsx)(tx.u,{hasUnreadContent:g,isActive:f,onClick:function(e){(0,tV.s6)(e)&&v()},rootElement:(0,r.jsx)(e2.N_,{draggable:"false","data-id":c.id,to:u}),children:(0,r.jsx)(tx.u.Content,{endContent:(g||h)&&(0,r.jsx)(t1.M,{count:y,variant:h?"branded":"secondary"}),label:null!=(i=c.name)?i:"",labelTestId:"space-name",startContent:(0,r.jsx)(tY.K,{appearance:a,customEmojiDarkUrl:c.custom_emoji_dark_url,customEmojiUrl:c.custom_emoji_url,emoji:c.emoji,emojiClassName:"text-sm justify-center",className:"flex !h-4 !max-h-4 !w-4 max-w-none items-center leading-none",lockIcon:(0,r.jsx)(tX.t,{name:"lock",size:"sm"}),shouldUseLockIcon:x})})})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},t5=function(e){var t=e.currentAppearance,n=e.isAdmin,o=e.isLargeScreen,i=e.spaceGroup,a=i.spaces,s=(0,m.useMemo)(function(){return a.map(function(e){return"space-".concat(e.id)})},[a]);return 0===a.length?(0,r.jsx)(tQ,{spaceGroup:i}):(0,r.jsx)(X.gB,{items:s,strategy:X._G,children:(0,r.jsx)("ul",{className:"flex list-none flex-col gap-y-1",children:a.map(function(e){return(0,r.jsx)("li",{children:(0,r.jsx)(t4,{currentAppearance:t,isAdmin:n,isLargeScreen:o,space:e})},e.id)})})})},t6=function(e){var t=(0,i.Od)().currentCommunityMember,n=(0,w.V8)(t),r=!!(0,c._V)({spaceGroup:e});return{canAdd:r||n,canCreateSpace:r,canManage:!!(0,c.ot)({spaceGroup:e}),isAdmin:n}};function t8(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t9(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return t8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t8(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var t7=function(e){var t,n,o=e.isPreview,i=e.position,a=e.spaceGroup,s=t9((0,m.useState)(!1),2),c=s[0],u=s[1],p=t9((0,B.C)(a.collapsed),2),f=p[0],b=p[1],y=t6(a),h=y.canAdd,g=y.canManage,v=y.canCreateSpace,x=y.isAdmin,j=(0,tq.wR)().currentAppearance,_=(0,d.t2)(),w=(0,I.n_)({mutationFn:function(){return(0,l.oK)(C.y4.toggleVisibility({spaceGroupId:String(a.id)}))}}).mutate,O=x&&_,S=(0,X.gl)({id:"space-group-".concat(a.id),disabled:!O,data:{type:"spaceGroup",id:a.id}}),P=S.attributes,k=S.listeners,N=S.setNodeRef,A=S.transform,E=S.transition,R=S.setActivatorNodeRef,L=S.isDragging,D={transform:en.Ks.Translate.toString(A),transition:E};return(0,r.jsxs)(tv.i,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:N,id:"space-group-".concat(a.slug),isDragging:L,style:D},P,k),n=n={children:[(0,r.jsx)(tv.i.Header,{collapseButtonRef:R,isActionsOpen:c,isCollapsed:f,isDragEnabled:O,isDragging:L,title:a.name,onCollapseToggle:function(){b(),w()},actions:!(void 0!==o&&o)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(tZ,{canManage:g,spaceGroup:a,onToggle:u}),h&&(0,r.jsx)(t$,{canCreateSpace:v,isAdmin:x,position:i,spaceGroup:a,onOpenChange:u})]})}),(0,r.jsx)(tv.i.Content,{isCollapsed:f,children:(0,r.jsx)(t5,{spaceGroup:a,currentAppearance:j,isAdmin:x,isLargeScreen:_})})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},ne=function(e){var t=e.spaceGroupWithSpaces,n=(0,m.useMemo)(function(){return t.map(function(e){return"space-group-".concat(e.id)})},[t]);return(0,r.jsx)(X.gB,{items:n,strategy:X._G,children:(0,r.jsx)("ul",{className:"flex list-none flex-col gap-y-4",children:t.map(function(e,t){return(0,r.jsx)("li",{children:(0,r.jsx)(t7,{position:t,spaceGroup:e})},e.id)})})})},nt=function(e){var t,n=e.spaceGroupWithSpaces,o=(0,i.Od)(),a=o.currentCommunityMember,s=o.data,l=(0,h.R)(),c=(0,p.s)().refetchSpaceNotifications;(0,m.useEffect)(function(){(null==a?void 0:a.id)&&c()},[null==a?void 0:a.id,c]);var u=!!a||(null==s||null==(t=s.current_community)?void 0:t.is_private)===!1;return(0,r.jsx)(ty.t,{name:"SidebarV3",fallback:tB,children:(0,r.jsxs)(tM.B,{footer:u&&!l&&(0,r.jsx)(th.V,{}),children:[(0,r.jsx)(tT.s,{}),u&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ne,{spaceGroupWithSpaces:n}),(0,r.jsx)(tD,{})]})]})})},nn=n(824836),nr=n(722125),no=function(e){return(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"&&null!==e&&"type"in e&&"id"in e&&("space"===e.type&&"spaceGroupId"in e&&"number"==typeof e.id&&"number"==typeof e.spaceGroupId||"spaceGroup"===e.type&&"number"==typeof e.id)},ni=function(e){return"space"===e.type},na=function(e){return"spaceGroup"===e.type},ns=function(e){var t=e.data.current;return no(t)?t:null},nl=n(551474),nc=n(946012);function nu(e){var t=e.spaceGroup,n=e.className,o=t.spaces.length>0;return(0,r.jsxs)("div",{id:t.slug,className:(0,er.x)("group relative",n),children:[(0,r.jsx)(nc.g,{className:"rounded-lg bg-c-sidebar-hover shadow-lg",children:(0,r.jsx)(nl.F,{canManage:!1,isCollapsed:!1,isDropdownOpen:!1,spaceGroup:t})}),(0,r.jsx)("div",{className:"opacity-0 bg-transparent pointer-events-none",children:(0,r.jsx)(ey.g,{children:o?t.spaces.map(function(e){return(0,r.jsx)(em.G,{space:e,isDragOverlay:!0},e.id)}):(0,r.jsx)(ep,{spaceGroup:t})})})]})}function nd(e){var t=e.activeItem,n=t.type,o=t.item,i="scale-[1.02] transition-transform duration-75 ease-in opacity-100 pointer-events-none cursor-grab";return"spaceGroup"===n?(0,r.jsx)(nu,{spaceGroup:o,className:i}):"space"===n?(0,r.jsx)(em.G,{space:o,className:(0,er.x)(i,"rounded-lg bg-c-sidebar-hover shadow-lg"),isDragOverlay:!0}):null}function np(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nf=function(e){var t,n,r,o=e.active,i=e.droppableContainers,a=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["active","droppableContainers"]),s=null==(r=o.data.current)?void 0:r.type,l=i.filter(function(e){if("spaceGroup"===s){var t;return(null==(t=e.data.current)?void 0:t.type)==="spaceGroup"}return!0});return(0,nn.fp)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},a),n=n={active:o,droppableContainers:l},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};function nm(e){var t,n=e.children,o=e.onSpaceGroupSortEnd,i=e.onSpaceSortEnd,a=e.spaceGroupWithSpaces,s=function(e){if(Array.isArray(e))return e}(t=(0,m.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return np(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return np(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1],u=(0,nn.FR)((0,nn.MS)(nn.AN,{activationConstraint:{distance:10}}),(0,nn.MS)(nn.IG,{activationConstraint:{delay:500,tolerance:10}}));return(0,r.jsxs)(nn.Mp,{sensors:u,collisionDetection:nf,modifiers:[nr.FN,nr.Q_],onDragStart:function(e){var t=ns(e.active);if(t){if(na(t)){var n=a.find(function(e){return e.id===t.id});if(!n)return;c({item:n,type:"spaceGroup"})}else if(ni(t)){var r=a.flatMap(function(e){return e.spaces}).find(function(e){return e.id===t.id});if(!r)return;c({item:r,type:"space"})}}},onDragEnd:function(e){var t=e.active,n=e.over;if(t&&n&&t.id!==n.id){var r=ns(t),a=ns(n);r&&a&&(na(r)&&na(a)?o({activeId:r.id,overId:a.id}):ni(r)&&ni(a)&&i({activeId:r.id,overId:a.id,spaceGroupId:a.spaceGroupId}),c(null))}},onDragCancel:function(){c(null)},children:[n,(0,r.jsx)(nn.Hd,{children:l&&(0,r.jsx)(nd,{activeItem:l})})]})}function nb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ny(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function nh(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){ny(i,r,o,a,s,"next",e)}function s(e){ny(i,r,o,a,s,"throw",e)}a(void 0)})}}function ng(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function nv(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function nx(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var nj=function(){var e,t=(0,a.t)(),n=t.helpers.isDataLoading,h=t.records,g=t.actions.refresh,v=(0,s.E)(),x=v.helpers,j=x.isDataLoading,_=x.spaceVisibleOnSidebar,w=v.actions.refresh,O=(0,i.Od)(),S=O.currentCommunityMember,P=O.isLoading,C=_(),k=j()||n()||P,I=(0,m.useCallback)(function(){return k?[]:h.map(function(e){var t=C.filter(function(t){return t.space_group_id===e.id&&(0,u._o)({space:t,spaceGroup:e})});return nv(ng({},e),{collapsed:(0,c.kW)({currentCommunityMember:S,spaceGroupId:e.id}),spaces:t})}).filter(function(e){return e.spaces.length>0||e.hide_non_member_spaces_from_sidebar||(0,c._V)({spaceGroup:e})})},[k,C,h,S]),N=function(e){if(Array.isArray(e))return e}(e=(0,m.useState)(I))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return nb(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nb(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),A=N[0],E=N[1],R=(0,p.s)().refetchSpaceNotifications;(0,m.useEffect)(function(){S&&R()},[S,R]),(0,m.useEffect)(function(){k||E(I())},[k,I]);var L=function(e){var t=e.spaceGroupId,n=e.orderedSpaceIds;return nh(function(){return nx(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),[4,(0,l.Ez)("/space_groups/".concat(t,"/reorder_spaces"),{method:"POST",body:JSON.stringify({order_array:n})})];case 1:return e.sent(),[4,w()];case 2:return e.sent(),[3,4];case 3:return console.error("Error while reordering space: ",e.sent()),[3,4];case 4:return[2]}})})()},D=(0,y.z)(),T=(0,b.c)().isCircleV4,M=(0,d.J6)();return k||D?(0,r.jsx)(o.t,{}):(0,r.jsx)(nm,{onSpaceGroupSortEnd:function(e){var t,n=e.activeId,r=e.overId,o=A.findIndex(function(e){return e.id===n}),i=A.findIndex(function(e){return e.id===r}),a=(0,f.p)(A,o,i);E(a),t=a.map(function(e){return e.id.toString()}),nh(function(){return nx(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,(0,l.Ez)("/space_groups/reorder",{method:"POST",body:JSON.stringify({order_array:t})})];case 1:return e.sent(),g(),[3,3];case 2:return console.error("Error while reordering space groups: ",e.sent()),[3,3];case 3:return[2]}})})()},onSpaceSortEnd:function(e){var t,n=e.activeId,r=e.overId,o=e.spaceGroupId,i=A.find(function(e){return e.id===o});if(i){var a=i.spaces.findIndex(function(e){return e.id===n}),s=i.spaces.findIndex(function(e){return e.id===r}),l=A.map(function(e){if(e.id==i.id){var t=(0,f.p)(i.spaces,a,s);return nv(ng({},e),{spaces:t})}return e});E(l);var c=null==(t=l.find(function(e){return e.id===i.id}))?void 0:t.spaces.map(function(e){return e.id});L({spaceGroupId:i.id,orderedSpaceIds:c})}},spaceGroupWithSpaces:A,children:T&&M?(0,r.jsx)(nt,{spaceGroupWithSpaces:A}):(0,r.jsx)(tb,{spaceGroupWithSpaces:A})})}},495617(e,t,n){"use strict";var r=n(391426),o=function(e){var t=e.children;return(0,r.jsx)("div",{className:"bg-c-sidebar mt-4 flex flex-col gap-y-6 px-3 lg:mt-6 lg:px-6",children:t})};n.d(t,{Z:()=>o})},551474(e,t,n){"use strict";n.d(t,{F:()=>p});var r=n(391426),o=n(973646),i=n(605274),a=n(497184),s=n.n(a),l=n(417980),c=function(e){var t=e.isActive,n=e.isCollapsed,a=void 0!==n&&n,c=(0,i.A5)();return(0,r.jsx)("div",{className:s()("ml-1 mr-auto flex size-5 rounded-sm py-0.5 transition-transform",{"hidden group-hover:flex":c,"hover:bg-c-sidebar-hover":!(void 0!==t&&t),"rotate-0":a,"rotate-90":!a}),"aria-label":a?(0,l.t)("community_sidebar.expand_group",{group_name:"space"}):(0,l.t)("community_sidebar.collapse_group",{group_name:"space"}),children:(0,r.jsx)(o.In,{type:"cheveron-right",size:16,"aria-hidden":!0})})};function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(e){var t,n=e.isDropdownOpen,o=e.canManage,a=e.children,l=(0,i.A5)();return(0,r.jsx)("div",{className:s()("flex w-full space-x-px",(u(t={},o?"group-hover:max-w-[calc(100%-56px)]":"group-hover:max-w-[calc(100%-32px)]",!n),u(t,o?"max-w-[calc(100%-56px)]":"max-w-[calc(100%-32px)]",n||!l),t)),children:a})},p=function(e){var t=e.isDropdownOpen,n=e.spaceGroup,o=e.isCollapsed,i=e.canManage;return(0,r.jsxs)(d,{isDropdownOpen:t,canManage:i,children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold leading-5 text-current","data-id":n.id,"data-testid":"spaces-left-sidebar",title:n.name,children:n.name}),(0,r.jsx)(c,{isCollapsed:o})]})}},918842(e,t,n){"use strict";n.d(t,{T:()=>P});var r=n(391426),o=n(909250),i=n(915779),a=n(605274),s=n(497184),l=n.n(s),c=n(933578),u=n(973646),d=n(529648),p=n(930260),f=n(417980),m=function(e){var t=e.position,n=e.isAdmin,o=e.canCreateSpaces,i=e.onCreateSpace,a=e.onCreateSpaceGroup,s=e.onToggle;return n||o?(0,r.jsx)(p.F,{children:(0,r.jsxs)(d.ms,{className:"flex items-center",buttonClassName:"flex py-0.5 w-5 h-5 rounded hover:bg-black/10 focus-visible:bg-black/10 transition-colors",menuButtonEl:"button",buttonLabel:(0,f.t)("community_sidebar.add_space_or_space_group"),button:(0,r.jsx)(u.In,{type:"16-add-new",size:16,"aria-hidden":"true",useWithFillCurrentColor:!0}),onToggle:s,appendTo:document.body,direction:"bottom-start","data-testid":"spacegroup-add-wrapper",children:[o&&(0,r.jsx)(d.ms.ItemWithLink,{onClick:i,children:(0,f.t)("add_space")}),n&&(0,r.jsx)(d.ms.ItemWithLink,{onClick:function(){a(t)},children:(0,f.t)("add_space_group")})]})}):null},b=n(551474),y=n(230763),h=n(451430),g=function(e){var t,n,o=e.onAddMembersClick,i=e.onEditSpaceGroupClick,a=e.seeMembersLink,s=e.seeSpace
1sLink,l=e.onToggle,c=e.canManage,p=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["onAddMembersClick","onEditSpaceGroupClick","seeMembersLink","seeSpacesLink","onToggle","canManage"]),m=(0,y.Od)().isViewOnlyMasquerading;return(0,r.jsxs)(d.ms,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:"flex items-center",buttonClassName:"flex py-0.5 w-5 h-5 rounded hover:bg-black/10 focus-visible:bg-black/10 transition-colors",menuButtonEl:"button",buttonLabel:(0,f.t)("space_groups.view_space_group_options"),button:(0,r.jsx)(u.In,{type:"16-menu-dots-horizontal",size:16,useWithFillCurrentColor:!0}),onToggle:l,popperOptions:{modifiers:[{name:"offset",options:{offset:[4,0]}}]},appendTo:document.body,direction:"bottom-start","data-testid":"spacegroup-options-wrapper",buttonDataTestId:"spacegroup-options-button"},p),n=n={children:[(0,r.jsx)(d.ms.ItemWithLink,{to:s,role:"menuitem",children:(0,f.t)("space_groups.see_spaces")}),void 0!==c&&c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.ms.ItemWithLink,{to:a,role:"menuitem",children:(0,f.t)("space_groups.see_members")}),!m&&(0,r.jsx)(d.ms.ItemWithLink,{onClick:function(){return(0,h.isFunction)(o)&&o()},role:"menuitem",children:(0,f.t)("space_groups.add_members")}),!m&&(0,r.jsx)(d.ms.ItemWithLink,{role:"menuitem",onClick:function(){return(0,h.isFunction)(i)&&i()},children:(0,f.t)("space_groups.edit_space_group")})]})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},v=function(e){var t=e.canManage,n=e.onAddMembersClick,o=e.onEditSpaceGroupClick,i=e.onToggle,a=e.seeMembersLink,s=e.seeSpacesLink,l=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["canManage","onAddMembersClick","onEditSpaceGroupClick","onToggle","seeMembersLink","seeSpacesLink"]);return(0,r.jsx)(g,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({canManage:t,onAddMembersClick:n,onEditSpaceGroupClick:o,onToggle:i,seeMembersLink:a,seeSpace
1sLink:s},l))},x=n(946012);function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _(e){if(Array.isArray(e))return e}function w(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e,t){return _(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||S(e,t)||w()}function S(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}}var P=(0,c.forwardRef)(function(e,t){var n,s,u,d=_(n=[e,t])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||S(n)||w(),p=d[0],f=d.slice(1),y=p.canManage,h=void 0!==y&&y,g=p.children,j=p.isAdmin,P=void 0!==j&&j,C=p.isCollapsed,k=void 0!==C&&C,I=p.isDragging,N=p.onAddMembersClick,A=p.onCollapseToggle,E=p.onCreateSpaceClick,R=p.onCreateSpaceGroupClick,L=p.onEditSpaceGroupClick,D=p.position,T=p.shouldDisplayOptions,M=p.spaceGroup,F=p.viewWrapperRef,K=p.className,B=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(p,["canManage","children","isAdmin","isCollapsed","isDragging","onAddMembersClick","onCollapseToggle","onCreateSpaceClick","onCreateSpaceGroupClick","onEditSpaceGroupClick","position","shouldDisplayOptions","spaceGroup","viewWrapperRef","className"]),q=O(f,1)[0],U=(0,a.A5)(),z=O((0,c.useState)(!1),2),W=z[0],$=z[1];return(0,r.jsxs)("div",(s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:q,className:l()("group relative",K)},B),u=u={role:void 0,tabIndex:-1,children:[(0,r.jsx)(x.g,{onCollapseToggle:void 0===A?function(){}:A,isDragging:void 0!==I&&I,isCollapsed:k,ref:F,children:(0,r.jsx)(b.F,{isDropdownOpen:W,canManage:h,spaceGroup:M,isCollapsed:k})}),(void 0===T||T)&&(0,r.jsxs)("div",{className:l()("text-c-sidebar absolute right-[1rem] top-[0.375rem] ml-1 flex gap-1 transition-opacity duration-75",{"invisible group-focus-within:visible group-hover:visible":U&&!W}),onClick:function(e){e.preventDefault(),e.stopPropagation()},"data-testid":"space-group-actions",children:[(0,r.jsx)(v,{onAddMembersClick:void 0===N?function(){}:N,onEditSpaceGroupClick:void 0===L?function(){}:L,seeMembersLink:i.y4.members({spaceGroupSlug:M.slug}),seeSpacesLink:i.y4.show({spaceGroupSlug:M.slug}),onToggle:$,canManage:h}),((0,o._V)({spaceGroup:M})||P)&&(0,r.jsx)(m,{position:D,isAdmin:P,onCreateSpace:void 0===E?function(){}:E,onCreateSpaceGroup:void 0===R?function(){}:R,canCreateSpaces:(0,o._V)({spaceGroup:M}),onToggle:$})]}),!k&&(void 0===g?null:g)]},Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(u)).forEach(function(e){Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(u,e))}),s))});P.displayName="SpaceGroupView"},946012(e,t,n){"use strict";var r=n(391426),o=n(230763),i=n(6418),a=n(497184),s=n.n(a);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){if(Array.isArray(e))return e}function u(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}}var p=(0,n(933578).forwardRef)(function(e,t){var n,a,l,p=c(n=[e,t])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||d(n)||u(),f=p[0],m=p.slice(1),b=f.isCollapsed,y=f.children,h=f.onCollapseToggle,g=f.isDragging,v=f.className,x=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(f,["isCollapsed","children","onCollapseToggle","isDragging","className"]),j=(c(m)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(m)||d(m,1)||u())[0],_=(0,o.Od)().currentCommunityMember;return(0,r.jsx)("button",(a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:j,type:"button",className:s()("text-c-sidebar hover:text-c-sidebar hover:bg-c-sidebar-hover focus-visible:text-c-sidebar focus-visible:bg-c-sidebar-hover focus-visible:outline-secondary mb-1 flex w-full select-none items-center justify-between rounded-md px-4 py-1.5 text-sm font-semibold transition-colors duration-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",{"cursor-grab":!g&&(0,i.V8)(_),"cursor-grabbing":g},v),"data-testid":"space-group",onClick:h,"aria-expanded":!(void 0!==b&&b)},x),l=l={children:y},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(l)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(l)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(l,e))}),a))});p.displayName="SpaceGroupViewWrapper",n.d(t,{g:()=>p})},97193(e,t,n){"use strict";var r=n(391426),o=function(e){var t,n,o=e.children,i=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children"]);return(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:"flex flex-col gap-y-1"},i),n=n={children:o},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{g:()=>o})},361537(e,t,n){"use strict";var r=n(391426),o=n(269131),i=n(973646),a=n(805950),s=n(258920),l=n(230763),c=n(340479),u=n(6418),d=n(570310),p=n(806124),f=n(534529),m=n(933578),b=n(202090),y=n(395123);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e){if(Array.isArray(e))return e}function v(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}}var j=(0,m.forwardRef)(function(e,t){var n,m,h,j=g(n=[e,t])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||x(n)||v(),_=j[0],w=j.slice(1),O=_.space,S=_.buttonLink,P=_.spaceNotificationDetail,C=void 0===P?{unread_content_count:0,unread_notifications_count:0}:P,k=_.style,I=_.className,N=_.isDragOverlay,A=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(_,["space","buttonLink","spaceNotificationDetail","style","className","isDragOverlay"]),E=(g(w)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(w)||x(w,1)||v())[0],R=(0,y.o)(),L=R.getActiveInactiveClasses,D=R.getUnreadClasses,T=(0,l.Od)().currentCommunityMember,M=(0,u.V8)(T),F=(0,b.wR)().currentAppearance,K=null!=C?C:{},B=K.unread_content_count,q=K.unread_notifications_count,U=void 0===q?0:q,z=B>0,W=U>0,$=(0,s.O)({shouldShowLockIconForNonMembers:O.show_lock_icon_for_non_members&&!O.is_space_member,isPrivate:O.is_private,isAdmin:M}),V=(0,p.p)(O.id).resetUnreadCount;return(0,r.jsx)("div",(m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:E,style:k,className:I,draggable:"false"}
1,A),h=h={tabIndex:-1,children:(0,r.jsxs)(f.N_,{to:(void 0===S?"/":S)||"/",className:(0,d.x)("focus-visible:outline-secondary select-none h-8.5 group flex items-center gap-2 !rounded-md px-4 py-1.5 transition-colors duration-75 focus-visible:rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",D(z),{"!bg-c-sidebar-hover !text-c-sidebar":void 0!==N&&N}),activeOptions:{includeSearch:!1},activeProps:{className:L(!0)},inactiveProps:{className:L(!1)},draggable:"false","data-id":O.id,onClick:function(e){(0,c.s6)(e)&&V()},children:[(0,r.jsx)("span",{className:"flex",children:(0,r.jsx)(o.K,{className:"flex !h-5 !max-h-5 !w-5 max-w-none items-center leading-none",emojiClassName:"text-sm justify-center",emoji:O.emoji,appearance:F,customEmojiUrl:O.custom_emoji_url,customEmojiDarkUrl:O.custom_emoji_dark_url,shouldUseLockIcon:$,lockIcon:(0,r.jsx)(i.In,{size:16,type:"lock-v2"})})}),(0,r.jsx)("span",{className:"truncate",children:(0,r.jsx)("h4",{className:(0,d.x)("text-sm truncate",{"font-medium":!z,"font-semibold":z}),"data-testid":"space-name",children:O.name})}),(z||W)&&(0,r.jsx)(a.M,{isGray:!W,children:U>0?U:B>99?"99+":B})]})},Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(h)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(h)).forEach(function(e){Object.defineProperty(m,e,Object.getOwnPropertyDescriptor(h,e))}),m))});j.displayName="SpaceView",n.d(t,{G:()=>j})},395123(e,t,n){"use strict";var r=n(345722),o=n(202090),i=function(){var e=(0,r.T)(),t=(0,o.wR)().currentTheme,n=e&&"custom"===t;return{getActiveInactiveClasses:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return r&&t||e&&!t?n?"bg-c-active-item-color rounded-md text-c-active-item-text-color focus:text-c-active-item-text-color hover:text-c-active-item-text-color cursor-default":"bg-brand rounded-md text-brand-button focus:text-brand-button hover:text-brand-button cursor-default":"bg-transparent text-c-sidebar focus:text-c-sidebar hover:text-c-sidebar cursor-pointer hover:bg-c-sidebar-hover focus:bg-c-sidebar-hover rounded-md"},getUnreadClasses:function(e){return e?"rounded-md font-semibold":""}}};n.d(t,{o:()=>i})},253344(e,t,n){"use strict";n.d(t,{u:()=>p});var r=n(391426),o=n(230763),i=n(605274),a=n(189363),s=n(906532),l=n(228823),c=n(16643),u=n(869889),d=function(e){var t=e.communitySlug,n=(0,s.mg)();return(0,r.jsx)(u.i,{className:"bg-c-sidebar justify-center !p-0",communitySlug:t,styles:n})},p=function(e){var t=e.isPreviewMode,n=(0,s.mg)(),u=(0,c.k)(),p=(0,a.H)().shouldShowBranding,f=(0,i.Km)(),m=(0,o.Od)().currentCommunity,b=(null!=m?m:{}).slug;return u||p?(0,r.jsxs)("div",{style:n,className:"border-c-sidebar bg-c-sidebar flex w-full flex-col gap-2 border-t px-6 pb-3.5 pt-4",children:[!f&&(0,r.jsx)(l.f,{isPreviewMode:void 0!==t&&t}),p&&(0,r.jsx)(d,{communitySlug:null!=b?b:""})]}):null}},223578(e,t,n){"use strict";n.d(t,{l:()=>y});var r=n(391426),o=n(497184),i=n.n(o),a=n(843134),s=n(981416),l=n(8570),c=n(410016),u=n(605274),d=n(189363),p=n(618817),f=n(16643),m=function(){var e=(0,f.k)(),t=(0,d.H)().shouldShowBranding;return{goLiveButtonHeight:39,poweredByHeight:16,extraContainerSpacing:(t||e?31:0)+(t&&e?8:0)}},b=function(){var e=(0,p.R)(),t=(0,u.J6)(),n=(0,s.Q)().shouldShowTrialBanner,r=(0,l.dc)().room,o=(0,d.H)().shouldShowBranding,i=(0,f.k)(),a=(0,c.Y)(),b=m(),y=b.goLiveButtonHeight,h=b.poweredByHeight,g=b.extraContainerSpacing;return e?{paddingBottom:0}:{paddingBottom:[48*!!a,63*!!t,63*!t,t&&n?48:0,t&&i?y:0,168*!!r,65*!t,o?h:0,g].reduce(function(e,t){return e+t},0)}},y=function(e){var t=e.children,n=b();return(0,r.jsx)("div",{className:i()("h-full"),style:n,children:(0,r.jsx)(a.r,{className:"h-full",options:{scrollbars:{autoHide:"leave",autoHideDelay:0}},children:t})})}},808775(e,t,n){"use strict";n.d(t,{u:()=>u});var r=n(391426),o=n(288513),i=n(451430),a=n(570310),s=n(417980),l=n(804939),c=function(e){var t=e.name,n=e.src,i=e.className,c=(0,l.P)();return(0,r.jsx)("img",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}
1({loading:"eager",id:"community-logo",alt:(0,s.t)("community_logo_alt",{community_name:t}),className:(0,a.x)("max-h-9 max-w-[14.375rem]",{"w-auto object-contain":c},i),src:n},(0,o.Bs)({anchor:"app-topbar-logo-image"})))},u=function(e){var t,n,a=e.communityName,s=e.logoType,l=e.logoUrl,u=e.as,d=void 0===u?"button":u,p=e.onLogoClick;return(0,r.jsx)(d,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:"w-full min-w-0",id:"community-logo-wrapper",onClick:function(){return(0,i.isFunction)(p)&&p()}},"button"===d&&{buttonProps:{type:"button"}},(0,o.Bs)({anchor:"app-topbar-logo"})),n=n={children:"logo"===s&&l?(0,r.jsx)(c,{name:a,src:l}):(0,r.jsxs)("div",{className:"text-c-header flex items-center gap-2",children:[l&&(0,r.jsx)("div",{className:"shrink-0",children:(0,r.jsx)(c,{name:a,src:l})}),(0,r.jsx)("div",{className:"w-full min-w-0 max-w-[15rem]",children:(0,r.jsx)("h1",{"data-testid":"title-name",className:"text-c-header truncate text-left text-lg font-semibold normal-case leading-7 tracking-normal",children:a})})]})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}},197184(e,t,n){"use strict";n.d(t,{X:()=>G});var r=n(391426),o=n(157485),i=n(451430),a=n(228242),s=n(605274),l=n(92406),c=n(973646),u=n(529648),d=n(570310),p=n(998202),f=function(e){var t=e.children,n=e.hasFullWidth,o=e.dropDownOptions,i=(0,p.P)();return(0,r.jsx)(u.ms,{appendTo:null!=i?i:void 0,direction:"bottom-start",transitionWrapperClassName:"mt-1 lg:-mt-2 !w-[16.25rem] !left-[1.65rem] lg:!-left-2.5",menuWrapperClassName:"!px-0 !mt-0",size:"full",className:(0,d.x)("h-full",{"w-full":void 0===n||n}),buttonWrapperClassName:"flex w-full h-full px-4 py-3",buttonClassName:"w-full focus-visible:outline-secondary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 rounded-md group",menuItemsClassName:"overflow-y-auto max-h-[calc(100vh-4rem)]",button:(0,r.jsxs)("div",{className:"flex w-full items-center justify-between",children:[t,(0,r.jsx)("div",{className:"group-hover:bg-c-header-active text-c-header group-hover:text-c-header-active ml-1.5 flex size-5 flex-col items-center justify-center rounded-full transition-colors duration-150",children:(0,r.jsx)(c.In,{size:12,type:"12-chevron-down",className:"!transition-none"})})]}),buttonDataTestId:"community-menu",children:(0,r.jsx)("div",{"data-testid":"community-dropdown-menu",children:(0,r.jsx)(u.ms.IconWithBadgeList,{options:void 0===o?[]:o})})})},m=n(808775),b=n(320759),y=n(230763),h=n(355104),g=n(202090),v=n(627252),x=n(417980),j=n(6418),_=n(915779),w=function(){var e=(0,y.Od)().currentCommunityMember,t=!!((0,j.V8)(e)||(0,j.JY)(e)),n=(0,x.t)("settings_nav_v3.content.label");return{isVisible:t,link:(0,j.V8)(e)?_.ty.content.files:_.ty.content.posts,icon:"20-doc-v3",iconSize:20,title:n}},O=n(941397),S=n(696208),P=n(965216),C=n(870547),k=n(117034),I=n(586555),N=n(310860),A=n(574653),E={value:"separator"};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function L(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return R(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return R(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var D=function(e){var t=e.memberCount,n=e.showCustomizeTheme,r=e.toggleTheme,o=e.viewAs,i=e.content,a=e.isWorkflowsEnabled,s=e.isAffiliatesEnabled,l=e.isBannerVisible,c=e.shortcutsModalButton,u=e.hasAIAgentsAccess,d=e.isCoursesV2Enabled,p=e.isCircleV4,f=(0,S.I)().isOverviewTabEnabled,m=(0,A.f)(),b=m.brandedAppsBuilder,y=m.brandedApp,h=(0,N.z)({select:function(e){return e.pathname}}),g=[];g.push({value:(0,x.t)("sidebar_admin_dashboard"),label:(0,x.t)("sidebar_admin_dashboard"),pathTo:P.S.index(),icon:"sw-home",iconSize:20});var v={value:"members",label:(0,x.t)("section_audience"),pathTo:_.Io.index(),icon:"20-users-v3",iconSize:20};return t&&(v.badge=String(t)),g.push(v),g.push.apply(g,L(i)),void 0!==p&&p&&g.push({value:(0,x.t)("sidebar_events"),label:(0,x.t)("sidebar_events"),pathTo:"/settings/events",icon:"20-event-ticket",iconSize:20}),void 0!==d&&d&&g.push({value:(0,x.t)("sidebar_courses"),label:(0,x.t)("sidebar_courses"),pathTo:C.v.overview(),icon:"20-graduate-cap-hollow",iconSize:20}
1),g.push({value:(0,x.t)("sidebar_email"),label:(0,x.t)("sidebar_email"),pathTo:O.t.email.overview,icon:"16-send",iconSize:20}),a&&g.push({value:(0,x.t)("sidebar_workflows"),label:(0,x.t)("sidebar_workflows"),pathTo:I.L.list(),icon:"20-flash-v3",iconSize:20}),g.push({value:(0,x.t)("analytics.analytics"),label:(0,x.t)("analytics.analytics"),pathTo:"/settings/analytics",icon:"20-analytics-v3",iconSize:20}),g.push({value:(0,x.t)("sidebar_ai_agents"),label:(0,x.t)("sidebar_ai_agents"),pathTo:"/settings/ai-agents/agents",icon:"20-community-bot",iconSize:20}),(void 0===u||u)&&g.push({value:(0,x.t)("sidebar_ai_inbox"),label:(0,x.t)("sidebar_ai_inbox"),pathTo:"/settings/ai-inbox",icon:"20-community-inbox",iconSize:20}),g.push({value:(0,x.t)("sidebar_paywalls"),label:(0,x.t)("sidebar_paywalls"),pathTo:"/settings/paywalls",icon:"20-currency-v3",iconSize:20}),s&&g.push({value:(0,x.t)("sidebar_paywalls_affiliates"),label:(0,x.t)("sidebar_paywalls_affiliates"),pathTo:"/settings/affiliates_settings",icon:"20-affiliates-v3",iconSize:20}),g.push({value:(0,x.t)("pricing_plans.title"),label:(0,x.t)("settings.billing.plans.title"),pathTo:(0,_.kP)(),icon:"20-card-v3",iconSize:20}),y.isEnabled&&g.push({value:(0,x.t)("settings_nav_v3.settings.branded_app"),label:(0,x.t)("settings_nav_v3.settings.branded_app"),pathTo:b.isEnabled?"/settings/plus":"/settings/plus/lite",icon:"16-20-mobile",iconSize:20}),g.push({label:(0,x.t)("settings_nav_v3.site.label"),value:(0,x.t)("settings_nav_v3.site.label"),icon:"20-display",pathTo:k.u.index(),iconSize:20}),g.push({label:(0,x.t)("settings_nav_v3.developers.title"),value:(0,x.t)("settings_nav_v3.developers.title"),icon:"20-code-tag",pathTo:f?O.t.developers.overview:O.t.developers.api,iconSize:20}),g.push({value:(0,x.t)("sidebar_settings"),label:(0,x.t)("sidebar_settings"),pathTo:"/settings",icon:"20-settings-v3",iconSize:20}),g.push(E),g.push({value:(0,x.t)("settings_nav_v3.site_builder.label"),label:(0,x.t)("settings_nav_v3.site_builder.label"),pathTo:O.t.content.pages,icon:"20-display",iconSize:20}),n&&g.push({value:(0,x.t)("customize_theme.title"),label:(0,x.t)("customize_theme.title"),pathTo:"/settings/theme",icon:"20-color-palette-v3",iconSize:20}),g.push.apply(g,L(r)),c&&g.push(c),g.push(E),l||g.push(o),g.push({value:(0,x.t)("sidebar_invite_member"),label:(0,x.t)("sidebar_invite_member"),pathTo:"".concat(O.t.members.invite,"?from=").concat(h),icon:"20-user-plus-v3",iconSize:20}),g},T=function(e){var t=e.isVisible,n=e.link,r=e.icon,o=e.iconSize,i=e.title;return t?[{value:i,label:i,pathTo:n,icon:r,iconSize:o}]:[]};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return M(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return M(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var K=function(e){var t=e.moderation,n=e.showToggleTheme,r=e.toggleTheme,o=e.content,i=e.shortcutsModalButton;return F(o).concat([t],F(n?[E]:[]),F(r),F(i?[i]:[]))},B=function(e){var t={value:(0,x.t)("sidebar_moderation"),label:(0,x.t)("sidebar_moderation"),pathTo:"/settings/moderation",icon:"20-shield-v3",iconSize:20};return e&&(t.badge=String(e)),t},q=n(224704),U=function(){var e=(0,q.J)();return{value:(0,x.t)("header_v3.keyboard_shortcuts"),label:(0,x.t)("header_v3.keyboard_shortcuts"),onClick:function(){e.show()},icon:"20-keyboard-shortcuts",iconSize:20}},z=function(e){var t=e.showToggleTheme,n=e.currentAppearance,r=e.toggleAppearance,o=void 0===r?i.noop:r;return t?[{value:n,label:n===g.xz.LIGHT?(0,x.t)("sidebar_switch_to_dark_mode"):(0,x.t)("sidebar_switch_to_light_mode"),onClick:o,icon:(g.xz.LIGHT,"20-moon-v3"),iconSize:20}]:[]},W=function(e){var t=e.showBanner;return{icon:"20-open-eye-v3",iconSize:20,label:(0,x.t)("view_as"),onClick:function(){setTimeout(function(){t()},0)},value:"viewAs"}};function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function V(e){return function(e){if(Array.isArray(e))return $(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return $(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return $(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var H=function(e){var t=e.isAdmin,n=e.isModerator,r=e.memberCount,o=e.moderationCount,i=e.showToggleTheme,a=e.showCustomizeTheme,s=e.isWorkflowsEnabled,l=(0,g.wR)(),c=l.currentAppearance,u=l.toggleAppearance,d=U(),p=z({currentAppearance:c,toggleAppearance:u,showToggleTheme:i}),f=(0,b.p0)(),m=f.isBannerVisible,x=W({showBanner:f.showBanner}),j=B(o),_=T(w()),O=(0,y.Od)().currentCommunity,S=D({memberCount:r,showCustomizeTheme:a,toggleTheme:p,viewAs:x,content:_,isWorkflowsEnabled:s,isAffiliatesEnabled:!!(null==O?void 0:O.affiliates_feature_flag_enabled),isBannerVisible:m,shortcutsModalButton:d,hasAIAgentsAccess:!!(null==O?void 0:O.ai_agents_feature_flag_enabled),isCoursesV2Enabled:(0,v.f)(),isCircleV4:(0,h.c)().isCircleV4});return t?S:n?K({moderation:j,showToggleTheme:i,toggleTheme:p,content:_,shortcutsModalButton:d}):V(d?[d]:[]).concat(V(p))},G=function(e){var t=e.communityName,n=void 0===t?"":t,c=e.isAdmin,u=e.isModerator,d=e.logoType,p=void 0===d?"icon":d,b=e.logoUrl,y=e.onLogoClick,h=e.showToggleTheme,g=e.showCustomizeTheme,v=e.memberCount,x=e.moderationCount,j=(0,s.Ub)("(max-width: 1023px)"),_=(0,a.J)(),w=(0,l.i)().display_community_switcher,O=H({isAdmin:void 0!==c&&c,isModerator:void 0!==u&&u,memberCount:v,moderationCount:x,showToggleTheme:void 0!==h&&h,showCustomizeTheme:void 0!==g&&g,isWorkflowsEnabled:(0,o.h)()}),S=j&&w;return S?(0,r.jsxs)("div",{className:"flex w-full items-center px-4",id:"community-logo-mobile-community-switcher",children:[(0,r.jsx)(m.u,{communityName:n,logoType:p,logoUrl:b,onLogoClick:function(){_.show()}}),(0,r.jsx)(f,{hasFullWidth:!1,dropDownOptions:O})]}):(0,i.isEmpty)(O)?(0,r.jsx)("div",{className:"px-4",id:"community-logo-no-dropdown",children:(0,r.jsx)(m.u,{communityName:n,logoType:p,logoUrl:b,onLogoClick:function(){if(S)return _.show();y&&y()}})}):(0,r.jsx)(f,{dropDownOptions:O,children:(0,r.jsx)(m.u,{communityName:n,logoType:p,logoUrl:b,as:"div"})})}},97823(e,t,n){"use strict";var r=n(391426),o=n(930260),i=n(497184),a=n.n(i),s=n(906532),l=function(e){var t=e.hasPadding,n=e.isSticky,i=e.children,l=e.className,c=(0,s.mg)();return(0,r.jsx)(o.F,{children:(0,r.jsx)("div",{className:a()(l,"top-0 z-30 flex h-16 min-h-[4rem] items-center justify-between gap-2",{"px-4":void 0===t||t,sticky:void 0===n||n}),"data-testid":"top_section_container",style:c,children:i})})};n.d(t,{y:()=>l})}
1,419320(e,t,n){"use strict";n.d(t,{e:()=>J});var r=n(391426),o=n(230763),i=n(6418),a=n(345722),s=n(298463),l=n(605274),c=n(202090),u=n(765724),d=n(355104),p=n(197184),f=n(97823),m=n(157485),b=n(451430),y=n(228242),h=n(92406),g=n(808775),v=n(534529),x=n(627252),j=n(417980),_=n(333504),w=n(762864),O=n(402284),S=n(722495),P=n(320759),C=n(941397),k=n(696208),I=n(965216),N=n(870547),A=n(117034),E=n(586555),R=n(955015),L=n(310860),D=n(915779),T=n(574653);function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return M(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return M(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var K=function(e){var t,n=e.memberCount,o=e.showCustomizeTheme,i=e.content,a=e.isWorkflowsEnabled,s=e.isAffiliatesEnabled,l=e.hasAIAgentsAccess,c=e.isCoursesV2Enabled,u="window",d=(0,k.I)().isOverviewTabEnabled,p=(0,T.f)(),f=p.brandedAppsBuilder,m=p.brandedApp,b=(0,P.p0)(),y=b.isBannerVisible,h=b.showBanner,g=(0,L.z)({select:function(e){return e.pathname}});return[{label:(t=(0,j.t)("sidebar_admin_dashboard"),"".concat(t).concat("\xa0".repeat(Math.max(0,28-t.length)))),icon:"compass",renderLink:(0,r.jsx)(v.N_,{to:I.S.index()})},function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,j.t)("section_audience"),icon:"people-circle",renderLink:(0,r.jsx)(v.N_,{to:D.Io.index()})},n&&{suffix:(0,r.jsx)(R.E,{label:String(n),variant:"primary"})})].concat(F(i),F(void 0!==c&&c?[{label:(0,j.t)("sidebar_courses"),icon:"graduate-cap",renderLink:(0,r.jsx)(v.N_,{to:N.v.overview()})}]:[]),[{label:(0,j.t)("sidebar_email"),icon:"paper-plane",renderLink:(0,r.jsx)(v.N_,{to:C.t.email.overview})}],F(a?[{label:(0,j.t)("sidebar_workflows"),icon:"zap",renderLink:(0,r.jsx)(v.N_,{to:E.L.list()})}]:[]),[{label:(0,j.t)("analytics.analytics"),icon:"chart-square",renderLink:(0,r.jsx)(v.N_,{to:"/settings/analytics"})},{label:(0,j.t)("sidebar_ai_agents"),icon:"sparkle-box",renderLink:(0,r.jsx)(v.N_,{to:"/settings/ai-agents/agents"})}],F(void 0===l||l?[{label:(0,j.t)("sidebar_ai_inbox"),icon:"inbox-ai",renderLink:(0,r.jsx)(v.N_,{to:"/settings/ai-inbox"})}]:[]),[{label:(0,j.t)("sidebar_paywalls"),icon:"money-hand",renderLink:(0,r.jsx)(v.N_,{to:"/settings/paywalls"})}],F(s?[{label:(0,j.t)("sidebar_paywalls_affiliates"),icon:"affiliates",renderLink:(0,r.jsx)(v.N_,{to:"/settings/affiliates_settings"})}]:[]),[{label:(0,j.t)("settings.billing.plans.title"),icon:"calendar",renderLink:(0,r.jsx)(v.N_,{to:(0,D.kP)()})}],F(m.isEnabled?[{label:(0,j.t)("settings_nav_v3.settings.branded_app"),icon:"tablet",renderLink:(0,r.jsx)(v.N_,{to:f.isEnabled?"/settings/plus":"/settings/plus/lite"})}]:[]),[{label:(0,j.t)("settings_nav_v3.site.label"),icon:u,renderLink:(0,r.jsx)(v.N_,{to:A.u.index()})},{label:(0,j.t)("settings_nav_v3.developers.title"),icon:"code-brackets",renderLink:(0,r.jsx)(v.N_,{to:d?C.t.developers.overview:C.t.developers.api})},{label:(0,j.t)("sidebar_settings"),icon:"settings-gear",renderLink:(0,r.jsx)(v.N_,{to:"/settings"})},"divider",{label:(0,j.t)("settings_nav_v3.site_builder.label"),icon:u,renderLink:(0,r.jsx)(v.N_,{to:C.t.content.pages})}],F(o?[{label:(0,j.t)("customize_theme.title"),icon:"color-swatch",renderLink:(0,r.jsx)(v.N_,{to:"/settings/theme"})}]:[]),["divider"],F(y?[]:[{label:(0,j.t)("view_as"),icon:"eye-open",onClick:function(){setTimeout(function(){h()},0)}}]),[{label:(0,j.t)("sidebar_invite_member"),icon:"people-add",renderLink:(0,r.jsx)(v.N_,{to:C.t.members.invite,search:(0,S.FC)({from:g})})}])},B=function(){var e=(0,o.Od)().currentCommunityMember;if(!((0,i.V8)(e)||(0,i.JY)(e)))return[];var t=(0,j.t)("settings_nav_v3.content.label"),n=(0,i.V8)(e)?D.ty.content.files:D.ty.content.posts;return[{label:t,icon:"page",renderLink:(0,r.jsx)(v.N_,{to:n})}]};function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function z(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return q(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return q(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var W=function(e){var t=e.isAdmin,n=e.isModerator,i=e.memberCount,a=e.moderationCount,s=e.showCustomizeTheme,l=e.isWorkflowsEnabled,c=(0,O.N)(),u=(0,w.S)(),d=(0,_.x)(),p=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,j.t)("sidebar_moderation"),icon:"shield-check",renderLink:(0,r.jsx)(v.N_,{to:"/settings/moderation"})},a&&{suffix:(0,r.jsx)(R.E,{label:String(a),variant:"primary"})}),f=B(),m=(0,o.Od)().currentCommunity,b=K({memberCount:i,showCustomizeTheme:s,content:f,isWorkflowsEnabled:l,isAffiliatesEnabled:!!(null==m?void 0:m.affiliates_feature_flag_enabled),hasAIAgentsAccess:!!(null==m?void 0:m.ai_agents_feature_flag_enabled),isCoursesV2Enabled:(0,x.f)()});if(c&&t){var y=u.items.map(function(e){return U({label:e.label,icon:e.icon},e.to?{renderLink:(0,r.jsx)(v.N_,{to:e.to})}:{onClick:e.onClick})}),h=d.map(function(e){var t;return U({label:e.label,icon:e.compassIcon},(null==(t=e.children)?void 0:t.length)?{submenu:e.children.map(function(e){return{label:e.label,renderLink:(0,r.jsx)(v.N_,{to:e.to})}})}:{renderLink:(0,r.jsx)(v.N_,{to:e.path})})}),g=b.indexOf("divider"),S=-1===g?[]:b.slice(g),P=S.indexOf("divider",1),C=-1===P?S:S.slice(0,P),k=-1===P?[]:S.slice(P+1);return z(y).concat(["divider"],z(k),["divider"],z(h),[{label:(0,j.t)("admin_nav_v4.settings"),icon:"settings-gear",renderLink:(0,r.jsx)(v.N_,{to:"/settings"})}],z(C))}return t?b:n?z(f).concat([p]):[]},$=n(570310),V=n(817751),H=n(34819),G=n(70719),Z=function(e){var t=e.children,n=e.menuOptions,o=void 0===n?[]:n;if(0===o.length)return(0,r.jsx)("div",{className:"flex items-center",children:t});var i=t?(0,r.jsxs)("button",{type:"button",className:"group inline-flex items-center gap-2 rounded-md focus-visible:shadow-focus focus-visible:outline-none","data-testid":"community-menu","aria-label":(0,j.t)("user_menu_options"),children:[t,(0,r.jsx)("span",{"aria-hidden":!0,
1className:(0,$.x)((0,H.O)({variant:"ghost",size:"sm"}),"pointer-events-none","group-hover:bg-hover group-hover:shadow-2xs group-hover:[--color-text-primary:var(--color-community-header-active-text)]","group-active:bg-active group-active:shadow-2xs group-active:[--color-text-primary:var(--color-community-header-active-text)]","group-data-[popup-open]:bg-active group-data-[popup-open]:shadow-2xs group-data-[popup-open]:[--color-text-primary:var(--color-community-header-active-text)]"),children:(0,r.jsx)(V.t,{name:"chevron-down",size:"sm"})})]}):(0,r.jsx)(H.K,{icon:"chevron-down",size:"sm",variant:"ghost","aria-label":(0,j.t)("user_menu_options"),"data-testid":"community-menu","data-header-icon-button":!0});return(0,r.jsx)(G.t,{align:"start",side:"bottom",options:o,"data-testid":"community-dropdown-menu",trigger:i})},Q=function(e){var t=e.communityName,n=void 0===t?"":t,i=e.isAdmin,a=e.isModerator,s=e.logoType,c=void 0===s?"icon":s,u=e.logoUrl,d=e.onLogoClick,p=e.showCustomizeTheme,f=e.memberCount,v=e.moderationCount,x=(0,l.Ub)("(max-width: 1023px)"),j=(0,y.J)(),_=(0,o.Od)().currentCommunityMember,w=(0,h.i)().display_community_switcher,O=W({isAdmin:void 0!==i&&i,isModerator:void 0!==a&&a,memberCount:f,moderationCount:v,showCustomizeTheme:void 0!==p&&p,isWorkflowsEnabled:(0,m.h)()});return x&&w?(0,r.jsxs)("div",{className:"flex w-full items-center",id:"community-logo-mobile-community-switcher",children:[(0,r.jsx)(g.u,{communityName:n,logoType:c,logoUrl:u,onLogoClick:function(){j.show()}}),(0,r.jsx)(Z,{menuOptions:O})]}):(0,b.isEmpty)(O)?(0,r.jsx)("div",{id:"community-logo-no-dropdown",children:(0,r.jsx)(g.u,{communityName:n,logoType:c,logoUrl:u,onLogoClick:_?d:void 0,as:_?"button":"div"})}):(0,r.jsx)(Z,{menuOptions:O,children:(0,r.jsx)(g.u,{communityName:n,logoType:c,logoUrl:u,as:"div"})})};function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var J=function(e){var t=e.isPreviewMode,n=void 0!==t&&t,m=e.previewCommunityName,b=e.previewLogoType,y=e.previewLogoUrl,h=(0,d.c)().isCircleV4,g=(0,o.Od)(),v=g.currentCommunity,x=g.currentCommunityMember,j=(0,s.J)().goToCommunityRootPath,_=(0,c.wR)(),w=_.currentAppearance,O=_.isDarkAppearance,S=(0,a.T)(),P=(0,i.V8)(x),C=(0,i.JY)(x),k=(0,u.Xt)(v,O),I=k.url,N=k.type,A=(0,l.Ab)(),E=(0,a.T)(),R=null!=v?v:{},L=R.member_count,D=R.moderation_count,T=R.dark_icon_url,M=R.dark_logo_url,F=I;w===c.xz.DARK&&E&&("logo"===N&&M?F=M:"icon"===N&&T&&(F=T));var K={communityName:n?void 0===m?"":m:null==v?void 0:v.name,isAdmin:P,isModerator:C,logoType:n?void 0===b?"icon":b:N,logoUrl:n?void 0===y?"":y:F,showToggleTheme:!0,showCustomizeTheme:S&&!A,onLogoClick:j,memberCount:L,moderationCount:D};return(0,r.jsx)(f.y,{hasPadding:!1,children:h?(0,r.jsx)(Q,Y({},K)):(0,r.jsx)(p.X,Y({},K))})}},805950(e,t,n){"use strict";var r=n(391426),o=n(497184),i=n.n(o),a=function(e){var t=e.children,n=e.isGray,o=void 0!==n&&n,a=e.ariaLabel;return(0,r.jsx)("div",{className:i()("ml-auto min-w-[1.75rem] rounded-sm px-1.5 py-1 text-center text-[11px] font-semibold leading-[11px]",{"bg-c-sidebar-badge text-c-sidebar-badge-text":!o,"border-primary bg-primary group-hover:bg-primary text-dark my-[-1px] border":o}),"data-testid":"unread-count","aria-label":a,children:t})};n.d(t,{M:()=>a})},336372(e,t,n){"use strict";var r=n(230763),o=n(445365),i=n(26583),a=n(933578),s=function(){var e=(0,r.Od)(),t=e.currentCommunity,n=e.currentCommunityMember,s=(0,o.s)(),l=s.newNotificationCount,c=s.fetchNewNotificationsCount,u=s.resetNewNotificationsCount,d=s.onNotificationEventReceive;return(0,i.M)(null==n?void 0:n.id,d),(0,a.useEffect)(function(){n&&c(null==t?void 0:t.id)},[null==t?void 0:t.id,n]),{newNotificationCount:l,resetNewNotificationsCount:u}};n.d(t,{Y:()=>s})},495118(e,t,n){"use strict";var r=n(593703),o=n(230763),i=n(393235),a=n(16876),s=n(204908),l=n(208690),c=n(6418),u=n(907037),d=function(){var e=(0,u.d)().isChecklistAvailable,t=(0,o.Od)(),n=t.currentCommunity,d=t.currentCommunityMember,p=t.currentCommunitySettings,f=(0,r.A)(),m=!!(0,a._f)()({to:i.aL.onboarding()}),b=(0,s.h)(),y=!!(0,c.V8)(d),h=(0,l.w)(),g=!!(y||(null==p?void 0:p.public_events_page));return{shouldShowOnboarding:e,isOnboardingActive:m,hideOnboardingConfirmationModal:b,currentCommunity:n,currentCommunitySettings:p,currentCommunityMember:d,isAdmin:y,spotlightSearch:h,toggleSpaceGroupDrawer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;f.show({position:e})},showSpotlightSearch:function(){h.show()},shouldShowAllEventsPage:g}};n.d(t,{c:()=>d})},853456(e,t,n){"use strict";n.d(t,{q:()=>b});var r=n(391426),o=n(230763),i=n(393235),a=n(417980),s=n(973646),l=n(395123),c=n(16876),u=n(534529),d=n(570310),p=function(e){var t=e.text,n=e.linkTo,o=e.icon,i=e.isActive,a=e.isDisabled,p=void 0!==a&&a,f=e.onClose,m=e.className,b=(0,l.o)().getActiveInactiveClasses,y=(0,c._f)(),h=b(void 0!==i&&i||!!y({to:n}));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(u.N_,{to:n,title:t,className:(0,d.x)("h-8.5 flex w-full items-center gap-2 !rou
1nded-md px-4 py-1.5 transition-colors duration-200",h,m),onClick:function(e){p&&e.preventDefault()},"aria-disabled":p,children:[(0,r.jsx)(s.In,{type:o,size:20}),(0,r.jsx)("h4",{className:"text-sm max-w-full truncate font-medium text-current",children:t})]}),f&&(0,r.jsx)("button",{className:(0,d.x)("focus-visible:outline-secondary absolute right-2 top-1/2 flex size-5 -translate-y-1/2 rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",h),type:"button",onClick:f,children:(0,r.jsx)(s.In,{type:"16-close",size:16})})]})},f=n(621398);function m(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var b=function(e){var t=e.isDisabled,n=void 0!==t&&t,s=e.isFeedLinkActive,l=(0,f.j)(),c=l.shouldShowOnboarding,u=l.hideOnboardingModal,d=(0,o.Od)().currentCommunity,b=(null!=d?d:{}).home_page_enabled;return c||b?(0,r.jsx)("nav",{"aria-label":(0,a.t)("secondary_navigation_bar"),children:(0,r.jsxs)("ul",{className:"bg-c-sidebar mt-4 flex list-none flex-col gap-y-1 px-3 lg:mt-6 lg:px-6",children:[c&&(0,r.jsx)("li",{className:"relative",children:(0,r.jsx)(p,{text:(0,a.t)("getting_started"),linkTo:i.aL.onboarding(),icon:"20-todo-list-v3",isDisabled:n,onClose:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,u.show()];case 1:return e.sent(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){m(i,r,o,a,s,"next",e)}function s(e){m(i,r,o,a,s,"throw",e)}a(void 0)})})()}})}),b&&(0,r.jsx)("li",{className:"relative",children:(0,r.jsx)(p,{text:(0,a.t)("feed"),linkTo:i.aL.feed(),icon:"20-feed-v3",isDisabled:n,isActive:void 0!==s&&s})})]})}):null}},621398(e,t,n){"use strict";var r=n(204908),o=n(907037),i=function(){return{shouldShowOnboarding:(0,o.d)().isChecklistAvailable,hideOnboardingModal:(0,r.h)()}};n.d(t,{j:()=>i})},739754(e,t,n){"use strict";var r=n(391426),o=n(497184),i=n.n(o),a=function(e){var t=e.children,n=e.className;return(0,r.jsx)("div",{className:i()("fixed bottom-0 flex w-[inherit] flex-col items-center bg-transparent sm:max-w-[21.25rem] md:max-w-[18.5rem]",n),children:t})};n.d(t,{D:()=>a})},228823(e,t,n){"use strict";n.d(t,{f:()=>y,m:()=>j});var r=n(391426),o=n(973646),i=n(8570),a=n(454776),s=n(230763),l=n(6418),c=n(570310),u=n(417980),d=n(233070),p=n(387099),f=n(355104),m=n(906532),b=n(16643),y=function(e){var t=e.isPreviewMode,n=e.inSettings,y=void 0!==n&&n,h=(0,f.c)().isCircleV4,g=(0,s.Od)(),v=g.currentCommunityMember,x=g.isViewOnlyMasquerading,j=(0,i._J)({enabled:!!v}),_=j.isLoading,w=j.isMonthlyHourLimitReached,O=j.isStorageLimitReached,S=(0,a.H)(),P=(0,m.mg)(),C=(0,b.k)(),k=!(0,l.V8)(v)&&(_||w||O);return C?h?(0,r.jsx)(d.u,{triggerSize:y?"sm":"md"}):(0,r.jsx)("div",{className:(0,c.x)("flex w-full items-center justify-between",{"pl-4 pr-0":y,"bg-c-sidebar":!y,"cursor-not-allowed":
1x}),style:P,children:(0,r.jsx)(p.$,{full:!0,onClick:function(){S.show()},variant:"secondary-light",disabled:k,className:(0,c.x)("!border-dark hover:bg-secondary px-4 py-[8.5px] font-medium transition-colors duration-150 ease-in-out",{"pointer-events-none":void 0!==t&&t||x}),children:(0,r.jsxs)("div",{className:"text-selector-active flex items-center justify-center",children:[(0,r.jsx)(o.In,{type:"16-go-live",size:16,className:"text-default mr-2"}),(0,u.t)("sidebar_footer_v3.go_live")]})})}):null},h=n(568316),g=n(248638),v=n(693410),x=n(734527),j=function(){var e,t,n,a=(0,i.dc)(),s=a.room,l=a.canManage,c=a.handleNavigateToRoom,d=a.handleEndStream,f=(0,g.f)({title:(0,u.t)("live_streams.".concat((0,v.sA)(s),"_ended.confirm")),onConfirm:d}),m=f.confirmModal,b=f.onConfirmButtonClick;return s?(0,r.jsxs)("div",{className:"bg-sidebar-footer-live-indicator mb-1 w-full max-w-[256px] rounded-lg p-4",children:[(0,r.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(x.J,{size:"6",src:null==s||null==(e=s.creator)?void 0:e.avatar_url,name:null==s||null==(t=s.creator)?void 0:t.name}),(0,r.jsx)(h.o.BodySm,{color:"text-white max-w-[15ch]",truncate:!0,children:null==s||null==(n=s.creator)?void 0:n.name}),(0,r.jsx)(o.In,{type:"24-live-waveform",size:24})]}),(0,r.jsx)("div",{className:"bg-c-sidebar-badge flex items-center justify-center rounded-[4px] px-2 py-1",children:(0,r.jsx)("span",{className:"text-xs font-bold uppercase leading-3 text-white",children:(0,u.t)("sidebar_footer_v3.live")})})]}),(0,r.jsx)(h.o.BodyMd,{color:"text-white line-clamp-2",weight:"font-semibold",children:null==s?void 0:s.name}),(0,r.jsx)(p.$,{full:!0,className:"!bg-circle mt-4",onClick:c,children:(0,u.t)("sidebar_footer_v3.join")}),l&&(0,r.jsxs)(h.o.BodyXs,{color:"text-white mt-2",children:[(0,u.t)("live_streams.room.cant_join"),(0,r.jsx)("button",{type:"button",className:"ml-1 cursor-pointer text-xs font-semibold text-white",onClick:b,children:(0,u.t)("live_streams.room.".concat((0,v.sA)(s),".end"))})]}),m]}):null}},16643(e,t,n){"use strict";var r=n(8570),o=n(230763),i=n(6418),a=function(){var e=(0,o.Od)(),t=e.isLoading,n=e.currentCommunityMember,a=(0,r.dc)().room;return!t&&(0,i.tJ)(n)&&!a};n.d(t,{k:()=>a})},741835(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(618817),a=function(e){var t=e.children,n=(0,i.R)();return(0,r.jsx)("div",{className:(0,o.x)("bg-c-sidebar flex h-full max-h-full flex-col",n?"w-full":"w-sidebar-v3 fixed"),children:t})};n.d(t,{a:()=>a})},906532(e,t,n){"use strict";var r=n(68981),o=n(202090),i=n(922896),a=function(){var e=(0,o.wR)(),t=e.customColors,n=e.isCustomTheme,r=e.currentTheme,a=e.currentAppearance,s=(null==(c=t[a])?void 0:c.sidebar_background_color)||"#fff",l="#fff";if("custom"!==r){var c,u,d,p=null===o.$y||void 0===o.$y||null==(d=o.$y[r])||null==(u=d[a])?void 0:u["--color-community-sidebar-background"];p&&(l=p)}return n?(0,i.Mj)(s):(0,i.Mj)(l)},s=function(){return a().toHex()},l=function(){var e=a();return e.isDark()?e.lighten(.1).toHex():e.darken(.1).toHex()},c=function(){var e=s();return(0,r.R)()?{backgroundColor:e}:{}},u=function(){var e=l();return(0,r.R)()?{borderColor:e}:{}};n.d(t,{aT:()=>l,m:()=>s,mg:()=>u,sC:()=>c})},489364(e,t,n){"use strict";n.d(t,{i:()=>m});var r=n(391426),o=n(570310),i=n(605274),a=n(817751),s=n(892907),l=n(892002);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){if(Array.isArray(e))return e}function d(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}}var f=(0,n(933578).forwardRef)(function(e,t){var n,i,a,s=u(n=[e,t])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||p(n)||d(),l=s[0],c=s.slice(1),f=l.children,m=l.className,b=l.isDragging,y=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(l,["children","className","isDragging"]),h=(u(c)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(c)||p(c,1)||d())[0];return(0,r.jsx)("div",(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ref:h,className:(0,o.x)("group/collapsible-section flex w-full flex-col",{"pointer-events-none opacity-50":void 0!==b&&b},m)}
1,y),a=a={tabIndex:-1,children:f},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(a)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(a,e))}),i))});f.displayName="CollapsibleSection";var m=Object.assign(f,{Header:function(e){var t=e.actions,n=e.collapseButtonRef,c=e.isActionsOpen,u=e.isCollapsed,d=void 0!==u&&u,p=e.isDragEnabled,f=void 0!==p&&p,m=e.isDragging,b=void 0!==m&&m,y=e.onCollapseToggle,h=e.title,g=(0,i.A5)();return(0,r.jsxs)("div",{className:(0,o.x)("flex h-9 w-full items-center gap-1 rounded-md px-3 transition-colors duration-200","group/header has-[[data-collapse-trigger]:focus-visible]:bg-hover has-[[data-collapse-trigger]:hover]:bg-hover has-[[data-collapse-trigger]:focus-visible]:outline has-[[data-collapse-trigger]:focus-visible]:outline-2 has-[[data-collapse-trigger]:focus-visible]:outline-offset-2 has-[[data-collapse-trigger]:focus-visible]:outline-primary"),children:[(0,r.jsxs)("button",{ref:n,type:"button","data-collapse-trigger":!0,className:(0,o.x)("flex min-w-0 flex-1 items-center gap-1 focus-visible:outline-none",{"cursor-grab":f&&!b,"cursor-grabbing":f&&b}),"aria-expanded":!d,onClick:y,children:[(0,r.jsx)(s.o5,{className:"truncate",color:"primary",component:"span",variant:"heading-sm",children:h}),(0,r.jsx)("span",{className:(0,o.x)("inline-flex shrink-0 items-center justify-center transition-transform",d?"rotate-0":"rotate-180",g&&"hidden group-focus-within/header:inline-flex group-hover/header:inline-flex"),children:(0,r.jsx)(a.t,{name:"chevron-triangle-down",color:"primary",size:"md"})})]}),t&&(0,r.jsx)("div",{className:(0,o.x)("inline-flex shrink-0 items-center gap-1",g&&!(void 0!==c&&c)&&"hidden group-focus-within/header:inline-flex group-hover/header:inline-flex",l.Wm),"data-testid":"space-group-actions",children:t})]})},Content:function(e){var t,n,i=e.children,a=e.isCollapsed,s=void 0!==a&&a;return(0,r.jsx)("div",{"aria-hidden":s,className:(0,o.x)("grid overflow-hidden transition-[grid-template-rows,margin-top] duration-200 ease-out motion-reduce:transition-none",s?"mt-0 grid-rows-[0fr]":"mt-1 grid-rows-[1fr]"),children:(0,r.jsx)("div",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({className:"min-h-0 overflow-hidden"},s&&{inert:!0}),n=n={children:void 0===i?null:i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))})}})},392573(e,t,n){"use strict";n.d(t,{V:()=>N});var r=n(391426),o=n(570310),i=n(817751),a=n(933578),s=n(538749),l=n(19577);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u=function(){var e,t=(0,l.x)(),n=t.shouldShow,u=t.isUrgent,d=t.title,p=t.onCtaClick,f=function(e){if(Array.isArray(e))return e}(e=(0,a.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return c(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=f[0],b=f[1];if(!n)return null;var y=(0,r.jsxs)("button",{type:"button",onClick:p,onMouseEnter:function(){return b(!0)},onMouseLeave:function(){return b(!1)},className:(0,o.x)("inline-flex h-9 w-full items-center justify-center gap-2 rounded-md border px-4 text-sm font-medium leading-5 whitespace-nowrap shrink-0 shadow-2xs focus-visible:outline-none","transition-colors",u?"border-warning bg-warning-light text-primary hover:brightness-95":"text-primary border-primary bg-primary hover:bg-hover active:bg-active focus-visible:border-focus focus-visible:shadow-focus"),children:[(0,r.jsx)(i.t,{name:"arrow-up-circle",size:"md",color:u?"warning":"primary"}),(0,r.jsx)("span",{className:"truncate",children:d})]});return u?y:(0,r.jsx)(s.b,{active:m,className:"rounded-md",children:y})},d=n(8570),p=n(189363),f=n(906532),m=n(16643),b=n(892002),y=n(230763),h=n(6418),g=n(233070),v=function(e){var t=e.isPreviewMode,n=(0,y.Od)(),o=n.currentCommunityMember,i=n.isViewOnlyMasquerading,a=(0,d._J)({enabled:!!o}),s=a.isLoading,l=a.isMonthlyHourLimitReached,c=a.isStorageLimitReached,u=!(0,h.V8)(o)&&(s||l||c);return(0,r.jsx)(g.u,{disabled:i||u,isPreviewMode:void 0!==t&&t})},x=n(973646),j=n(248638),_=n(693410),w=n(844842),O=n(739042),S=n(892907),P=n(417980),C=function(){var e,t,n,o,i=(0,d.dc)(),a=i.room,s=i.canManage,l=i.handleNavigateToRoom,c=i.handleEndStream,u=(0,j.f)({title:(0,P.t)("live_streams.".concat((0,_.sA)(a),"_ended.confirm")),onConfirm:c}),p=u.confirmModal,f=u.onConfirmButtonClick;return a?(0,r.jsx)("div",{className:"p-2 mb-1 w-full",children:(0,r.jsxs)("div",{className:"bg-sidebar-footer-live-indicator rounded-lg p-4 text-grey-50",children:[(0,r.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,r.jsx)(w.t,{src:null==(t=a.creator)?void 0:t.avatar_url,name:null!=(e=null==(n=a.creator)?void 0:n.name)?e:"",size:"sm"}),(0,r.jsx)(S.o5,{variant:"body-sm",color:"current",className:"max-w-[15ch] truncate",children:null==(o=a.creator)?void 0:o.name}),(0,r.jsx)(x.In,{type:"24-live-waveform",size:24})]}),(0,r.jsx)("div",{className:"bg-c-sidebar-badge flex shrink-0 items-center justify-center rounded px-2 py-1",children:(0,r.jsx)("span",{className:"text-xs font-bold uppercase leading-3 text-white",children:(0,P.t)("sidebar_footer_v3.live")})})]}),(0,r.jsx)(S.o5,{variant:"label-md",color:"current",className:"line-clamp-2",children:a.name}),(0,r.jsx)(O.$,{variant:"secondary",fullWidth:!0,className:"mt-4",onClick:l,children:(0,P.t)("sidebar_footer_v3.join")}),s&&(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-1",children:[(0,r.jsx)(S.o5,{variant:"label-xs",color:"current",component:"span",children:(0,P.t)("live_streams.room.cant_join")}),(0,r.jsx)("button",{type:"button",className:"cursor-pointer text-xs font-semibold text-white",onClick:f,children:(0,P.t)("live_streams.room.".concat((0,_.sA)(a),".end"))})]}),p]})}):null},k=n(409858),I=function(){var e,t=(0,y.Od)().currentCommunity,n=null!=(e=null==t?void 0:t.slug)?e:"";return(0,r.jsx)("div",{className:"flex items-center justify-center px-4 opacity-60",children:(0,r.jsx)(k.N,{color:"secondary",href:"https://circle.so/?utm_source=powered-by&community=".concat(n),rel:"noopener noreferrer",target:"_blank",typography:"label-xs",variant:"custom",children:(0,P.t)("powered_by_circle")})})},N=function(e){var t=e.isPreviewMode,n=(0,d.dc)().room,i=(0,m.k)(),a=(0,p.H)().shouldShowBranding,s=(0,l.x)().shouldShow,c=(0,f.mg)();return n||i||a||s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C,{}),(i||a||s)&&(0,r.jsxs)("div",{style:c,className:(0,o.x)("border-c-sidebar bg-c-sidebar flex shrink-0 flex-col gap-2 border-t px-5 py-4",b.Wm),children:[s&&(0,r.jsx)(u,{}),i&&(0,r.jsx)(v,{isPreviewMode:void 0!==t&&t}),a&&(0,r.jsx)(I,{})]})]}):null}},916855(e,t,n){"use strict";n.d(t,{S:()=>g});var r=n(391426),o=n(974618),i=n(927561),a=n(51730),s=n(915779),l=n(117211),c=n(791009),u=n(258752),d=n(417980),p=function(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.l.Item,{name:"name",label:(0,d.t)("link_name"),description:(0,d.t)("link_name_description"),hideBorder:!0,isFirstChild:!0,children:(0,r.jsx)(i.l.Input,{})}),(0,r.jsx)(i.l.Item,{name:"url",label:(0,d.t)("link_url"),description:(0,d.t)("link_url_description"),hideBorder:!0,children:(0,r.jsx)(i.l.Input,{})})]})},f=n(243994),m="sidebar-v3-add-link-form",b=f.Ik().shape({name:f.Yj().required((0,d.t)("link_name_required")),url:f.RZ(function(e){return"string"==typeof e&&e.startsWith("mailto:")?f.Yj().trim().test("mailto-email",(0,d.t)("link_url_invalid"),function(e){return!!e&&f.Yj().email().isValidSync(e.replace(/^mailto:/,""))}).required((0,d.t)("link_url_required")):f.Yj().url((0,d.t)("link_url_invalid")).required((0,d.t)("link_url_required"))})}),y=function(e){var t=e.isEdit,n=void 0!==t&&t,o=e.link,f=e.onOpenChange,y=e.open,h=function(){l.b.all(),f(!1)},g=(0,u.n_)({mutationFn:function(e){return(0,a.oK)(s.iK.communities.communityLinks.
1create(),e)},onSuccess:h}),v=g.mutate,x=g.isPending,j=(0,u.n_)({mutationFn:function(e){return(0,a.$H)(s.iK.communities.communityLinks.update({communityLinkId:null==o?void 0:o.id.toString()}),e)},onSuccess:h}),_=j.mutate,w=j.isPending,O=n?w?(0,d.t)("link_updating"):(0,d.t)("link_update"):x?(0,d.t)("link_creating"):(0,d.t)("link_create");return(0,r.jsx)(c.a.Root,{open:y,onOpenChange:f,size:"md",children:(0,r.jsxs)(c.a.Content,{children:[(0,r.jsx)(c.a.Header,{title:n?(0,d.t)("edit_link"):(0,d.t)("add_link"),showCloseButton:!0}),(0,r.jsx)(c.a.Body,{children:(0,r.jsx)(i.l,{id:m,defaultValues:n&&o?{name:o.name,url:o.url}:{name:"",url:""},validationSchema:b,onSubmit:function(e){n?_(e):v(e)},children:(0,r.jsx)(p,{})})}),(0,r.jsx)(c.a.Footer,{secondaryAction:{label:(0,d.t)("cancel")},primaryAction:{label:O,type:"submit",form:m,loading:x||w}})]})})},h=o.PT.create(function(e){var t=e.isEdit,n=e.link,i=(0,o.hS)();return(0,r.jsx)(y,{isEdit:t,link:n,open:i.visible,onOpenChange:function(e){e||i.hide()}})}),g=function(){return(0,o.hS)(h)}},892666(e,t,n){"use strict";var r=n(230763),o=n(51730),i=n(6418),a=n(915779),s=n(117211),l=n(933578),c=n(258752);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var d=[],p=function(e,t){if(e.length!==t.length)return!0;var n=new Map(t.map(function(e){return[e.id,e]}));return e.some(function(e){var t=n.get(e.id);return e.name!==(null==t?void 0:t.name)||e.url!==(null==t?void 0:t.url)})},f=function(){var e,t,n=(0,r.Od)(),f=n.currentCommunity,m=n.currentCommunityMember,b=null!=(t=null==f?void 0:f.links)?t:d,y=function(e){if(Array.isArray(e))return e}(e=(0,l.useState)(b))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return u(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),h=y[0],g=y[1],v=(0,i.V8)(m),x=(0,c.n_)({mutationFn:function(e){var t=e.links_order_array;return(0,o.$H)(a.iK.communities.communityLinks.reorder(),{links_order_array:t})},onSuccess:function(){s.b.all()}}).mutate;return(0,l.useEffect)(function(){p(b,h)&&g(b)},[b,h]),{canSeeLinks:v||b.length>0,isAdmin:v,onSort:function(e){g(e),x({links_order_array:e.map(function(e){return e.id.toString()})})},orderedList:h}};n.d(t,{J:()=>f})},460248(e,t,n){"use strict";var r=n(391426),o=n(230763),i=n(393235),a=n(817751),s=n(16876),l=n(534529),c=n(417980),u=n(570310),d=n(621398),p=n(654030),f=n(112953),m=function(e){var t=e.isDisabled,n=void 0!==t&&t,m=e.isFeedLinkActive,b=(0,f.r)().getActiveInactiveClasses,y=(0,d.j)(),h=y.shouldShowOnboarding,g=y.hideOnboardingModal,v=(0,o.Od)().currentCommunity,x=(null!=v?v:{}).home_page_enabled,j=(0,s._f)(),_=j({to:i.aL.feed()}),w=!!j({to:i.aL.onboarding()});return h||x?(0,r.jsx)("nav",{"aria-label":(0,c.t)("secondary_navigation_bar"),children:(0,r.jsxs)("ul",{className:"flex list-none flex-col gap-y-1",children:[h&&(0,r.jsx)("li",{children:(0,r.jsx)(p.u,{isActive:w,isDisabled:n,hoverScope:"scoped",rootElement:(0,r.jsx)(l.N_,{to:i.aL.onboarding()}),children:(0,r.jsx)(p.u.Content,{label:(0,c.t)("getting_started"),startIcon:"to-do-list",endContent:(0,r.jsx)("button",{"aria-label":(0,c.t)("close"),className:(0,u.x)("shrink-0 rounded-md p-0.5",b(w)),type:"button",onClick:function(e){e.preventDefault(),e.stopPropagation(),g.show()},disabled:n,children:(0,r.jsx)(a.t,{name:"cross-small",size:"sm"})})})})}),x&&(0,r.jsx)("li",{children:(0,r.jsx)(p.u,{isActive:!!_||void 0!==m&&m,isDisabled:n,rootElement:(0,r.jsx)(l.N_,{to:i.aL.feed()}),children:(0,r.jsx)(p.u.Content,{label:(0,c.t)("feed"),startIcon:"bullet-list"})})})]})}):null};n.d(t,{s:()=>m})}
1,654030(e,t,n){"use strict";n.d(t,{u:()=>d});var r=n(391426),o=n(570310),i=n(817751),a=n(892907),s=function(e){var t=e.endContent,n=e.label,s=e.labelTestId,l=e.showEndContentOnlyOnHover,c=e.startContent,u=e.startIcon;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex w-full min-w-0 items-center gap-2","data-hover-trigger":!0,children:[c,!c&&u&&(0,r.jsx)(i.t,{name:u,size:"sm"}),(0,r.jsx)(a.o5,{className:"flex-1",color:"current",component:"span","data-testid":s,truncate:!0,variant:"label-sm",children:n})]}),t&&(0,r.jsx)("div",{className:(0,o.x)("inline-flex shrink-0 items-center",void 0!==l&&l&&"hidden group-hover/sidebar-item:inline-flex group-focus-within/sidebar-item:inline-flex"),children:t})]})},l=n(933578),c=n(112953),u=function(e){var t=l.Children.only(e);if(!(0,l.isValidElement)(t)||t.type!==s)throw Error("SidebarItem must have a SidebarItem.Content child");return t.props},d=Object.assign(function(e){var t,n,i=e.children,a=e.className,s=e.hasUnreadContent,d=e.isActive,p=e.isDisabled,f=void 0!==p&&p,m=e.onClick,b=e.rootElement,y=e.hoverScope,h=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["children","className","hasUnreadContent","isActive","isDisabled","onClick","rootElement","hoverScope"]),g=u(i).label,v=(0,c.r)(),x=v.getActiveInactiveClasses,j=v.getUnreadClasses,_=(0,o.x)("flex w-full min-w-0 items-center gap-2 h-9 px-3 rounded-md text-start text-sm font-medium leading-5 no-underline transition-colors duration-200 group/sidebar-item",x(void 0!==d&&d,void 0===y?"direct":y),j(void 0!==s&&s),a),w=function(e,t){f?e.preventDefault():(null==m||m(e),null==t||t(e))};if(b&&(0,l.isValidElement)(b)){var O=b.props;return(0,l.cloneElement)(b,{"aria-disabled":f,className:(0,o.x)(O.className,_),title:g,children:i,onClick:function(e){w(e,O.onClick)}})}return(0,r.jsx)("button",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({type:"button","aria-disabled":f,className:_,disabled:f,title:g},h),n=n={onClick:w,children:i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},{Content:s})},49851(e,t,n){"use strict";var r=n(391426),o=n(570310),i=n(843134),a=n(417980),s=n(288513),l=n(618817),c=n(618445),u=function(e){var t,n,u=e.children,d=e.footer,p=(0,l.R)(),f=(0,c.X)();return(0,r.jsxs)("aside",(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({"aria-label":(0,a.t)("left_sidebar"),className:(0,o.x)("bg-primary dark:bg-secondary flex flex-col h-full max-h-full",p?"w-full":"w-sidebar-v3 fixed"),style:f},(0,s.Bs)({anchor:"app-sidebar"})),n=n={children:[(0,r.jsx)("div",{className:"min-h-0 flex-1",children:(0,r.jsx)(i.r,{className:"h-full",options:{scrollbars:{autoHide:"leave",autoHideDelay:0}},children:(0,r.jsx)("div",{className:"flex flex-col gap-4 px-3 py-5",children:u})})}),d]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{B:()=>u})},803846(e,t,n){"use strict";var r=n(391426),o=n(955015),i=function(e){var t=e.count,n=e.variant;return(0,r.jsx)(o.E,{className:"shrink-0","data-testid":"unread-count",label:t,variant:void 0===n?"secondary":n})};n.d(t,{M:()=>i})},225712(e,t,n){"use strict";var r=function(e,t){return t>0?String(t):e>99?"99+":String(e)};n.d(t,{J:()=>r})},892002(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o,i,a,s,l=(r(o={},"--color-background-badge-branded","var(--color-community-sidebar-badge-background)"),r(o,"--color-border-badge-branded","var(--color-community-sidebar-badge-background)"),r(o,"--color-text-badge-branded","var(--color-community-sidebar-badge-text)"),o),c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}((r(i={},"--color-background-primary","var(--color-community-sidebar-background)"),r(i,"--color-background-hover","var(--color-community-sidebar-hover-background)"),r(i,"--color-background-active","var(--color-community-sidebar-active-background)"),r(i,"--color-text-primary","var(--color-community-sidebar-text)"),r(i,"--color-text-secondary","var(--color-community-sidebar-text)"),r(i,"--color-icon-primary","var(--color-community-sidebar-text)"),r(i,"--color-icon-secondary","var(--color-community-sidebar-text)"),r(i,"--color-border-primary","var(--color-community-sidebar-border)"),r(i,"--color-border-secondary","var(--color-community-sidebar-border)"),r(i,"--color-border-focus","var(--color-community-sidebar-border)"),r(i,"--shadow-focus","0 0 0 3px color-mix(in srgb, var(--color-community-sidebar-border) 30%, transparent)"),r(i,"--shadow-focus-inset","inset 0 0 0 3px color-mix(in srgb, var(--color-community-sidebar-border) 30%, transparent)"),i),l);r(a={},"--color-background-primary","var(--color-grey-0)"),r(a,"--color-background-hover","var(--color-grey-50)"),r(a,"--color-background-active","var(--color-grey-100)"),r(a,"--color-text-primary","var(--color-grey-900)"),r(a,"--color-icon-primary","var(--color-grey-900)"),r(a,"--color-border-primary","var(--color-grey-200)"),r(s={},"--color-background-primary","var(--color-grey-800)"),r(s,"--color-background-hover","var(--color-grey-900)"),r(s,"--color-background-active","var(--color-grey-700)"),r(s,"--color-text-primary","var(--color-grey-50)"),r(s,"--color-icon-primary","var(--color-grey-50)"),r(s,"--color-border-primary","var(--color-grey-600)"),n.d(t,{Wm:()=>"hover:[--color-background-primary:var(--color-grey-0)] hover:[--color-background-hover:var(--color-grey-50)] hover:[--color-background-active:var(--color-grey-100)] hover:[--color-text-primary:var(--color-grey-900)] hover:[--color-icon-primary:var(--color-grey-900)] hover:[--color-border-primary:var(--color-grey-200)] [&_[data-popup-open]]:[--color-background-primary:var(--color-grey-0)] [&_[data-popup-open]]:[--color-background-hover:var(--color-grey-50)] [&_[data-popup-open]]:[--color-background-active:var(--color-grey-100)] [&_[data-popup-open]]:[--color-text-primary:var(--color-grey-900)] [&_[data-popup-open]]:[--color-icon-primary:var(--color-grey-900)] [&_[data-popup-open]]:[--color-border-primary:var(--color-grey-200)] dark:hover:[--color-background-primary:var(--color-grey-800)] dark:hover:[--color-background-hover:var(--color-grey-900)] dark:hover:[--color-background-active:var(--color-grey-700)] dark:hover:[--color-text-primary:var(--color-grey-50)] dark:hover:[--color-icon-primary:var(--color-grey-50)] dark:hover:[--color-border-primary:var(--color-grey-600)] dark:[&_[data-popup-open]]:[--color-background-primary:var(--color-grey-800)] dark:[&_[data-popup-open]]:[--color-background-hover:var(--color-grey-900)] dark:[&_[data-popup-open]]:[--color-background-active:var(--color-grey-700)] dark:[&_[data-popup-open]]:[--color-text-primary:var(--color-grey-50)] dark:[&_[data-popup-open]]:[--color-icon-primary:var(--color-grey-50)] dark:[&_[data-popup-open]]:[--color-border-primary:var(--color-grey-600)]",pC:()=>l,x:()=>c})},618445(e,t,n){"use strict";var r=n(68981),o=n(906532),i=n(892002);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function(){var e,t,n,s=(0,r.R)(),l=(0,o.aT)();return s?(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){a(e,t,n[t])})}return e}({},i.x),t=null!=(a(n={},"--color-community-sidebar-border",l),a(n,"backgroundColor","var(--color-community-sidebar-background)"),t=n)?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e):i.pC};n.d(t,{X:()=>s})},112953(e,t,n){"use strict";var r=n(570310),o=n(345722),i=n(202090),a={scoped:"has-[[data-hover-trigger]:hover]:bg-hover has-[[data-hover-trigger]:hover]:text-primary",direct:"hover:bg-hover hover:text-primary"},s=function(){var e=(0,o.T)(),t=(0,i.wR)().currentTheme,n=e&&"custom"===t;return{getActiveInactiveClasses:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"direct";return e?n?"bg-c-active-item-color text-c-active-item-text-color focus:text-c-active-item-text-color hover:text-c-active-item-text-color cursor-default":"bg-brand text-brand-button focus:text-brand-button hover:text-brand-button cursor-default":(0,r.x)("bg-transparent text-primary cursor-pointer focus-visible:bg-hover focus-visible:text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary focus-visible:-outline-offset-2",a[t])},getUnreadClasses:function(e){return e?"font-semibold":""}}};n.d(t,{r:()=>s})},3898(e,t,n){"use strict";var r=n(417980),o=[{value:"all",get label(){return(0,r.t)("notification_settings.all.label")},get description(){return(0,r.t)("notification_settings.all.description")}},{value:"mentions",get label(){return(0,r.t)("notification_settings.mentions.label")},get description(){return(0,r.t)("notification_settings.mentions.description")}},{value:"never",get label(){return(0,r.t)("notification_settings.never.label")},get description(){return(0,r.t)("notification_settings.never.description")}}],i=[{value:"all",get label(){return(0,r.t)("member_notification_settings.all.label")},get description(){return(0,r.t)("member_notification_settings.all.description")}},{value:"mentions",get label(){return(0,r.t)("member_notification_settings.mentions.label")},get description(){return(0,r.t)("member_notification_settings.mentions.description")}},{value:"never",get label(){return(0,r.t)("member_notification_settings.never.label")},get description(){return(0,r.t)("member_notification_settings.never.description")}}];n.d(t,{B:()=>i,E:()=>o})},719265(e,t,n){"use strict";n.d(t,{t:()=>b});var r=n(915921),o=n(729824),i=n(230763),a=n(765724),s=n(689492),l=function(){var e=(0,i.Od)(),t=e.currentCommunity,n=e.currentCommunityMember,r=(null==t?void 0:t.current_plan_tier)||"",o=!!(null==n?void 0:n.is_admin),l=!(0,s.Qf)(r)&&!(0,s.PF)(r)&&!(0,s.KL)(r)&&o,c=((0,s.Qf)(r)||(0,s.PF)(r))&&!(0,a.E1)(t)&&o;return{currentPlanTier:r,isLegibleForAddonModal:c,isLegibleForUpgradePlanModal:l}},c=n(933578),u=n(417980),d=n(778380);function p(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function f(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){p(i,r,o,a,s,"next",e)}function s(e){p(i,r,o,a,s,"throw",e)}a(void 0)})}}function m(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onBeforeModal,n=e.onUpgradeSuccess,i=(0,r.M)(),a=(0,d.v)(),p=l(),b=p.currentPlanT
1ier,y=p.isLegibleForUpgradePlanModal,h=p.isLegibleForAddonModal,g=y||h;return{handleSpaceLimitError:(0,c.useCallback)(function(e){return f(function(){var r,l,c,d;return m(this,function(p){switch(p.label){case 0:if(!(null==(l=e.body)||null==(r=l.error_details)?void 0:r.max_space_limit))return[2,!1];if(!y)return[3,2];return null==t||t(),[4,i.show({planTier:b&&null!=(c=(0,s.ax)(b))?c:void 0,onSuccess:function(){return f(function(){return m(this,function(e){switch(e.label){case 0:return[4,null==n?void 0:n()];case 1:return e.sent(),[4,i.hide()];case 2:return e.sent(),[2]}})})()},subheading:null==(d=e.body)?void 0:d.message,successButtonLabel:(0,u.t)("pricing_plans.upgrade_modal.actions.go_to_spaces"),source:o.p6.SPACE_LIMIT_UPGRADE_MODAL,showPlanDetails:!0})];case 1:case 3:return p.sent(),[3,5];case 2:if(!h)return[3,4];return null==t||t(),[4,a.show({})];case 4:return[2,!1];case 5:return[2,!0]}})})()},[b,h,y,t,n,a,i]),isSpaceLimitModalAvailable:g}}},258920(e,t,n){"use strict";var r=function(e){var t=e.shouldShowLockIconForNonMembers,n=e.isPrivate,r=e.isAdmin;return!(void 0!==r&&r)&&n&&t};n.d(t,{O:()=>r})},930260(e,t,n){"use strict";var r=n(391426),o=n(230763),i=function(e){var t=e.children;return(0,o.Od)().isViewOnlyMasquerading?(0,r.jsx)("div",{className:"!cursor-not-allowed",children:(0,r.jsx)("div",{className:"!pointer-events-none",children:t})}):(0,r.jsx)(r.Fragment,{children:t})};n.d(t,{F:()=>i})},894723(e,t,n){"use strict";n.d(t,{A:()=>x});var r=n(391426),o=n(186065),i=n(360163),a=n(974618),s=n(278636),l=n(519104),c=n(258752),u=n(417980),d=n(973646),p=n(56696),f=n(120557),m=n(386890),b=n(355104),y=n(619774),h=n(134138),g=n(814679),v=function(e){var t=e.isOpen,n=e.isLoading,o=e.templateKey,i=e.onClose,a=e.onCreateWorkflow;return(0,r.jsx)(y.S,{isOpen:t,onClose:i,title:(0,u.t)("workflows_v2.momentum_modal.".concat(o,".title")),description:(0,u.t)("workflows_v2.momentum_modal.".concat(o,".description")),isLoading:n,children:(0,r.jsx)(g.G,{title:(0,u.t)("workflows_v2.momentum_modal.".concat(o,".notice.title")),description:(0,u.t)("workflows_v2.momentum_modal.".concat(o,".notice.description")),children:(0,r.jsx)(h.r,{startIcon:"zap",onClick:a,disabled:n,"data-testid":"create-moderation-workflow-button",children:(0,u.t)("workflows_v2.momentum_modal.".concat(o,".notice.button"))})})})},x=a.PT.create(function(e){var t=e.templateKey,n=(0,s.hS)(),a=(0,l.Z)(),y=(0,b.c)().isCircleV4,h=(0,c.IT)(["workflow-templates","ai_workflows"],function(){return i.l.templates({params:{category:"ai_workflows"}})}),g=h.data,x=h.isLoading,j=function(){var e,r,o=null==g||null==(r=g.records)||null==(e=r.find(function(e){return(null==e?void 0:e.key)===t}))?void 0:e.id;o?a({to:"/settings/workflows/new/preview/$id",params:{id:o}}):a({to:m._.new()}),n.hide()};return y?(0,r.jsx)(v,{isOpen:n.visible,isLoading:x,templateKey:t,onClose:n.hide,onCreateWorkflow:j}):(0,r.jsx)(o.m,{isOpen:n.visible,onClose:n.hide,title:(0,u.t)("workflows_v2.momentum_modal.".concat(t,".title")),description:(0,u.t)("workflows_v2.momentum_modal.".concat(t,".description")),isLoading:x,"data-testid":"reported-post-momentum-modal",children:(0,r.jsx)(f.G,{title:(0,u.t)("workflows_v2.momentum_modal.".concat(t,".notice.title")),description:(0,u.t)("workflows_v2.momentum_modal.".concat(t,".notice.description")),children:(0,r.jsx)(p.r,{iconEl:(0,r.jsx)(d.In,{type:"20-zap",size:20}),onClick:j,disabled:x,"data-testid":"create-moderation-workflow-button",children:(0,u.t)("workflows_v2.momentum_modal.".concat(t,".notice.button"))})})})})},284326(e,t,n){"use strict";var r=n(391426),o=function(){return(0,r.jsx)("div",{className:"border-primary h-px border-b"})};n.d(t,{c:()=>o})},293183(e,t,n){"use strict";n.d(t,{q:()=>s});var r=n(391426),o=n(617593),i=function(){return(0,r.jsxs)("li",{className:"flex w-full list-none items-center gap-3 px-3 py-2",children:[(0,r.jsx)(o.E,{shape:"pill",className:"size-6 shrink-0"}),(0,r.jsx)(o.E,{shape:"rounded",className:"h-4 w-1/2"})]})},a=["skeleton-1","skeleton-2","skeleton-3","skeleton-4","skeleton-5","skeleton-6"],s=function(){return(0,r.jsx)(r.Fragment,{children:a.map(function(e){return(0,r.jsx)(i,{},e)})})}},180156(e,t,n){"use strict";var r=n(208690),o=n(231127),i=n(310860),a=n(933578),s=n(572742),l=function(){var e=(0,i.z)(),t=(0,r.w)(),n=(0,o.T)("circle_v4_modals_enabled",{requireAdminArea:!1});(0,a.useEffect)(function(){n&&(0,s.Fy)(e.searchStr).isOpen&&!t.visible&&t.show()},[e.searchStr,n])};n.d(t,{Z:()=>l})},492302(e,t,n){"use strict";n.d(t,{H:()=>N});var r=n(391426),o=n(95427),i=n(560457),a=n(620708),s=n(570310),l=n(791009),c=n(933578),u=n(417980),d=n(804939),p=n(519104),f=n(310860),m=n(572742),b=function(){var e=(0,p.Z)(),t=(0,f.z)();return{params:(0,c.useMemo)(function(){return(0,m.Fy)(t.searchStr)},[t.searchStr]),syncToUrl:(0,c.useCallback)(function(n){var r=n.query,o=n.tab,i=(0,m.J8)(t.searchStr,{query:r,tab:o});e({href:i?"".concat(t.pathname,"?").concat(i):t.pathname,replace:!0})},[t.pathname,t.searchStr,e]),clearFromUrl:(0,c.useCallback)(function(){var n=(0,m.mz)(t.searchStr);e({href:n?"".concat(t.pathname,"?").concat(n):t.pathname,replace:!0})},[t.pathname,t.searchStr,e])}},y=n(617593),h=n(293183),g=function(){return(0,r.jsxs)("div",{className:"flex flex-1 flex-col pt-6",children:[(0,r.jsx)(y.E,{shape:"pill",className:"h-10 w-full"}),(0,r.jsx)("ul",{className:"m-0 flex list-none flex-col gap-0.5 p-0 pt-4",children:(0,r.jsx)(h.q,{})})]})},v=n(345451),x=n(739042),j=n(817751),_=n(892907),w=n(89267),O=function(e){e.error;var t=e.resetState;return(0,r.jsxs)("div",{className:"m-auto flex max-w-md flex-col items-center justify-center gap-4 p-8 text-center",children:[(0,r.jsx)(j.t,{name:"triangle-exclamation-filled",color:"danger",size:"lg"}),(0,r.jsx)(_.o5,{variant:"body-sm",color:"secondary",children:(0,r.jsx)(w.A,{html:(0,u.t)("search_v2.search_error")})}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",onClick:t,children:(0,u.t)("search_v2.search_error_retry")}),!1]})},S=function(e){var t=e.children;return(0,r.jsx)(v.t,{name:"SpotlightSearchV4",fallback:O,children:t})};function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var k=(0,a.Z)(function(){return Promise.all([n.e(31040),n.e(25266),n.e(53767),n.e(75613)]).then(n.bind(n,512812)).then(function(e){return{default:e.SpotlightSearchBody}})}),I="posts",N=function(e){var t,n=e.isOpen,a=void 0===n||n,p=e.onClose,f=e.variant,m="page"===(void 0===f?"modal":f),y=b(),h=y.params,v=y.syncToUrl,x=y.clearFromUrl,j=C((0,c.useState)(h.query),2),_=j[0],w=j[1],O=C((0,c.useState)(null!=(t=h.tab)?t:I),2),P=O[0],N=O[1],A=null!==_,E=(0,d.P)();(0,c.useEffect)(function(){m||a&&null===_&&!h.isOpen&&v({query:null})},[m,a,_,h.isOpen,v]),(0,c.useEffect)(function(){if(!m&&a&&null!==h.query){var e;w(h.query),N(null!=(e=h.tab)?e:I)}},[m,a]);var R=function(e){w(e),v({query:e,tab:P})},L=function(e){N(e),v({query:_,tab:e})},D=function(){w(null),N(I),x(),p()},T=(0,r.jsx)("div",{className:(0,s.x)({"flex min-h-[280px] flex-col":!A&&!m}),children:(0,r.jsx)(S,{children:(0,r.jsx)(k,{submittedQuery:_,activeTab:P,onSubmitQuery:R,onTabChange:L,onClose:m?p:D})})});return(0,r.jsx)(o.d,{children:(0,r.jsx)(i.nR,{children:m?T:(0,r.jsx)(l.a.Root,{open:a,onOpenChange:function(e){e||D()},size:A||E?"full-screen":"lg",position:"top","aria-describedby":(0,u.t)("search_v2.search_community_quick"),children:(0,r.jsxs)(l.a.Content,{"data-testid":"spotlight-search-v4",children:[(0,r.jsx)(l.a.Body,{children:(0,r.jsx)("div",{className:(0,s.x)({"flex min-h-[280px] flex-col":!A}),children:(0,r.jsx)(S,{children:(0,r.jsx)(c.Suspense,{fallback:(0,r.jsx)(g,{}),children:(0,r.jsx)(k,{submittedQuery:_,activeTab:P,onSubmitQuery:R,onTabChange:L,onClose:D})})})})}),(A||E)&&(0,r.jsx)(l.a.Footer,{primaryAction:{label:(0,u.t)("close"),onClick:D,shouldCloseModal:!0}})]})})})})}},572742(e,t,n){"use strict";var r="search",o="search_tab",i="open",a=["posts","comments","messages","lessons","events","members"],s=function(e){var t=new URLSearchParams(e),n=t.get("q"),s=t.get(o),l=a.includes(s)?s:null;return{isOpen:t.get(r)===i||null!==n,query:n,tab:l}},l=function(e,t){var n=t.query,a=t.tab,s=new URLSearchParams(e);return s.set(r,i),n?s.set("q",n):s.delete("q"),n&&a?s.set(o,a):s.delete(o),s.toString()},c=function(e){var t=new URLSearchParams(e);return t.delete(r),t.delete("q"),t.delete(o),t.toString()};n.d(t,{Fy:()=>s,J8:()=>l,mz:()=>c})},867373(e,t,n){"use strict";var r={USD:{code:"USD",flag:"\uD83C\uDDFA\uD83C\uDDF8",symbol:"$"},BRL:{code:"BRL",flag:"\uD83C\uDDE7\uD83C\uDDF7",symbol:"R$"}};r.USD,n.d(t,{Y:()=>r})},108237(e,t,n){"use strict";n.d(t,{N:()=>"google-one-tap:redirecting"})},306215(e,t,n){"use strict";var r=["overview","lessons","customize","paywalls","lock_screen","members","options","workflows"];n.d(t,{s:()=>r})},617500(e,t,n){"use strict";var r=n(391426),o=n(933578),i=n(258954),a=n(780565);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){l(i,r,o,a,s,"next",e)}function s(e){l(i,r,o,a,s,"throw",e)}a(void 0)})}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var p={status:a.F5,record:{},actions:{},helpers:{}},f=(0,o.createContext)(p);f.displayName="CommunityFeatureFlagsContext";var m=function(e){var t=e.communityBetaFeatures,n=e.children,s=u((0,o.useState)(p.status),2),l=s[0],m=s[1],b=u((0,o.useState)(p.record),2),y=b[0],h=b[1],g=function(e){h(e),m(a.S2)};(0,o.useEffect)(function(){t?(h(t),m(a.S2)):v()},[]);var v=function(){return c(function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,i.W.communitySettings()];case 1:if(!(null==(e=t.sent())?void 0:e.ok))return[3,3];return[4,e.json()];case 2:return g(t.sent().community_settings),[3,3];case 3:return[2]}})})()};return(0,r.jsx)(f.Provider,{value:{status:l,record:y,actions:{loadData:v,refresh:function(){return c(function(){return d(this,function(e){switch(e.label){case 0:return m(a.UL),[4,v()];case 1:return e.sent(),[2]}})})()}},helpers:{isDataLoading:function(){return l===a.F5},isDataRefreshing:function(){return l===a.UL},isDataLoaded:function(){return l===a.S2}}},children:n})},b=function(){return(0,o.useContext)(f)};n.d(t,{L:()=>m,z:()=>b})},360650(e,t,n){"use strict";var r=n(391426),o=n(933578),i=n(258954),a=n(780565);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){l(i,r,o,a,s,"next",e)}function s(e){l(i,r,o,a,s,"throw",e)}a(void 0)})}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var p={status:a.F5,record:{home_page_cover_image:void 0},actions:{refresh:function(){return Promise.resolve()},loadData:function(){return Promise.resolve()}},helpers:{isDataRefreshing:function(){return!1},isDataLoading:function(){return!1},isDataLoaded:function(){return!1},communityVisibilityText:function(){return"Public"}}},f=(0,o.createContext)(p);f.displayName="CurrentCommunityContext";var m=function(e){var t=e.value,n=e.children;return(0,r.jsx)(f.Provider,{value:t,children:n})},b=function(e){var t=e.children,n=e.community,s=u((0,o.useState)(a.F5),2),l=s[0],m=s[1],b=u((0,o.useState)(p.record),2),y=b[0],h=b[1],g=y.is_private,v=(0,o.useCallback)(function(e){h(e),m(a.S2)},[]),x=(0,o.useCallback)(function(){return c(function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,i.W.show()];case 1:if(!(null==(e=t.sent())?void 0:e.ok))return[3,3];return[4,e.json()];case 2:return v(t.sent()),[3,3];case 3:return[2]}})})()},[v]);(0,o.useEffect)(function(){n?(h(n),m(a.S2)):x()},[]);var j=(0,o.useCallback)(function(){return c(function(){return d(this,function(e){switch(e.label){case 0:return m(a.UL),[4,x()];case 1:return e.sent(),[2]}})})()},[x]),_=(0,o.useCallback)(function(){return g?"Private":"Public"},[g]),w=(0,o.useCallback)(function(){return l===a.S2},[l]),O=(0,o.useCallback)(function(){return l===a.F5},[l]),S=(0,o.useCallback)(function(){return l===a.UL},[l]),P=(0,o.useMemo)(function(){return{status:l,record:y,actions:{loadData:x,refresh:j},helpers:{isDataLoading:O,isDataRefreshing:S,isDataLoaded:w,communityVisibilityText:_}}},[l,y,x,j,O,S,w,_]);return(0,r.jsx)(f.Provider,{value:P,children:t})},y=function(){return(0,o.useContext)(f)};n.d(t,{hO:()=>y,xZ:()=>b,yP:()=>m})},505549(e,t,n){"use strict";var r=n(391426),o=n(933578);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var s=(0,o.createContext)({});s.displayName="CurrentLessonContext";var l=function(e){var t=e.children,n=a((0,o.useState)(!0),2),i=n[0],l=n[1],c=a((0,o.useState)({}),2),u=c[0],d=c[1];return(0,r.jsx)(s.Provider,{value:{isSubmitEnabled:i,setIsSubmitEnabled:l,currentLesson:u,setCurrentLesson:d},children:t})},c=function(){var e=(0,o.useContext)(s);if(!e)throw Error("useCurrentLessonContext must be used within a CurrentLessonContextProvider");return e};n.d(t,{Y:()=>c,w:()=>l})},931639(e,t,n){"use strict";n.d(t,{m:()=>w,a:()=>O});var r=n(391426),o=n(319143),i=n(328187),a=n(451430),s=n(933578),l=n(230763),c=n(506493),u=n(417980),d=n(58661),p=n(717526),f=n(915779);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var y=function(e){var t,n=e.post,r=e.onSuccess,o=e.onFailure,i=(0,l.iZ)(),a=(0,p.d)().error,y=function(e){if(Array.isArray(e))return e}
1(t=(0,s.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return m(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),h=y[0],g=y[1],v=n.is_liked_by_current_user,x=(0,l.PM)(),j=(0,c.B)();return function(e){var t;return(t=function(){var t,s,l;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(c){switch(c.label){case 0:if(e.preventDefault(),!x)return[2];if(!i)return a((0,u.t)("log_in_to_like_posts")),t=f.YO.signIn({params:{post_login_redirect:window.location.href}}),j?window.open(t,"_blank","noreferrer"):window.location.href=t,[2];if(h)return[2];g(!0),s={userLikeableId:n.id,userLikableType:"Post",forReactQuery:!0},c.label=1;case 1:if(c.trys.push([1,7,8,9]),!v)return[3,3];return[4,d.p.destroy(s)];case 2:return c.sent(),[3,5];case 3:return[4,d.p.create(s)];case 4:c.sent(),c.label=5;case 5:return[4,null==r?void 0:r(n)];case 6:return c.sent(),[3,9];case 7:return console.error(l=c.sent()),null==o||o(l),[3,9];case 8:return g(!1),[7];case 9:return[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){b(i,r,o,a,s,"next",e)}function s(e){b(i,r,o,a,s,"throw",e)}a(void 0)})})()}};function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function x(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var _=(0,s.createContext)({onPostChange:function(){}});_.displayName="CurrentPostContext";var w=function(e){var t=e.post,n=void 0===t?{}:t,l=e.usedIn,c=e.onPostChange,u=e.onPostDestroy,d=e.children,p=(0,o.c)(n.id),f=p.postDetails,m=void 0===f?{}:f,b=p.onLikeToggle,h=p.refetchPostDetails,w=p.updatePostDetailsQueryCache,O=v({},n,m),S=j((0,s.useState)(!0),2),P=S[0],C=S[1],k=j((0,s.useState)(!1),2),I=k[0],N=k[1],A=y({post:O,onFailure:function(){(0,a.isFunction)(b)&&b(m.is_liked_by_current_user)}});O.sample_user_likes_community_members||(O.sample_user_likes_community_members=[]);var E=function(){return x(v({},O),{body:O.body_for_editor})},R=(0,i.Ux)(O),L=(0,i.J0)(O),D={record:O,isEdit:!!(null==O?void 0:O.id),onPostChange:c||function(){},onPostDestroy:u,onLikeToggle:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:if(!m.post_details_loaded)return[2];return(0,a.isFunction)(b)&&b(!m.is_liked_by_current_user),[4,A(e)];case 1:return[2,t.sent()]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){g(i,r,o,a,s,"next",e)}function s(e){g(i,r,o,a,s,"throw",e)}a(void 0)})})()},refetchPostDetails:h,onPostFollow:function(e){(0,a.isFunction)(w)&&w(e)},updatePostDetailsQueryCache:w,helpers:{postForTrixEditor:E,eventForEdit:function(){var e=(O.event_setting_attributes||{}).in_person_location;return x(v({},E()),{location_type:e?["in_person"]:["virtual"]})},isTiptapPost:R,isTrixPost:L},isSubmitEnabled:P,setIsSubmitEnabled:C,usedIn:l,isUsedInMinimalTipTapViewModal:"minimal-post-modal"===l,isUpdatingCardViewThumbnail:I,setIsUpdatingCardViewThumbnail:N};return(0,r.jsx)(_.Provider,{value:D,children:"function"==typeof d?d(D):d})},O=function(){return(0,s.useContext)(_)}},398061(e,t,n){"use strict";var r=n(391426),o=n(339551),i=n(652020),a=n(933578),s=(0,a.createContext)({});s.displayName="CurrentSpaceContext";var l=function(e){var t=e.spaceId,n=e.children,a=(0,o.E)().helpers.findBy({id:t}),l=(0,i.q)({spaceId:t,queryOptions:{placeholderData:a}});return(0,r.jsx)(s.Provider,{value:l,children:n})},c=function(){return(0,a.useContext)(s)};n.d(t,{Ir:()=>c,Yy:()=>l})},64340(e,t,n){"use strict";var r=n(391426),o=n(933578),i=n(258752),a=n(915779),s=(0,o.createContext)({});s.displayName="LayoutPartialsContext";var l=function(e){var t=e.children,n=(0,i.IT)({queryKey:[a.iK.layoutPartials.show()]}),l=n.data,c=n.error,u=n.isLoading,d=(0,o.useMemo)(function(){return{data:l,error:c,isLoading:u}},[l,c,u]);return(0,r.jsx)(s.Provider,{value:d,children:t})},c=function(){return(0,o.useContext)(s)};n.d(t,{Z:()=>l,j:()=>c})},780565(e,t,n){"use strict";n.d(t,{F5:()=>"LOADING",S2:()=>"LOADED",UL:()=>"REFRESHING",ff:()=>"ERROR"})},320759(e,t,n){"use strict";n.d(t,{TA:()=>$,p0:()=>V});var r=n(391426),o=n(451430),i=n(933578),a=n(974618),s=n(737225),l=n(769942),c=n(872518),u=n(258752),d=n(904994),p=n(51730),f=n(915779),m=n(973646),b=n(568316),y=n(417980),h=function(){return(0,r.jsx)("div",{className:"bg-primary m-auto text-center",children:(0,r.jsxs)("div",{className:"m-auto flex h-32 max-w-md flex-col items-center justify-center gap-4 p-8","data-testid":"empty-search",children:[(0,r.jsx)(m.In,{type:"32-search-v2",className:"text-default !h-8 !w-8",size:32}),(0,r.jsx)("div",{className:"flex flex-col gap-2",children:(0,r.jsx)(b.o.BodySm,{color:"text-default",children:(0,y.t)("view_only_masquerading.empty_search_placeholder")})})]})})},g=n(289693),v=function(e){var t=e.setCategory,n=e.setQuery;return(0,r.jsxs)("div",{className:"mx-auto flex h-32 flex-col items-center justify-center pb-8 pt-6 leading-tight",children:[(0,r.jsx)("div",{className:"pb-2",children:(0,r.jsx)(b.o.TitleSm,{weight:"semibold",children:(0,y.t)("view_only_masquerading.no_results")})}),(0,r.jsx)("div",{children:(0,r.jsx)(b.o.BodySm,{color:"text-default",children:(0,y.t)("view_only_masquerading.try_a_different_term")})}),(0,r.jsx)("div",{className:"pt-2",children:(0,r.jsx)("button",{type:"button",onClick:function(){"function"==typeof t&&t(""),n("")},children:(0,r.jsx)(g.aw,{color:"text-circle",weight:"semibold",children:(0,y.t)("view_only_masquerading.back")})})})]})},x=function(e){var t=e.isLoading,n=e.query,o=e.setQuery;return(0,r.jsx)("div",{className:"bg-primary sticky top-0 isolate z-10 flex items-center justify-between p-4 md:static md:top-auto md:p-0",children:(0,r.jsx)("div",{className:"mr-0 flex w-full items-center md:p-5",children:(0,r.jsxs)("div",{className:"bg-secondary sm:bg-primary border-secondary flex w-full items-center gap-3 rounded-md border px-2 py-1 sm:rounded-md sm:px-2 sm:py-1",children:[(0,r.jsx)("div",{className:"flex",children:t?(0,r.jsx)(m.In,{type:"loader",className:"text-default",size:20,useWithFillCurrentColor:!0}):(0,r.jsx)(m.In,{type:"16-search",className:"text-default",size:16,useWithFillCurrentColor:!0})}),(0,r.jsx)("input",{className:"text-dark sm:bg-primary placeholder:text-light h-6 w-full rounded-sm bg-transparent text-sm outline-none placeholder:opacity-100 sm:rounded-none",placeholder:(0,y.t)("view_only_masquerading.input_placeholder"),"aria-autocomplete":"list",value:n,onChange:function(e){return o(e.target.value)}}),(0,r.jsx)("button",{type:"submit",className:"text-default flex pt-1",onClick:function(){return o("")},children:!!n&&(0,r.jsx)(m.In,{type:"20-close-md",useWithFillCurrentColor:!0})})]})})})},j=n(872806),_=n(570310),w=n(734527),O=n(288513),S=function(e){var t,n=e.id,o=e.type,i=e.name,a=e.avatarUrl,s=e.onClick;return"CommunityMember"==o?t=(0,r.jsx)(w.J,{src:a,name:i,size:"5"}):"Paywall"==o?t=(0,r.jsx)(m.In,{type:"credit-card",className:"text-default shrink-0",size:16}):"InvitationLink"==o&&(t=(0,r.jsx)(m.In,{type:"16-link",className:"text-default shrink-0",size:16})),(0,r.jsx)("li",{children:(0,r.jsx)("button",{tabIndex:0,type:"button",className:"text-dark bg-primary hover:bg-secondary focus:bg-secondary flex w-full cursor-pointer items-center justify-between gap-4 px-5 py-2.5 transition-colors",onClick:function(){return s(n,o)},children:(0,r.jsxs)("div",{className:(0,_.x)((0,O._h)("truncate-one-line"),"flex items-center gap-3"),children:[t,(0,r.jsx)(j.PP,{children:i})]})})})};function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var k=function(){var e=(0,a.hS)(),t=(0,i.useRef)(null),n=(0,i.useRef)(null);(0,d.A)(t,function(){e.remove()});var o=C((0,i.useState)(""),2),m=o[0],b=o[1],y=C((0,i.useState)([]),2),g=y[0],j=y[1],_=C((0,i.useState)(!1),2),w=_[0],O=_[1],P=(0,c.o)(m,500),k=(0,u.IT)({queryKey:["masquerading/entities",P],queryFn:function(){return(0,p.i_)(f.iK.masquerading.entities.index({query:P,members_only:!0}))},refetchOnWindowFocus:!1,enabled:!!P,staleTime:3e5}),I=k.data,N=k.isInitialLoading;(0,i.useEffect)(function(){P||(O(!1),j([]))},[P]),(0,i.useEffect)(function(){if(I){var e=I.records,t=I.category,n=I.query;t||n?(O(0===e.length),j(e)):(O(!1),j([]))}},[I]);var A=function(e,t){return(0,l.c)({entityId:e,entityType:t,mode:"edit"}).then(function(e){return window.open(e.masquerade_url,"_self")}).catch(function(e){console.error(e)})};return(0,r.jsx)(s.aF,{isOpen:e.visible,onClose:e.remove,children:(0,r.jsx)(s.aF.Content,{position:"top",className:"border-primary w-full rounded-[0px] sm:rounded-md sm:border md:!mt-[3.25rem] md:w-[335px]",size:"xl",children:(0,r.jsxs)("div",{ref:t,children:[(0,r.jsx)(x,{isLoading:N,query:m,setQuery:b}),g.length>0?(0,r.jsx)("div",{className:"overflow-y-auto md:max-h-96",ref:n,children:(0,r.jsx)("ul",{className:"list-none",children:g.map(function(e){return(0,r.jsx)(S,{id:e.id,type:e.type,name:e.name,avatarUrl:e.avatar_url,onClick:A},"".concat(e.type,"-").concat(e.id))})})}):w?(0,r.jsx)(v,{setQuery:b}):(0,r.jsx)(h,{})]})})})},I=n(113799),N=function(e){var t=e.category,n=e.setCategory;return(0,r.jsx)("button",{tabIndex:0,type:"button",className:"text-dark bg-primary hover:bg-secondary focus:bg-secondary flex w-full cursor-pointer items-center justify-between gap-4 px-5 py-2.5 transition-colors",onClick:function(){return n("")},children:(0,r.jsxs)("div",{className:"flex items-center gap-3 text-gray-500",children:[(0,r.jsx)(m.In,{type:"chevron-left",className:"text-default",size:16}),(0,r.jsx)(I.I,{color:"text-gray-500",children:(0,y.t)("view_only_masquerading.categories.".concat(t))})]})})},A=function(e){var t=e.name,n=e.icon,o=e.onClick;return(0,r.jsx)("li",{children:(0,r.jsxs)("button",{tabIndex:0,type:"button",className:"text-dark bg-primary hover:bg-secondary focus:bg-secondary flex w-full cursor-pointer items-center justify-between gap-4 px-5 py-2.5 transition-colors",onClick:o,children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(m.In,{type:n,className:"text-default",size:16}),(0,r.jsx)(j.PP,{children:t})]}),(0,r.jsx)(m.In,{type:"16-chevron-right",className:"text-default",size:16})]})})},E=function(e){var t=e.setCategory;return(0,r.jsx)("div",{className:"mb-2 overflow-y-auto md:max-h-96",children:(0,r.jsxs)("ul",{className:"list-none",children:[(0,r.jsx)(A,{name:(0,y.t)("view_only_masquerading.categories.members"),icon:"16-account",onClick:function(){return t("members")}}),(0,r.jsx)(A,{name:(0,y.t)("view_only_masquerading.categories.paywalls"),icon:"credit-card",onClick:function(){return t("paywalls")}}),(0,r.jsx)(A,{name:(0,y.t)("view_only_masquerading.categories.links"),icon:"16-link",onClick:function(){return t("links")}}),(0,r.jsx)(A,{name:(0,y.t)("view_only_masquerading.categories.access_groups"),icon:"16-lock",onClick:function(){return t("access_groups")}})]})})};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var D=function(){var e=(0,a.hS)(),t=(0,i.useRef)(null),n=(0,i.useRef)(null);(0,d.A)(t,function(){e.remove()});var o=L((0,i.useState)(""),2),m=o[0],b=o[1],y=L((0,i.useState)(""),2),h=y[0],g=y[1],j=L((0,i.useState)(""),2),_=j[0],w=j[1],O=L((0,i.useState)(""),2),P=O[0],C=O[1],k=L((0,i.useState)([]),2),I=k[0],A=k[1],R=L((0,i.useState)(!1),2),D=R[0],T=R[1],M=(0,c.o)(h,500),F=(0,u.IT)({category:m,queryKey:["masquerading/entities",M,m],queryFn:function(){return(0,p.i_)(f.iK.masquerading.entities.index({query:M,category:m}))},refetchOnWindowFocus:!1,enabled:!!(M||m),staleTime:3e5}),K=F.data,B=F.isInitialLoading;(0,i.useEffect)(function(){M||m||(T(!1),A([]))},[M,m]),(0,i.useEffect)(function(){if(K){var e=K.records,t=K.category,n=K.query;w(t),C(n),t||n?(T(0===e.length),A(e)):(T(!1),A([]))}},[K]);var q=function(e,t){return(0,l.c)({entityId:e,entityType:t}).then(function(e){return window.open(e.masquerade_url,"_self")}).catch(function(e){console.error(e)})};return(0,r.jsx)(s.aF,{isOpen:e.visible,onClose:e.remove,children:(0,r.jsx)(s.aF.Content,{position:"top",className:"border-primary w-full rounded-[0px] sm:rounded-md sm:border md:!mt-[3.25rem] md:w-[335px]",size:"xl",children:(0,r.jsxs)("div",{ref:t,children:[(0,r.jsx)(x,{isLoading:B,query:h,setQuery:g}),I.length>0?(0,r.jsxs)("div",{className:"mb-2 overflow-y-auto md:max-h-96",ref:n,children:[_&&!P&&(0,r.jsx)(N,{category:_,setCategory:b}),(0,r.jsx)("ul",{className:"list-none",children:I.map(function(e){return(0,r.jsx)(S,{id:e.id,type:e.type,name:e.name,avatarUrl:e.avatar_url,onClick:q},"".concat(e.type,"-").concat(e.id))})})]}):D?(0,r.jsx)(v,{setCategory:b,setQuery:g}):(0,r.jsx)(E,{setCategory:b})]})})})},T=a.PT.create(function(){return(0,r.jsx)(k,{})}),M=a.PT.create(function(){return(0,r.jsx)(D,{})}),F=n(230763),K=n(857933),B=n(92406);function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var z={isBannerVisible:!1,isCircleAiAllowed:!1,isCircleAiInputDisabled:!1,shouldShowCircleAiToggle:!1,setIsCircleAiAllowed:o.noop,showBanner:o.noop,hideBanner:o.noop,openViewMasqueradingSearch:o.noop,openEditMasqueradingSearch:o.noop},W=(0,i.createContext)(z);W.displayName="MasqueradeContext";var $=function(e){var t,n,o,s,l=e.children,c=U((0,i.useState)(!1),2),u=c[0],d=c[1],p=U((0,i.useState)(K.S),2),f=p[0],m=p[1],b=(0,F.Od)().apiData,y=(0,B.i)().masquerade_referrer_url,h=null!=(t=null==b||null==(o=b.current_community_member)||null==(n=o.id)?void 0:n.toString())?t:null,g=!!(y&&b&&!b.view_only_masquerading&&!u&&h&&(null==(s=b.current_community_settings)?void 0:s.circle_ai_masquerading_enabled)),v=g&&f===h,x=!!(y&&(!b||g&&!v));(0,i.useEffect)(function(){(!y||b)&&(g&&f===h||((0,K.I)(null),m(null)))},[f,b,h,y,g]);var j=function(e){var t=e&&g?h:null;(0,K.I)(t),m(t)},_=(0,a.hS)(M),w=(0,a.hS)(T);return(0,r.jsx)(W.Provider,{value:{isBannerVisible:u,isCircleAiAllowed:v,isCircleAiInputDisabled:x,shouldShowCircleAiToggle:g,setIsCircleAiAllowed:j,showBanner:function(){d(!0),_.show()},hideBanner:function(){j(!1),d(!1)},openViewMasqueradingSearch:function(){_.show()},openEditMasqueradingSearch:function(){w.show()}},children:l})},V=function(){var e=(0,i.useContext)(W);if(!e)throw Error("useMasqueradeContext must be used within a MasqueradeContextProvider");return e}},319143(e,t,n){"use strict";var r=n(391426),o=n(230763),i=n(146917),a=n(367764),s=n(758904),l=n(933578),c=n(274685),u=n(1412);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var f=(0,l.createContext)({});f.displayName="PostsDetailsContext";var m=function(e){var t=e.spaceId,n=e.perPagePostIds,l=void 0===n?[]:n,m=e.isSharedPostView,b=void 0!==m&&m,y=e.queryOptions,h=void 0===y?{}:y,g=e.children,v=(0,c.jE)(),x=(0,o.Il)(),j=(0,u.E)({queries:l.map(function(e){return p({},i.x.postBatchDetails({postIds:e,spaceId:t,isSharedPostView:b}),h)})}),_=Object.fromEntries(l.flat().map(function(e){return[e,{data:null,isLoading:!0}]}));
1j.forEach(function(e){var t=Array.isArray(e.data)?e.data:void 0;null==t||t.forEach(function(t){_[t.id]={data:t,isLoading:e.isLoading}})});var w=function(e,t){v.setQueriesData({queryKey:a.Ro.detail,predicate:(0,s.ip)(e)},function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return n.map(function(n){return n.id!==e?n:p({},n,t)})})};return(0,r.jsx)(f.Provider,{value:{allPostDetails:_,onLikeToggle:function(e,t){if(x&&e){var n,r={};r=t?{is_liked_by_current_user:t,sample_user_likes_community_members:((function(e){if(Array.isArray(e))return d(e)})(n=e.sample_user_likes_community_members)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e){if(e){if("string"==typeof e)return d(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,void 0)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([x]),user_likes_count:e.user_likes_count+1}:{is_liked_by_current_user:t,sample_user_likes_community_members:e.sample_user_likes_community_members.filter(function(e){return e.id!==x.id}),user_likes_count:e.user_likes_count-1},w(e.id,r),i.w.postLikes(e.id),v.removeQueries({queryKey:["post-likes-modal",e.id]})}},refetchPostDetails:function(e){i.w.postDetails(e)},updatePostDetailsQueryCache:w},children:g})},b=function(e){var t=(0,l.useContext)(f);if(!e||!t.allPostDetails[e])return{};var n=t.allPostDetails[e],r=n.data;return{isLoading:n.isLoading,postDetails:r,onLikeToggle:function(e){return t.onLikeToggle(r,e)},refetchPostDetails:function(){return t.refetchPostDetails(e)},updatePostDetailsQueryCache:function(n){return t.updatePostDetailsQueryCache(e,n)}}};n.d(t,{U:()=>m,c:()=>b})},424668(e,t,n){"use strict";var r=n(391426),o=n(933578);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}var l=function(e,t){switch(t.type){case"SET_SPACE_NOTIFICATIONS":return t.payload;case"UPDATE_SPACE_NOTIFICATIONS":var n=e.spaces,r=n.findIndex(function(e){return e.id===t.payload.space.id});if(r>-1)return{spaces:a(n.slice(0,r)).concat([t.payload.space],a(n.slice(r+1)))};return e;default:throw Error("Unhandled action type: ".concat(String(t)))}},c=(0,o.createContext)(null);c.displayName="SpaceNotificationsStateContext";var u=(0,o.createContext)(null);u.displayName="SpaceNotificationsDispatchContext";var d={spaces:[]},p=function(e){var t,n=e.children,i=function(e){if(Array.isArray(e))return e}(t=(0,o.useReducer)(l,d))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||s(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],p=i[1],f=(0,o.useMemo)(function(){return a.spaces.reduce(function(e,t){return e[t.id]=t,e},{})},[a.spaces]),m=(0,o.useMemo)(function(){return{spaces:a.spaces,spacesById:f}},[a.spaces,f]);return(0,r.jsx)(c.Provider,{value:m,children:(0,r.jsx)(u.Provider,{value:p,children:n})})},f=function(){var e=(0,o.useContext)(c);if(null===e)throw Error("useSpaceNotificationsState must be used within a SpaceNotificationsProvider");return e},m=function(){var e=(0,o.useContext)(u);if(null===e)throw Error("useSpaceNotificationsDispatch must be used within a SpaceNotificationsProvider");return e};n.d(t,{F$:()=>f,SD:()=>p,cj:()=>m})},337162(e,t,n){"use strict";var r=n(391426),o=n(272528),i=n(451430),a=n(933578),s=n(258752),l=n(697652),c=n(945955),u=n(780565),d=n(230763);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var b={status:u.F5,records:[],actions:{loadData:function(){return Promise.resolve()},refresh:function(){}},helpers:{isDataLoading:function(){return!1},isDataRefreshing:function(){return!1},isDataLoaded:function(){return!1},findById:function(){},findBy:function(){}},isLoading:!1},y=(0,a.createContext)(b);y.displayName="SpaceGroupsContext";var h=function(e){var t,n,p,b=e.children,h=e.spaceGroups,g=m((0,a.useState)(u.F5),2),v=g[0],x=g[1],j=m((0,a.useState)([]),2),_=j[0],w=j[1],O=(0,d.Od)(),S=O.currentCommunityMember,P=O.data,C=(0,l.M)(o.UY.SpaceGroupsContextProvider),k=C.getValue,I=C.setValue,N=(0,a.useCallback)(function(e){w(e.records),x(u.S2),I(e.records)},[I]),A=void 0!==h,E=!!S||!!P.current_community,R=!!S||(null==P||null==(p=P.current_community)?void 0:p.is_private)===!1,L=!A&&E&&R,D=(0,s.IT)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},c.Wo.list()),n=n={enabled:L},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)),T=D.data,M=D.error,F=D.refetch,K=(0,a.useCallback)(function(){var e;return(e=function(){var e,t;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:if(!E)return x(u.F5),[2];if(!R)return w([]),x(u.S2),[2];return[4,F()];case 1:return t=(e=n.sent()).data,e.error?x(u.ff):t&&N(t),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){f(i,r,o,a,s,"next",e)}function s(e){f(i,r,o,a,s,"throw",e)}a(void 0)})})()},[E,R,F,N]);(0,a.useEffect)(function(){if(A){w(h),x(u.S2);return}if(!E)return void x(u.F5);if(!R){w([]),x(u.S2);return}var e=k();e&&e.length>0?(w(e),x(u.S2)):x(u.F5)},[A,h,E,R,k]),(0,a.useEffect)(function(){!A&&R&&(T?N(T):M&&x(u.ff))},[A,R,T,M,N]);var B=(0,a.useCallback)(function(){x(u.UL),K()},[K]),q=(0,a.useCallback)(function(){return v===u.S2},[v]),U=(0,a.useCallback)(function(){return v===u.F5},[v]),z=(0,a.useCallback)(function(){return v===u.UL},[v]),W=(0,a.useCallback)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};q()||console.warn("findBy called when status = ".concat(v,"."));var t=(0,i.find)(_,e);if(t&&(void 0===t?"undefined":t&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)=="object"&&"id"in t)return t},[q,v,_]),$=(0,a.useCallback)(function(e){return W({id:e})},[W]),V=(0,a.useMemo)(function(){return{status:v,records:_,actions:{loadData:K,refresh:B},isLoading:U(),helpers:{isDataLoading:U,isDataRefreshing:z,isDataLoaded:q,findById:$,findBy:W}}},[v,_,K,B,U,z,q,$,W]);return(0,r.jsx)(y.Provider,{value:V,children:b})},g=function(){return(0,a.useContext)(y)};n.d(t,{X:()=>h,t:()=>g})},339551(e,t,n){"use strict";var r=n(391426),o=n(230763),i=n(292626),a=n(451430),s=n(933578),l=n(258752),c=n(697652),u=n(341409),d=n(780565);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var b=function(e,t){var n=(0,a.find)(e,t);if(n&&(void 0===n?"undefined":n&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)=="object"&&"id"in n)return n},y=(0,s.createContext)(null);y.displayName="SpacesContext";var h=function(e){var t,n,a,p=e.children,h=e.includeSidebar,g=e.spaces,v=m((0,s.useState)(d.F5),2),x=v[0],j=v[1],_=m((0,s.useState)([]),2),w=_[0],O=_[1],S=m((0,s.useState)(""),2),P=S[0],C=S[1],k=(0,o.Od)(),I=k.currentCommunityMember,N=k.data,A=(0,c.M)("SpacesContextProvider"),E=A.getValue,R=A.setValue,L=(0,s.useCallback)(function(e){O(e.records),R(e.records),C(e.sidebar_html),j(d.S2)},[R]),D=void 0!==g,T=!!I||!!N.current_community,M=!!I||(null==N||null==(a=N.current_community)?void 0:a.is_private)===!1,F=!D&&T&&M,K=(0,l.IT)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},i.l9.list({includeSidebar:!!h})),n=n={enabled:F,onSuccess:function(e){M&&L(e)},onError:function(){return j(d.ff)}}
1,Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)).refetch;(0,s.useEffect)(function(){if(D){O(g),j(d.S2);return}if(!T)return void j(d.F5);if(!M){O([]),C(""),j(d.S2);return}var e=E();e&&e.length>0?(O(e),j(d.S2)):j(d.F5)},[D,g,T,M,E]);var B=function(){var e;return(e=function(){var e,t,n;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:if(!T)return j(d.F5),[2];if(!M)return O([]),C(""),j(d.S2),[2];return[4,K()];case 1:return t=(e=r.sent()).data,n=e.error,t?L(t):n&&j(d.ff),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){f(i,r,o,a,s,"next",e)}function s(e){f(i,r,o,a,s,"throw",e)}a(void 0)})})()},q=function(){return x===d.S2},U=function(){return x===d.F5},z=function(){return x===d.UL},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!U())return b(w,e)},$={status:x,records:w,sidebarHtml:P,actions:{loadData:B,refresh:function(){return j(d.UL),B()},updateSpace:function(e){if(q())O(w.map(function(t){return e.id==t.id?e:t}));else throw Error("updateSpace called before data was loaded")}},isLoading:U()||z(),helpers:{isDataLoading:U,isDataRefreshing:z,isDataLoaded:q,findById:function(e){return W({id:e})},findBy:W,spacesWithPostCreationAllowed:function(){return w.filter(u.E4)},spacesWithEventCreationAllowed:function(){return w.filter(u.Gb)},basicSpacesWithPostCreationAllowed:function(){return w.filter(u.Ax)},imageSpacesWithPostCreationAllowed:function(){return w.filter(u.nX)},basicOrImageSpacesWithPostCreationAllowed:function(){return w.filter(u.wC)},spaceVisibleOnSidebar:function(){return w},spaceWithViewContentAccess:function(){return w.filter(function(e){return(0,u.H6)(e,I)})}}};return(0,r.jsx)(y.Provider,{value:$,children:p})},g=function(){var e=(0,s.useContext)(y);if(!e)throw Error("useSpacesContext must be used within a SpacesContextProvider");return e};n.d(t,{E:()=>g,Q:()=>h})},359641(e,t,n){"use strict";var r=n(945955),o=n(258752),i=function(e){return{name:e.name,moderator_community_member_ids:e.moderator_community_member_ids,active_members_count:e.active_members_count}},a=function(e){var t,n,a=r.Wo.resourceDetail(e),s=(0,o.IT)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},a),n=n={select:i},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)),l=s.data,c=s.isInitialLoading,u=s.refetch;return{data:l,isLoading:c,isError:s.isError,refetch:u}};n.d(t,{R:()=>a})},652020(e,t,n){"use strict";var r=n(292626),o=n(258752),i=function(e){var t=e.spaceId,n=e.queryOptions,i=(0,o.IT)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},r.l9.resourceDetail(t),void 0===n?{}:n));return{data:i.data,isInitialLoading:i.isInitialLoading,isLoading:i.isLoading,refetch:i.refetch,space:i.data}};n.d(t,{q:()=>i})},905001(e,t,n){"use strict";var r={communitySetting:"CommunitySetting",onboarding:"Onboarding",paywall:"Paywall",invitationLink:"InvitationLink",memberBulkImport:"AsyncTasks::BulkCommunityMemberImportTask"},o=Object.freeze({ARCHIVED:"archived",ACTIVE:"active"}),i=function(e){return(null==e?void 0:e.status)===o.ARCHIVED},a=function(e){return!(null==e?void 0:e.block_access_groups_for_trials_enabled)};n.d(t,{Gs:()=>a,c3:()=>i,fB:()=>r})},967038(e,t,n){"use strict";var r=n(352466),o=function(e){var t=[],n=Math.random().toString(36).slice(2);return{contentWithoutAttachments:e.replace(/data-trix-attachment="([^"]*)"/g,function(e,r){var o=t.push(r)-1;return'data-trix-attachment="__TRIX_'.concat(n,"_").concat(o,'__"')}),attachments:t,uniqueId:n}},i=function(e){if(!e)return e;var t,n=o(e),i=n.contentWithoutAttachments,a=n.attachments,s=n.uniqueId;return t=(0,r.A)(i,{defaultProtocol:"https",target:{url:"_blank"},ignoreTags:["a","style","script","img","iframe","action-text-attachment","video","audio"],validate:{url:function(e){return/^[^A-Z]/.test(e)}}}),t.replace(RegExp('data-trix-attachment="__TRIX_'.concat(s,'_(\\d+)__"'),"g"),function(e,t){return'data-trix-attachment="'.concat(a[Number(t)],'"')})},a=function(e){e.querySelectorAll("video").forEach(function(e){e.setAttribute("controlsList","nodownload")})},s=function(e){var t=e.containerElement,n=e.shouldIncludeInternalLinks,r=void 0!==n&&n;t.querySelectorAll("a").forEach(function(e){"A"===e.tagName&&!e.isContentEditable&&(r||e.host!==window.location.host)&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noreferrer"))})},l=function(e){e.querySelectorAll("[data-background-image]").forEach(function(e){var t=e.getAttribute("data-background-image")||"",n=document.createElement("img");n.src=t,e.setAttribute("style",'background-image: url("'.concat(t,'")')),n.onload=function(){var t=e.parentElement;t&&(t.classList.add("show"),t.classList.remove("hide"))}})};function c(e){e.querySelectorAll("[data-target~='downloadAttachment']").forEach(function(e){e.addEventListener("click",function(e){var t,n;if(t=e.currentTarget,null!=(n=HTMLElement)&&"u">typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n){e.preventDefault(),e.stopPropagation();var r,o,i,a,s,l,c,u=e.currentTarget.dataset;u.url&&u.fileName&&u.logUrl&&(o=(r={url:u.url,fileName:u.fileName,logUrl:u.logUrl}).url,i=r.fileName,a=r.logUrl,s=o,l=i,(c=document.createElement("a")).href=s,c.download=l,c.setAttribute("download",l),c.click(),fetch(a,{method:"POST"}))}})})}n.d(t,{ZZ:()=>c,_P:()=>s,ee:()=>l,pj:()=>i,rf:()=>a})},340479(e,t,n){"use strict";var r=n(904686),o=n.n(r),i=n(467363),a=function(){return{name:o().name,version:o().version,os:o().os,description:o().description,product:o().product,layout:o().layout,manufacturer:o().manufacturer,ua:o().ua}},s=function(){return"Safari"===a().name},l=function(){return"iPhone"===a().product},c=function(e){if(!e)return!1;var t=e.ctrlKey||e.metaKey,n=e.button&&1===e.button;return t||n},u=function(){return s()&&i.Ue&&15>=parseFloat(i.n5)},d=function(){return u()?"vh":"dvh"};n.d(t,{WC:()=>d,lR:()=>u,nr:()=>s,s6:()=>c,sf:()=>l})},857933(e,t,n){"use strict";var r=n(244405),o="circle-ai-masquerading-allowed-member",i=function(){return r.Q.getItem(o)},a=function(e){e?r.Q.setItem(o,e):r.Q.removeItem(o)};n.d(t,{I:()=>a,S:()=>i})},151129(e,t,n){"use strict";var r=n(451430),o=function(e){return(0,r.omitBy)(e,r.isUndefined)};n.d(t,{s:()=>o})},333789(e,t,n){"use strict";var r=n(248043),o=n(451430),i=function(e,t){try{var n,i,a,s,l,c,u=new Date(e),d=(0,r.Kf)(),p=new Intl.DateTimeFormat(d,{day:"numeric",month:"short",timeZone:t}).formatToParts(u);s=null==(l=p.find(function(e){return"month"===e.type}))?void 0:l.value,i=null==(c=p.find(function(e){return"day"===e.type}))?void 0:c.value,a=(0,o.upperFirst)(s).replace(".","")}catch(e){(null!=(n=Error)&&"u">typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)&&console.error("dateComponents - Could not parse date: ".concat(e.message))}return{dayOfMonth:i,shortMonthString:a}};n.d(t,{H:()=>i})},645765(e,t,n){"use strict";var r=n(121197),o=n(547816),i=n(417980),a=n(889828),s=function(e){var t=new Date(e),n=new Date,s=(0,r.R)(),l=(0,o.K)();return{day:t.getFullYear()===n.getFullYear()?t>s?(0,i.t)("today"):t>
1l?(0,i.t)("yesterday"):(0,a.w)({dateTime:t,format:"short_month_and_date"}):(0,a.w)({dateTime:t,format:"short_month_and_date_with_year"}),time:(0,a.w)({dateTime:t,format:"short_time"})}};n.d(t,{B:()=>s})},490096(e,t,n){"use strict";var r=n(33139),o=n(248043),i=function(e,t){var n=t.format,i=t.decimal,a=void 0===i?0:i,s=t.position,l=t.text;if(n===r.TQ.UNFORMATTED)return e.toString();var c=(0,o.Kf)(),u=e.toLocaleString(c,{minimumFractionDigits:a,maximumFractionDigits:a});return n===r.TQ.PERCENT&&(u+="%"),n===r.TQ.CUSTOM&&l&&(u="left"===s?"".concat(l," ").concat(u):"".concat(u," ").concat(l)),u};n.d(t,{Y:()=>i})},157576(e,t,n){"use strict";var r=n(697890),o=n(248043),i=n(451430);n(783116);var a=function(e,t){try{if(!e)throw Error("Missing date string");var n,a=(0,o.Kf)(),s=new Intl.DateTimeFormat(a,t);return(0,i.upperFirst)(s.format(new Date(e)))}catch(e){return(null!=(n=Error)&&"u">typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)&&!(0,r.R6)()&&console.error("Could not parse date: ".concat(e.message)),""}},s=function(e,t){return a(e,{hour12:!0,hour:"2-digit",minute:"2-digit",timeZone:t})},l=function(e,t){return a(e,{month:"long",year:"numeric",timeZone:t})},c=function(e){return a(e,{month:"short",day:"numeric",year:"numeric"})};n.d(t,{RG:()=>c,Wo:()=>s,bU:()=>a,l$:()=>l})},199563(e,t,n){"use strict";var r=n(248043),o=n(710842),i=n(602250),a=n(916481),s=n(417980),l={default:"default",short:"short"},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,n=new Date;return(0,o.O)(n,e)<t},u=function(e){var t=new Date;return 0===(0,i.I)(t,e)},d=function(e,t){return p(new Date(e),t)},p=function(e,t){var n=(null==t?void 0:t.format)||"default",o=(0,r.Kf)(),i=new a.A(o);return"short"===n?c(e)?(0,s.t)("time_format.just_now"):u(e)?i.format(e,"mini"):i.format(e,"twitter-minute-now"):i.format(e)};n.d(t,{Or:()=>l,WN:()=>p,z9:()=>d})},783116(e,t,n){"use strict";var r=n(861060),o=n(357864),i=function(e,t){return(0,o.m)(new r.BB(e,t),Date)};n.d(t,{C:()=>i})},383308(e,t,n){"use strict";var r=(0,n(629257).partial)({base:2,standard:"jedec"});n.d(t,{v:()=>r})},418668(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var a="OvDGLovptOPNSO5JjplEIssLF1x8Yxc3",s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new URL("".concat("https://api.giphy.com/v1/gifs","/").concat(e)),o=!0,i=!1,a=void 0;try{for(var s,l=Object.entries(t)[Symbol.iterator]();!(o=(s=l.next()).done);o=!0){var c,u=(c=s.value,function(e){if(Array.isArray(e))return e}(c)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(c)||function(e){if(e){if("string"==typeof e)return r(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,2)}}(c)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=u[0],p=u[1];n.searchParams.set(d,p)}}catch(e){i=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(i)throw a}}return n.toString()},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return fetch(s("search",i(o({},t),{q:e,api_key:a}))).then(function(e){return e.json()})},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return fetch(s("trending",i(o({},e),{api_key:a}))).then(function(e){return e.json()})};n.d(t,{$:()=>l,M:()=>c})},942852(e,t,n){"use strict";var r=function(e){return"triggerFormSubmit"in e};n.d(t,{N:()=>r})},774478(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var o=/^```html\n([\s\S]*?)\n```$/gm,i=/^<html>[\s\S]*<\/html>$/i,a=function(e){return o.test(e)||i.test(e)};function s(e){return e.replace(o,"$1").trim().replace(/<\/?\s*br\s*>/gi,function(e){return e.startsWith("</")?"":"<br />"}).replace(/<br\s*\/?>/gi,"<br />")}var l=function(e){return"```html\n".concat(e,"\n```")}
1,c=function(e){return e.nodeType===Node.ELEMENT_NODE},u=function(e){var t=document.createElement("div");t.innerHTML=e;var n=[],o=/^<[^>]+>/,i=function(e){if(e.nodeType===Node.TEXT_NODE){var t=(e.textContent||"").match(/\S+\s*/g)||[];n.push.apply(n,function(e){if(Array.isArray(e))return r(e)}(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return r(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(c(e)){n.push((null==(a=o.exec(e.outerHTML))?void 0:a[0])||""),e.childNodes.forEach(i);var a,s=e.tagName.toLowerCase();n.push("</".concat(s,">"))}};return t.childNodes.forEach(i),n};n.d(t,{ak:()=>s,bZ:()=>l,jz:()=>a,t8:()=>u,vq:()=>c})},244765(e,t,n){"use strict";var r,o,i=n(172949),a=n.n(i);function s(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var l=function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){return window.HYPERDX_API_KEY?r?[2,r]:(null!=o||(o=n.e(32785).then(n.t.bind(n,255752,23)).then(function(e){var t,n,o=e.default,i=window.HYPERDX_API_KEY;if(i){var s=window.location.origin,l=a()(s);return o.init({apiKey:i,url:s,logsUrl:"".concat(s,"/v1/logs"),tracesUrl:"".concat(s,"/v1/traces"),service:"circle-frontend",tracePropagationTargets:[new RegExp("^".concat(l,"(?:/|$)"))],consoleCapture:!0,advancedNetworkCapture:!0,otelResourceAttributes:{"service.version":null!=(t=window.CIRCLE_APP_VERSION)?t:"","deployment.environment":null!=(n=window.RAILS_ENV)?n:""}}),r=o,o}}).catch(function(){})),[2,o]):[2,void 0]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){s(i,r,o,a,l,"next",e)}function l(e){s(i,r,o,a,l,"throw",e)}a(void 0)})})()},c=function(){l()},u=function(e,t){l().then(function(n){null==n||n.setGlobalAttributes({userId:String(e),communityId:void 0===t?"":String(t)})})},d=function(){l().then(function(e){null==e||e.setGlobalAttributes({userId:"",communityId:""})})};n.d(t,{A1:()=>u,Pi:()=>c,nE:()=>d})},667907(e,t,n){"use strict";var r=function(){var e=window.location.pathname;return/^\/c\/[^/]+\/[^/]+\/?$/.test(e)};n.d(t,{S:()=>r})},693410(e,t,n){"use strict";var r=Object.freeze({INITIALIZING:"initializing",BACKSTAGE:"backstage",LIVE:"active",ENDED:"inactive",CLOSING:"closing",SCHEDULED:"scheduled"}),o=Object.freeze({CONFERENCE:"conference",STREAM:"stream",EVENT:"event"}),i=Object.freeze({OPEN:"open",SECRET:"secret",PUBLIC_STREAM:"public_stream"}),a=Object.freeze({SPEAKER:"speaker_view",SPEAKER_VARIANT:"speaker_variant_view",GRID:"grid_view"}),s=Object.freeze({HOST:"host",HLS_SPECTATOR:"hlsspectator",MODERATOR:"moderator"}),l=Object.freeze({HOST:"host",MODERATOR:"moderator",COHOST:"cohost",PARTICIPANT:"participant"}),c={JOINING:"joining",ACTIVE:"active",INACTIVE:"inactive"},u=Object.freeze({HMS:"hms",LIVEKIT:"livekit"}),d=function(e){return(null==e?void 0:e.status)===r.BACKSTAGE},p=function(e){return(null==e?void 0:e.status)===r.LIVE},f=function(e){return(null==e?void 0:e.status)===r.CLOSING},m=function(e){return(null==e?void 0:e.status)===r.ENDED},b=function(e){return(null==e?void 0:e.status)===r.SCHEDULED},y=function(e){return(null==e?void 0:e.room_type)===o.STREAM},h=function(e){return(null==e?void 0:e.room_type)===o.CONFERENCE},g=function(e){return!!(null==e?void 0:e.recording_enabled)},v=function(e){return!!(null==e?void 0:e.can_manage)},x=function(e){return!!(null==e?void 0:e.can_host)},j=function(e){return!!(null==e?void 0:e.host_capacity_reached)},_=function(e){return!!(null==e?void 0:e.spectator_capacity_reached)},w=function(e){return(null==e?void 0:e.room_type)||o.STREAM},O=function(e){return!(null==e?void 0:e.view_type)||(null==e?void 0:e.view_type)===a.SPEAKER||(null==e?void 0:e.view_type)===a.SPEAKER_VARIANT},S=function(e){return(null==e?void 0:e.view_type)===a.SPEAKER_VARIANT},P=function(e){return(null==e?void 0:e.view_type)===a.GRID},C=function(e){return(null==e?void 0:e.access_type)===i.SECRET},k=function(e){return(null==e?void 0:e.access_type)===i.PUBLIC_STREAM},I=function(e){return(null==e?void 0:e.status)===c.INACTIVE},N=function(e){return(null==e?void 0:e.role)===s.HOST},A=function(e){return(null==e?void 0:e.role)===s.HLS_SPECTATOR},E=function(e){return(null==e?void 0:e.room_provider)===u.LIVEKIT},R=function(e){return k(e)&&v(e)},L=function(e){return null==e?void 0:e.limit_url_sharing},D=function(e){return!!(null==e?void 0:e.hide_participants_list)&&!v(e)&&!(null==e?void 0:e.can_moderate)},T=function(e){var t=null==e?void 0:e.metadata;if(!t)return null;try{var n,r,o=JSON.parse(t);return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},o),r={role:e.roleName},r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n}catch(e){return console.error("Error parsing peer metadata",e),null}};n.d(t,{DG:()=>p,EZ:()=>k,He:()=>h,IJ:()=>s,Jw:()=>g,NO:()=>v,Nr:()=>R,Ts:()=>I,V4:()=>c,Vs:()=>b,Wv:()=>1,XU:()=>_,aV:()=>C,bG:()=>N,dS:()=>T,fY:()=>O,hR:()=>A,hq:()=>l,iA:()=>d,k9:()=>E,kF:()=>a,mE:()=>L,mJ:()=>j,mQ:()=>x,pl:()=>m,rL:()=>y,sA:()=>w,sR:()=>o,sl:()=>S,tx:()=>i,w1:()=>P,wH:()=>f,xM:()=>r,zo:()=>D})},132416(e,t,n){"use strict";var r=function(e){var t,n;return(null!=(t=null==e||null==(n=e.member_tags)?void 0:n.length)?t:0)>0},o=function(e){return!!e.website_url||!!e.facebook_url||!!e.twitter_url||!!e.linkedin_url||!!e.instagram_url},i={SIGNUP:"signup",EDIT_PROFILE:"edit_profile",PROFILE_VIEW:"profile_view"};n.d(t,{Ni:()=>o,TP:()=>i,kS:()=>r})},766160(e,t,n){"use strict";var r=n(157576);n(451430);var o=function(e,t){return e&&/^\d{4}-\d{2}-\d{2}/.test(e)?e:null!=t?t:void 0},i=function(e){return e?(0,r.bU)(e,{month:"long",year:"numeric"}):""};n.d(t,{Fw:()=>i,l8:()=>o})},838605(e,t,n){"use strict";var r=function(e){return e.memberTags.filter(function(e){var t=e.display_locations;return(null==t?void 0:t.member_directory)&&e.is_public})};n.d(t,{L:()=>r})},799684(e,t,n){"use strict";var r=function(e){return e>99?"99+":e};n.d(t,{f:()=>r})},689492(e,t,n){"use strict";var r=n(417980),o=n(306788),i=n(867373),a=Object.freeze({basic:"basic",professional:"professional",enterprise:"enterprise",plus:"plus",business:"business"}),s=Object.freeze({basic:1,professional:2,business:3,enterprise:4,plus:5}),l=Object.freeze({month:"month",year:"year",quarter:"quarter",biannual:"biannual"}),c=function(e){return e===l.year},u=function(e){return e===l.month},d=function(e){return e===a.basic},p=function(e){return e===a.professional},f=function(e){return e===a.enterprise},m=function(e){return e===a.plus},b=function(e){return e===a.business},y=function(e){var t;return(null==e?void 0:e.name)==="Circle Configurable Plus"&&(null==(t=e.subscription)?void 0:t.status)==="active"},h=function(e,t){return s[t]<s[e]},g=function(e,t){return s[t]>s[e]},v=function(e){var t=Object.keys(s),n=t.indexOf(e),r=n<t.length-1,o=t[n+1];return r?o:null},x=function(e,t){return"".concat(e," ").concat(t.toUpperCase())},j=function(e,t){if(!e)return"";if(!t)return String(e);var n=t.toUpperCase(),r=i.Y[n];return r?"".concat(r.symbol).concat(e):e.toString()},_=function(e){var t=Object.keys(s),n=t.indexOf(e),r=t[n-1];return n>0?r:null},w=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e},O=function(e){return e?(0,r.t)(["pricing_plans.plan_settings.plan_selection.features.tiers",e],{defaultValue:w(e)}):""},S=function(e,t){return t?e===o.O.SCHEDULED_DOWNGRADE_BANNER?t.name:O(t.tier):""},P=function(e){var t;return C(null!=(t=e.fetch_discount)?t:"0")},C=function(e){var t=5*Math.round(Math.abs(parseInt(e.replace("%",""),10))/5);return"".concat(t,"%")},k=function(e){return d(e)||p(e)?a.business:a.enterprise};n.d(t,{Bm:()=>j,C0:()=>O,Cg:()=>g,KL:()=>m,LQ:()=>a,N4:()=>k,PF:()=>f,Qf:()=>b,V5:()=>h,Zr:()=>w,_r:()=>y,ax:()=>v,cA:()=>c,e_:()=>x,ku:()=>u,rT:()=>p,sB:()=>S,sj:()=>d,wi:()=>_,zD:()=>P})},75571(e,t,n){"use strict";var r=n(417980),o=n(689492),i=function(e){return e.interval===l.year?(0,r.t)("pricing_plans.billing_cycle.annually"):(0,r.t)("pricing_plans.billing_cycle.monthly")},a=function(e){return(0,o.C0)(e)},s=function(e){return!!((null==e?void 0:e.alternative_plan)||(null==e?void 0:e.alternative_plan_id))},l=Object.freeze({month:"month",year:"year",quarter:"quarter",biannual:"biannual"}),c=function(e){return[O.live_stream_max_host_capacity,O.live_stream_max_spectator_capacity].includes(e)},u=function(e){return e>=1e6},d={upgrade:"upgrade",current_plan:"current_plan",resume:"resume",redeem_offer:"redeem_offer",renew:"renew",change_plan:"change_plan",downgrade:"downgrade",contact_support:"contact_support"},p=function(e){return function(t){return t===e}},f=p(d.current_plan),m=p(d.upgrade);p(d.redeem_offer);var b=p(d.resume),y=p(d.renew),h=p(d.change_plan),g=p(d.downgrade),v=p(d.contact_support),x=function(e){return h(e.plan_action)&&e.interval===l.year},j=function(e){return h(e.plan_action)&&e.interval===l.month},_=function(e){return x(e)||m(e.plan_action)},w=function(e){var t=e.checkout_succeeded;return!!(void 0!==t&&t)},O=Object.freeze({sso:"sso",max_admin_count:"max_admin_count",max_space_count:"max_space_count",custom_css:"custom_css",api_access:"api_access",automated_moderation:"automated_moderation",advanced_reporting:"advanced_reporting",custom_domain:"custom_domain",max_moderator_count:"max_moderator_count",internal_custom_html:"internal_custom_html",post_admin_change:"post_admin_change",max_member_count:"max_member_count",payments_fee_percentage:"payments_fee_percentage",allow_addons:"allow_addons",email_whitelist:"email_whitelist",live_stream_max_host_capacity:"live_stream_max_host_capacity",live_stream_max_spectator_capacity:"live_stream_max_spectator_capacity",live_stream_monthly_stream_hours:"live_stream_monthly_stream_hours",live_stream_recording_hours:"live_stream_recording_hours",chat_space_members_limit:"chat_space_members_limit",profile_fields_enabled:"profile_fields_enabled",max_bulk_import_member_limit_tier_1:"max_bulk_import_member_limit_tier_1",max_bulk_import_member_limit_tier_2:"max_bulk_import_member_limit_tier_2",max_bulk_import_member_limit_on_trial:"max_bulk_import_member_limit_on_trial",live_room_participants_capacity:"live_room_participants_capacity",courses:"courses",customize_community:"customize_community",paywall_conversion_tracking_code:"paywall_conversion_tracking_code",max_dynamic_workflows_count:"max_dynamic_workflows_count",max_bulk_action_workflows_count:"max_bulk_action_workflows_count",max_scheduled_
1workflows_count:"max_scheduled_workflows_count",zapier_token_automatic_creation:"zapier_token_automatic_creation",affiliates:"affiliates",analytics_filters:"analytics_filters",included_storage_gigabytes:"included_storage_gigabytes",monthly_ai_credit_allotment:"monthly_ai_credit_allotment"});n.d(t,{Cg:()=>m,Lh:()=>O,NG:()=>c,Oz:()=>f,Pu:()=>j,RG:()=>u,V5:()=>g,We:()=>i,_6:()=>a,eu:()=>x,gm:()=>_,jR:()=>w,k$:()=>l,li:()=>d,qK:()=>s,sU:()=>y,v1:()=>v,x:()=>b})},328187(e,t,n){"use strict";n.d(t,{AF:()=>_,AT:()=>f,Cu:()=>I,HF:()=>u,J0:()=>k,JE:()=>v,Lo:()=>A,MB:()=>p,Ni:()=>h,O7:()=>c,Rj:()=>P,Ux:()=>C,V1:()=>x,VG:()=>E,Vz:()=>y,Y0:()=>O,YU:()=>w,a1:()=>d,bZ:()=>j,g:()=>N,mc:()=>b,pn:()=>g,q1:()=>S,su:()=>m});var r=n(889828),o=n(12471),i=n(451430),a=n(765724),s=n(310944),l=n(341409),c=function(e){return!e||(0,l.WY)(e)||!e.hide_post_settings},u=function(e){return!e||(0,l.WY)(e)||!e.disable_member_post_covers},d=function(e){return"cards"===(e||{}).display_view},p=function(e){if(!e)return null;try{return JSON.parse(e)}catch(t){return{formatted_address:e}}},f=function(e){var t;return!!(null==e||null==(t=e.policies)?void 0:t.can_manage_post)},m=function(e){var t;return!!(null==e||null==(t=e.policies)?void 0:t.can_update_post)},b=function(e){var t;return!!(null==e||null==(t=e.policies)?void 0:t.can_duplicate_post)},y=function(e){var t;return!!(null==e||null==(t=e.policies)?void 0:t.can_destroy_post)},h=function(e){var t;return!!(null==e||null==(t=e.policies)?void 0:t.can_report_post)},g=function(e,t){return!!(t.postSlugInUrl===(null==e?void 0:e.share_uid)&&(null==e?void 0:e.share_post_enabled))},v=function(e,t){var n=t.currentUser,r=t.postSlugInUrl;return!!n&&!g(e,{postSlugInUrl:r})},x=function(e){return"Posts::Basic"===e.type},j=function(e){return(null==e?void 0:e.type)==="Posts::Event"},_=function(e){return!!(e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"&&"type"in e&&"Posts::Image"===e.type)},w=function(e,t,n){return!!n&&!!t&&!!e&&!!(x(e)||j(e)||_(e))&&(n.is_hidden?(0,l.WY)(n)&&!(0,a.E1)(t):!!(!(0,l._J)(n)&&!(0,a.fz)(t)||(0,l.Mk)(n)&&(0,a.tI)(t))||(0,l.WY)(n)&&!(0,a.E1)(t))},O="scheduled",S="draft",P=function(e){return"published"===e.status},C=function(e){return"tiptap"===e.editor},k=function(e){return!C(e)},I=function(e){if((0,i.get)(e,"body_trix_content")||(0,i.get)(e,"internal_custom_html"))return!1;var t=(0,i.get)(e,"tiptap_body.body.content",[]);return(0,i.isEmpty)(t)},N=function(e){return!!(null==e?void 0:e.hide_meta_info)},A=function(e){var t=e.post,n=e.editMode;return P(t)?s.Q.buildLocation({to:"/c/$spaceSlug/$postSlug",params:{spaceSlug:t.space_slug,postSlug:t.slug},search:void 0!==n&&n?{edit:!0}:{}}).href:s.Q.buildLocation({to:"/settings/posts",search:{status:t.status}}).href},E=function(e){var t=(0,o.H)(e);return(0,r.w)({dateTime:t,format:r.z.long_date_at_short_time})}},13444(e,t,n){"use strict";var r=n(451430),o=n(417980),i=n(915779);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function(e){return(0,r.isString)(e)?e.replace(/(^\w+:|^)\/\//,""):e},l=function(e){var t=e.name,n=e.params,s=e.publicUid,l=e.shouldOpenInNewTab,c=e.showMemberProfileDrawer,u=t||(0,o.t)("view_user_profile_name"),d=(0,o.t)("view_user_profile",{user:u});return s?void 0!==l&&l?a({href:(0,i.qN)({public_uid:s,params:n}),target:"_blank",rel:"noreferrer"},"aria-label",d):a({onClick:function(e){e.preventDefault(),c({memberPublicId:s,params:n})},href:(0,i.qN)({public_uid:s})},"aria-label",d):a({onClick:r.noop,href:"#"},"aria-label","")};n.d(t,{R:()=>s,S:()=>l})},441042(e,t,n){"use strict";var r=function(e){return{body:{type:"doc",content:[{type:"paragraph",content:[{type:"text",text:e}]}]},attachments:[],localAttachments:[],localSgidToObjectMap:{}}};n.d(t,{y:()=>r})},909250(e,t,n){"use strict";var r=n(451430);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var i=function(e){var t,n=e.spaceGroupId,r=e.currentCommunityMember;return null==r||null==(t=r.hidden_space_group_ids)?void 0:t.includes(n)},a=function(e){var t,n=e.spaceGroup;return null==n||null==(t=n.policies)?void 0:t.can_manage_space_group},s=function(e){var t;return null==(t=e.spaceGroup.policies)?void 0:t.can_create_space},l=function(e){var t,n,i=e.spaceGroup,a=e.spaces,s=e.spacesWithDetails,l=void 0===s?[]:s,c=a.filter(function(e){return e.space_group_id==i.id}).map(function(e){return o({},e,(0,r.find)(l,{id:e.id})||{})});return t=o({},i),n=n={spaces:c},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t},c=function(e){return"paywall"===e};n.d(t,{GD:()=>c,_V:()=>s,kW:()=>i,li:()=>l,ot:()=>a})},341409(e,t,n){"use strict";var r=n(915779);n(343257);var o=n(451430),i=n(6418),a=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).current_user_roles;return!!(e&&(e.includes("admin")||e.includes("moderator")))},s=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).is_space_member;return!!e},l=function(e){return(null==e?void 0:e.post_type)==="event"},c=function(e){return(null==e?void 0:e.post_type)==="basic"},u=function(e){return(null==e?void 0:e.post_type)==="chat"||(null==e?void 0:e.space_type)==="chat"},d=function(e){return(null==e?void 0:e.post_type)==="course"},p=function(e){return(null==e?void 0:e.post_type)==="members"},f=function(e){return(null==e?void 0:e.post_type)==="image"},m=function(e){return c(e)||l(e)||f(e)},b=function(e){return(null==e?void 0:e.display_view)==="posts"&&!l(e)},y=function(e){return(null==e?void 0:e.display_view)==="cards"},h=function(e){return(null==e?void 0:e.display_view)==="list"},g=function(e){return!!(e&&f(e)&&"feed"===e.display_view)},v=function(e){return!!(e&&f(e)&&"masonry"===e.display_view)},x=function(e){return!!(e&&f(e)&&"grid"===e.display_view)},j=function(e){return v(e)||x(e)},_=function(e){return!!(null==e?void 0:e.is_private)},w=function(e){return!!(e&&!_(e))},O=function(e){return(null==e?void 0:e.visibility)==="secret"},S=function(e){return(null==e?void 0:e.visibility)==="draft"},P=function(e,t){return!_(e)||s(e)||(0,i.V8)(t)},C=function(e){var t;return!!(null==e||null==(t=e.policies)?void 0:t.can_create_post)},k=function(e){return C(e)&&l(e)},I=function(e){var t;return!!(null==e||null==(t=e.policies)?void 0:t.can_invite_members)},N=function(e){return C(e)&&c(e)},A=function(e){return C(e)&&f(e)},E=function(e){return C(e)&&(c(e)||f(e))},R=function(e){var t;return!!(null==e||null==(t=e.policies)?void 0:t.can_manage_space)},L=function(e){var t;return!!(null==e||null==(t=e.policies)?void 0:t.can_leave_space)},D=function(e){return(null==e?void 0:e.space_access_type)==="paywall"},T=function(e){return!!((null==e?void 0:e.emoji)&&"#"!==e.emoji)},M=function(e){return!(null==e?void 0:e.hide_sorting)},F=function(e,t){var n;return!!(e&&t&&(null==e||null==(n=e.visible_tabs)?void 0:n[t]))},K=function(e,t){return F(e,"members")&&((null==t?void 0:t.is_admin)||(null==e?void 0:e.is_space_member)||!(null==e?void 0:e.is_private))},B=function(e,t){return!!(e&&(!e.is_private||e.is_space_member||(null==t?void 0:t.is_admin)))},q=function(e){return l(e)?F(e,"upcoming")||F(e,"past"):!!p(e)||F(e,"posts")},U=function(e){return!p(e)&&!q(e)&&K(e)},z=function(e){return!!((null==e?void 0:e.id)&&q(e))},W=function(e){var t;return(null==e||null==(t=e.meta_tag_attributes)?void 0:t.meta_title)?e.meta_tag_attributes.meta_title:null==e?void 0:e.name},$=function(e){var t=e.spaces,n=e.sort;switch(void 0===n?"none":n){case"active":return(0,o.orderBy)(t,["posts_count"],["desc"]);case"latest":return(0,o.orderBy)(t,["created_at"],["desc"]);case"alphabetical":return(0,o.orderBy)(t,["name"],["asc"]);default:return t}},V=function(){return function(e){return e&&e.slug?r.qj.show({spaceSlug:e.slug}):""}},H=function(e,t){return e.find(function(e){return e.id===t})},G=function(e){return"paywall"===e},Z=function(e){return(null==e?void 0:e.display_view)==="calendar"},Q=function(e){return l(e)&&Z(e)},Y=function(e){var t=e.space,n=e.spaceGroup;return!t.hide_from_sidebar&&(!n.hide_non_member_spaces_from_sidebar||t.is_space_member)};n.d(t,{$J:()=>H,$O:()=>u,Ax:()=>N,E4:()=>C,Gb:()=>k,H6:()=>P,Hq:()=>j,Jw:()=>D,KB:()=>S,L9:()=>U,M2:()=>W,Mk:()=>w,Mu:()=>Z,O9:()=>h,Op:()=>p,QM:()=>l,RQ:()=>F,WY:()=>a,ZR:()=>G,_0:()=>y,_J:()=>_,_N:()=>V,_o:()=>Y,aZ:()=>$,fN:()=>g,ge:()=>c,hn:()=>T,jl:()=>K,jx:()=>O,ks:()=>m,m2:()=>v,nK:()=>f,nX:()=>A,o1:()=>B,ps:()=>x,qI:()=>M,qJ:()=>L,sZ:()=>z,sp:()=>Q,wC:()=>E,wp:()=>R,ww:()=>b,xl:()=>I,yd:()=>d,z:()=>s})},555376(e,t,n){"use strict";var r=function(e){return!!e};n.d(t,{z:()=>r})},627522(e,t,n){"use strict";var r={list:function(){return"/settings/emails/broadcast"},show:function(e){var t=e.broadcastId;return"/settings/emails/broadcast/".concat(t)},edit:function(e){var t=e.broadcastId;return"/settings/emails/broadcast/".concat(t,"/edit")},visualBuilder:function(e){var t=e.broadcastId;return"/settings/emails/broadcast/".concat(t,"/visual-builder")},content:function(e){var t=e.broadcastId;return"/settings/emails/broadcast/".concat(t,"/content")},view:function(e){var t=e.broadcastId;return"/settings/emails/broadcast/".concat(t,"/view")},viewAnalytics:function(e){var t=e.broadcastId;return"/settings/emails/broadcast/".concat(t,"/view/analytics")}};n.d(t,{C:()=>r})},869954(e,t,n){"use strict";var r=n(940486),o=n(27838),i=n(100736),a=["lesson","courses::lesson"],s=function(e){var t=e.type,n=e.slug,s=e.space_slug,l=e.section_id,c=e.lesson_id,u=e.params,d=void 0===u?{}:u,p=t.toLowerCase();return p===r.c4.SPACE?(0,o.m)("/c/".concat(n),d):a.includes(p)?(0,o.m)("/c/".concat(s,"/sections/").concat(l,"/lessons/").concat(c),d):(0,i.$)({spaceSlug:s,slug:n,params:d})},l=function(e){var t=e.url,n=e.type,r=e.slug,o=e.space_slug,i=e.section_id,a=e.id,l=e.params;return t||s({type:n,slug:null!=r?r:"",space_slug:null!=o?o:"",section_id:i,lesson_id:a,params:l})};n.d(t,{N:()=>s,t:()=>l})},250313(e,t,n){"use strict";var r=n(993192),o="/internal_api/workflows",i="".concat(o,"/workflows"),a=function(e){var t=e.workflowId,n=e.id,o=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/triggers/").concat(n),void 0===o?{}:o)},s={create:function(e){var t=e.params;return(0,r.U)(i,void 0===t?{}:t)},list:function(e){var t=e.params;return(0,r.U)(i,void 0===t?{}:t)},fetch:function(e){var t=e.id,n=e.params;return(0,r.U)("".concat(i,"/").concat(t),void 0===n?{}:n)},update:function(e){var t=e.id,n=e.params;return(0,r.U)("".concat(i,"/").concat(t),void 0===n?{}:n)},activate:function(e){var t=e.id,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/activate"),void 0===n?{}:n)},inactivate:function(e){var t=e.id,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/inactivate"),void 0===n?{}:n)},archive:function(e){var t=e.id,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/archive"),void 0===n?{}:n)},duplicate:function(e){var t=e.id,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/duplicate"),void 0===n?{}:n)},delete:function(e){var t=e.id,n=e.params;return(0,r.U)("".concat(i,"/").concat(t),void 0===n?{}:n)},createTrigger:function(e){var t=e.workflowId,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/triggers"),void 0===n?{}:n)}
1,updateTrigger:a,deleteTrigger:a,createRun:function(e){var t=e.workflowId,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/runs"),void 0===n?{}:n)},fetchRuns:function(e){var t=e.workflowId,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/runs"),void 0===n?{}:n)},fetchRun:function(e){var t=e.workflowId,n=e.runId,o=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/runs/").concat(n),void 0===o?{}:o)},cancelRun:function(e){var t=e.workflowId,n=e.runId,o=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/runs/").concat(n,"/cancel"),void 0===o?{}:o)},fetchTasksInRun:function(e){var t=e.workflowId,n=e.runId,o=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/runs/").concat(n,"/tasks"),void 0===o?{}:o)},createAudience:function(e){var t=e.workflowId,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/audiences"),void 0===n?{}:n)},updateAudience:function(e){var t=e.workflowId,n=e.id,o=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/audiences/").concat(n),void 0===o?{}:o)},createAction:function(e){var t=e.workflowId,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/actions"),void 0===n?{}:n)},updateAction:function(e){var t=e.workflowId,n=e.id,o=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/actions/").concat(n),void 0===o?{}:o)},deleteAction:function(e){var t=e.workflowId,n=e.id,o=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/actions/").concat(n),void 0===o?{}:o)},upsertActions:function(e){var t=e.workflowId,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/actions/upsert"),void 0===n?{}:n)},updateGraph:function(e){var t=e.workflowId,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/graph"),void 0===n?{}:n)},createOneTimeSchedule:function(e){var t=e.workflowId,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/schedule/one_time"),void 0===n?{}:n)},updateOneTimeSchedule:function(e){var t=e.workflowId,n=e.id,o=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/schedule/one_time/").concat(n),void 0===o?{}:o)},createRecurringSchedule:function(e){var t=e.workflowId,n=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/schedule/recurring"),void 0===n?{}:n)},updateRecurringSchedule:function(e){var t=e.workflowId,n=e.id,o=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/schedule/recurring/").concat(n),void 0===o?{}:o)},reschedule:function(e){var t=e.workflowId,n=e.id,o=e.params;return(0,r.U)("".concat(i,"/").concat(t,"/schedule/reschedule/").concat(n),void 0===o?{}:o)},tasks:function(e){var t=e.params;return(0,r.U)("".concat(o,"/tasks"),void 0===t?{}:t)},taskDetail:function(e){var t=e.taskId,n=e.params;return(0,r.U)("".concat(o,"/tasks/").concat(t),void 0===n?{}:n)},templates:function(e){var t=e.params;return(0,r.U)("".concat(o,"/templates"),void 0===t?{}:t)},fetchTemplate:function(e){var t=e.templateId,n=e.params;return(0,r.U)("".concat(o,"/templates/").concat(t),void 0===n?{}:n)},createFromTemplate:function(e){var t=e.templateId,n=e.params;return(0,r.U)("".concat(o,"/templates/").concat(t,"/create_workflow"),void 0===n?{}:n)},createFromTemplateKey:function(e){var t=e.templateKey;return(0,r.U)("".concat(o,"/templates/").concat(t,"/create_workflow"))},fetchCommunityCurrentUsageStats:function(e){var t=e.params;return(0,r.U)("".concat(o,"/community_current_usage_stats"),void 0===t?{}:t)},fetchInterpolatedMessage:function(e){var t=e.params;return(0,r.U)("".concat(o,"/preview_messages/interpolated_message"),void 0===t?{}:t)},fetchDynamicVariables:function(e){var t=e.params;return(0,r.U)("".concat(o,"/dynamic_variables"),void 0===t?{}:t)},testWebhook:function(e){var t=e.params;return(0,r.U)("".concat(o,"/webhook_tests"),void 0===t?{}:t)},events:{index:function(e){var t=e.params;return(0,r.U)("/internal_api/workflows/events",void 0===t?{}:t)},show:function(e){var t=e.id,n=e.params;return(0,r.U)("/internal_api/workflows/events/".concat(t),void 0===n?{}:n)}},posts:{show:function(e){var t=e.id,n=e.params;return(0,r.U)("/internal_api/workflows/posts/".concat(t),void 0===n?{}:n)}},recurringEventSettings:{show:function(e){var t=e.id,n=e.params;return(0,r.U)("/internal_api/workflows/recurring_event_settings/".concat(t),void 0===n?{}:n)}}
1,paywallPrices:{show:function(e){var t=e.paywallId,n=e.id,o=e.params;return(0,r.U)("/internal_api/workflows/paywalls/".concat(t,"/prices/").concat(n),void 0===o?{}:o)}},previewMessages:{previewAttributes:function(e){var t=e.params;return(0,r.U)("/internal_api/workflows/preview_messages/preview_attributes",void 0===t?{}:t)}},contacts:{index:function(e){var t=e.params;return(0,r.U)("/internal_api/workflows/contacts",void 0===t?{}:t)}},broadcasts:{index:function(e){var t=e.params;return(0,r.U)("/internal_api/workflows/broadcasts",void 0===t?{}:t)},show:function(e){var t=e.id,n=e.params;return(0,r.U)("/internal_api/workflows/broadcasts/".concat(t),void 0===n?{}:n)},links:function(e){var t=e.id,n=e.params;return(0,r.U)("/internal_api/workflows/broadcasts/".concat(t,"/links"),void 0===n?{}:n)}}};n.d(t,{L:()=>s})},595994(e,t,n){"use strict";var r=function(e,t){try{return e.location.origin===new URL(t,e.location.origin).origin}catch(e){return!1}};n.d(t,{J:()=>r})},450225(e,t,n){"use strict";var r=n(230763),o=n(451430),i=n(258752),a=n(274685),s=n(51730),l=n(915779);function c(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var u=["community-setting","show"],d=function(){return(0,i.IT)({queryKey:u,queryFn:function(){var e=l.iK.communities.communitySettings.index();return(0,s.i_)(e)}})},p=function(e){var t=e.data,n=e.updates,r=l.iK.communities.communitySettings.update({communitySettingId:t.community_settings.id});return(0,s.kS)(r,{community_setting:n})},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onMutate,n=void 0===t?o.noop:t,s=e.onSuccess,l=void 0===s?o.noop:s,d=e.onError,f=void 0===d?o.noop:d,m=e.onSettled,b=void 0===m?o.noop:m,y=(0,r.Od)().refetch,h=(0,a.jE)();return(0,i.n_)({mutationFn:p,onMutate:function(e){var t=e.data,r=h.getQueryData(u);return h.setQueryData(u,t),n&&n(),{previousData:r,data:t}},onSuccess:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return[4,y()];case 1:return t.sent(),h.setQueryData(u,e),l&&l(),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){c(i,r,o,a,s,"next",e)}function s(e){c(i,r,o,a,s,"throw",e)}a(void 0)})})()},onError:f,onSettled:b})},m=function(e){var t=(0,r.Od)().currentCommunitySettings;return!!(null==t?void 0:t[e])};n.d(t,{Uy:()=>f,YQ:()=>d,nR:()=>m})},777602(e,t,n){"use strict";var r,o=n(51730),i=n(913961),a=n(5219),s=n(258752);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=(l(r={},a.E.Space,i.i.accessRegistry.spaces),l(r,a.E.SpaceGroup,i.i.accessRegistry.spaceGroups),l(r,a.E.AccessGroup,i.i.accessRegistry.accessGroups),r),u=function(e,t){var n=c[e];return(0,s.IT)(["access_registry_content_spec",e,t],function(){return(0,o.i_)(n.show(t))})};n.d(t,{c:()=>u})},174404(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(258752),a=function(e){var t=e.agentId,n=e.params,a=void 0===n?{}:n,s=["AI_AGENT_PROFILE_INFO",t,a];return{getAgentProfileInfoQuery:(0,i.IT)({queryKey:s,queryFn:function(){return(0,r.i_)(o.iK.communityAiAgentProfile.show({agentId:t,params:a}))},retry:!1,enabled:!!t})}};n.d(t,{K:()=>a})},275603(e,t,n){"use strict";n.d(t,{w:()=>ec});var r=n(451430),o=n(417980);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(e){var t=e.name,n=e.params,a=e.agentId,s=e.shouldOpenInNewTab,l=e.showAgentProfileDrawer,c=t||(0,o.t)("view_user_profile_name"),u=(0,o.t)("view_user_profile",{user:c});return!a||void 0!==s&&s?i({onClick:r.noop,href:"#"},"aria-label",""):i({onClick:function(e){e.preventDefault(),l({agentId:a,params:n})},href:"#"},"aria-label",u)},s=n(340479),l=n(506493),c=n(933578),u=n(809061),d=n(391426),p=n(132416),f=n(791009),m=n(174404),b=n(568316),y=n(785466),h=n(964786),g=n(222256),v=n(103263),x=n(224444),j=n(441042),_=n(519104),w=n(325335),O=n(988269),S=n(786158),P=n(328187),C=n(534529),k=n(713821),I=n(898666),N=n(734527),A=n(9995),E=function(e){var t=e.comment,n=e.onClose,r=e.member,i=(0,k.GP)(new Date(t.created_at),"MMM dd");return(0,d.jsxs)(C.N_,{to:"/c/$spaceSlug/$postSlug",params:{spaceSlug:t.space_slug,postSlug:t.post_slug},hash:"".concat(A.r0.replace(/^#/,"")).concat(t.id),onClick:n,className:"flex w-full min-w-0 items-start space-x-3 overflow-hidden py-5 first:pt-0",children:[(0,d.jsx)("div",{className:"mt-1",children:(0,d.jsx)(N.J,{isFullRounded:!0,name:r.name,src:r.avatar_url,size:"10"})}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex w-full min-w-0 items-center justify-between space-x-2",children:[(0,d.jsxs)("div",{className:"text-default w-full min-w-0 flex-1 truncate text-sm",children:[(0,o.t)("profile_drawer.comments.commented_on")," ",(0,d.jsx)("span",{className:"text-dark dark:text-darkest font-medium",children:t.post_name||t.post_truncated_content})]}),(0,d.jsx)("div",{children:(0,d.jsx)(I.$,{interactive:!1,content:(0,P.VG)(t.created_at),children:(0,d.jsx)("span",{className:"text-default text-sm",children:i})})})]}),"tiptap"===t.editor?(0,d.jsx)(S._,{tiptapBody:t.tiptap_body},t.updated_at):(0,d.jsx)(O.X,{content:t.body_trix_content})]})]})},R=n(678431),L=(0,c.createContext)({agent:null,isLoading:!0,isFullPageView:!1,onClose:function(){}});L.displayName="AgentProfileContext";var D=function(){return(0,c.useContext)(L)},T=function(e){var t=e.agent,n=e.isFullPageView,o=e.isLoading,i=e.children,a=e.onClose,s=void 0===a?r.noop:a;return(0,d.jsx)(L.Provider,{value:{agent:t,isLoading:o,isFullPageView:void 0!==n&&n,onClose:s},children:i})};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var F="agent-profile-scrollable-target",K=function(){var e,t,n,r,i,a=D(),s=a.agent,l=a.onClose,u=s.can_interact,p=(0,_.Z)(),f=function(e){if(Array.isArray(e))return e}(e=(0,c.useState)("about"))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return M(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return M(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=f[0],O=f[1],S=null==s||null==(r=s.profile)?void 0:r.id,P=(0,R.f)({profileId:S,enabled:"comments"===m}),C=P.fetchNextPage,k=P.hasNextPage,I=P.isLoading,N=P.error,A=P.comments,L=null!=(t=null!=(n=null==s?void 0:s.comments_count)?n:null==s||null==(i=s.profile)?void 0:i.comments_count)?t:0,T=(0,c.useMemo)(function(){var e,t,n;return{id:null!=(e=null==s?void 0:s.id)?e:0,name:null!=(t=null==s?void 0:s.name)?t:"",avatar_url:null!=(n=null==s?void 0:s.avatar_url)?n:""}},[null==s?void 0:s.id,null==s?void 0:s.name,null==s?void 0:s.avatar_url]),K=(0,v.T)().createChat,B=function(e,t){K({id:e.id,body:(0,j.y)(t)}).then(function(e){p({to:"/messages/bot/$id",params:{id:String(e.id)}})}).catch(function(e){console.error(e)})};return(0,d.jsxs)("div",{className:"bg-primary col-span-12 flex flex-col overflow-auto overflow-x-hidden p-8 md:col-span-8",children:[(0,d.jsx)("div",{className:"pb-5 pt-2",children:(0,d.jsxs)("div",{className:"flex items-center gap-2 overflow-x-auto pb-2",children:[(0,d.jsx)(h.V,{title:(0,o.t)("about"),isActive:"about"===m,onClick:function(){return O("about")}}),(0,d.jsx)(h.V,{title:(0,o.t)("comments.comments"),isActive:"comments"===m,count:L,onClick:function(){return O("comments")}})]})}),(0,d.jsx)("div",{className:"flex-1 overflow-auto",id:F,children:"about"===m?(0,d.jsx)("div",{className:"pb-8",children:(0,d.jsxs)("div",{className:"flex flex-col items-start gap-6",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(b.o.LabelSm,{weight:"semibold",color:"text-dark",children:(0,o.t)("community_bot.profiles.bio_label")}),(0,d.jsx)(b.o.BodySm,{color:"text-default",children:s.bio})]}),(0,d.jsx)("div",{className:"flex flex-col gap-3",children:u&&s.suggested_questions&&s.suggested_questions.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(b.o.LabelSm,{weight:"semibold",color:"text-dark",children:(0,o.t)("community_bot.profiles.suggested_questions_label")}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:s.suggested_questions.map(function(e){return(0,d.jsx)(g.I,{question:e,onClick:function(){return B(s.profile,e)}},e)})})]})})]})}):(0,d.jsx)("div",{className:"flex flex-col",children:I?(0,d.jsx)(x.y,{}):N?(0,d.jsx)("div",{className:"flex h-32 flex-col items-center justify-center px-2 text-center",children:(0,d.jsx)("p",{className:"text-sm text-[#dc2626]",children:(0,o.t)("community_inbox.profile.error_loading_comments")})}):A.length>0?(0,d.jsx)("div",{children:(0,d.jsx)(w.A,{style:{overflow:"initial"},scrollThreshold:.5,next:C,hasMore:!!k,loader:(0,d.jsx)(x.y,{}),dataLength:A.length,scrollableTarget:F,className:"divide-primary space-y-2 divide-y",children:A.map(function(e){return(0,d.jsx)(E,{comment:e,member:T,onClose:function(){return null==l?void 0:l()}},e.id)})})}):(0,d.jsx)("div",{children:(0,d.jsx)(y.A,{title:(0,o.t)("profile_drawer.comments.empty_state.title"),subtitle:(0,o.t)("profile_drawer.comments.empty_state.description")})})})})]})},B=n(961533),q=n(226603),U=n(906015),z=n(570310),W=n(355104),$=n(617593),V=n(791408),H=function(){return(0,d.jsxs)("div",{className:"border-primary bg-primary col-span-full flex flex-col items-center overflow-auto border-r px-6 pb-10 pt-8 md:col-span-4",children:[(0,d.jsx)($.E,{shape:"rounded",className:"size-[152px]"}),(0,d.jsxs)("div",{className:"mt-6 flex w-full flex-col items-center gap-4",children:[(0,d.jsx)(V.H,{variant:"label-lg",className:"w-48"}),(0,d.jsx)($.E,{shape:"rounded",className:"h-6 w-24"})]})]})},G=function(){return(0,d.jsxs)("div",{className:"bg-primary col-span-12 flex flex-col overflow-auto p-8 md:col-span-8",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 pb-7 pt-2",children:[(0,d.jsx)($.E,{shape:"rounded",className:"h-9 w-16"}),(0,d.jsx)($.E,{shape:"rounded",className:"h-9 w-28"})]}),(0,d.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,d.jsx)(V.H,{variant:"label-sm",className:"w-10"}),(0,d.jsx)(V.H,{variant:"body-sm",lines:3,className:"w-full space-y-1"})]})]})},Z=function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(H,{}),(0,d.jsx)(G,{})]})},Q=function(e){var t=e.isFullPageView;return(0,W.c)().isCircleV4?(0,d.jsx)(Z,{}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(q._,{isFullPageView:t}),(0,d.jsxs)("div",{className:(0,z.x)("col-span-12 flex flex-col overflow-auto px-4 pb-9 md:col-span-8 md:p-8",{"!md:pl-14 pl-4":t}),children:[(0,d.jsx)(U.o,{}),(0,d.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,d.jsx)(B.M,{}),(0,d.jsx)(B.M,{}),(0,d.jsx)(B.M,{}),(0,d.jsx)(B.M,{})]})]})]})},Y=n(973646),J=n(677123),X=n(387099),ee=function(){var e=D(),t=e.isLoading,n=e.agent,r=n.can_interact,i=(0,_.Z)(),a=(0,J.IH)().setCurrentBotProfile;return t?null:(0,d.jsxs)("div",{className:"border-primary bg-primary dark:bg-primary col-span-full flex flex-col items-center overflow-auto border-r bg-[linear-gradient(180deg,#F5ECFC_19.48%,#FFF_50%)] px-6 pb-10 pt-8 md:col-span-4 dark:bg-none",children:[(0,d.jsx)("img",{loading:"eager",src:n.avatar_url,alt:n.name,className:"size-[152px] rounded-full"}),(0,d.jsxs)("div",{className:"mt-6 flex w-full flex-col items-center gap-[28px] text-center",children:[(0,d.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,d.jsx)(b.o.LabelLg,{weight:"semibold",color:"text-dark",children:n.name}),(0,d.jsxs)("div",{className:"bg-tertiary dark:bg-secondary-dark flex h-6 items-center justify-center gap-1.5 rounded-full px-2 py-[3px]",children:[(0,d.jsx)(Y.In,{type:"16-ask-ai-gradient",size:16}),(0,d.jsx)("span",{className:"text-dark text-[12px] font-medium",children:(0,o.t)("community_bot.profile_tag")})]})]}),r&&(0,d.jsx)("div",{className:"w-full",children:(0,d.jsx)(X.$,{variant:"circle",onClick:function(){a(n.profile),i({to:"/messages/$uuid",params:{uuid:"new"}})},children:(0,o.t)("community_inbox.new_conversation")})})]})]})},et=function(e){var t=e.agent,n=e.isLoading,r=e.isFullPageView,o=e.onClose;return(0,d.jsx)(T,{isFullPageView:void 0!==r&&r,agent:t,isLoading:n,onClose:o,children:t?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ee,{}),(0,d.jsx)(K,{})]}):(0,d.jsx)(Q,{})})},en={page_name:p.TP.PROFILE_VIEW},er=n(737225),eo=n(758777),ei=n(974618),ea={page_name:p.TP.PROFILE_VIEW},es=(0,u.F)(function(e){var t=e.agentId,n=e.open,r=e.onOpenChange,i=(0,m.K)({agentId:t,params:en}).getAgentProfileInfoQuery,a=i.data,s=i.isInitialLoading;return(0,d.jsx)(f.a.Root,{open:n,onOpenChange:r,size:"xl",children:(0,d.jsxs)(f.a.Content,{children:[(0,d.jsx)(f.a.Header,{title:(0,o.t)("profile"),showCloseButton:!0}),(0,d.jsx)(f.a.Body,{customLayout:!0,children:(0,d.jsx)("div",{className:"min-h-0 flex-1 grid-cols-12 md:grid md:grid-flow-row-dense md:grid-rows-1",children:(0,d.jsx)(et,{agent:a,isLoading:s,onClose:function(){return r(!1)}})})})]})})},function(e){var t=e.agentId,n=(0,ei.hS)(),r=n.visible,i=function(){return n.remove()},a=(0,m.K)({agentId:t,params:ea}).getAgentProfileInfoQuery,s=a.data,l=a.isInitialLoading;return(0,d.jsxs)(er.aF,{isOpen:r,onClose:i,contentPortalId:"post-modal-portal",children:[(0,d.jsx)(er.aF.Overlay,{}),(0,d.jsxs)(er.aF.Content,{size:"2xl",className:"max-w-screen-xl",children:[(0,d.jsxs)("div",{className:"border-primary text-dark flex justify-between border-b !px-9 !py-4",children:[(0,d.jsx)(b.o.TitleSm,{weight:"semibold",children:(0,o.t)("profile")}),(0,d.jsx)(eo.s,{onClick:i})]}),(0,d.jsx)(er.aF.Body,{className:"!md:px-0 !md:pt-0 !md:overflow-hidden block grid-cols-12 !p-0 md:grid md:grid-flow-row-dense",children:(0,d.jsx)(et,{agent:s,isLoading:l,onClose:i})})]})]})}),el=n(867494),ec=function(e){var t,n,r=e.name,o=e.params,i=void 0===o?{}:o,u=e.id,d=es().show,p=(0,l.B)(),f=(0,el.t)().isDrawer,m=(0,c.useCallback)(function(e){(0,s.s6)(e)||p||f||(e.preventDefault(),d({agentId:u,params:i}))},[p,f,i,d]);return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},a({name:r,params:i,agentId:u,shouldOpenInNewTab:p,showAgentProfileDrawer:d})),n=n={onClick:m},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t}},678431(e,t,n){"use strict";var r=n(18477),o=n(451430),i=n(933578),a=n(258752),s=function(e){var t,n,s=e.profileId,l=e.enabled,c=e.perPage,u=(0,a.qu)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},r.WQ.comments({profileId:null!=s?s:0,perPage:void 0===c?10:c})),n=n={enabled:!!s&&!!l,getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)),d=(0,i.useMemo)(function(){return u.isInitialLoading||!u.data?[]:(0,o.uniqBy)((0,o.flatten)(u.data.pages.map(function(e){return e.records})),"id")},[u.data,u.isInitialLoading]);return{data:u.data,error:u.error,fetchNextPage:u.fetchNextPage,hasNextPage:u.hasNextPage,isLoading:u.isInitialLoading,comments:d}};n.d(t,{f:()=>s})},10457(e,t,n){"use strict";var r=n(230763),o=function(){var e=(0,r.Od)().currentCommunityMember;return{canBlockMemberDm:function(t){return!((null==e?void 0:e.id)===t.community_member_id||t.admin)}}};n.d(t,{r:()=>o})},748342(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}var s=new(function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(){var e,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return n=o(n=t),r(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,a()?Reflect.construct(n,[],o(this).constructor):n.apply(this,void 0)),"toggleMessageBookmark",function(t){e.emit("onBookmarkToggle",t)}),r(e,"sendSuggestedQuestion",function(t){e.emit("sendSuggestedQuestion",t)}),e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e),t}(n(551940).EventEmitter));n.d(t,{K:()=>s})},923573(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function i(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return r(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a=function(e,t){return!!e&&t&&!!e.is_flagged_for_embedded_chat},s=function(e){var t=e.chatMessages,n=e.setChatRoomMessages,r=e.newMessage,a=r.parent_message_id,s=r.sent_at,l=r.sender,c=r.chat_thread_id,u=t.findIndex(function(e){return e.id===a});if(u>-1){var d,p,f=t[u],m=f.thread_participants_preview,b=void 0===m?[]:m,y=f.replies_count,h=(d=o({},f),p=p={replies_count:(void 0===y?0:y)+1,last_reply_at:s},Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(p)).forEach(function(e){Object.defineProperty(d,e,Object.getOwnPropertyDescriptor(p,e))}),d);f.chat_thread_id||(h.chat_thread_id=c),l&&b.length<3&&!b.some(function(e){return e.community_member_id===l.community_member_id})&&(h.thread_participants_preview=i(b).concat([o({},l)])),n(i(t.slice(0,u)).concat([h],i(t.slice(u+1))))}},l=function(e){if(!e)return!1;var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.right<=window.innerWidth&&t.bottom<=window.innerHeight};n.d(t,{Xz:()=>a,bg:()=>s,mz:()=>l})},721226(e,t,n){"use strict";var r=n(808877),o=n(310860),i=function(){return(0,o.z)({select:function(e){return e.pathname}}).startsWith(r.Ok)};n.d(t,{$:()=>i})},808877(e,t,n){"use strict";var r=n(915779),o=n(941397),i=n(310860),a=n(173630),s=n(933578),l=n(639770),c=o.t.unified_inbox.index,u="".concat(c,"/messages"),d="".concat(c,"/chat-threads"),p=function(){var e=(0,i.z)({select:function(e){return e.pathname}}),t=(0,a.r)();return(0,s.useMemo)(function(){return e.startsWith(c)?{aiInboxPath:function(){return o.t.unified_inbox.ai},chatRoomsPath:function(){return u},chatRoomPath:function(e){var n=e.uuid,r=e.messageHashId;return t.buildLocation({to:"/settings/inbox/messages/$uuid",params:{uuid:n},hash:r?"message_".concat(r):void 0}).href},newChatRoomPath:function(){return"".concat(u,"/new")},chatBotPath:function(e){var t=e.id;return"".concat(u,"/bot/").concat(t)},chatInboxPath:function(e){var n=e.id;return t.buildLocation({to:"/settings/inbox/ai/conversations/$id",params:{id:n},search:function(e){return l.K.parse(e)}}).href},isBotPath:function(e){return e.startsWith("".concat(u,"/bot/"))},isRoomsIndexPath:function(e){return e===u}}:{aiInboxPath:function(){return o.t.community_inbox.index},chatRoomsPath:r.ce,chatRoomPath:r.je,newChatRoomPath:r.V1,chatBotPath:r.tV,chatInboxPath:r.Cl,isBotPath:function(e){return e.startsWith("/messages/bot")},isRoomsIndexPath:function(e){return e===(0,r.ce)()}}},[e,t])};n.d(t,{Ok:()=>c,mu:()=>d,on:()=>u,uc:()=>p})},501995(e,t,n){"use strict";n.d(t,{m:()=>O,P:()=>P});var r=n(230763),o=n(915779),i=n(310860),a=n(451430),s=n(933578),l=n(274685),c=n(258752),u=n(51730),d=n(808877),p=n(376409);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function b(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function y(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return f(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var h=function(e,t,n){var r=e.chat_room_uuids,o=void 0===r?[]:r;0!==o.length&&n(t.map(function(e){return o.includes(e.uuid)?b(m({},e),{has_unread_messages:!1}):e}))},g=function(e,t,n){var r=e.chat_room_uuid,o=t.findIndex(function(e){return e.uuid===r});if(o>-1){var i=t[o];n(y(t.slice(0,o)).concat([b(m({},i),{has_unread_messages:!1})],y(t.slice(Number(o)+1))))}};function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function j(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function _(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return v(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return v(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var w=["sidebar","chat-rooms","all"],O=["messaging","chat-rooms","all"],S=["sidebar","chat-rooms","unread"],P=function(e){var t=e.openChatRoomUuid,n=e.uuids,f=(0,l.jE)(),m=((0,r.Od)().currentCommunitySettings||{}).cached_unread_chat_room_ids_enabled,b=(0,p.n)().updateAllRecords,y=(0,i.z)({select:function(e){return e.pathname}}),v=y.startsWith("/messages")||y.startsWith(d.on),P=(0,s.useMemo)(function(){return n?S:v?O:w},[n,v]),C=function(e){b(e,P)},k=function(e){var t={page:e,per_page:v?20:10};return n&&(m?t.only_unread=!0:t.uuids=n),(0,u.i_)(o.iK.chatRooms.index({params:t}))},I=(0,c.qu)({initialPageParam:1,queryKey:P,queryFn:function(e){var t=e.pageParam;return k(void 0===t?1:t)},select:function(e){var t=e.pages,n=void 0===t?[]:t;return{pages:(0,a.uniqBy)((0,a.flatten)(n.map(function(e){return e.records})),"uuid"),pageParams:n.map(function(e){return e.page})}},onSuccess:function(){B(t)},getNextPageParam:function(e){return e.has_next_page?Number(e.page)+1:void 0}}),N=I.isInitialLoading,A=I.refetch,E=I.data,R=(void 0===E?{}:E).pages,L=void 0===R?[]:R,D=I.hasNextPage,T=void 0!==D&&D,M=I.fetchNextPage,F=function(e){return L.find(function(t){return t.uuid===e})},K=function(e){(0,u.i_)(o.iK.chatRooms.show({uuid:e})).then(function(e){e.chat_room&&C([e.chat_room].concat(_(L)))})},B=function(e){e&&"new"!==e&&L.find(function(e){return!!e.isOpen})&&K(e)},q=function(e){if(e.pinned_at)C(L.map(function(t){return t.uuid===e.uuid?e:t}));else{var t=[],n=[];L.forEach(function(r){r.pinned_at?t.push(r):r.uuid!==e.uuid&&n.push(r)}),C(_(t).concat([e],_(n)))}},U=function(e,t){var n=e.json_message,r=n.chat_room_uuid,o=n.sender.community_member_id,i=F(r);if(i){var a=i.isOpen;q(j(x({},i),{last_message:n,has_unread_messages:!a&&o!==t}))}else f.invalidateQueries({queryKey:P})},z=function(e){var t="string"==typeof e.chat_room?JSON.parse(e.chat_room):e.chat_room;C(L.map(function(e){return e.uuid===t.uuid?j(x({},e),{chat_room_name:t.chat_room_name}):e}))},W=function(e){var n=e.chat_room_uuid;C(L.filter(function(e){return e.uuid!==n})),t===n&&(window.location.href=(0,o.ce)())},$=function(e){var t=(0,a.isObject)(e.chat_room)?e.chat_room:JSON.parse(e.chat_room);C(L.map(function(e){return e.uuid===t.uuid?x({},e,t):e}))},V=function(){f.invalidateQueries({queryKey:P})},H=function(e){var t=e||{},n=t.chat_room_id,r=t.pinned_at,o={},i=[];
1L.forEach(function(e){e.id!==n?i.push(e):o=j(x({},e),{pinned_at:r})}),C([o].concat(_(i)))},G=function(e){var t=(e||{}).chat_room_id;C(_(L.map(function(e){return e.id===t?j(x({},e),{pinned_at:null}):e}))),A()};return{chatRooms:L,setChatRooms:C,fetchChatRoomForUuid:F,onEventReceive:function(e,t){switch(e.event){case"newMessage":U(e,t);break;case"chatRoomRead":g(e,L,C);break;case"chatMarkAllAsRead":h(e,L,C);break;case"chatRoomCreated":V();break;case"chatRoomUpdated":z(e);break;case"chatRoomDeleted":case"chatRoomParticipantDestroy":W(e);break;case"chatRoomParticipantsUpdated":$(e);break;case"chatRoomPinned":H(e);break;case"chatRoomUnPinned":G(e)}},chatRoomsHasNextPage:T,hasNextPage:T,fetchNextPage:M,fetchUserChatRooms:A,isLoading:N}}},677123(e,t,n){"use strict";var r=n(933578),o=n(592480),i=n(437491),a=n(56054),s=function(e){return e.threads},l=function(e){return e.ui},c=function(e){return e.inbox},u=function(e){return e.unread},d=function(e){return Array.from(e.chatRoomMap.values()).reverse()},p=function(e){return e.messageActions},f=function(e){return e.actions},m=function(e){return function(t){return t.chatRoomMap.get(e)}},b=function(e){return e.messageActions.sendRichTextMessage},y=function(){return(0,a.L)(s)},h=function(){return(0,a.L)(l)},g=function(){return(0,a.L)(c)},v=function(){return(0,a.L)(u)},x=function(){var e=(0,o.g)().chatRoomUuid,t=(0,a.L)(function(t){var n;return null==(n=t.chatRoomStateMap.get(e))?void 0:n.uiState});return null!=t?t:i.Lr},j=function(){var e=(0,o.g)().chatRoomUuid;return{chatRoomMessages:(0,a.L)(function(t){var n;return null==(n=t.chatRoomStateMap.get(e))?void 0:n.chatRoomMessages})}},_=function(){var e=(0,o.g)().chatRoomUuid;return(0,a.L)(m(e))},w=function(){var e=(0,a.L)().messageActions,t=(0,o.g)(),n=t.chatRoomUuid,i=t.isMessaging;return(0,r.useMemo)(function(){return{setChatRoomMessages:function(t){return e.setChatRoomMessages(n,t)},fetchChatMessages:function(t){return e.fetchChatMessages(n,i,t)},setIsLoading:function(t){return e.setIsLoading(n,t)},setIsInitialPageLoaded:function(t){return e.setIsInitialPageLoaded(n,t)},setHasNextPage:function(t){return e.setHasNextPage(n,t)},setHasPrevPage:function(t){return e.setHasPrevPage(n,t)},setScrollInfo:function(t){return e.setScrollInfo(n,t)},setFirstMessageId:function(t){return e.setFirstMessageId(n,t)},setLastMessageId:function(t){return e.setLastMessageId(n,t)},setTopMessageId:function(t){return e.setTopMessageId(n,t)},setActiveMessageId:function(t){return e.setActiveMessageId(n,t)},appendLastMessage:function(t){return e.appendLastMessage(n,t)},deleteMessage:function(t){return e.deleteMessage(n,t)},updateMessage:function(t){return e.updateMessage(n,t)}}},[e,n,i])},O=function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},x(),j(),w(),{chatRooms:(0,a.L)(d)})};n.d(t,{AB:()=>m,DX:()=>w,IH:()=>g,K4:()=>f,SP:()=>p,UO:()=>O,aR:()=>j,eC:()=>x,eL:()=>y,gz:()=>v,l4:()=>b,tc:()=>h,xK:()=>d,z2:()=>_})},437491(e,t,n){"use strict";var r={isLoading:!1,hasNextPage:!1,hasPrevPage:!1,scrollInfo:{},firstMessageId:null,lastMessageId:null,topMessageId:null,isInitialPageLoaded:!1,activeMessageId:null},o={uiState:r,chatRoomMessages:[]};n.d(t,{Lr:()=>r,Ps:()=>o,gM:()=>60,xg:()=>40})},56054(e,t,n){"use strict";n.d(t,{L:()=>X});var r=n(126373),o=n(698804),i=n(704643),a=n(51730),s=n(915779),l=n(437491);function c(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function u(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){c(i,r,o,a,s,"next",e)}function s(e){c(i,r,o,a,s,"throw",e)}a(void 0)})}}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function p(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function f(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var m=function(e,t){return{actions:{createNewChatRoom:function(t){return e(function(e){e.chatRoomStateMap.set(t,p(d({},l.Ps),{uiState:d({},l.Lr)}))}),l.Lr},fetchChatRoom:function(n){return u(function(){var r,o,i,c,u;return f(this,function(f){switch(f.label){case 0:o=(null==(r=t().chatRoomStateMap.get(n)||l.Ps)?void 0:r.uiState)||l.Lr,i=p(d({},r),{uiState:p(d({},o),{isLoading:!0})}),e(function(e){e.chatRoomStateMap.set(n,i)}),f.label=1;case 1:return f.trys.push([1,3,,4]),[4,(0,a.i_)(s.iK.chatRooms.show({uuid:n}))];case 2:return(c=f.sent()).chat_room&&e(function(e){var t=c.chat_room;e.chatRoomMap.set(n,t);var r=e.chatRoomStateMap.get(n);r&&(r.uiState.isLoading=!1)}),[3,4];case 3:return u=f.sent(),e(function(e){var t=e.chatRoomStateMap.get(n);t&&(t.uiState.isLoading=!1)}),console.error(u),[3,4];case 4:return[2]}})})()},ensureChatRoomParticipant:function(e){return u(function(){var n;return f(this,function(r){switch(r.label){case 0:if(null==(n=t().chatRoomMap.get(e))?void 0:n.current_participant)return[3,2];return[4,t().actions.fetchChatRoom(e)];case 1:r.sent(),r.label=2;case 2:return[2]}})})()},updateChatRoom:function(n){return e(function(e){var r=t().chatRoomMap.get(n.uuid);r&&e.chatRoomMap.set(n.uuid,d({},r,n))})},appendChatRoom:function(t){return e(function(e){e.chatRoomMap.delete(t.uuid),e.chatRoomMap.set(t.uuid,t)})},removeChatRoom:function(t){return e(function(e){e.chatRoomMap.delete(t)})},markChatRoomAsRead:function(t){return e(function(e){var n=e.chatRoomMap.get(t);n&&(n.has_unread_messages=!1)})}}}},b=n(44773),y=n(451430),h=n(597255);function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return g(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var x=new Map,j=function(e,t){var n=v(e),r=n.length>l.gM;r&&(n=n.slice(-l.xg));var o=!0,i=!1,a=void 0;try{for(var s,c=t[Symbol.iterator]();!(o=(s=c.next()).done);o=!0)!function(){var e=s.value.message,t=(0,y.last)(n);if((null==t?void 0:t.id)!=e.id&&!(0,h.w_)(t,e)){var r=n.findIndex(function(t){return t.creation_uuid===e.creation_uuid});r>-1?n[r]=e:n.push(e)}}()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return{messages:n,wasTrimmed:r}},_=function(e,t,n){if(x){var r=x.get(e);if(r&&0!==r.messages.length){var o=v(r.messages);r.messages=[],r.timeoutId=null;try{var i=n().chatRoomStateMap.get(e);if(!i)return;var a=i.uiState,s=!!(null==a?void 0:a.isInitialPageLoaded),l=!!(null==a?void 0:a.hasNextPage);if(!s||l)return;t(function(t){var n,r=t.chatRoomStateMap.get(e);if(r){var i=j(null!=(n=null==r?void 0:r.chatRoomMessages)?n:[],o),a=i.messages;i.wasTrimmed&&a.length>0&&(r.uiState.firstMessageId=a[0].id,r.uiState.hasPrevPage=!0),r.chatRoomMessages=a}})}catch(e){console.error("Error processing batched messages:",e)}}}};function w(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var S=n(875023);function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function k(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return P(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return P(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var I=function(e,t){return{messageActions:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},{setChatRoomMessages:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);r&&(r.chatRoomMessages=n)})},appendLastMessage:function(n,r){x.has(n)||x.set(n,{messages:[],timeoutId:null});var o=x.get(n);o&&(o.messages.push({message:r}),r.id<0?(_(n,e,t),o.timeoutId=null):o.timeoutId||(o.timeoutId=setTimeout(function(){_(n,e,t)},200)))},updateMessage:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);if(r){var o=r.chatRoomMessages.findIndex(function(e){return e.id===n.id});o>-1&&(r.chatRoomMessages[o]=O({},r.chatRoomMessages[o],n))}})},deleteMessage:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);r&&(r.chatRoomMessages=r.chatRoomMessages.filter(function(e){return e.id!==n}))})},clearSpotlightedMessages:function(t){return e(function(e){var n=e.chatRoomStateMap.get(t);n&&(n.chatRoomMessages=n.chatRoomMessages.map(function(e){var t,n;return t=O({},e),n=n={spotlighted:!1},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t}))})},sendRichTextMessage:function(e,n){var r;return(r=function(){var r,o,i,l,c,u,d,p,f,m,y,h;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(g){switch(g.label){case 0:return r=n.richTextBody,o=n.localAttachments,i=n.localSgidToObjectMap,l=n.parentMessageId,c=n.unfurlUrls,u=n.currentContact,[4,t().actions.ensureChatRoomParticipant(e)];case 1:if(g.sent(),f=null==(p=null==(d=t().chatRoomMap.get(e))?void 0:d.current_participant)?void 0:p.id,!d||!p||!f)return[2];return m={chat_room_participant_id:f,rich_text_body:r},l&&(m.parent_message_id=l),c&&(m.unfurl_urls=c),[4,(0,a.oK)(s.iK.chatRoomMessages.create({uuid:e}),{chat_room_message:m})];case 2:if(y=g.sent(),!(h=(0,b.Hj)({chatRoom:d,currentContact:u,richTextBody:r,localAttachments:o,localSgidToObjectMap:i,unfurlUrls:c,parentMessageId:l,creationUuid:y.creation_uuid,sentAt:y.sent_at})))return[2];return l?t().threads.appendLastMessage(h):t().messageActions.appendLastMessage(e,h),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){w(i,n,o,a,s,"next",e)}function s(e){w(i,n,o,a,s,"throw",e)}a(void 0)})})()}},{fetchChatMessages:function(n){var r,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0,c=i.id,u=void 0===c?null:c,d=i.previousPerPage,p=void 0===d?20:d,f=i.nextPerPage,m=void 0===f?0:f,b=i.isInitialPage,h=void 0!==b&&b,g=i.parentMessageId;return(r=function(){var r,i,c,d,f,b,v,x,j;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(_){switch(_.label){case 0:if(r=(0,S.GA)(o,n),d=(c=(null==(i=t().chatRoomStateMap.get(n))?void 0:i.uiState)||{}).isLoading,f=c.hasNextPage,b=c.hasPrevPage,(v=0===p)&&d)return[2];return e(function(e){var t=e.chatRoomStateMap.get(n);t&&(t.uiState.isLoading=!0)}),x={previous_per_page:p,next_per_page:m},u&&(x.id=u),g&&(x.parent_message_id=g),[4,(0,a.i_)(s.iK.chatRoomMessages.index({uuid:n,params:x}))];case 1:return j=_.sent(),e(function(e){var t=e.chatRoomStateMap.get(n);if(t)if(h)t.chatRoomMessages=j.records,t.uiState.scrollInfo=(0,S.S1)({event:"chatRoomLoad",scrollerId:r}),t.uiState.hasNextPage=j.has_next_page,t.uiState.hasPrevPage=j.has_previous_page,t.uiState.firstMessageId=j.first_id,t.uiState.lastMessageId=j.last_id;else{v?(t.uiState.scrollInfo=(0,S.S1)({event:"nextPaginatedMessageLoad",scrollerId:r}),t.uiState.lastMessageId=j.last_id):(t.uiState.scrollInfo=(0,S.S1)({event:"paginatedMessageLoad",scrollerId:r}),t.uiState.firstMessageId=j.first_id);var o=k(t.chatRoomMessages);if(o.length>l.gM)if(v)o=o.slice(-l.xg),t.uiState.firstMessageId=o[0].id,t.uiState.hasPrevPage=!0;else{var i=j.records[j.records.length-1];t.uiState.topMessageId=i.id,o=o.slice(0,l.xg),t.uiState.lastMessageId=o[o.length-1].id,t.uiState.hasNextPage=!0}else t.uiState.topMessageId=null;t.chatRoomMessages=v?(0,y.uniqBy)(k(o).concat(k(j.records)),"id"):(0,y.uniqBy)(k(j.records).concat(k(o)),"id"),f&&(t.uiState.hasNextPage=j.has_next_page),b&&(t.uiState.hasPrevPage=j.has_previous_page)}}),e(function(e){var t=e.chatRoomStateMap.get(n);t&&(t.uiState.isLoading=!1,t.uiState.isInitialPageLoaded=!0)}),[2,j]}})},function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){C(i,n,o,a,s,"next",e)}function s(e){C(i,n,o,a,s,"throw",e)}a(void 0)})})()}},{setIsLoading:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);r&&(r.uiState.isLoading=n)})},setIsInitialPageLoaded:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);r&&(r.uiState.isInitialPageLoaded=n)})},setHasNextPage:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);r&&(r.uiState.hasNextPage=n)})},setHasPrevPage:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);r&&(r.uiState.hasPrevPage=n)})},setScrollInfo:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);r&&(r.uiState.scrollInfo=n)})},setFirstMessageId:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);r&&(r.uiState.firstMessageId=n)})}
1,setLastMessageId:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);r&&(r.uiState.lastMessageId=n)})},setTopMessageId:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);r&&(r.uiState.topMessageId=n)})},setActiveMessageId:function(t,n){return e(function(e){var r=e.chatRoomStateMap.get(t);r&&(r.uiState.activeMessageId=n)})}})}},N=function(){return{chatRoomMap:new Map,chatRoomStateMap:new Map}},A=n(955348),E=n(632343),R=function(e,t,n,r){e.forEach(function(e){if(e.community_bot_profile.id===t){var o;e.disabled=null!=(o=null==r?void 0:r[e.id])?o:!n,e.community_bot_profile.enabled=n}})},L=function(e,t){var n=e.findIndex(function(e){return e.id===t});return -1!==n&&e[n].has_unread_messages_for_admin?(e[n].has_unread_messages_for_admin=!1,e[n].ai_snoozed?-1:0):0},D=function(e,t){var n=e.findIndex(function(e){return e.id===t});return -1!==n&&e[n].has_unread_messages_for_member?(e[n].has_unread_messages_for_member=!1,-1):0},T=function(e,t,n){var r=e["member"===n?"memberChats":"adminChats"].findIndex(function(e){return e.id===t.community_inbox_chat_id});-1!==r&&("member"===n?(e.memberChats[r].has_unread_messages_for_member=!0,e.totalUnreadChatsCount=e.memberChats.filter(function(e){return e.has_unread_messages_for_member}).length):(e.adminChats[r].has_unread_messages_for_admin=!0,e.totalUnreadPausedAiChatsCount=e.adminChats.filter(function(e){return e.has_unread_messages_for_admin&&e.ai_snoozed}).length))},M=n(207800),F=function(e){var t,n;return e.has_unread_messages_for_admin?(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={has_unread_messages_for_admin:!1},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t):e};function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function q(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return K(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return K(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var U=function(e,t){return{inbox:{currentChatId:null,setCurrentChatId:function(t){return e(function(e){e.inbox.currentChatId=t})},memberChats:[],adminChats:[],searchChats:[],previewChat:null,totalUnreadChatsCount:0,totalUnreadPausedAiChatsCount:0,isTotalUnreadPausedAiChatsCountLoaded:!1,setChats:function(t,n){var r="member"===n?"memberChats":"adminChats";e(function(e){e.inbox[r]=t})},setSearchChats:function(t){e(function(e){e.inbox.searchChats=t})},appendChats:function(n,r){var o="member"===r?"memberChats":"adminChats";e(function(e){e.inbox[o]=(0,y.uniqBy)(q(t().inbox[o]).concat(q(n)),"id")})},setPreviewChat:function(t){e(function(e){e.inbox.previewChat=t})},fetchChat:function(e,n){var r;return(r=function(){var r;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(o){switch(o.label){case 0:return[4,A.St.fetchChat({id:e})];case 1:return r=o.sent(),t().inbox.updateChat(r,n),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){B(i,n,o,a,s,"next",e)}function s(e){B(i,n,o,a,s,"throw",e)}a(void 0)})})()},appendChat:function(n,r){var o="member"===r?"memberChats":"adminChats";t().inbox[o].some(function(e){return e.id===n.id})||e(function(e){e.inbox[o]=[n].concat(q(e.inbox[o]))})},updateChat:function(n,r){var o="member"===r?"memberChats":"adminChats",i=t().inbox[o],a=i.findIndex(function(e){return e.id===n.id});-1===a?t().inbox.appendChat(n,r):(0,y.isEqual)(i[a],n)||e(function(e){e.inbox[o][a]=n})},updateAgentChats:function(t,n,r){return e(function(e){var o=null==r?void 0:r.reduce(function(e,t){return e[t.id]=t.disabled,e},{});R(e.inbox.memberChats,t,n,o),R(e.inbox.adminChats,t,n,o)})},destroyChat:function(t,n){var r="member"===n?"memberChats":"adminChats";e(function(e){e.inbox[r]=e.inbox[r].filter(function(e){return e.id!==t})})},markAllAdminChatsAsRead:function(n){e(function(e){var t;e.inbox.adminChats=(t=e.inbox.adminChats,n===M.ZQ.UNREAD?[]:t.map(F)),e.inbox.searchChats=e.inbox.searchChats.map(F)}),t().inbox.fetchPausedAiUnreadChatsCount()},adminMarkAsRead:function(t){A.St.adminMarkAsRead({id:t}).then(function(){e(function(e){e.inbox.totalUnreadPausedAiChatsCount+=L(e.inbox.adminChats,t)})}).catch(function(e){console.error(e)})},memberMarkAsRead:function(t){A.St.memberMarkAsRead({id:t}).then(function(){e(function(e){e.inbox.totalUnreadChatsCount+=D(e.inbox.memberChats,t)})}).catch(function(e){console.error(e)})},messages:[],setMessages:function(t){return e(function(e){e.inbox.messages=t})},appendMessage:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"member";n.community_inbox_chat_id!==Number(t().inbox.currentChatId)?e(function(e){T(e.inbox,n,r)}):t().inbox.messages.some(function(e){return e.id===n.id})||e(function(e){e.inbox.messages=q(e.inbox.messages).concat([n])})},updateMessage:function(n){n.community_inbox_chat_id===Number(t().inbox.currentChatId)&&e(function(e){var t=e.inbox.messages.findIndex(function(e){return e.id===n.id});-1!==t&&(e.inbox.messages[t]=n)})},destroyMessage:function(t){e(function(e){e.inbox.messages=e.inbox.messages.filter(function(e){return e.id!==t})})},resetMessages:function(){return e(function(e){e.inbox.messages=[]})},scrollAction:E.k.FIRST_LOAD,setScrollAction:function(t){e(function(e){e.inbox.scrollAction=t})},currentBotProfile:null,setCurrentBotProfile:function(t){e(function(e){e.inbox.currentBotProfile=t})},fetchTotalUnreadChatsCount:function(){return A.St.unreadMemberChatsCount().then(function(t){var n=t.unread_chats_count;e(function(e){e.inbox.totalUnreadChatsCount=n})}).catch(function(e){console.error(e)})},fetchPausedAiUnreadChatsCount:function(){return A.St.unreadAdminPau
1sedAiChatsCount().then(function(t){var n=t.unread_chats_count;e(function(e){e.inbox.totalUnreadPausedAiChatsCount=n,e.inbox.isTotalUnreadPausedAiChatsCountLoaded=!0})}).catch(function(e){console.error(e)})},setIsProcessing:function(t,n){e(function(e){var r=e.inbox["member"===n?"memberChats":"adminChats"].find(function(t){return t.id===e.inbox.currentChatId});r&&(r.is_processing=t)})},setPreviewChatProcessing:function(t){e(function(e){var n=e.inbox.previewChat;n&&(n.is_processing=t)})}}}};function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function $(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function V(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return z(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return z(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var H={chatMessages:[],isLoading:!1,hasNextPage:!1,hasPrevPage:!1,scrollInfo:{},firstMessageId:null,lastMessageId:null,totalMessagesCount:0,metaData:{}},G=function(e){return{threads:$(W({},H),{setChatMessages:function(t){return e(function(e){e.threads.chatMessages=t})},setIsLoading:function(t){return e(function(e){e.threads.isLoading=t})},setHasNextPage:function(t){return e(function(e){e.threads.hasNextPage=t})},setHasPrevPage:function(t){return e(function(e){e.threads.hasPrevPage=t})},setScrollInfo:function(t){return e(function(e){e.threads.scrollInfo=t})},setFirstMessageId:function(t){return e(function(e){e.threads.firstMessageId=t})},setLastMessageId:function(t){return e(function(e){e.threads.lastMessageId=t})},setTotalMessagesCount:function(t){return e(function(e){e.threads.totalMessagesCount=t})},setMetaData:function(t){return e(function(e){e.threads.metaData=t})},clearSpotlightedMessages:function(){return e(function(e){e.threads.chatMessages=e.threads.chatMessages.map(function(e){return $(W({},e),{spotlighted:!1})})})},updateMessage:function(t){return e(function(e){var n=e.threads.chatMessages.findIndex(function(e){return e.id===t.id});n>-1&&(e.threads.chatMessages[n]=W({},e.threads.chatMessages[n],t))})},appendLastMessage:function(t){return e(function(e){var n=e.threads.chatMessages,r=n.findIndex(function(e){return e.creation_uuid===t.creation_uuid});if(r>-1){if(t.id>0){var o=V(n);o[r]=t,e.threads.chatMessages=o}}else e.threads.chatMessages=V(n).concat([t])})}})}},Z=function(e){return{ui:{liveChatRoomUuid:null,setLiveChatRoomUuid:function(t){return e(function(e){e.ui.liveChatRoomUuid=t})},dmSelectedTabIndex:0,setDmSelectedTabIndex:function(t){return e(function(e){e.ui.dmSelectedTabIndex=t})}}}},Q=function(e){return{unread:{unreadChatRoomUuids:{},setUnreadChatRoomUuids:function(t,n){return e(function(e){e.unread.unreadChatRoomUuids[t]=n})},appendUnreadChatRoomUuids:function(t,n){return e(function(e){e.unread.unreadChatRoomUuids[t]||(e.unread.unreadChatRoomUuids[t]=[]),e.unread.unreadChatRoomUuids[t].push(n)})}}}};function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function J(e){return function(e){if(Array.isArray(e))return Y(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return Y(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Y(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(0,r.IP)();var X=(0,o.vt)()((0,i.D)(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},N.apply(void 0,J(t)),m.apply(void 0,J(t)),I.apply(void 0,J(t)),G.apply(void 0,J(t)),Q.apply(void 0,J(t)),Z.apply(void 0,J(t)),U.apply(void 0,J(t)))}))},832823(e,t,n){"use strict";var r=n(258752),o=n(417980),i=n(717526),a=n(51730),s=n(915779),l=n(367090),c=function(){var e=(0,i.d)(),t=(0,l.s)().resetNewBadgeIds,n=(0,r.n_)({mutationFn:function(){return(0,a.kS)(s.iK.chatThreads.markAllAsRead())},onSuccess:function(){t(),e.success((0,o.t)("header_v3.chat_threads_marked_as_read"))}});
1return{markAllChatThreadsAsRead:n.mutateAsync,isLoading:n.isPending}};n.d(t,{J:()=>c})},178905(e,t,n){"use strict";n.d(t,{h:()=>w});var r=n(230763),o=n(310829),i=n(947331),a=n(933578),s=n(258752),l=n(51730),c=n(915779),u=n(244174),d=n(677123),p=n(56054),f=n(417980),m=n(543934),b=n(362036),y=n(479674);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||j(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||j(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}}var _=function(e){var t=e.communityId,n=(0,d.gz)().setUnreadChatRoomUuids,r=(0,p.L)(d.SP),o=r.updateMessage,i=r.setScrollInfo,h=(0,b.$)().sendNotificationToDesktopApp,j=(0,m.E)({communityId:t}),_=v((0,a.useState)([]),2),w=_[0],O=_[1],S=v((0,a.useState)(null),2),P=S[0],C=S[1],k=(0,a.useRef)(j),I=(0,a.useRef)(w),N=(0,s.n_)({mutationFn:function(){return y.E.getChatRoomCurrentParticipant(P)},mutationKey:["chatroom","participant",P]}),A=function(e,t,n){var r;return(r=function(){var r,o,i,a,s,l,c,d,p,m,b,y;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(g){switch(g.label){case 0:if(!(o=t.json_message)||(i=o.chat_room_uuid,a=o.chat_room_kind,s=o.sender,l=o.embedded,c=null==(r=window.location.pathname)?void 0:r.split("messages/")[1],d=s.community_member_id,p=c===i,m=a===u.Br,d!==n&&h({title:"".concat(o.sender.name," ").concat((0,f.t)("desktop_app.notifications.new_message_text")),body:o.body,metadata:o,type:"message"}),l||p))return[2];if(C(i),m)return[3,2];return[4,N.mutateAsync()];case 1:b=null==(y=g.sent())?void 0:y.chat_room_participant,g.label=2;case 2:if(d===Number(n)||(null==b?void 0:b.muted))return[2];return(null==e?void 0:e.find(function(e){return e===i}))||(O(x(I.current).concat([i])),setTimeout(function(){return E()},2e3)),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){g(i,n,o,a,s,"next",e)}function s(e){g(i,n,o,a,s,"throw",e)}a(void 0)})})()},E=function(){n(Number(t),x(new Set(x(k.current).concat(x(I.current))))),O([])},R=function(e,r){var o,i=r.chat_room_uuid;if(i){var a=null==e?void 0:e.filter(function(e){return e!==i});O(null==I||null==(o=I.current)?void 0:o.filter(function(e){return e!==i})),n(Number(t),a)}},L=function(e,r){var o=r.chat_room_uuids;if(o){var i=e.filter(function(e){return!o.includes(e)});n(Number(t),i)}};return k.current=j,I.current=w,{unreadChatRoomUuids:j,onEventReceive:function(e,t,n){switch(t.event){case"newMessage":A(e,t,n);break;case"updatedMessage":var r=t.json_message;i(r.chat_room_uuid,{action:"noScroll"}),o(r.chat_room_uuid,r),p.L.getState().threads.updateMessage(r);break;case"chatRoomRead":R(e,t);break;case"chatMarkAllAsRead":L(e,t)}},fetchUnreadChatRoomUuids:function(e){(0,l.i_)(c.iK.chatRooms.unreadChatRooms({params:{community_id:e}})).then(function(t){t.chat_room_uuids&&n(Number(e),t.chat_room_uuids)}).catch(function(e){console.error(e)})},unreadChatRoomUuidsRef:k,newUnreadChatRoomBatch:w,newUnreadChatRoomBatchRef:I,setUnreadChatRoomUuids:n}},w=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).community,t=(0,r.Od)(),n=t.currentCommunity,u=t.currentCommunityMember,d=(0,i.UF)().showMessagesTab,p=e?e.community_member_id:null==u?void 0:u.id,f=e?e.id:null==n?void 0:n.id,m=_({communityId:f}),b=m.unreadChatRoomUuids,y=m.onEventReceive,h=m.setUnreadChatRoomUuids,g=m.unreadChatRoomUuidsRef,v=m.newUnreadChatRoomBatch,x=m.newUnreadChatRoomBatchRef;return(0,s.IT)({queryKey:["UNREAD_CHAT_ROOMS_COUNT",f,p],queryFn:function(){return(0,l.i_)(c.iK.chatRooms.unreadChatRooms({params:{community_id:f}}))},enabled:!!(f&&p&&d),onSuccess:function(e){e.chat_room_uuids&&h(f,e.chat_room_uuids)}}),(0,o.z)({communityMemberId:p,onMessageReceive:function(e){y(g.current,e,p)},canCreateConnection:!!(f&&p)}),(0,a.useEffect)(function(){g.current=b},[b]),(0,a.useEffect)(function(){x.current=v},[v]),{unreadChatCount:b.length,unreadChatRoomUuids:b}}},184982(e,t,n){"use strict";var r=n(322249),o=function(){var e,t,n=(0,r.g)({strict:!1});return{uuid:null!=(e=n.uuid)?e:"",id:null!=(t=n.id)?t:""}};n.d(t,{M:()=>o})},665176(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(75132),a=n(451430),s=n(933578),l=n(258752),c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=["chat-participants",e],c=t.shouldDisableCache,u=t.enabled,d=t.per_page,p=void 0===d?25:d,f=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(t,["shouldDisableCache","enabled","per_page"]),m=(0,s.useCallback)(function(){var e=i.qQ.getQueryData(n),t=(0,a.flatten)(((null==e?void 0:e.pages)||[]).map(function(e){return e.records}));return(0,a.uniqBy)(t,"id")},[n]),b=m().length,y=(0,l.qu)({initialPageParam:1,queryKey:n,queryFn:function(t){var n,i=t.pageParam;return n=void 0===i?1:i,(0,r.i_)(o.iK.chatRoomParticipants.index({uuid:e,params:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({page:n,per_page:p},f)}))},select:function(e){return{pages:e.pages,pageParams:e.pageParams,participants:(0,a.uniqBy)((0,a.flatten)((e.pages||[]).map(function(e){return e.records})),"id"),totalCount:e.pages[0].count}},enabled:!!e&&(void 0===u||u)&&(0===b||void 0!==c&&c),getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0}}),h=y.data,g=y.isInitialLoading,v=y.refetch,x=y.hasNextPage,j=y.fetchNextPage,_=(h||{}).totalCount;return{chatParticipants:(0,s.useMemo)(function(){return m()},[null==h?void 0:h.pages]),isLoading:g,refetchChatParticipants:e?v:a.noop,hasNextPage:x,totalCount:void 0===_?0:_,fetchNextPage:j}};n.d(t,{Y:()=>c,l:()=>25})}
1,429807(e,t,n){"use strict";var r=n(915779),o=n(808877),i=n(519104),a=n(417980),s=n(717526),l=n(51730),c=n(358954);function u(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,s,"next",e)}function s(e){u(i,r,o,a,s,"throw",e)}a(void 0)})}}function p(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}function f(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var m=function(){var e=(0,i.Z)(),t=(0,s.d)(),n=(0,o.uc)().chatRoomPath;return{findChatRoom:function(o){return d(function(){var i,s,u,d,m,b;return f(this,function(f){switch(f.label){case 0:s=void 0!==(i=o.shouldNavigate)&&i,u=p(o,["shouldNavigate"]),f.label=1;case 1:return f.trys.push([1,3,,4]),d=u.community_member_ids,[4,(0,l.i_)(r.iK.chatRooms.fetch({params:{community_member_ids:d}}))];case 2:return m=f.sent().uuid,s&&e({href:n({uuid:m})}),[2,m];case 3:return b=f.sent(),t.error((0,a.t)("something_went_wrong")),(0,c.Vt)(b),[3,4];case 4:return[2]}})})()},findOrCreateChatRoom:function(o){return d(function(){var i,a,s,u,d,m,b,y;return f(this,function(f){switch(f.label){case 0:a=void 0!==(i=o.shouldNavigate)&&i,s=p(o,["shouldNavigate"]),f.label=1;case 1:return f.trys.push([1,3,,4]),u={chat_room:s},[4,(0,l.oK)(r.iK.chatRooms.create(),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},u))];case 2:return m=(d=f.sent()).chat_room.uuid,a&&e({href:n({uuid:d.chat_room.uuid})}),[2,m];case 3:return b=f.sent(),t.error((null==(y=b.errorDetails)?void 0:y.message)||b.message),(0,c.Vt)(b),[3,4];case 4:return[2]}})})()}}};n.d(t,{n:()=>m})},310829(e,t,n){"use strict";var r=n(544819),o=n(319804);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a=function(e){var t,n=e.communityMemberId,a=e.onMessageReceive,s=e.canCreateConnection,l=void 0===s||s,c=e.deps,u=(0,o.y)(n),d=u.isDeactivated,p=u.onMemberDeactivatedEvent;(0,r.h)({channel:"ChatRoomChannel",contact_id:n,onMessageReceive:function(e){p(e),"memberDeactivated"!==e.event&&a(e)},canCreateConnection:l&&!!n&&!d},[n,l,d].concat(function(e){if(Array.isArray(e))return i(e)}(t=void 0===c?[]:c)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return i(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))};n.d(t,{z:()=>a})},592480(e,t,n){"use strict";var r=n(391426),o=n(933578),i=(0,o.createContext)({chatRoomUuid:"main",isMessaging:!1});i.displayName="ChatRoomContext";var a=function(e){var t=e.chatRoomUuid,n=e.isMessaging,o=e.children;return(0,r.jsx)(i.Provider,{value:{chatRoomUuid:t,isMessaging:void 0!==n&&n},children:o})},s=function(){return(0,o.useContext)(i)};n.d(t,{g:()=>s,w:()=>a})},710762(e,t,n){"use strict";n.d(t,{F:()=>C,X:()=>k}
1);var r=n(391426),o=n(915779),i=n(933578),a=n(274685),s=n(417980),l=n(717526),c=n(51730),u=n(358954),d=n(244174),p=n(350847);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var m=/^\(\d+\)\s/,b=/| [a-z 0-9@_\-#.!]+ $/i,y=function(){var e,t=(function(e){if(Array.isArray(e))return e}(e=(0,i.useState)(document.title.replace(m,"")))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return f(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,1)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return{originalTitle:t,prependTitle:function(e){return document.title="".concat(e).concat(t)},resetTitleToOriginal:function(){return document.title=t},addDirectMessageParticipantNameInTitle:function(e){var n=document.title.match(m),r=t.replace(b,"".concat(e," "));n&&(r="".concat(n[0]).concat(r)),document.title=r}}},h=n(677123),g=n(56054);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var x=function(){var e=(0,i.useRef)(null);return(0,i.useEffect)(function(){return clearTimeout(e.current)},[]),{debouncedFunction:(0,i.useCallback)(function(t,n){for(var r=arguments.length,o=Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];clearTimeout(e.current),e.current=setTimeout(function(){t.apply(void 0,function(e){if(Array.isArray(e))return v(e)}(o)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e){if(e){if("string"==typeof e)return v(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return v(e,void 0)}}(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())},n)},[])}},j=n(925890),_=function(){var e=(0,j.M)().markChatRoomAsRead,t=x().debouncedFunction,n=(0,i.useRef)(null);return(0,i.useEffect)(function(){var t=function(){var t=n.current;"visible"===document.visibilityState&&t&&(n.current=null,e({uuid:t}))};return document.addEventListener("visibilitychange",t),function(){return document.removeEventListener("visibilitychange",t)}},[e]),function(r){"visible"===document.visibilityState?t(e,2e3,{uuid:r}):n.current=r}};function w(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function O(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){w(i,r,o,a,s,"next",e)}function s(e){w(i,r,o,a,s,"throw",e)}a(void 0)})}}function S(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var P=(0,i.createContext)({chatRooms:[]});P.displayName="ChatRoomsContext";var C=function(e){var t=e.children,n=(0,g.L)(h.xK),f=(0,g.L)(h.K4),m=f.fetchChatRoom,b=f.updateChatRoom,v=f.appendChatRoom,x=f.removeChatRoom,j=f.markChatRoomAsRead,w=y().addDirectMessageParticipantNameInTitle,C=_(),k=(0,l.d)(),I=(0,a.jE)(),N=(0,i.useCallback)(function(e){return n.find(function(t){return t.uuid===e})},[n]),A=(0,i.useCallback)(function(e,t){var n=e.json_message,r=n.chat_room_uuid;!n.parent_message_id&&(N(r)?t&&C(r):m(r))},[m,N,C]),E=(0,i.useCallback)(function(e){j(e.chat_room_uuid)},[j]),R=(0,i.useCallback)(function(e){v((e||{}).chat_room)},[v]),L=(0,i.useCallback)(function(e){b((e||{}).chat_room)},[b]),D=(0,i.useCallback)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};b(e.chat_room)},[b]),T=(0,i.useCallback)(function(e){var t,n="object"==((t=e.chat_room)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)?e.chat_room:JSON.parse(e.chat_room);b(n),I.invalidateQueries({queryKey:[(0,p.Z)(n.uuid)]})},[I,b]),M=(0,i.useCallback)(function(e){x(e.chat_room_uuid);var t="/messages/".concat(e.chat_room_uuid);window.location.pathname.startsWith(t)&&(window.location.href=(0,o.ce)())},[x]),F=(0,i.useCallback)(function(e,t){switch(e.event){case"newMessage":A(e,t);break;case"chatRoomRead":E(e);break;case"chatRoomCreated":R(e);break;case"chatRoomUpdated":L(e);break;case"chatRoomParticipantsUpdated":T(e);break;case"chatRoomParticipantDestroy":case"chatRoomDeleted":M(e)}},[R,M,T,E,L,A]),K=(0,i.useCallback)(function(e){switch(e.event){case"chatRoomRead":E(e);break;case"chatRoomUpdated":D(e);break;case"chatRoomParticipantsUpdated":T(e);break;case"chatRoomParticipantDestroy":x(e.chat_room_uuid),window.location.reload()}},[D,T,E,x]),B=(0,i.useCallback)(function(e){var t,n,r=N(e);r&&w(r.chat_room_kind===d.Br?null==(n=r.other_participants_preview)||null==(t=n[0])?void 0:t.name:r.chat_room_name)},[w]),q=(0,i.useCallback)(function(e){var t=e.chatRoomUuid,n=e.rich_text_body,r=e.messageId,i=e.unfurl_urls;return O(function(){var e,a;return S(this,function(l){switch(l.label){case 0:e={rich_text_body:n},i&&(e.unfurl_urls=i),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,(0,c.kS)(o.iK.chatRoomMessages.update({uuid:t,id:r}),{chat_room_message:e})];case 2:return l.sent(),[3,4];case 3:return a=l.sent(),k.error((0,s.t)("something_went_wrong")),(0,u.Vt)(a),[3,4];case 4:return[2]}})})()},[k]),U=(0,i.useCallback)(function(e){var t=e.chatRoomUuid,n=e.messageId;return O(function(){var e;return S(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,(0,c.Dc)(o.iK.chatRoomMessages.delete({uuid:t,id:n}))];case 1:return r.sent(),[3,3];case 2:return e=r.sent(),k.error((0,s.t)("something_went_wrong")),(0,u.Vt)(e),[3,3];case 3:return[2]}})})()},[k]),z=(0,i.useMemo)(function(){return{fetchChatRoomForUuid:N,onEventReceive:F,onEmbedEventReceive:K,updateTitleBar:B,updateRichTextMessage:q,deleteRichTextMessage:U}},[U,N,K,F,q,B]);return(0,r.jsx)(P.Provider,{value:z,children:t})},k=function(){return(0,i.useContext)(P)}}
1,177096(e,t,n){"use strict";var r=n(544819),o=n(319804);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a=function(e){var t,n=e.communityMemberId,a=e.onMessageReceive,s=e.canCreateConnection,l=void 0===s||s,c=e.deps,u=(0,o.y)(n),d=u.isDeactivated,p=u.onMemberDeactivatedEvent;(0,r.h)({channel:"Chats::CommunityMemberThreadsChannel",contact_id:n,onMessageReceive:function(e){p(e),"memberDeactivated"!==e.event&&a(e)},canCreateConnection:l&&!!n&&!d},[n,l,d].concat(function(e){if(Array.isArray(e))return i(e)}(t=void 0===c?[]:c)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return i(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))};n.d(t,{C:()=>a})},700613(e,t,n){"use strict";var r=n(933578),o=n(258752),i=n(417980),a=n(717526),s=n(230763),l=n(51730),c=n(915779),u=n(677123),d=n(543934),p=function(){var e=(0,s.Od)(),t=e.currentCommunitySettings,n=e.currentCommunity,p=(0,a.d)(),f=(t||{}).cached_unread_chat_room_ids_enabled,m=Number(null==n?void 0:n.id),b=(0,u.gz)().setUnreadChatRoomUuids,y=(0,d.E)({communityId:m}),h=(0,r.useMemo)(function(){var e={};return f?e.only_unread=!0:e.uuids=y,e},[f,y]),g=(0,o.n_)({mutationFn:function(){return(0,l.kS)(c.iK.chatRooms.markAllAsRead({params:h}))},onSuccess:function(){b(m,[]),p.success((0,i.t)("header_v3.chats_marked_as_read"))}});return{markAllChatRoomAsRead:g.mutateAsync,isLoading:g.isPending}};n.d(t,{v:()=>p})},925890(e,t,n){"use strict";var r=n(451430),o=n(258752),i=n(51730),a=n(915779),s=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).onSuccess;return{markChatRoomAsRead:(0,o.n_)({mutationFn:function(e){var t=e.uuid;return(0,i.kS)(a.iK.chatRooms.markAsRead({uuid:t}))},onSuccess:function(){(0,r.isFunction)(e)&&e()},onError:function(e){console.error(e.message)}}).mutateAsync}};n.d(t,{M:()=>s})},319804(e,t,n){"use strict";var r=n(933578);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var i=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,r.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return o(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],a=n[1];return(0,r.useEffect)(function(){a(!1)},[e]),{isDeactivated:i,onMemberDeactivatedEvent:(0,r.useCallback)(function(e){"memberDeactivated"===e.event&&a(!0)},[])}};n.d(t,{y:()=>i})},867494(e,t,n){"use strict";n.d(t,{s:()=>eX,t:()=>e0});var r=n(391426),o=n(428266),i=n(257957),a=n(381301),s=n(779504),l=n(398061),c=n(570310),u=n(554013),d=n(451430),p=n(933578),f=n(417980),m=n(743021),b=n(605274),y=n(872518),h=n(973646),g=n(568316),v=function(e){var t=e.name;return(0,r.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[(0,r.jsx)(h.In,{type:"20-search-v3",size:24,className:"text-disabled !w-6"}),(0,r.jsxs)("div",{className:"w-48 text-center",children:[(0,r.jsx)("div",{className:"mr-1",children:(0,r.jsx)(g.o.LabelSm,{color:"text-default",children:(0,f.t)("chat_space.search_messages.empty_state")})}),(0,r.jsx)(g.o.LabelSm,{color:"text-default",children:t||""})]})]})},x=n(325335),j=n(224444),_=n(645765),w=n(862960),O=n(906304),S=n(734527),P=function(e){var t=e.message,n=e.activeMessageId,o=e.setActiveMessageId,i=t.sender,a=t.sent_at,s=(0,_.B)(a),l=s.day,u=s.time,d=(0,O.O)().redirectToMessage,p=e0(),m=p.toggleShowEmbeddedRailBar,y=p.shouldShowEmbeddedRailBar,h=p.closeThreadsRailbar,g=(0,b.Km)(),v="Today"===l;
1return(0,r.jsxs)("button",{type:"button",className:(0,c.x)("bg-primary hover:border-light w-full cursor-pointer rounded-lg border px-4 py-3 text-left",n===t.id?"border-light":"border-primary"),onClick:function(){y&&m(),g&&h(),o(t.id),d(t)},children:[(0,r.jsx)("div",{className:"mb-px flex items-center gap-1.5",children:(0,r.jsxs)("div",{className:"mb-1 flex items-center gap-1",children:[(0,r.jsx)("div",{className:"mr-1 self-start",children:(0,r.jsx)(S.J,{src:i.avatar_url,name:i.name,size:"6",hasBorder:!0})}),(0,r.jsx)("div",{className:(0,c.x)("text-darkest truncate text-left text-sm font-semibold"),children:(null==i?void 0:i.name)||""}),(0,r.jsx)("div",{className:"text-timestamp mx-0.5 inline min-w-fit text-sm font-medium",children:(0,f.t)("separator_dot")}),(0,r.jsx)("div",{className:"text-light inline min-w-fit text-sm font-normal",children:v?u:l})]})}),(0,r.jsx)(w.Y,{message:t,shouldShowPreviewBlocks:!1})]},t.id)};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var k=function(e){var t,n=e.messages,o=e.fetchNextPage,i=e.hasNextPage,a=function(e){if(Array.isArray(e))return e}(t=(0,p.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return C(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return C(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=a[0],l=a[1];return(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsxs)(g.o.LabelXs,{color:"text-dark",weight:"medium",children:[n.length," ",(0,f.t)("chat_space.search_messages.results")]})}),(0,r.jsx)(x.A,{style:{overflow:"initial",height:"100%"},scrollThreshold:.8,next:o,hasMore:i,loader:(0,r.jsx)(j.y,{}),scrollableTarget:"scrollableMessageSearch",dataLength:(null==n?void 0:n.length)||0,className:"pb-6",children:(0,r.jsx)("div",{className:"space-y-2",children:n.map(function(e){return(0,r.jsx)(P,{message:e,activeMessageId:s,setActiveMessageId:l},e.id)})})})]})},I=n(665686);function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var A=function(){var e,t=(0,l.Ir)().data,n=e0(),h=n.isDmsPage,g=n.closeThreadsRailbar,x=n.toggleChatRoomMessageSearchRailbar,j=(0,b.Km)(),_=t?t.name:"DMs",w=function(e){if(Array.isArray(e))return e}(e=(0,p.useState)(""))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return N(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return N(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),O=w[0],S=w[1],P=(0,u.v)(),C=P.ref,A=P.height,E=(0,y.o)(O,300),R=(0,I.r)({debouncedValue:E,isDmsPage:h,currentSpace:t}),L=R.messages,D=R.isLoading,T=R.fetchNextPage,M=R.hasNextPage,F=!!E;return(0,r.jsxs)(s.En,{children:[(0,r.jsx)("div",{ref:C,children:(0,r.jsxs)(a.h.Header,{className:(0,c.x)(j?"!px-4":"!px-2",{"h-[56px]":h}),children:[j&&(0,r.jsx)(o.K,{name:"16-arrow-left",onClick:g,className:"flex-none",ariaLabel:(0,f.t)("close")}),(0,r.jsx)(m.D,{onChange:S,searchValue:O,onKeyPress:d.noop,showCancelButton:!0,onClickCancel:function(){F?S(""):x()},placeholder:(0,f.t)("chat_space.search_messages.placeholder",{spaceName:(0,d.toLower)(_)}
1),className:(0,c.x)("!bg-primary !border-dark !hover:border-secondary-dark rounded-full",{"!h-9":!h})})]})}),(0,r.jsx)(a.h.Content,{noPadding:!0,heightGap:A,className:"bg-secondary-dark",id:"scrollableMessageSearch",children:F?D?(0,r.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,r.jsx)(i.a,{})}):(0,r.jsx)(k,{messages:L,fetchNextPage:T,hasNextPage:!!M}):(0,r.jsx)(v,{name:_})})]})},E=n(34819),R=n(204993),L=n(364562),D=n(144410);function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var M=function(){var e,t=(0,l.Ir)().data,n=e0(),o=n.isDmsPage,m=n.closeThreadsRailbar,h=(0,b.Km)(),g=t?t.name:"DMs",v=function(e){if(Array.isArray(e))return e}(e=(0,p.useState)(""))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return T(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return T(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),x=v[0],j=v[1],_=(0,u.v)(),w=_.ref,O=_.height,S=(0,y.o)(x,300),P=(0,I.r)({debouncedValue:S,isDmsPage:o,currentSpace:t}),C=P.messages,k=P.isLoading,N=P.fetchNextPage,A=P.hasNextPage,M=!!S;return(0,r.jsxs)(s.En,{children:[(0,r.jsx)("div",{ref:w,children:(0,r.jsxs)(a.h.Header,{className:(0,c.x)(h?"!px-4 py-3 gap-x-2":"!px-4 py-4 gap-x-3"),hasNoBorder:!0,children:[h&&(0,r.jsx)(E.K,{icon:"arrow-left",onClick:m,"aria-label":(0,f.t)("close"),variant:"ghost",size:"md"}),(0,r.jsx)(R.D,{placeholder:(0,f.t)("chat_space.search_messages.placeholder",{spaceName:(0,d.toLower)(g)}),"data-testid":"v2-search","aria-autocomplete":"list",value:x,onChange:function(e){return j(e.target.value)},onClear:function(){return j("")}}),(0,r.jsx)(E.K,{icon:"cross",onClick:m,"aria-label":(0,f.t)("close"),size:"md",variant:"ghost"})]})}),(0,r.jsx)(a.h.Content,{noPadding:!0,heightGap:O,id:"scrollableMessageSearch",children:M?k?(0,r.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,r.jsx)(i.a,{})}):(0,r.jsx)(D.s,{messages:C,fetchNextPage:N,hasNextPage:!!A}):(0,r.jsx)(L.p,{name:g})})]})},F=n(620708),K=(0,F.Z)(function(){return Promise.all([n.e(24014),n.e(10443),n.e(14982),n.e(84338),n.e(11753),n.e(20192)]).then(n.bind(n,305815)).then(function(e){return{default:e.ChatThreads}})}),B=function(e){return(0,r.jsx)(p.Suspense,{fallback:(0,r.jsx)(i.a,{center:!0}),children:(0,r.jsx)(K,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e))})},q=(0,F.Z)(function(){return Promise.all([n.e(10204),n.e(79862),n.e(37954),n.e(73501),n.e(87126),n.e(49252)]).then(n.bind(n,422354)).then(function(e){return{default:e.MemberProfileRailBar}})}),U=function(){return(0,r.jsx)(p.Suspense,{fallback:null,children:(0,r.jsx)(q,{})})},z=n(244174),W=n(132416),$=n(665176),V=n(294395),H=n(355104),G=n(156713),Z=n(470382),Q=n(964925),Y=n(104938),J=n(745323),X=n(803831),ee=n(892907),et=function(e){var t=e.description,n=e.className;return t?(0,r.jsx)("div",{className:(0,c.x)("px-5 pt-4 whitespace-pre-line",void 0===n?"":n),children:(0,r.jsx)(ee.o5,{variant:"body-sm",children:t})}):null},en=n(327006),er=n(844842),eo=n(955015),ei=n(314054),ea=n(525462),es=n(159200),el=n(10457),ec=function(e){var t=e.currentParticipant,n=e.toggleBlockDmsModal,o=e.handleMakeAdmin,i=e.onRemoveParticipant,a=e.onUnblockMemberDm,s=e.participantList,l=e.showMemberProfile,u=(0,el.r)().canBlockMemberDm,d=function(e){var t=e.is_blocked_by_current_community_member,r=[{icon:"eye-open",label:(0,f.t)("view_profile"),onClick:function(){return l(e.user_public_uid||"")}},{icon:"people-circle",label:e.admin?(0,f.t)("messaging.remove_admin"):(0,f.t)("messaging.make_admin"),onClick:function(){o({participantId:e.id,status:!e.admin})}}];return u({admin:e.community_admin,community_member_id:e.community_member_id})&&r.push({icon:t?"message-check":"message-cross",label:({blocked:function(){return(0,f.t)("messaging.unblock_direct_messages")},unblocked:function(){return(0,f.t)("messaging.block_direct_messages")}})[t?"blocked":"unblocked"](),onClick:function(){return t?a(e):n(e)},danger:!t}),r.push({icon:"cross",label:(0,f.t)("messaging.remove"),onClick:function(){i({participantId:e.id})},danger:!0}),r};return(0,r.jsx)("div",{className:"flex flex-col gap-0.5 -mx-2",children:s.map(function(e){var n=t.id===e.id,o=(0,r.jsxs)("button",{type:"button",className:"hover:bg-hover dark:hover:bg-primary focus-visible:bg-hover has-[[data-popup-open]]:bg-hover dark:has-[[data-popup-open]]:bg-primary group flex h-10 w-full cursor-pointer flex-row items-center justify-between rounded-2xl px-3 py-2","aria-label":(0,f.t)("messaging.open_member_profile_button_aria_label",{name:e.name}),onClick:function(){return l(e.user_public_uid||"")}
1,children:[(0,r.jsxs)("div",{className:(0,c.x)("flex w-[90%] items-center text-left",{"opacity-50":!1===e.messaging_enabled}),children:[(0,r.jsx)("div",{className:"mr-3",children:(0,r.jsx)(er.t,{name:e.name,src:e.avatar_url,status:(0,ea.K)(e.status),size:"sm"})}),(0,r.jsx)(ee.o5,{variant:"label-sm",truncate:!0,children:n?(0,f.t)("messaging.you"):e.name}),e.admin&&(0,r.jsx)("div",{className:"ml-2",children:(0,r.jsx)(eo.E,{label:(0,f.t)("moderator"),variant:"secondary"})})]}),t.id!==e.id&&t.admin&&(0,r.jsx)(es.B,{options:d(e)})]});return!1===e.messaging_enabled?(0,r.jsx)(ei.m,{content:(0,f.t)("messaging.member_disabled_messaging"),children:o},e.id):(0,r.jsx)("div",{children:o},e.id)})})},eu=n(938301),ed=n(529648),ep=n(898666);function ef(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var em=function(e){var t=e.currentParticipant,n=e.toggleBlockDmsModal,i=e.handleMakeAdmin,a=e.onRemoveParticipant,s=e.onUnblockMemberDm,l=e.participantList,u=e.showMemberProfile,d=(0,el.r)().canBlockMemberDm,p=function(e){var t=e.is_blocked_by_current_community_member,r="!py-2.5 !px-3",o={iconClassName:"text-feedback-error",color:"text-feedback-error"},l=[{value:"view-profile",icon:"20-eye-open",iconSize:20,className:r,label:(0,f.t)("view_profile"),onClick:function(){return u(e.user_public_uid||"")}},{value:e.admin?"remove-admin":"make-admin",label:e.admin?(0,f.t)("messaging.remove_admin"):(0,f.t)("messaging.make_admin"),icon:"20-moderator",iconSize:20,className:r,onClick:function(){return i({participantId:e.id,status:!e.admin})}}];return d({admin:e.community_admin,community_member_id:e.community_member_id})&&(t?l.push({value:"block-dm",icon:"20-message-check",className:r,iconSize:20,label:(0,f.t)("messaging.unblock_direct_messages"),onClick:function(){return s(e)}}):l.push(ef({value:"block-dm",icon:"20-block-dms",className:r,iconSize:20,label:(0,f.t)("messaging.block_direct_messages"),onClick:function(){return n(e)}},o))),l.push(ef({value:"remove",label:(0,f.t)("messaging.remove"),icon:"20-close",iconSize:20,className:r,onClick:function(){return a({participantId:e.id})}},o)),l};return(0,r.jsx)(r.Fragment,{children:l.map(function(e){var n=t.id===e.id,i=p(e);return(0,r.jsx)(ep.$,{content:(0,f.t)("messaging.member_disabled_messaging"),disabled:!1!==e.messaging_enabled,children:(0,r.jsxs)("button",{type:"button",className:"-mx-2 box-border flex flex-row items-center justify-between rounded-md p-2 text-sm font-semibold hover:bg-tertiary focus-visible:bg-tertiary group w-full","aria-label":(0,f.t)("messaging.open_member_profile_button_aria_label",{name:e.name}),onClick:function(){return u(e.user_public_uid||"")},children:[(0,r.jsxs)("div",{className:(0,c.x)("text-dark flex w-[90%] items-center text-left",{"opacity-50":!1===e.messaging_enabled}),children:[(0,r.jsx)("div",{className:"mr-3",children:(0,r.jsx)(S.J,{name:e.name,src:e.avatar_url,status:e.status,size:"8"})}),(0,r.jsx)("div",{className:"truncate font-medium",children:n?(0,f.t)("messaging.you"):e.name}),e.admin&&(0,r.jsx)("div",{className:"ml-3",children:(0,r.jsx)(eu.$,{label:(0,f.t)("moderator")})})]}),t.id!==e.id&&t.admin&&(0,r.jsx)("button",{type:"button",onClick:function(e){e.stopPropagation()},children:(0,r.jsx)(ed.ms,{direction:"bottom-start",menuButtonEl:"div",className:"group-hover:block lg:hidden",menuItemsClassName:"!p-2 !w-60",button:(0,r.jsx)("span",{id:"action-block",className:"hidden group-hover:inline-block group-focus-within:inline-block",children:(0,r.jsx)(ed.ms.MenuButton,{children:(0,r.jsx)(o.K,{name:"20-menu-dots-horizontal",iconSize:20,ariaLabel:(0,f.t)("options_dropdown")})})}),options:i})})]})},e.id)})})};function eb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var ey=function(e){return(0,H.c)().isCircleV4?(0,r.jsx)(ec,eb({},e)):(0,r.jsx)(em,eb({},e))}
1,eh=n(258752),eg=n(253615),ev=n(717526),ex=function(e){var t=e.refetchChatParticipants,n=e.refetchChatRoom,r=e.uuid,o=(0,ev.d)();return{handleMakeAdmin:(0,eh.n_)({mutationFn:function(e){var t=e.participantId,n=e.status;return eg.L.update({uuid:r,id:t,admin:n})},onSuccess:function(e){var r=e.chat_room_participant,i=r.name,a=r.roles.admin,s=i||(0,f.t)("messaging.member");t(),n(),o.success(a?(0,f.t)("messaging.member_made_admin",{name:s}):(0,f.t)("messaging.member_removed_as_admin",{name:s}),{duration:"short",shouldUseProgress:!1})},onError:function(){o.error((0,f.t)("request_failure_message"))}}).mutateAsync,removeParticipant:(0,eh.n_)({mutationFn:function(e){var t=e.participantId;return eg.L.destroy({uuid:r,id:t})},onSuccess:function(e){var r=e.message;t(),n(),o.success(r)},onError:function(){o.error((0,f.t)("request_failure_message"))}}).mutateAsync}};function ej(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var e_=function(e){var t,n=e.chatRoom,o=e.refetchChatRoom,a=e.description,s=(0,Q.n)(),l=n.uuid,u=n.current_participant,d=(0,H.c)().isCircleV4,p=(0,$.Y)(l,{shouldDisableCache:!0,per_page:25}),m=p.chatParticipants,b=p.refetchChatParticipants,y=p.totalCount,h=p.hasNextPage,g=p.fetchNextPage,v=function(e){if(Array.isArray(e))return ej(e)}(t=(0,en.pJ)(void 0===m?[]:m))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return ej(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ej(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),j=ex({refetchChatParticipants:b,refetchChatRoom:o,uuid:l}),_=j.handleMakeAdmin,w=j.removeParticipant,O=(0,J.b)({onSuccess:function(){b()}}),S=O.isBlocking,P=O.memberToBlock,C=O.toggleBlockDmsModal,k=O.handleBlockMember,I=O.handleUnblockMember,N=O.isBlockDmsModalOpen,A=O.setIsBlockDmsModalOpen,E=(0,en.WQ)(v),R=E.onlineParticipants,L=E.offlineParticipants;return(0,r.jsxs)(r.Fragment,{children:[d&&(0,r.jsx)(et,{description:a}),(0,r.jsx)("div",{id:"scrollableDiv",className:(0,c.x)("h-full overflow-auto pt-2"),children:(0,r.jsxs)(x.A,{scrollThreshold:.8,next:g,hasMore:!!h,dataLength:y,className:"px-6 pb-6",scrollableTarget:"scrollableDiv",loader:(0,r.jsx)(i.a,{center:!0}),children:[R.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(X.Y,{title:(0,f.t)("chat_space.online")}),(0,r.jsx)(ey,{currentParticipant:u,toggleBlockDmsModal:C,handleMakeAdmin:_,onRemoveParticipant:w,onUnblockMemberDm:I,participantList:R,showMemberProfile:s})]}),L.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(X.Y,{title:(0,f.t)("chat_space.offline")}),(0,r.jsx)(ey,{currentParticipant:u,toggleBlockDmsModal:C,handleMakeAdmin:_,onRemoveParticipant:w,onUnblockMemberDm:I,participantList:L,showMemberProfile:s})]})]})}),(0,r.jsx)(Y.B,{showModal:N,onClose:function(){return A(!1)},onConfirm:k,memberName:(null==P?void 0:P.name)||"",isLoading:S})]})},ew=(0,F.Z)(function(){return Promise.all([n.e(10204),n.e(79862),n.e(37954),n.e(73501),n.e(87126),n.e(9288)]).then(n.bind(n,268699)).then(function(e){return{default:e.CompactProfileV4}})}),eO=function(e){var t=e.chatRoom,n=e.isDirect,o=e.refetchChatRoom,i=e.memberPublicId,a=e.member,s=e.refetchProfileInfo,l=e.description,c=e.onClose,u=(0,H.c)().isCircleV4;if(n){var d=function(){s(),o()};return u?(0,r.jsx)(p.Suspense,{fallback:(0,r.jsx)(Z.c,{}),children:(0,r.jsx)(ew,{member:a,isLoading:!1,refetchProfileInfo:d,shouldHideMessageButton:!0,onClose:c})}):(0,r.jsx)(G.W,{memberPublicId:i,member:a,isFullPageProfile:!1,isRenderedOnRailBar:!0,shouldHideMessageButton:!0,shouldHideBadge:!0,shouldFixTabsOnTop:!0,refetch:d})}return(0,r.jsx)(e_,{chatRoom:t,refetchChatRoom:o,description:l})},eS=n(900302),eP={page_name:W.TP.PROFILE_VIEW},eC=function(e){var t,n=e.chatRoom,o=e.chatRoomUuid,i=e.refetchChatRoom,l=n||{},c=l.chat_room_name,d=l.chat_room_kind,p=l.chat_room_description,m=l.other_participants_preview,b=d===z.Br,y=(null==m||null==(t=m[0])?void 0:t.user_public_uid)||"",h=(0,$.Y)(o,{enabled:!b}),g=h.isLoading,v=h.totalCount,x=e0().toggleShowRailBar,j=(0,H.c)().isCircleV4,_=(0,V.dS)({publicId:b?y:void 0,params:eP}).getProfileInfoQuery,w=_.data,O=_.isInitialLoading,S=_.refetch,P=(0,u.v)(),C=P.ref,k=P.height,I=b&&j;return(0,r.jsxs)(s.En,{isLoading:b?O:g,loaderVariant:b?"rail-profile":"rail-member-list",children:[!I&&(0,r.jsx)("div",{ref:C,children:(0,r.jsx)(a.h.Header,{className:"!min-h-[56px]",children:(0,r.jsx)(eS.Y,{title:b?(0,f.t)("profile"):c,memberCount:v,isDirect:b,description:p,onClose:x})})}),(0,r.jsx)(a.h.Content,{noPadding:!0,heightGap:I?0:k,children:(0,r.jsx)(eO,{chatRoom:n,isDirect:b,memberPublicId:y,member:void 0===w?{}:w,refetchChatRoom:i,refetchProfileInfo:S,description:p,onClose:x})})]})},ek=n(987237),eI=function(){var e=(0,l.Ir)().data,t=e0(),n=t.shouldShowRailBar,o=t.dateRange,i=t.closeSpaceSummaryRailbar,a=t.firstUnreadMessageId;return e?(0,r.jsx)(ek.r,{isOpen:n,onClose:i,space:e,dateRange:o,type:"chat",shouldHideRailbarDragger:!1,firstUnreadMessageId:a}):null},eN=n(783550),eA=function(e){var t=e.description,n=e.shouldHideMembersCount,i=e.memberCount,a=void 0===i?0:i,s=e.onClose,l=void 0===s?d.noop:s,c=(0,b.Km)();return(0,b.qI)()?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"border-primary flex items-center justify-between border-b px-6 py-4",children:[(0,r.jsx)(o.K,{name:"16-arrow-left",onClick:l,ariaLabel:(0,f.t)("chat_space.details")}),(0,r.jsx)(g.o.TitleSm,{as:"h2",weight:"semibold",children:(0,f.t)("chat_space.details")}),!n&&(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"text-default mr-2",children:(0,r.jsx)(g.o.LabelSm,{weight:"medium",children:a})}),(0,r.jsx)(h.In,{type:"20-members",size:20,className:"text-dark",useWithFillCurrentColor:!0})]})]}),t&&(0,r.jsx)("div",{className:"text-default mt-4 max-h-[200px] overflow-y-auto whitespace-pre-line px-6 py-4",children:(0,r.jsx)(g.o.BodySm,{children:t})})]}):(0,r.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,r.jsx)(g.o.TitleSm,{as:"h2",weight:"semibold",children:(0,f.t)("chat_space.details")}),c?(0,r.jsx)("button",{type:"submit",onClick:l,children:(0,r.jsx)(h.In,{type:"close-v2",className:"text-dark mr-1 mt-2.5 cursor-pointer",useWithFillCurrentColor:!0})}):(0,r.jsx)(r.Fragment,{children:!n&&(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"text-dark mr-2",children:(0,r.jsx)(g.o.LabelSm,{weight:"medium",children:a})}),(0,r.jsx)(h.In,{type:"space-chat-members",className:"mt-1"})]})})]}),t&&(0,r.jsx)("div",{className:"text-dark max-h-[200px] overflow-y-auto whitespace-pre-line",children:(0,r.jsx)(g.o.BodySm,{children:t})})]})},eE=function(e){var t=e.onClose,n=void 0===t?d.noop:t;return(0,r.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,r.jsx)(ee.o5,{variant:"heading-md",children:(0,f.t)("chat_space.details")}),(0,r.jsx)(E.K,{icon:"cross",size:"md",variant:"ghost",onClick:n,"aria-label":(0,f.t)("close")})]})},eR=function(e){var t=e.space,n=(0,$.Y)(t.chat_room_uuid,{shouldDisableCache:!0,per_page:25}),o=n.chatParticipants,i=n.isLoading,l=n.refetchChatParticipants,d=n.hasNextPage,p=n.fetchNextPage,f=n.totalCount,m=(0,H.c)().isCircleV4,b=e0().toggleShowRailBar,y=(0,u.v)(),h=y.ref,g=y.height;return(0,r.jsxs)(s.En,{isLoading:i,loaderVariant:"rail-member-list",children:[(0,r.jsx)(a.h.Header,{className:(0,
1c.x)("mb-4 !p-0 md:mb-0 md:!py-4",m?"sm:!px-5":"sm:!px-6 border-none"),children:(0,r.jsx)("div",{ref:h,className:"w-full",children:m?(0,r.jsx)(eE,{onClose:b}):(0,r.jsx)(eA,{shouldHideMembersCount:!!t.hide_members_count,memberCount:f,description:t.chat_room_description||"",onClose:b})})}),(0,r.jsxs)(a.h.Content,{heightGap:g,noPadding:!0,children:[m&&(0,r.jsx)(et,{description:t.chat_room_description||"",className:"pb-2"}),(0,r.jsx)(eN.U,{spaceMembers:o,hasMoreSpaceMembers:d,space:t,refetchSpaceMembers:l,fetchNextPage:p})]})]})},eL=n(818185),eD=n(310860),eT=n(597255),eM=n(808877),eF=n(991303),eK=n(14930),eB="PARTICIPANTS",eq="CHAT_THREADS",eU="CHAT_ROOM_MESSAGE_SEARCH",ez="CHAT_SPACE_SUMMARY",eW="MEMBER_PROFILE";function e$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return e$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e$(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eH=function(e){var t=e.setShowRailBar,n=e.setType,r=e.shouldShowRailBar,o=e.type,i=eV((0,p.useState)(),2),a=i[0],s=i[1],l=eV((0,p.useState)(null),2),c=l[0],u=l[1],d=o===eW,f=(0,p.useCallback)(function(e){e&&(u(function(e){return d?e:{shouldShowRailBar:r,type:o}}),s(e),n(eW),t(!0))},[d,t,n,r,o]);return{closeMemberProfileRailbar:(0,p.useCallback)(function(){var e,r;n(null!=(e=null==c?void 0:c.type)?e:eB),t(null!=(r=null==c?void 0:c.shouldShowRailBar)&&r),s(void 0),u(null)},[c,t,n]),dismissMemberProfile:(0,p.useCallback)(function(){d&&(n(eB),s(void 0),u(null))},[d,n]),memberProfilePublicId:a,openMemberProfileRailbar:f}};function eG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eG(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eY={canOpenMemberProfileRailbar:!1,chatRoom:null,closeMemberProfileRailbar:function(){},closeThreadsRailbar:function(){},memberProfilePublicId:void 0,openMemberProfileRailbar:function(){},isCourseSpace:!1,isLiveStream:!1,isUnifiedInbox:!1,isUnifiedInboxChatThreadsPage:!1,isDrawer:!1,isPaddedByContainer:!1,messageHighlightId:null,openThreadsRailbar:function(){},parentMessage:null,RailbarComponent:function(){return null},setMessageHighlightId:function(){},shouldShowRailBar:!1,toggleShowRailBar:function(){},type:eB,updateParentMessage:function(){},isChatSpace:!1,isDmsPage:!1,toggleChatRoomMessageSearchRailbar:function(){},isMessageSearchRailbarOpen:!1,EmbeddedRailbarComponent:function(){return null},shouldShowEmbeddedRailBar:!1,toggleShowEmbeddedRailBar:function(){},messageHashId:void 0,dateRange:eF.a.LAST_7_DAYS,setDateRange:function(){},openSpaceSummaryRailbar:function(){},closeSpaceSummaryRailbar:function(){},firstUnreadMessageId:void 0},eJ=(0,p.createContext)(eY);eJ.displayName="RailbarContext";var eX=function(e){var t,n=e.isChatSpace,o=void 0!==n&&n,i=e.children,a=e.isLiveStream,s=void 0!==a&&a,l=e.isUnifiedInbox,c=void 0!==l&&l,u=e.isCourseSpace,d=e.isDrawer,f=void 0!==d&&d,m=e.isPaddedByContainer,y=(0,eT.d$)(),h=(0,H.c)().isCircleV4,g=(0,eL.a)().message_id,v=eQ((0,p.useState)(eY.type),2),x=v[0],j=v[1],_=eQ((0,eK.C)(!1),3),w=_[0],O=_[1],S=_[2],P=eQ((0,eK.C)(!1),3),C=P[0],k=P[1],I=P[2],N=eQ((0,p.useState)(eY.parentMessage),2),E=N[0],R=N[1],L=eQ((0,p.useState)(eY.chatRoom),2),D=L[0],T=L[1],F=eQ((0,p.useState)(g),2),K=F[0],q=F[1],z=(0,eD.z)({select:function(e){return e.pathname}}),W=z.startsWith("/messages")||z.startsWith(eM.on),$=z.startsWith(eM.mu),V=(0,b.Km)(),G=x===eU,Z=eQ((0,p.useState)(eF.a.LAST_7_DAYS),2),Q=Z[0],Y=Z[1],J=eQ((0,p.useState)(),2),X=J[0],ee=J[1],et=eH({setShowRailBar:S,setType:j,shouldShowRailBar:w,type:x}),en=et.closeMemberProfileRailbar,er=et.dismissMemberProfile,eo=et.memberProfilePublicId,ei=et.openMemberProfileRailbar;(0,p.useEffect)(function(){S(!(V||c))},[V,c,S]);var ea=(0,p.useCallback)(function(e,t){R(e),T(t),G&&g?I(!0):(I(!1),j(eq),S(!0))},[G,g]),es=(0,p.useCallback)(function(){R(null),T(null),j(eB),(V||c)&&S(!1)},[V,c,S]),el=(0,p.useCallback)(function(){j(x===eU?eB:eU),S(!0)},[x]),ec=(0,p.useCallback)(function(){return o?eR:eC},[o]),eu=(0,p.useCallback)(function(e,t){Y(e),ee(t),j(ez),S(!0)},[]),ed=(0,p.useCallback)(function(){j(eB),(V||c)&&S(!1)},[V,c,S]),ep=(0,p.useCallback)(function(){w&&er(),O()},[er,w,O]),ef=(eZ(t={},eB,ec()),eZ(t,eq,B),eZ(t,eU,h?M:A),eZ(t,ez,eI),eZ(t,eW,U),t),em={canOpenMemberProfileRailbar:h&&(o||W||$)&&!f&&!s,chatRoom:D,closeMemberProfileRailbar:en,closeThreadsRailbar:es,memberProfilePublicId:eo,openMemberProfileRailbar:ei,isCourseSpace:void 0!==u&&u,isLiveStream:s,isUnifiedInbox:c,isUnifiedInboxChatThreadsPage:$,isChatSpace:o,isDrawer:f,isPaddedByContainer:void 0!==m&&m,messageHighlightId:K,openThreadsRailbar:ea,parentMessage:E,RailbarComponent:ef[x],EmbeddedRailbarComponent:ef[eq],setMessageHighlightId:q,shouldShowRailBar:w,toggleShowRailBar:ep,type:x,updateParentMessage:function(e){R(e)},isDmsPage:W,toggleChatRoomMessageSearchRailbar:el,isMessageSearchRailbarOpen:G,shouldShowEmbeddedRailBar:C&&G,toggleShowEmbeddedRailBar:k,messageHashId:y,dateRange:Q,setDateRange:Y,openSpaceSummaryRailbar:eu,closeSpaceSummaryRailbar:ed,firstUnreadMessageId:X};return(0,r.jsx)(eJ.Provider,{value:em,children:i})},e0=function(){return(0,p.useContext)(eJ)}},875023(e,t,n){"use strict";var r=n(933578),o=n(494972),i=n(199062),a=n(592480),s=function(e){var t=e.event,n=e.scrollerId,r=e.targetDocument,i=(0,o.I)().isMobileView,a=(r||document).getElementById(void 0===n?"message-scroll-view":n);if(!a)return{};var s="noScroll";switch(t){case"messageSent":s="scrollToBottom";break;case"messageReceived":var l=a.scrollTop-a.scrollHeight+a.offsetHeight,c=i()&&0===l,u=l>=-(.8*a.offsetHeight)||l>14;(c||u)&&(s="scrollToBottom");break;case"chatRoomLoad":s="scrollToUnreadMessageIndicator";break;case"paginatedMessageLoad":s="adjustTop";break;case"nextPaginatedMessageLoad":case"messageUpdated":case"messageDeleted":case"parentMessageUpdated":break;case"reaction":a.scrollTop-a.scrollHeight+a.offsetHeight>=-80&&(s="scrollToBottom")}return{action:s,scrollTopValue:a.scrollTop,scrollHeightValue:a.scrollHeight}},l=function(e,t){return e&&t?"message-scroll-view-".concat(t):"message-scroll-view"},c=function(){var e=(0,a.g)(),t=e.chatRoomUuid,n=e.isMessaging,o=(0,i.S)().frameDocument,c=l(n,t),u=o||document,d=(0,r.useCallback)(function(){return u.getElementById(c)},[u,c]),p=(0,r.useCallback)(function(e){return s({event:e.event,scrollerId:c,targetDocument:u})},[c,u]);return(0,r.useMemo)(function(){return{calculateScrollInfo:p,scrollerId:c,get
1ScrollingElement:d,targetDocument:u}},[p,c,d,u])};n.d(t,{GA:()=>l,S1:()=>s,b5:()=>c})},543934(e,t,n){"use strict";var r=n(230763),o=n(677123),i=n(451430),a=function(e){var t=e.communityId,n=(0,r.Od)().currentCommunity,a=t||(null==n?void 0:n.id),s=(0,o.gz)().unreadChatRoomUuids;return(0,i.isNull)(a)?[]:s[a]||[]};n.d(t,{E:()=>a})},367090(e,t,n){"use strict";var r=n(391426),o=n(606580),i=n(230763),a=n(310860),s=n(933578),l=n(258752),c=n(717526),u=n(51730),d=n(915779),p=n(923573),f=n(177096);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||h(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}}var g=(0,s.createContext)(null);g.displayName="UnreadChatThreadsContext";var v=function(e){var t,n=e.children,m=(0,i.Od)().currentCommunityMember,h=null==m?void 0:m.id,v=b((0,s.useState)([]),2),x=v[0],j=v[1],_=b((0,s.useState)(!1),2),w=_[0],O=_[1],S=b((0,s.useState)(new Set),2),P=S[0],C=S[1],k=(0,c.d)().error,I=(0,a.z)({select:function(e){return e.pathname}}),N="/threads"===I||I.startsWith("/settings/inbox/chat-threads"),A=(0,s.useMemo)(function(){var e=/^\/settings\/inbox\/chat-threads\/(\d+)/.exec(I);return e?Number(e[1]):null},[I]),E=(0,s.useCallback)(function(e){j(function(t){return t.includes(e)?t.filter(function(t){return t!==e}):t})},[]),R=(0,s.useCallback)(function(e){(null==e?void 0:e.unread_flow)&&O(!0);var t,n=(null==(t=e.sender)?void 0:t.community_member_id)===h,r=!e.chat_thread_id,i=(null==e?void 0:e.chat_room_parent_type)==="Live::Room";if(!r&&!n&&!i){if(A&&e.chat_thread_id===A)return void(0,o.r)(e.chat_thread_id);j(function(t){if(t.includes(e.chat_thread_id))return t;if(N){var n=document.getElementById(String(e.chat_thread_id));if(n&&(0,p.mz)(n))return t}return y(t).concat([e.chat_thread_id])})}},[A,h,N]),L=(0,s.useCallback)(function(e){"chatThreadRead"===e.event?E(e.chat_thread_id):"newMessage"===e.event&&R(e.json_message)},[E,R]);(0,f.C)({communityMemberId:h,onMessageReceive:L,deps:[L]});var D=(0,l.IT)({queryKey:["thread_messages","unread",h],queryFn:function(){return(0,u.i_)(d.iK.chatThreads.unreadChatThreads())},enabled:!!(null==m||null==(t=m.policies)?void 0:t.can_access_threads_tab),onSuccess:function(e){j(e.chat_thread_ids)},onError:function(e){k(e.message)}}),T=D.isInitialLoading,M=D.refetch;(0,s.useEffect)(function(){C(function(e){return new Set(y(e).concat(y(x)))})},[x]);var F=(0,s.useCallback)(function(){C(new Set)},[]),K=(0,s.useMemo)(function(){return{fetchUnreadChatThreads:M,unreadChatThreadIds:x,unreadThreadsCount:x.length,isLoading:T,onEventReceive:L,isUnreadThreadFlow:w,newBadgeIds:P,resetNewBadgeIds:F}},[M,x,T,L,w,P,F]);return(0,r.jsx)(g.Provider,{value:K,children:n})},x=function(){var e=(0,s.useContext)(g);if(!e)throw Error("useUnreadChatThreads must be used within UnreadChatThreadsProvider");return e};n.d(t,{W:()=>v,s:()=>x})},465274(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(933578),a=n(258752),s=n(417980),l=n(717526),c=n(92406);function u(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var d=function(){return(0,r.i_)((0,o.oO)())},p=function(e){var t=e.map(function(e){return e.id});return(0,r.$H)((0,o.$A)(),{community_order:t})},f=function(){(0,r.oK)("/community_switchers/invalidate_cache").catch(function(){})},m=function(e){return e.map(function(e){return e.id}).join(",")},b=["COMMUNITY_SWITCHER"],y=[],h=function(){var e=(0,l.d)(),t=(0,c.i)(),n=(0,i.useRef)(!1),r=(0,i.useMemo)(function(){var e;return null!=(e=t.community_switcher_data)?e:[]},[t.community_switcher_data]),o=(0,a.IT)({queryKey:b,queryFn:d}),h=o.data,g=o.refetch;(0,i.useEffect)(function(){n.current||h&&0!==r.length&&(n.current=!0,m(h.communities)!==m(r)&&f())},[h,r]);var v=h||{communities:r,token:""},x=(0,a.n_)({mutationFn:p,onSuccess:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,g()];case 1:return e.sent(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,s,"next",e)}function s(e){u(i,r,o,a,s,"throw",e)}a(void 0)})})()},onError:function(){e.error((0,s.t)("community_switcher_reorder.reorder_error"))}}),j=x.mutate,_=x.isPending,w=v.token||"";return{communities:v.communities||y,token:w,isLoadingCommunities:!1,isReorderingCommunities:_,refetchCommunities:g,onSortCommunities:j}};n.d(t,{e:()=>h})},226778(e,t,n){"use strict";var r=n(294395),o=n(526448),i=function(e){var t=e.queryClient,n=e.initiatorPublicUid,i=e.recipientPublicUid;t.invalidateQueries({queryKey:[o.Du]}
1),(n||i)&&(t.invalidateQueries({queryKey:["community-members"]}),t.invalidateQueries({queryKey:["audience"]}),n&&t.invalidateQueries({queryKey:[r.ym,n]}),i&&t.invalidateQueries({queryKey:[r.ym,i]}))};n.d(t,{s:()=>i})},715771(e,t,n){"use strict";var r=n(544819),o=function(e,t){(0,r.h)({channel:"ConnectionRequestChannel",onMessageReceive:t,community_member_id:e,canCreateConnection:!!e},[e])};n.d(t,{s:()=>o})},526448(e,t,n){"use strict";n.d(t,{Du:()=>d,cA:()=>p});var r=n(558613),o=n.n(r),i=n(933578),a=n(258752),s=n(51730),l=n(533877),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.H)("connect/connection/requests",e)};function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var d="connection-requests",p=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.perPage,r=void 0===n?10:n,l=t.initialPage,p=void 0===l?1:l,f=t.options,m=u({getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},getPreviousPageParam:function(e){return e.page>1?e.page-1:void 0},keepPreviousData:!0},void 0===f?{}:f),b=(0,a.qu)(u({initialPageParam:p,queryKey:[d,r,p],queryFn:function(e){var t,n=e.pageParam,o=void 0===n?p:n,i=1;return"number"==typeof o&&o>0&&(i=o),t={page:i,per_page:r},(0,s.i_)(c(t))}},m)),y=b.data,h=b.fetchNextPage,g=b.hasNextPage,v=b.isFetchingNextPage,x=b.isInitialLoading,j=b.refetch,_=(0,i.useMemo)(function(){return(null==y?void 0:y.pages)||[]},[null==y?void 0:y.pages]);return{fetchNextPage:h,hasNextPage:g,isFetchingNextPage:v,isLoading:x,refetch:j,totalCount:(null==(e=_[0])?void 0:e.count)||0,requests:(0,i.useMemo)(function(){return o()(_.map(function(e){return e.records}))},[_])}}},815505(e,t,n){"use strict";var r=n(313567),o=n(258752);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var a=function(e){if(!e)throw Error("Course query is missing queryFn");return e},s=function(e){return r.B3.key(Number(e)||0,"sections")},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.params,s=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(t,["params"]),l=r.gZ.sections(e,void 0===n?{}:n),c=i({queryKey:l.queryKey,queryFn:a(l.queryFn),enabled:!!e},s);return(0,o.IT)(c)},c=function(e,t){return r.B3.key(Number(e)||0,"lessons",Number(t)||0)},u=function(e){var t=e.courseId,n=e.lessonId,s=e.sectionId,l=e.options,c=r.gZ.lesson(t,n,s),u=i({queryKey:c.queryKey,queryFn:a(c.queryFn),enabled:!!n},void 0===l?{}:l);return(0,o.IT)(u)};n.d(t,{$X:()=>l,Dj:()=>s,Qf:()=>u,md:()=>c})},627252(e,t,n){"use strict";var r=n(355104),o=function(){return(0,r.c)().isCircleV4};n.d(t,{f:()=>o})},494972(e,t,n){"use strict";var r=function(){return{isMobileView:function(){return window.matchMedia("(max-width: 992px)").matches}}};n.d(t,{I:()=>r})},696208(e,t,n){"use strict";var r=n(230763),o=n(933578),i={isApiFeatureEnabled:!1,isAdminApiFeatureEnabled:!1,isDataApiFeatureEnabled:!1,isHeadlessApiFeatureEnabled:!1,isOverviewTabEnabled:!1},a=function(){var e=(0,r.Od)(),t=e.currentCommunity,n=e.isLoading;return(0,o.useMemo)(function(){if(n||!t)return i;var e=t.api_access_feature_flag_enabled,r=t.admin_api_feature_flag_enabled,o=t.headless_api_feature_flag_enabled;return{isApiFeatureEnabled:e,isAdminApiFeatureEnabled:r,isDataApiFeatureEnabled:t.data_api_feature_flag_enabled,isHeadlessApiFeatureEnabled:o,isOverviewTabEnabled:r||o}},[t,n])};n.d(t,{I:()=>a})},350847(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(258752),a=n(677123),s=n(56054),l=function(e){return"embeddable-chat-room-".concat(e)},c=function(e){var t=(0,s.L)(a.K4).updateChatRoom,n=(0,a.z2)(),c=(0,i.IT)({queryKey:[l(e)],queryFn:function(){return(0,r.i_)(o.iK.chatRooms.show({uuid:e}))},enabled:!!e&&"new"!==e,refetchOnWindowFocus:!1,onSuccess:function(e){var n=e.chat_room;n&&t(n)}}),u=c.isInitialLoading,d=c.refetch,p=c.data,f=(void 0===p?{}:p).chat_room;return{isLoading:u,chatRoom:f,refetchChatRoom:e?d:void 0,onEventReceive:function(e){var r,o;
1if("chatRoomUpdated"===e.event){var i,a,s=e.chat_room;t((i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},s),a=a={pinned_message:s.pinned_message},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(a)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(a,e))}),i))}"updatedMessage"===e.event&&(null==n||null==(r=n.pinned_message)?void 0:r.id)===e.json_message.id&&(null==f?void 0:f.uuid)&&t({uuid:f.uuid,pinned_message:e.json_message}),"deletedMessage"===e.event&&(null==n||null==(o=n.pinned_message)?void 0:o.id)===e.id&&(null==f?void 0:f.uuid)&&t({uuid:f.uuid,pinned_message:null})}}};n.d(t,{Z:()=>l,l:()=>c})},270530(e,t,n){"use strict";n.d(t,{K:()=>a});var r=n(452146),o=n(230763),i=function(e){var t,n=(0,o.Od)().experimentation;return(null!=(t=null==n?void 0:n.experiments)?t:[]).some(function(t){return t.flag_name===e})},a=function(){return i("professional_yearly_price_2026_test")||(0,r.zu)()}},190569(e,t,n){"use strict";var r=n(230763),o=n(927139),i=n.n(o),a=n(258752),s=n(417980),l=n(717526),c=n(51730),u=function(e,t){var n=(0,r.Od)().currentCommunityMember,o=(0,l.d)(),u=o.success,d=o.error;return{downloadMembersCSV:(0,a.n_)({mutationFn:function(e){var t=e.downloadURL;return(0,c.i_)(t)},onSuccess:function(){u((0,s.t)("export_member_csv.message",{email:n.email})),i()(e)&&e()},onError:function(){d((0,s.t)("export_member_csv.error_message")),i()(t)&&t()}}).mutate}};n.d(t,{W:()=>u})},362036(e,t,n){"use strict";var r=n(417980),o=n(230763),i=n(358954),a=n(661116),s=function(e){var t=e.notification;try{return t.notification_text_structure.map(function(e){return t[e]||""}).join(" ")}catch(e){return""}},l=function(){var e=(0,o.Od)().currentCommunity,t=(0,a.W)().electronAPI,n=(null==e?void 0:e.icon_url)||"https://assets-v3.circle.so/qv2902nizkth5o752l2cugc6y09e";return{sendNotificationToDesktopApp:function(o){var a=o.title,l=o.body,c=o.metadata,u=o.type;if(null==t?void 0:t.sendNotification)try{if("notification"===u&&!c)return;t.sendNotification({title:a||(0,r.t)("desktop_app.notifications.new_notification_generic_title"),body:l||(c&&"notification_text_structure"in c?s({notification:c}):""),icon:n,metadata:c,currentCommunityData:{id:null==e?void 0:e.id,name:null==e?void 0:e.name,slug:null==e?void 0:e.slug,root_url:null==e?void 0:e.root_url,full_url:null==e?void 0:e.full_url},type:u})}catch(e){(0,i.sO)("Failed to send notification to desktop app"),(0,i.Vt)(e),console.warn("Failed to send notification to desktop app:",e)}},setDesktopAppNotificationCount:function(n){if(null==t?void 0:t.setNotificationCount)try{var r=(null==e?void 0:e.id)?Number(e.id):void 0;t.setNotificationCount(n,r)}catch(e){(0,i.sO)("Failed to set desktop app notification count"),(0,i.Vt)(e),console.warn("Failed to set desktop app notification count:",e)}},setDesktopAppUnreadMessageCount:function(n){if(null==t?void 0:t.setUnreadMessageCount)try{var r=(null==e?void 0:e.id)?Number(e.id):void 0;t.setUnreadMessageCount(n,r)}catch(e){(0,i.sO)("Failed to set desktop app unread message count"),(0,i.Vt)(e),console.warn("Failed to set desktop app unread message count:",e)}}}};n.d(t,{$:()=>l})},26583(e,t,n){"use strict";var r=n(544819),o=n(362036),i=function(e,t){var n=(0,o.$)().sendNotificationToDesktopApp;(0,r.h)({channel:"NotificationChannel",onMessageReceive:function(e){n({type:"notification",metadata:null==e?void 0:e.data}),t(e)},community_member_id:e,canCreateConnection:!!e},[e])};n.d(t,{M:()=>i})},445365(e,t,n){"use strict";var r=n(933578),o=n(51730),i=n(915779);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||u(e,t)||function(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}}var d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:30,t=l((0,r.useState)([]),2),n=t[0],a=t[1],u=l((0,r.useState)(0),2),d=u[0],p=u[1],f=l((0,r.useState)(!1),2),m=f[0],b=f[1],y=l((0,r.useState)(!1),2),h=y[0],g=y[1],v=function(t,n){return(0,o.i_)("internal_api/notifications?page=".concat(t,"&per_page=").concat(e,"&notification_group=").concat(n)).then(function(e){1===t?a(c(e.records)):a(function(t){return c(t).concat(c(e.records))}),g(!0),b(e.has_next_page)})};return{dataLoaded:h,setDataLoaded:g,notifications:n,newNotificationCount:d,setNewNotificationCount:p,hasNextPage:m,setHasNextPage:b,fetchNotifications:v,fetchFirstPage:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return[4,v(1,e)];case 1:return t.sent(),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){s(i,r,o,a,l,"next",e)}function l(e){s(i,r,o,a,l,"throw",e)}a(void 0)})})()},resetNewNotificationsCount:function(){d&&(0,o.oK)(i.vx.resetNotificationCount()).then(function(e){p(e.new_notifications_count)}).catch(function(e){console.error(e)})},markAsRead:function(e){e.read_at||(0,o.kS)(i.vx.markAsRead({id:e.id})).then(function(t){a(n.map(function(n){return n.id===e.id?t.record:n}))}).catch(function(e){console.error(e)})},markAllAsRead:function(){(0,o.oK)(i.vx.markAllAsRead()).then(function(){var e=new Date().toString();a(n.map(function(t){var n,r;return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t),r=r={read_at:e},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n}))}).catch(function(e){console.error(e)})},archiveNotification:function(e){(0,o.kS)("internal_api/notifications/".concat(e.id,"/archive")).then(function(){a(n.filter(function(t){return t.id!==e.id}))}).catch(function(e){console.error(e)})},fetchNewNotificationsCount:function(e){return(0,o.i_)((0,i.bN)()+"?community_id=".concat(e)).then(function(e){p(e.new_notifications_count),e.new_notifications_count&&g(!1)})},resizeNotificationWindow:(0,r.useCallback)(function(){var e=document.getElementById("bottomBarNotificationWrapperOuter"),t=document.getElementById("bottomBarNotificationWrapperInner");if(e){var n=window.innerHeight-56;e.style.height=n+"px"}if(t){var r=window.innerHeight-215;t.style.height=r+"px"}},[]),onNotificationEventReceive:function(e){switch(e.event){case"resetNewNotificationCount":case"updateNewNotificationCount":p(e.new_notifications_count);break;case"newNotification":p(d+1)}},unfollowNotification:function(e){(0,o.Dc)("internal_api/posts/".concat(e.post_id,"/post_followers/").concat(e.post_follower_id)).then(function(t){a(n.map(function(n){return n.id===e.id&&t.success&&(n.post_follower_id=null),n}))}).catch(function(e){console.error(e)})},followNotification:function(e){(0,o.oK)("internal_api/posts/".concat(e.post_id,"/post_followers")).then(function(t){a(n.map(function(n){return n.id===e.id&&t.success&&(n.post_follower_id=t.post_follower_id),n}))}).catch(function(e){console.error(e)})}}};n.d(t,{s:()=>d})},837326(e,t,n){"use strict";var r=n(274762),o=n(258752),i=[],a=function(e){var t=e.communityMemberId,n=e.status,a=e.options,s=e.spaceIds,l=r.N5.list({communityMemberId:t,status:void 0===n?i:n,spaceIds:void 0===s?[]:s}),c=l.queryKey,u=l.queryFn;return{paywallsListQuery:(0,o.IT)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({queryKey:c,queryFn:u},void 0===a?{}:a))}};n.d(t,{c:()=>a})},158740(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(258752);function a(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var s=function(e){var t,n;return(0,i.n_)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={mutationFn:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){return[2,(0,r.Dc)(o.iK.planTrials.destroy())]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function s(e){a(i,r,o,s,l,"next",e)}function l(e){a(i,r,o,s,l,"throw",e)}s(void 0)})})()}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{h:()=>s})},678548(e,t,n){"use strict";var r=n(230763),o=n(339551),i=function(){var e=(0,o.E)().helpers,t=(0,r.Od)().currentCommunityMember,n=e.basicSpacesWithPostCreationAllowed().length;return{canCreatePost:!!(t&&n)}};n.d(t,{G:()=>i})},802215(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(274685),a=n(258752),s=function(e){var t=e.post,n=["post-conversation-summary",t.id],s=(0,i.jE)(),l=(0,a.IT)(n,function(){return(0,r.i_)(o.iK.posts.conversationSummary.show({postId:t.id}))},{enabled:!1,staleTime:6e5,retry:function(e,t){return(null==t?void 0:t.status)!==404}}),c=l.data,u=l.isInitialLoading,d=l.refetch,p=function(){s.resetQueries({queryKey:n,exact:!0})},f=(0,a.n_)({mutationFn:function(e){return(0,r.kS)(o.iK.posts.conversationSummary.update({postId:t.id}),e)},onSuccess:function(){p()}});return{conversationSummary:c,isLoadingConversationSummary:u,refetchConversationSummary:d,clearConversationSummary:p,updateConversationSummary:f.mutateAsync,isSaving:f.isPending}};n.d(t,{l:()=>s})},704752(e,t,n){"use strict";n.d(t,{i:()=>y,B:()=>h});var r=n(398061),o=n(341409),i=n(146917),a=n(451430),s=n(933578),l=n(274685),c=n(258752),u=n(151129),d=n(376409),p=function(e){var t=e.lastPage,n=e.isCalendarView,r=e.fetchNextPage;(0,s.useEffect)(function(){n&&(null==t?void 0:t.has_next_page)&&(null==t?void 0:t.page)<11&&r()},[t,n,r])};function f(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function b(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{per_page:12},t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.noop,y=(0,l.jE)(),h=(0,d.n)(),g=h.removeRecord,v=h.findAndReplaceRecord,x=(0,r.Ir)().data,j=e.filter_date?b(m({},e),{filter_date:(0,u.s)(e.filter_date)}):e,_=i.x.spacePosts({spaceId:null==x?void 0:x.id,params:j}),w=_.queryKey,O="calendar"===j.used_on,S=(0,c.qu)(b(m({},_),{keepPreviousData:O,enabled:t&&!!(null==x?void 0:x.id)&&(0,o.ks)(x),onSuccess:n})),P=S.data,C=S.hasNextPage,k=S.isInitialLoading,I=S.isError,N=S.error,A=S.refetch,E=S.fetchNextPage,R=(0,s.useCallback)(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.refetch,o=void 0===r||r;return(t=function(){var t;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:if(t=e,!o)return[3,6];n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,y.fetchQuery(i.x.postDetails({spaceId:e.space_id,postSlug:e.slug}))];case 2:return t=n.sent(),[3,5];case 3:return console.error(n.sent()),[3,5];case 4:return v(t,w),[7];case 5:return[3,7];case 6:v(t,w),n.label=7;case 7:return[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){f(i,r,o,a,s,"next",e)}function s(e){f(i,r,o,a,s,"throw",e)}a(void 0)})})()},[v,y,w]),L=(0,s.useCallback)(function(e){g(e,w)},[g,w]),D=[];return!k&&P&&(D=(0,a.uniqBy)((0,a.flatten)(P.pages.map(function(e){return e.records})),"id")),p({lastPage:null==P?void 0:P.pages[(null==P?void 0:P.pages.length)-1],isCalendarView:O,fetchNextPage:E}),{mapPages:function(e){return k||!P?[]:P.pages.map(function(t){return e(t)})},hasNextPage:C,refetch:A,isLoading:k,isError:I,error:N,fetchNextPage:E,pages:null==P?void 0:P.pages,posts:D,onPostChange:R,onPostDestroy:L}},h=function(e){return y({only_pinned:!0,per_page:e||50,used_on:"pinned_post_sidebar"})}},527374(e,t,n){"use strict";var r=n(146917),o=n(258752),i=n(274685);function a(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var c=function(e){var t=e.spaceId,n=e.postSlug,c=e.spaceSlug,u=void 0===c?"":c,d=e.queryOptions,p=e.disabled,f=r.x.postDetails({spaceId:t,spaceSlug:u,postSlug:n}),m=(0,o.IT)(l(s(l(s({},f),{enabled:!(void 0!==p&&p)&&!!((t||u)&&n),staleTime:0}),void 0===d?{}:d),{retry:function(e,t){return![401,404].includes(null==t?void 0:t.status)}})),b=m.data,y=m.error,h=m.isInitialLoading,g=m.isLoading,v=m.refetch,x=m.status,j=(0,i.jE)();return{data:b,error:y,isInitialLoading:h,isLoading:g,onPostChange:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.refetch,o=void 0===r||r;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){return[2,o?v():j.setQueryData(f.queryKey,function(){return e})]})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function s(e){a(i,r,o,s,l,"next",e)}function l(e){a(i,r,o,s,l,"throw",e)}s(void 0)})})()},post:b,refetch:v,status:x}};n.d(t,{C:()=>c})},612974(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(274685),a=n(258752),s=function(e){var t=e.post,n=["post-summary",t.id],s=(0,i.jE)(),l=(0,a.IT)(n,function(){return(0,r.i_)(o.iK.posts.summary({postId:t.id}))},{enabled:!1,staleTime:6e5,retry:function(e,t){return(null==t?void 0:t.status)!==404}}),c=l.data,u=l.isInitialLoading,d=l.refetch,p=function(){u&&s.cancelQueries({queryKey:n}),s.resetQueries({queryKey:n,exact:!0})};return{summary:c,isLoadingSummary:u,refetchSummary:d,clearSummary:p,toggleSummary:function(){c||u?p():d()}}};n.d(t,{w:()=>s})},964925(e,t,n){"use strict";n.d(t,{n:()=>s});var r=n(867494),o=n(933578),i=n(617492),a=n(804939),s=function(){var e=(0,i.g)(),t=(0,a.P)(),n=(0,r.t)(),s=n.canOpenMemberProfileRailbar,l=n.isLiveStream,c=n.openMemberProfileRailbar,u=s&&!t;return(0,o.useCallback)(function(t){if(t){if(u)return void c(t);e.show({memberPublicId:t,params:{shouldOpenInNewTab:l}})}},[l,e,c,u])}},913479(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(451430),a=n(933578),s=n(258752),l=function(e){var t=e.memberPublicId,n=e.params,l=void 0===n?{per_page:10}:n,c=(0,s.qu)({queryKey:["profile-comments",t],queryFn:function(e){var n,i=e.pageParam;return n=void 0===i?1:i,(0,r.i_)(o.iK.profile.comments({memberPublicId:t,params:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({page:n},l)}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0}}),u=c.data,d=c.fetchNextPage,p=c.hasNextPage,f=c.isInitialLoading,m=c.isLoading;return{comments:(0,a.useMemo)(function(){var e;return f?[]:(0,i.uniqBy)((0,i.flatten)(null!=(e=null==u?void 0:u.pages.map(function(e){return e.records}))?e:[]),"id")},[u,f]),fetchNextPage:d,hasNextPage:p,isLoading:m}};n.d(t,{H:()=>l})}
1,488441(e,t,n){"use strict";n.d(t,{l:()=>c});var r=n(340479),o=n(13444),i=n(506493),a=n(933578),s=n(617492),l=n(867494),c=function(e){var t,n,c=e.name,u=e.params,d=void 0===u?{}:u,p=e.public_uid,f=(0,s.g)().show,m=(0,i.B)(),b=(0,l.t)().isDrawer,y=(0,a.useCallback)(function(e){(0,r.s6)(e)||m||b||(e.preventDefault(),f({memberPublicId:p,params:d}))},[m,b,p,d,f]);return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},(0,o.S)({name:c,params:d,publicUid:p,shouldOpenInNewTab:m,showMemberProfileDrawer:f})),n=n={onClick:y},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t}},897328(e,t,n){"use strict";var r=n(376409),o=n(146917),i=n(451430),a=n(933578),s=n(274685),l=n(258752);function c(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var d=function(e){var t,n,d=e.memberPublicId,p=e.params,f=e.enabled,m=e.onSuccess,b=void 0===m?i.noop:m,y=(0,s.jE)(),h=(0,r.n)(),g=h.findAndReplaceRecord,v=h.removeRecord,x=o.x.profilePosts({memberPublicId:null!=d?d:"",params:u({},void 0===p?{per_page:10}:p)}),j=x.queryKey,_=(0,l.qu)((t=u({},x),n=n={enabled:void 0===f||f,onSuccess:function(e){(0,i.isFunction)(b)&&b(e)}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)),w=_.data,O=_.fetchNextPage,S=_.hasNextPage,P=_.isInitialLoading,C=(0,a.useCallback)(function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return[4,y.fetchQuery(o.x.postDetails({spaceId:e.space_id,postSlug:e.slug}))];case 1:return[2,g(t.sent(),j)]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){c(i,r,o,a,s,"next",e)}function s(e){c(i,r,o,a,s,"throw",e)}a(void 0)})})()},[g,y,j]),k=(0,a.useCallback)(function(e){v(e,j)},[v,j]),I=(0,a.useMemo)(function(){var e;return P?[]:(0,i.uniqBy)((0,i.flatten)(null!=(e=null==w?void 0:w.pages.map(function(e){return e.records}))?e:[]),"id")},[w,P]);return{data:w,fetchNextPage:O,hasNextPage:S,isLoading:P,onPostChange:C,onPostDestroy:k,posts:I}};n.d(t,{U:()=>d})},922572(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(451430),a=n(933578),s=n(258752),l=function(e){var t=e.memberPublicId,n=e.params,l=void 0===n?{per_page:20}:n,c=(0,s.qu)({initialPageParam:1,queryKey:["PROFILE_SPACES",t,l],queryFn:function(e){var n,i=e.pageParam;return n=void 0===i?1:i,(0,r.i_)(o.iK.profile.spaces({memberPublicId:t,params:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({page:n},l)}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0}}),u=c.data,d=c.fetchNextPage,p=c.hasNextPage,f=c.isInitialLoading;return{fetchNextPage:d,hasNextPage:p,isLoading:c.isLoading,spaces:(0,a.useMemo)(function(){var e;return f?[]:(0,i.uniqBy)((0,i.flatten)(null!=(e=null==u?void 0:u.pages.map(function(e){return e.spaces}))?e:[]),"id")},[u,f])}};n.d(t,{m:()=>l})},523411(e,t,n){"use strict";n.d(t,{w:()=>y});var r=n(230763),o=n(51730),i=n(358954),a=n(6418),s=n(132416),l=n(915779),c=n(310860),u=n(519104),d=n(933578),p=n(417980),f=new(n(443473)).A({minLength:8,alphabet:"vRx5keXBhG3b0Z1nJgPiNMqsItjLuE2dOWz9DQCmScylaUfKFV7HA4pw6o8YTr"}),m=function(){var e=(0,c.z)(),t=(0,u.Z)();return(0,d.useCallback)(function(n){var r,o;t({to:"/settings/admin/audience/$sqid",params:{sqid:n.sqid},state:{from:(r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),o=o={search:e.searchStr},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r)}})},[e,t])},b={page_name:s.TP.PROFILE_VIEW},y=function(){var e=(0,c.z)(),t=(0,u.Z)(),n=(0,r.Od)().currentCommunityMember,s=(0,a.V8)(n),y=m(),h=(0,d.useCallback)(function(){t({to:"/account",state:{from:{pathname:e.pathname,search:e.searchStr}}})},[t,e]),g=(0,d.useCallback)(function(e){y({sqid:f.encode([e])})},[y]),v=(0,d.useCallback)(function(e){return(0,o.i_)(l.iK.profile.show({memberPublicId:e,params:b})).then(function(e){return(null==e?void 0:e.sqid)?y({sqid:e.sqid}):(null==e?void 0:e.id)?g(e.id):void console.error((0,p.t)("show_member_profile_has_no_sqid_or_id"),{profileData:e})}).catch(function(e){console.error((0,p.t)("show_member_profile_fetch_error"),{error:e})})},[y,g]);return{showOwnProfileEdit:h,showMemberProfileEdit:(0,d.useCallback)(function(e){var t=e.member;if(!s)return void console.error((0,p.t)("show_member_profile_no_admin"),{currentCommunityMember:n});if(!t)return void console.error((0,p.t)("show_member_profile_no_member"));if(t.sqid)return y({sqid:t.sqid});if(t.id){var r="Missing sqid for audience edit navigation ".concat(t.public_uid," ").concat(t.id," generating sqid");return(0,i.Vt)(r),console.warn(r),g(t.id)}if(t.public_uid){var o="Missing id or sqid for audience edit navigation ".concat(t.public_uid," ").concat(t.id," fetching the profile data and navigating");(0,i.Vt)(o),console.warn(o),v(t.public_uid);return}console.error((0,p.t)("show_member_profile_fallback_error"),{member:t})},[s,n,y,g,v])}}},376409(e,t,n){"use strict";var r=n(933578),o=n(274685);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function a(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var s=function(){var e=(0,o.jE)();return{findAndReplaceRecord:(0,r.useCallback)(function(t,n){if(!n)throw Error("queryKey is required");return e.setQueryData(n,function(e){return{pages:e.pages.map(function(e){return a(i({},e),{records:e.records.map(function(e){return e.id===t.id?t:e})})}),pageParams:e.pageParams}})},[e]),removeRecord:(0,r.useCallback)(function(t,n){if(!n)throw Error("queryKey is required");return e.setQueryData(n,function(e){return{pages:e.pages.map(function(e){return a(i({},e),{records:e.records.filter(function(e){return e.id!==t})})}),pageParams:e.pageParams}})},[e]),updateAllRecords:(0,r.useCallback)(function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20;if(!n)throw Error("queryKey is required");e.setQueryData(n,function(e){return a(i({},e),{pages:e.pages.map(function(e,n){return a(i({},e||{}),{records:t.slice(r*n,r*(Number(n)+1))})})})})},[e])}};n.d(t,{n:()=>s})},866959(e,t,n){"use strict";var r=n(51730),o=n(258752);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a=function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,l=Array.isArray(a)?a:[a||e],c=(0,o.qu)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},i),n=n={queryKey:l,initialPageParam:1,queryFn:function(t){var n,o=t.pageParam;return n=void 0===o?1:o,(0,r.i_)(s(e,{page:n}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t));return{data:c.data,fetchNextPage:c.fetchNextPage,hasNextPage:c.hasNextPage,isFetchingNextPage:c.isFetchingNextPage,isLoading:c.isInitialLoading,mapPages:function(e){var t=c.isInitialLoading,n=c.data;return t||!n?[]:n.pages.map(e)}}},s=function(e,t){var n=new URL(window.location.origin+e),r=!0,o=!1,a=void 0;try{for(var s,l=Object.entries(t)[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c,u=(c=s.value,function(e){if(Array.isArray(e))return e}(c)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(c)||function(e){if(e){if("string"==typeof e)return i(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,2)}}(c)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=u[0],p=u[1];n.searchParams.set(d,String(p))}}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n.pathname+n.search};n.d(t,{p:()=>a})},257449(e,t,n){"use strict";var r=n(558613),o=n.n(r),i=n(933578),a=n(258752),s=n(361379);function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var c=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.perPage,r=void 0===n?10:n,c=t.initialPage,u=void 0===c?1:c,d=t.options,p=t.scope,f=l({getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},getPreviousPageParam:function(e){return e.page>1?e.page-1:void 0},keepPreviousData:!0},void 0===d?{}:d),m=(0,a.qu)(l({initialPageParam:u,queryKey:["recommendations",void 0===p?"default":p,r,u],queryFn:function(e){var t=e.pageParam,n=void 0===t?u:t,o=1;"number"==typeof n&&n>0&&(o=n);var i={page:o,per_page:r};return s.z.getRecommendations(i)}},f)),b=m.data,y=m.fetchNextPage,h=m.hasNextPage,g=m.isFetchingNextPage,v=m.isInitialLoading,x=m.refetch,j=(0,i.useMemo)(function(){return(null==b?void 0:b.pages)||[]},[null==b?void 0:b.pages]),_=(null==(e=j[0])?void 0:e.count)||0;return{fetchNextPage:y,hasNextPage:h,isFetchingNextPage:g,isLoading:v,refetch:x,recommendations:(0,i.useMemo)(function(){return o()(j.map(function(e){return e.records}))},[j]),count:_}};n.d(t,{eM:()=>c})},598567(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(i=function(){return!!e})()}var a=new(function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(){var e,n,o,a,s;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return n=r(n=t),o=e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,i()?Reflect.construct(n,[],r(this).constructor):n.apply(this,void 0)),a="emitSubscriptionStateChange",s=function(t){"Chats::RoomChannel"===t.channel?e.emit("chatRoomSubscriptionStateChange",t):e.emit("subscriptionStateChange",t)},a in o?Object.defineProperty(o,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[a]=s,e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e),t}(n(551940).EventEmitter));n.d(t,{j:()=>a})},7072(e,t,n){"use strict";var r=n(915779),o=n(519104),i=n(258752),a=n(417980),s=n(526715),l=n(71
17526),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.shouldRedirect,n=void 0===t||t,c=(0,l.d)(),u=c.success,d=c.error,p=(0,o.Z)(),f=(0,i.n_)({mutationFn:function(e){return s.F.renew(e)},onSuccess:function(){p({to:(0,r.c6)()}),u((0,a.t)("pricing_plans.subscription_updated"))},onError:function(){d((0,a.t)("pricing_plans.errors.renew_error"))}}),m=f.mutate,b=f.isPending,y=(0,i.n_)({mutationFn:function(e){return s.F.update(e)},onSuccess:function(){n&&p({to:(0,r.c6)()}),u((0,a.t)("pricing_plans.subscription_updated"))},onError:function(){d((0,a.t)("pricing_plans.errors.update_subscription_error"))}}),h=y.mutate,g=y.isPending,v=(0,i.n_)({mutationFn:function(){return s.F.reactivateEmailHubSubscription()},onSuccess:function(){u((0,a.t)("pricing_plans.subscription_updated"))},onError:function(){d((0,a.t)("pricing_plans.errors.update_subscription_error"))}});return{renewSubscription:m,isRenewLoading:b,updateSubscription:h,isUpdatingSubscription:g,reactivateEmailHubSubscription:v.mutate,isReactivatingEmailHubSubscription:v.isPending}};n.d(t,{q:()=>c})},855096(e,t,n){"use strict";var r=n(933578),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,r.useEffect)(function(){if(e){var t=e.split(" ");return t.forEach(function(e){document.body.classList.add(e)}),function(){t.forEach(function(e){document.body.classList.remove(e)})}}},[e])};n.d(t,{Q:()=>o})},574653(e,t,n){"use strict";var r=n(230763),o=function(e){return!!(null==e?void 0:e.custom_app_builder_feature_flag_enabled)},i=function(){var e=(0,r.Od)(),t=e.currentCommunitySettings,n=e.currentCommunity,i=o(n),a=!!(null==n?void 0:n.branded_app_feature_flag_enabled);return{brandedAppsBuilder:{isEnabled:i,isDesignConfigEnabled:!!(null==t?void 0:t.plus_design_config_enabled),isOrphanLinkConfigEnabled:!!(null==t?void 0:t.plus_orphan_link_config_enabled),isWelcomePagesHomeTabsEnabled:!!(null==t?void 0:t.welcome_page_home_tabs_enabled),isPreviewInsideBuilderEnabled:!!(null==t?void 0:t.branded_mobile_app_builder_preview_enabled)},brandedApp:{isEnabled:a}}};n.d(t,{B:()=>o,f:()=>i})},533497(e,t,n){"use strict";var r=n(933578),o=n(467363),i=function(){var e=/Version\/(\d+(\.\d+)?)/.exec(navigator.userAgent);return e?Number(e[1]):null},a=function(){if(!o.nr)return!1;var e=i();return null!==e&&e>=18.4},s=function(){return(0,r.useMemo)(function(){return!a()},[])};n.d(t,{B:()=>s})},383711(e,t,n){"use strict";var r=n(230763),o=n(6418),i=function(){var e=(0,r.Od)(),t=e.currentCommunityMember,n=e.currentCommunitySettings,i=!!(null==n?void 0:n.voice_messages_in_posts_enabled);return(0,o.V8)(t)||(0,o.JY)(t)||i};n.d(t,{D:()=>i})},504531(e,t,n){"use strict";var r=n(230763),o=n(6418),i=function(){var e=(0,r.Od)(),t=e.currentCommunityMember,n=e.currentCommunitySettings,i=!!(null==n?void 0:n.member_media_uploads_enabled);return(0,o.V8)(t)||(0,o.JY)(t)||i};n.d(t,{b:()=>i})},907037(e,t,n){"use strict";var r=n(933578),o=n(230763),i=n(6418),a=function(){var e=(0,o.Od)(),t=e.onboardingFlags,n=e.currentCommunityMember;return{isChecklistAvailable:(0,r.useMemo)(function(){return!!n&&!!(0,i.V8)(n)&&!(null==t?void 0:t.getting_started_checklist_hidden)},[t,n])}};n.d(t,{d:()=>a})},836795(e,t,n){"use strict";n.d(t,{U:()=>h});var r=n(805134),o=n(849205),i=n(933578),a=n(970220),s=n(698804),l=n(244405),c=function(e){return(0,a.c)(o.Vz,e)<=o.$T},u=function(){try{var e=l.H.getItem(o.wr);if(!e)return null;var t=JSON.parse(e);if(!t.dismissedAt)return null;return new Date(t.dismissedAt)}catch(e){return null}},d=(0,s.vt)(function(e){return{dismissedAt:u(),dismiss:function(){var t=new Date;try{l.H.setItem(o.wr,JSON.stringify({dismissedAt:t.toISOString()}))}catch(e){console.error("LocalStorage is not accessible",e)}e({dismissedAt:t})}}}),p=function(){var e,t=d(function(e){return e.dismissedAt}),n=d(function(e){return e.dismiss}),r=null!==(e=t)&&!(!c(e)&&c(new Date));return{dismiss:(0,i.useCallback)(function(){n()},[n]),isHidden:r,shouldShow:!r}},f=n(230763),m=n(6418),b=n(355104),y=[o.aA,"/live/$roomSlug/not_supported","/live/$roomSlug/record","/live/$roomSlug/mobile","/live/$roomSlug/public","/live/$roomSlug","/two_fa","/discover"],h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.ignoreRouteRestrictions,n=(0,f.Od)().currentCommunityMember,o=(0,b.c)(),i=o.isCircleV4Eligible,a=o.isCircleV4OptInEnabled,s=o.isCircleV4PreviewEnabled,l=o.isCircleV4Enabled,c=!!(0,r.M)()(y),u=(0,m.V8)(n),d=p(),h=d.dismiss,g=d.shouldShow,v=void 0!==t&&t||!c,x=v&&i&&!a&&!s&&!l&&u&&g;
1return{dismissOptInBar:h,shouldShowOptInBar:v&&i&&a&&!s&&!l&&u,shouldShowPreviewEnabledBar:v&&s&&!l&&u,shouldShowWaitlistBar:x}}},718003(e,t,n){"use strict";var r=n(230763),o=function(e){var t=(0,r.Od)().circuitBreakers;return!!(null==t?void 0:t[e])};n.d(t,{N:()=>o})},261951(e,t,n){"use strict";var r=n(933578),o=n(51730),i=n(915779);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var s=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,r.useState)([]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return a(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],s=t[1];return{searchCommunityMembers:function(e){var t=e.query,n=e.filters,r=e.fields,a=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["query","filters","fields"]);return(0,o.oK)(i.iK.search.communityMembers.index({params:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({query_type:void 0===r?"name_and_email":r,query:void 0===t?"":t},a)}),{filters:void 0===n?{}:n}).then(function(e){s(e.records)})},communityMembers:n,resetCommunityMembers:function(){s([])}}};n.d(t,{t:()=>s})},583454(e,t,n){"use strict";var r=n(915779),o=n(558613),i=n.n(o),a=n(933578),s=n(258752),l=n(51730);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var u={ALPHABETICAL:"alphabetical",OLDEST:"oldest",LATEST:"latest",ROLE:"role"},d=function(){var e,t,n,o,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p=d.query,f=void 0===p?"":p,m=d.sort,b=void 0===m?u.ALPHABETICAL:m,y=d.order,h=d.filters,g=void 0===h?{}:h,v=d.perPage,x=void 0===v?30:v,j=d.initialPage,_=void 0===j?1:j,w=d.options,O=["community-members",f,b,y,g,x],S=c({getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},getPreviousPageParam:function(e){return e.page>1?e.page-1:void 0},keepPreviousData:!0},void 0===w?{}:w),P=(0,s.qu)(c({queryKey:O,queryFn:function(e){var t=e.pageParam,n=void 0===t?_:t,o=1;"number"==typeof n&&n>0&&(o=n);var i={page:o,sort:b,filters:g,per_page:x};return f&&(i.query=f),y&&(i.order=y),(0,l.i_)(r.iK.search.communityMembers.index({params:i}))}},S)),C=(0,a.useMemo)(function(){var e;return(null==(e=P.data)?void 0:e.pages)||[]},[null==(e=P.data)?void 0:e.pages]),k=(null==(n=C[0])||null==(t=n.meta)?void 0:t.total_count)||0,I=(null==(o=C[0])?void 0:o.count)||0,N=(0,a.useMemo)(function(){return i()(C.map(function(e){return e.records}))},[C]);return{data:P.data,isLoading:P.isInitialLoading,isFetching:P.isFetching,isFetchingNextPage:P.isFetchingNextPage,isFetchingPreviousPage:P.isFetchingPreviousPage,hasNextPage:P.hasNextPage,hasPreviousPage:P.hasPreviousPage,fetchNextPage:P.fetchNextPage,fetchPreviousPage:P.fetchPreviousPage,refetch:P.refetch,isError:P.isError,isFetched:P.isFetched,queryKey:O,totalMembers:k,totalQueryMembers:I,members:N,pages:C}};n.d(t,{ms:()=>d,pC:()=>u})},963652(e,t,n){"use strict";var r=n(915779),o=n(558613),i=n.n(o),a=n(933578),s=n(258752),l=n(51730);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var u="community-members",d={ALPHABETICAL:"alphabetical",OLDEST:"oldest",LATEST:"latest",ROLE:"role"},p=function(){return window.innerHeight>=2160?120:window.innerHeight>=1440?70:window.innerHeight>=1080?50:window.innerHeight>=925?30:15},f=function(){var e,t,n,o,f=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},m=f.sort,b=void 0===m?d.ALPHABETICAL:m,y=f.order,h=f.filters,g=void 0===h?[]:h,v=f.perPage,x=void 0===v?p():v,j=f.initialPage,_=void 0===j?1:j,w=f.options,O=f.scope,S=void 0===O?{}:O,P=f.isAdminScope,C=void 0!==P&&P,k=f.isClickHouseSearchEnabled,I=void 0!==k&&k,N=[u,b,y,g,x,I],A=c({getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},getPreviousPageParam:function(e){return e.page>1?e.page-1:void 0},keepPreviousData:!0},void 0===w?{}:w),E=(0,s.qu)(c({initialPageParam:_,queryKey:N,queryFn:function(e){var t=e.pageParam,n=void 0===t?_:t,o=1;"number"==typeof n&&n>0&&(o=n);var i=c({page:o,sort:b,filters:g,per_page:x},S);
1y&&(i.order=y);var a=I?C?r.iK.admin.search.contacts.indexV3:r.iK.search.contacts.indexV3:C?r.iK.admin.search.communityMembers.indexV2:r.iK.search.communityMembers.indexV2;return(0,l.i_)(a({params:i}))}},A)),R=(0,a.useMemo)(function(){var e;return(null==(e=E.data)?void 0:e.pages)||[]},[null==(e=E.data)?void 0:e.pages]),L=(null==(n=R[0])||null==(t=n.meta)?void 0:t.total_count)||0,D=(null==(o=R[0])?void 0:o.count)||0,T=(0,a.useMemo)(function(){return i()(R.map(function(e){return e.records}))},[R]);return{data:E.data,isLoading:E.isInitialLoading,isFetching:E.isFetching,isFetchingNextPage:E.isFetchingNextPage,isFetchingPreviousPage:E.isFetchingPreviousPage,hasNextPage:E.hasNextPage,hasPreviousPage:E.hasPreviousPage,fetchNextPage:E.fetchNextPage,fetchPreviousPage:E.fetchPreviousPage,refetch:E.refetch,isError:E.isError,isFetched:E.isFetched,queryKey:N,totalMembers:L,totalQueryMembers:D,members:T,pages:R}};n.d(t,{XL:()=>p,ms:()=>f,pC:()=>d,xE:()=>u})},978530(e,t,n){"use strict";var r=n(970220),o=n(967256),i=n(41798),a=n(710842),s=n(933578);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e){var t,n=e.endDate,c=function(e){if(Array.isArray(e))return e}(t=(0,s.useState)(""))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return l(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=c[0],d=c[1],p=function(e){var t=new Date(e),n=new Date;if(t<=n)return"0s";var s=(0,r.c)(t,n),l=(0,o.M)(t,n)%24,c=(0,i.o)(t,n)%60,u=(0,a.O)(t,n)%60;return 0===s&&0===l?"".concat(c,"m : ").concat(u,"s"):s>0?"".concat(s,"d : ").concat(l,"h : ").concat(c,"m"):"".concat(l,"h : ").concat(c,"m")};return(0,s.useEffect)(function(){if(!n)return void d("");var e=function(){d(p(n))};e();var t=setInterval(e,1e3);return function(){return clearInterval(t)}},[n]),u};n.d(t,{E:()=>c})},172327(e,t,n){"use strict";var r=n(230763),o=n(592447),i=n(258752),a=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n.enabled,s=(0,r.KU)();return(0,i.IT)((e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},o.m6.balance()),t=t={enabled:(void 0===a||a)&&s,staleTime:6e5,gcTime:6e5},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e))};n.d(t,{J:()=>a})},497489(e,t,n){"use strict";var r=n(806500),o=n(258752),i=n(51730),a=n(915779),s=function(e){var t=(0,o.IT)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({queryKey:["current-contact"],queryFn:function(){return(0,i.i_)(a.iK.currentContact.show())}},e)),n=t.data,s=(null==n?void 0:n.type)===r.q.COMMUNITY_MEMBER;return{currentContact:n,isCommunityMember:s,error:t.error,isLoading:t.isLoading,isFetching:t.is
1Fetching,refetch:t.refetch}};n.d(t,{X:()=>s})},631542(e,t,n){"use strict";var r=n(244174),o=function(){return{isMessagingModalOpen:!!document.getElementById(r.cz),isMessagingPageOverlayOpen:!!document.getElementById(r._y)}};n.d(t,{C:()=>o})},476738(e,t,n){"use strict";var r=n(356428),o=n(230763),i=function(){var e,t,n=(0,r.u)(),i=n.currentPlan,a=n.isCurrentPlanLoading,s=(0,o.Od)(),l=s.isLoading,c=s.currentCommunity,u=null==i?void 0:i.email_hub_billing,d=null==u?void 0:u.billing_status,p=null==i||null==(t=i.email_hub_billing)?void 0:t.free_period,f=null==c?void 0:c.is_on_trial,m=!f&&"free_period"===d,b=!f&&"active"===d,y=null!=(e=null==u?void 0:u.free_tier)&&e;return{emailHubBilling:u,emailHubBillingFreePeriod:p,isLoading:a||l,billingStatus:d,isTrialing:f,isInFreePeriod:m,isActive:b,isInactive:!(b||m||f)||"inactive"===d,isCancelAtPeriodEnd:"cancel_at_period_end"===d,isFreeTier:y}};n.d(t,{U:()=>i})},602620(e,t,n){"use strict";var r=n(933578),o=function(e){return(0,r.useCallback)(function(t){("Enter"===t.key||" "===t.key)&&(t.preventDefault(),e(t))},[e])};n.d(t,{u:()=>o})},208125(e,t,n){"use strict";var r=n(933578);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,r.useRef)(null);return(0,r.useEffect)(function(){var e;t.current&&(null==(e=t.current)||e.focus())},[t,t.current].concat(function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return o(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),t};n.d(t,{v:()=>i})},284873(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(258752),a="email-hub-status",s=function(e){return!!e&&"limits"in e},l=function(e){var t,n;return(0,i.IT)((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={queryKey:[a],queryFn:function(){return(0,r.i_)(o.iK.emailHubStatus.show())},staleTime:6e5},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};n.d(t,{FE:()=>l,PX:()=>a,QF:()=>s})},911754(e,t,n){"use strict";var r=n(391143),o=n(933578);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l=new r.D,c=new Map,u=function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e.startsWith("rgba("))return e;if(e.startsWith("rgb("))return e.replace("rgb(","rgba(").replace(")",", ".concat(o,")"));if(e.startsWith("hsl(")||e.startsWith("hsla(")){var i=document.createElement("canvas");i.width=1,i.height=1;var a=i.getContext("2d");if(a){a.fillStyle=e,a.fillRect(0,0,1,1);var l=s(a.getImageData(0,0,1,1).data,3),c=l[0],u=l[1],d=l[2];return"rgba(".concat(c,", ").concat(u,", ").concat(d,", ").concat(o,")")}}var p=e.replace("#","");return 3===p.length?(t=Number.parseInt(p[0]+p[0],16),n=Number.parseInt(p[1]+p[1],16),r=Number.parseInt(p[2]+p[2],16)):(t=Number.parseInt(p.slice(0,2),16),n=Number.parseInt(p.slice(2,4),16),r=Number.parseInt(p.slice(4,6),16)),"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(o,")")},d=function(e){var t=e.imageUrl,n=e.fallbackColor,r=void 0===n?"transparent":n,i=e.enabled,d=void 0===i||i,p=s((0,o.useState)(r),2),f=p[0],m=p[1],b=s((0,o.useState)(function(){return u(r)}),2),y=b[0],h=b[1],g=s((0,o.useState)(!1),2),v=g[0],x=g[1],j=s((0,o.useState)(null),2),_=j[0],w=j[1];return(0,o.useEffect)(function(){if(!t||!d){m(r),h(u(r));return}var e,n=c.get(t);if(n){m(n.hex),h(n.rgba);return}var o=!1;return(e=function(){var e,n,i,a;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(s){switch(s.label){case 0:x(!0),w(null),s.label=1;case 1:return s.trys.push([1,3,4,5]),[4,l.getColorAsync(t)];case 2:return e=s.sent(),o||(n=e.hex,i=e.rgba,c.set(t,{hex:n,rgba:i}),m(n),h(i)),[3,5];case 3:if(console.error(a=s.sent()),!o){var d;w((null!=(d=Error)&&"u">typeof Symbol&&d[Symbol.hasInstance]?!!d[Symbol.hasInstance](a):a instanceof d)?a:Error("Failed to extract color")),m(r),h(u(r))}return[3,5];case 4:return o||x(!1),[7];case 5:return[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function s(e){a(i,r,o,s,l,"next",e)}function l(e){a(i,r,o,s,l,"throw",e)}s(void 0)})})(),function(){o=!0}},[t,r,d]),{color:f,rgba:y,isLoading:v,error:_}};n.d(t,{M:()=>d})},146796(e,t,n){"use strict";var r=n(230763);function o(){var e=(0,r.Od)().currentCommunity;return!!(null==e?void 0:e.activity_score_ui_enabled)}function i(){var e=(0,r.Od)().currentCommunityMember;return!!(null==e?void 0:e.is_admin)}function a(){var e=(0,r.Od)().currentCommunity;return!!(null==e?void 0:e.community_ai_feature_flag_enabled)}function s(){var e=(0,r.Od)().currentCommunityMember,t=null==e?void 0:e.is_admin,n=!a(),i=!o();return t&&(n||i)}n.d(t,{CV:()=>s,Cn:()=>a,Yw:()=>o,mD:()=>i})},721818(e,t,n){"use strict";var r=n(355104),o=function(){return(0,r.c)().isCircleV4};n.d(t,{m:()=>o})},31221(e,t,n){"use strict";var r=n(230763),o=function(){var e=(0,r.Od)().currentCommunitySettings;return!!(null==e?void 0:e.cms_async_transcoding_enabled)};n.d(t,{F:()=>o})},555169(e,t,n){"use strict";var r=n(230763),o=n(6418),i=function(){var e=(0,r.Od)(),t=e.currentCommunity,n=e.currentCommunityMember,i=e.currentCommunitySettings;if(!n)return!1;var a=!!(null==t?void 0:t.connect_enabled),s=!!(null==i?void 0:i.connect_admin_only),l=(0,o.V8)(n);return s?l&&a:a},a=function(){var e=(0,r.Od)().currentCommunity;return!!(null==e?void 0:e.connect_recommendations_enabled)};n.d(t,{V:()=>i,m:()=>a})},68981(e,t,n){"use strict";var r=n(202090),o=n(345722),i=function(){var e=(0,o.T)(),t=(0,r.wR)().currentTheme;return e&&"default"!==t};n.d(t,{R:()=>i})},643493(e,t,n){"use strict";var r=n(230763),o=function(){var e=(0,r.Od)().currentCommunitySettings;return!!(null==e?void 0:e.email_hub_newsletter_enabled)};n.d(t,{r:()=>o})},914351(e,t,n){"use strict";var r=n(284873),o=function(){var e=(0,r.FE)().data;return!!(null==e?void 0:e.enabled)},i=function(){return(0,r.FE)().isLoading};n.d(t,{W:()=>o,X:()=>i})},667819(e,t,n){"use strict";var r=n(230763),o=function(){var e=(0,r.Od)().currentCommunitySettings;return!!(null==e?void 0:e.email_hub_variable_extension_enabled)};n.d(t,{H:()=>o})},305553(e,t,n){"use strict";var r=n(1107),o=function(){try{var e;return!!(null==(e=(0,r.s)({strict:!1}))?void 0:e.isEmbed)}catch(e){return!1}};n.d(t,{h:()=>o})},827676(e,t,n){"use strict";var r=n(355104),o=n(310860),i=function(){var e=(0,r.c)().isCircleV4,t=(0,o.z)({select:function(e){return e.state.from}});return e&&(void 0===t?"undefined":t&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)=="object"&&(null==t?void 0:t.path)==="/events"};n.d(t,{w:()=>i})},506493(e,t,n){"use strict";var r=n(501323),o=function(){var e=(0,r.S)({strict:!1});return"iframe"in e&&!!e.iframe};n.d(t,{B:()=>o})}
1,776577(e,t,n){"use strict";var r=n(230763),o=n(337162),i=n(339551),a=n(933578),s=function(){var e=(0,i.E)(),t=(0,o.t)(),n=(0,r.Od)(),s=!!e.helpers.isDataLoading(),l=!!t.isLoading,c=!!n.isLoading;return(0,a.useMemo)(function(){return s||l||c},[s,l,c])};n.d(t,{z:()=>s})},947331(e,t,n){"use strict";var r=n(914803),o=n(617500),i=n(230763),a=n(6418),s=function(){var e=(0,i.Od)().currentCommunityMember;return!!(null==e?void 0:e.messaging_enabled)},l=function(){var e=(0,o.z)().record.group_messaging_enabled,t=(0,i.Od)().currentCommunityMember||{},n=t.messaging_enabled,r=t.messaging_enabled_by_admin,a=t.messaging_enabled_by_member;return e&&void 0!==n&&n&&void 0!==r&&r&&void 0!==a&&a},c=function(){var e,t=(0,i.Od)(),n=t.currentCommunitySettings,r=t.currentCommunityMember,o=(0,a.V8)(r),s=!!(null==n||null==(e=n.messaging_settings)?void 0:e.member_to_member_messaging_enabled);return o||s},u=function(){var e,t=(0,i.Od)().currentCommunityMember,n=(0,r.D)(),o=!!(null==t||null==(e=t.policies)?void 0:e.can_access_direct_messages);return{shouldShowMessagingRoutes:!!(n||o),showMessagesTab:o}};n.d(t,{UF:()=>u,ft:()=>s,m:()=>c,tr:()=>l})},902e3(e,t,n){"use strict";var r=n(230763),o=n(355104),i=function(){var e=(0,r.Od)().currentCommunitySettings;return(0,o.c)().isCircleV4&&!!(null==e?void 0:e.cms_posts_comments_reactions_enabled)};n.d(t,{c:()=>i})},298463(e,t,n){"use strict";var r=n(230763),o=n(519104),i=n(933578),a=function(){var e=(0,r.Od)().currentCommunity,t=(0,o.Z)(),n=null==e?void 0:e.home_page_enabled;return{goToCommunityRootPath:(0,i.useCallback)(function(e){var r=e?"?post_login_redirect=".concat(e):"";n?t({to:"/home",search:{post_login_redirect:e}}):window.location.href="/".concat(r)}
1,[t,n]),goToMessagesRootPath:(0,i.useCallback)(function(){t({to:"/messages"})},[t])}};n.d(t,{J:()=>a})},410016(e,t,n){"use strict";var r=n(320759),o=n(92406),i=function(){var e=(0,o.i)().masquerade_referrer_url,t=(0,r.p0)().isBannerVisible;return!!e||t};n.d(t,{Y:()=>i})},805134(e,t,n){"use strict";var r=n(933578),o=n(819837),i=function(){var e=(0,o.T)();return(0,r.useCallback)(function(t){var n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=function(){var t=i.value,n=e(t);if(n)return{v:{path:t,params:n.params,get isExact(){return n.isExact}}}}();if("object"==(s&&"u">typeof Symbol&&s.constructor===Symbol?"symbol":typeof s))return s.v}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return null},[e])};n.d(t,{M:()=>i})},819837(e,t,n){"use strict";var r=n(16876),o=n(933578),i=function(){var e=(0,r._f)();return(0,o.useCallback)(function(t){var n=e({to:t,fuzzy:!0});return n?{get isExact(){return!!e({to:t,fuzzy:!1})},params:n}:null},[e])};n.d(t,{T:()=>i})},118442(e,t,n){"use strict";var r=n(544819),o=n(933578);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a=function(e){var t,n,a=e.enabled,s=e.signedId,l=e.mediaTranscoding,c=e.onSuccess,u=e.onError,d=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(null!=(n=null==l?void 0:l.status)?n:"pending"))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return i(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=d[0],f=d[1];return(0,r.h)({canCreateConnection:(void 0===a||a)&&!!s,channel:"MediaTranscodingChannel",blob_signed_id:s,onMessageReceive:function(e){"transcodingStatusUpdated"===e.event&&(f(e.json_message.status),"succeeded"===e.json_message.status?null==c||c({hlsUrl:e.json_message.hls_url,previewThumbnailsUrl:e.json_message.preview_thumbnails_url}):"failed"===e.json_message.status&&(null==u||u()))}}),{status:p}};n.d(t,{c:()=>a})},956585(e,t,n){"use strict";var r=n(230763),o=n(605274),i=function(){var e=(0,r.Od)().currentCommunitySettings,t=(0,o.V0)(),n=(0,o.t2)();return{isMobileWebNewSpaceCustomizationUIEnabled:!!(null==e?void 0:e.mobile_web_new_space_customization_ui_enabled)&&!t&&!n}};n.d(t,{Z:()=>i})},427056(e,t,n){"use strict";n.d(t,{U:()=>l});var r=n(258752),o=n(51730),i=n(915779),a=function(e){return(0,o.kS)(i.iK.communities.onboardingFlags.update({flag:e}),{flag:e})},s=n(230763),l=function(e){var t=e.onEnableFlagSuccess,n=(0,s.Od)(),o=n.onboardingFlags,i=n.refetch,l=n.isLoading,c=(0,r.n_)({mutationFn:a,onSuccess:function(){null==t||t(),i()}});return{onboardingFlags:o,enableFlag:c.mutate,isUpdating:c.isPending,areFlagsLoading:l}}},172676(e,t,n){"use strict";var r=n(915779),o=n(196e3),i=n(933578);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||d(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}}var p=function(){var e=c((0,i.useState)([]),2),t=e[0],n=e[1],a=c((0,i.useState)(0),2),d=a[0],p=a[1],f=(0,i.useCallback)(function(e){n(e.map(function(){return{progress:0,status:"idle"}})),e.forEach(function(e,t){new o.do(e,(0,r.Ec)(),{directUploadWillStoreFileWithXHR:function(e){e.upload.addEventListener("loadstart",function(){n(function(e){var n=u(e);return n[t]=l(s({},n[t]),{status:"uploading"}),n})}),e.upload.addEventListener("progress",function(e){n(function(n){var r=u(n);return r[t]=l(s({},r[t]),{progress:e.loaded/e.total*100}),r})})}}).create(function(e,o){if(e)throw n(function(e){var n=u(e);return n[t]=l(s({},n[t]),{status:"error"}),n}),Error("Direct upload failed: ".concat(null==e?void 0:e.message));n(function(e){var n=u(e);return n[t]=l(s({},n[t]),{status:"completed",progress:100,response:s({blob_url:(0,r.cD)({signed_id:o.signed_id,filename:encodeURIComponent(o.filename)})},o)}),n})})})},[]);(0,i.useEffect)(function(){var e=t.reduce(function(e,t){return e+t.progress},0);p(t.length?e/t.length:0)},[t]);var m=(0,i.useCallback)(function(){n([]),p(0)},[]);return{status:t.some(function(e){return"error"===e.status})?"error":t.every(function(e){return"idle"===e.status})?"idle":t.every(function(e){return"completed"===e.status})?"completed":"uploading",fileStates:t,overallProgress:d,reset:m,uploadFiles:f}};n.d(t,{C:()=>p})},335158(e,t,n){"use strict";var r=n(933578),o=n(526448);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function a(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.perPage,n=e.options,s=(0,o.cA)({perPage:t,options:n}),l=(0,r.useMemo)(function(){return s.requests.map(function(e){return a(i({},e.initiator),{connection_to_current_community_member:e,type:"CommunityMember",roles:{admin:!!e.initiator.admin,moderator:!1},email:""})})},[s.requests]);return a(i({},s),{audience:l,totalQueryAudience:s.totalCount,totalAudience:s.totalCount})};n.d(t,{G:()=>s})},961756(e,t,n){"use strict";var r=n(258752),o=n(915779),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.IT)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({queryKey:[o.iK.planFeatureFlags.show()]},e))};n.d(t,{m:()=>i})},983561(e,t,n){"use strict";var r=n(310860),o=n(915779),i=n(605274),a=function(){var e=(0,r.z)().pathname,t=(0,i.nZ)(),n=(0,i.Ub)("(max-width: 1200px)");return{isPlansPageLayout:[o.ty.plans.general,o.ty.plans.billing,o.ty.plans.invoices,o.ty.plans.payment_details].some(function(t){return e===t}),isMobileLayout:!t,isDesktopLayout:t,isCompactLayout:t&&n}};n.d(t,{x:()=>a})},640668(e,t,n){"use strict";n.d(t,{B:()=>u});var r=n(230763),o=n(356428),i=function(){var e,t=(0,o.u)().currentPlan;return!!(null==t||null==(e=t.api_billing)?void 0:e.is_admin_api_subscription_active)},a=function(){var e,t=(0,o.u)().currentPlan;return!!(null==t||null==(e=t.api_billing)?void 0:e.is_headless_api_subscription_active)},s=n(765724),l=n(689492),c=n(914351),u=function(){var e,t,n,o,u,d,p=(0,r.Od)().currentCommunity,f=null!=p?p:{},m=f.is_on_trial,b=f.default_currency,y=f.is_expired_trial,h=void 0!==y&&y,g=f.can_choose_currency,v=f.current_plan_tier,x=f.current_plan_interval,j=f.has_addons,_=void 0!==j&&j,w=f.has_active_offer,O=f.current_plan,S=f.subscription,P=null!=S?S:{},C=P.current_period_end,k=P.current_period_start,I=(0,c.W)(),N=i(),A=a(),E=!!m,R=(0,l.KL)(v),L=(0,l.PF)(v),D=L&&!(null==O?void 0:O.public),T=(0,l.rT)(v),M=(0,l.sj)(v),F=(0,l.Qf)(v),K=(0,s.a$)(p),B="incomplete_expired"===(null==p||null==(e=p.subscription)?void 0:e.status),q="incomplete"===(null==p||null==(t=p.subscription)?void 0:t.status),U=!!((null==p||null==(n=p.subscription)?void 0:n.is_cancelled)&&!(null==p||null==(o=p.subscription)?void 0:o.on_grace_peri
1od)),z=!!(null==p||null==(u=p.subscription)?void 0:u.on_grace_period),W=!!(null==p||null==(d=p.subscription)?void 0:d.has_incomplete_payment),$=!!(!E&&!h&&(null==p?void 0:p.subscription)&&!B&&!U);return{isCommunityOnTrial:E,isCommunityOnEnterprise:L,isLegacyEnterprisePlan:D,isCommunityOnProfessional:T,isCommunityOnBasic:M,isCommunityOnPlus:R,isCommunityOnBusiness:F,isCommunityOnPaidPlan:$,currentPlanTier:v,currentPlanInterval:x,currentPeriodEnd:C,currentPeriodStart:k,hasActiveOffer:void 0!==w&&w,defaultCurrency:void 0===b?null:b,canChooseCurrency:void 0!==g&&g,isExpiredTrial:h,shouldShowProration:function(e){return!I&&!N&&!A&&!!e&&!E&&!h&&(!!(x!=e.interval||(0,l.cA)(x)&&(0,l.cA)(e.interval))||_)},isCommunitySubscriptionIncompleteExpired:B,isCommunitySubscriptionIncomplete:q,isCommunitySubscriptionFullyCancelled:U,isCommunitySubscriptionOnGracePeriod:z,hasCommunityIncompletePayment:W,isPromoCodeEnabledForCommunity:K,changePlanModalParams:function(e){var t=v&&(0,l.Cg)(v,e);return E?(null==O?void 0:O.public)?t?{planTier:e}:{planTier:v}:t?{planTier:e}:{planId:null==O?void 0:O.id}:{planTier:e}},currentPlan:O}}},674453(e,t,n){"use strict";var r=n(310860),o=n(519104),i=n(933578),a=n(998597);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var l=function(){return(0,r.z)({select:function(e){return!!e.maskedLocation}})},c=function(){return(0,r.z)({select:function(e){if(e.maskedLocation)return e.pathname}})},u=function(){var e=(0,o.Z)(),t=l(),n=(0,a.HH)(),c=n.spaceSlug,u=n.postSlug,d=(0,r.z)({select:function(e){var t,n,r;return null!=(t=null!=(n=null==(r=e.maskedLocation)?void 0:r.hash)?n:e.hash)?t:""}});return(0,i.useCallback)(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.hash,i=null!=o?o:d;t&&c&&u?e({to:".",unsafeRelative:"path",replace:!0,search:!0,state:function(e){return s({},e,n)},mask:{to:"/c/$spaceSlug/$postSlug",params:{spaceSlug:c,postSlug:u},hash:i,unmaskOnReload:!0}}):e({to:".",replace:!0,search:!0,hash:i,state:function(e){return s({},e,n)}})},[e,t,c,u,d])},d=function(){var e=(0,o.Z)(),t=l();return(0,i.useCallback)(function(){t&&e({to:".",unsafeRelative:"path",search:!0,replace:!0})},[e,t])},p=function(){var e=(0,o.Z)(),t=(0,r.z)({select:function(e){var t,n,r;return null!=(t=null!=(n=null==(r=e.maskedLocation)?void 0:r.hash)?n:e.hash)?t:""}});return(0,i.useCallback)(function(n){e({to:"/c/$spaceSlug/$postSlug",params:{spaceSlug:n.space_slug,postSlug:n.slug},hash:t,state:{isRedirectFromPostModal:!0}})},[e,t])};n.d(t,{Z9:()=>d,g7:()=>p,is:()=>u,pL:()=>c,te:()=>l})},998597(e,t,n){"use strict";var r=n(322249),o=n(310860),i=n(173630),a=n(933578),s=(0,a.createContext)({isPostModalOverlay:!1});s.displayName="PostModalOverlayContext";var l=s.Provider,c=function(){return(0,a.useContext)(s).isPostModalOverlay},u=function(){var e,t,n=c(),i=(0,r.g)({from:"/_protected/_dynamicLayout/c/$spaceSlug/$postSlug",shouldThrow:!1}),a=(0,o.z)({select:function(e){var t;return null==(t=e.state)?void 0:t.postModal}});return n&&a?a:{postSlug:null!=(e=null==i?void 0:i.postSlug)?e:null==a?void 0:a.postSlug,spaceSlug:null!=(t=null==i?void 0:i.spaceSlug)?t:null==a?void 0:a.spaceSlug}},d=function(e){var t=(0,i.r)();return(0,a.useMemo)(function(){if(e){var n=t.matchRoutes(e.split("#")[0].split("?")[0]).find(function(e){return"/c/$spaceSlug/$postSlug"===e.fullPath}),r=null==n?void 0:n.params,o=null!=r?r:{},i=o.spaceSlug,a=o.postSlug;if("string"==typeof i&&"string"==typeof a)return{spaceSlug:i,postSlug:a}}},[e,t])};n.d(t,{HH:()=>u,NG:()=>d,nN:()=>l,zf:()=>c})},810327(e,t,n){"use strict";var r=n(310860),o=function(){var e=(0,r.z)({select:function(e){return{path:e.pathname,query:e.searchStr}}});return{from:{path:e.path,query:e.query}}};n.d(t,{B:()=>o})},162082(e,t,n){"use strict";var r=n(230763),o=n(583598),i=n(274685),a=n(7072);function s(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var u="billing-is-refreshing",d="community-upcoming-invoice-by-product",p="community-billing-details",f="community-current-plan",m=function(e){return(null==e?void 0:e.email_hub_billing)?c(l({},e),{email_hub_billing:c(l({},e.email_hub_billing),{cancel_at_period_end:!1,billing_status:"active"})}):e},b=function(e){e.setQueryData(o.xe.root(),function(e){var t;return(null==e||null==(t=e.current_community)?void 0:t.subscription)?c(l({},e),{current_community:c(l({},e.current_community),{subscription:c(l({},e.current_community.subscription),{is_cancelled:!1,on_grace_period:!1,ends_at:null})})}):e})},y=function(e){e.setQueryData([p],m),e.setQueryData([f],m)},h=function(e){var t=0,n=function(){var r;return(r=function(){var r,o,i;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(a){switch(a.label){case 0:return t+=1,[4,Promise.all([e.refetchQueries({queryKey:[d]}),e.refetchQueries({queryKey:[p]}),e.refetchQueries({queryKey:[f]})])];case 1:if(a.sent(),o=(r={invoiceData:e.getQueryData([d]),planData:e.getQueryData([p])}).invoiceData,i=r.planData,(null==o?void 0:o.headline)&&(null==i?void 0:i.cancelling_metadata)===null||t>=8)return e.setQueryData([u],!1),[2];return setTimeout(function(){n()},2e3),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){s(i,n,o,a,l,"next",e)}function l(e){s(i,n,o,a,l,"throw",e)}a(void 0)})})()};n()},g=function(){var e,t=(0,r.Od)().currentCommunity,n=(0,a.q)({shouldRedirect:!1}),o=n.updateSubscription,s=n.isUpdatingSubscription,l=(0,i.jE)(),c=null==t||null==(e=t.current_plan)?void 0:e.id;return{resumePlan:function(){c&&o(c,{onSuccess:function(){l.setQueryData([u],!0),b(l),y(l),h(l)}})},isLoading:s}};n.d(t,{B:()=>u,i:()=>g})},339792(e,t,n){"use strict";n.d(t,{x:()=>l});var r=n(258752),o=n(417980),i=n(51730),a=n(915779),s=n(717526),l=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).onScheduleDowngradeSuccess,t=(0,s.d)(),n=t.success,l=t.error,c=(0,r.n_)({mutationFn:function(e){var t;return t=e,(0,i.oK)(a.iK.scheduleDowngrades.create(t),{})},onSuccess:function(){null==e||e(),n((0,o.t)("pricing_plans.subscription_updated"))},onError:function(){l((0,o.t)("pricing_plans.errors.schedule_downgrade_error"))}}),u=c.mutate,d=c.isPending,p=(0,r.n_)({mutationFn:function(){return(0,i.oK)(a.iK.scheduleDowngrades.cancel(),{})},onSuccess:function(){n((0,o.t)("pricing_plans.downgrade_schedule_cancelation.success"))},onError:function(){l((0,o.t)("pricing_plans.downgrade_schedule_cancelation.error"))}});return{scheduleDowngrade:u,isSchedulingDowngrade:d,cancelScheduledDowngrade:p.mutate,isCancelingDowngrade:p.isPending}}},474811(e,t,n){"use strict";var r=n(230763),o=n(356428),i=n(6418),a=n(689492),s=n(640668),l=function(){var e,t,n,l,c=(0,o.u)().currentPlan,u=(0,s.B)(),d=u.isCommunityOnTrial,p=u.isCommunityOnPaidPlan,f=u.isCommunitySubscriptionOnGracePeriod,m=(0,r.Od)(),b=m.currentCommunityMember,y=m.currentCommunity,h=(null==c||null==(e=c.plan_trial)?void 0:e.active)||!1,g=(null==c||null==(t=c.plan_trial)?void 0:t.opted_out)||!1,v=(null==c||null==(n=c.plan_trial)?void 0:n.converted)||!1,x=(0,i.V8)(b),j=(null==y||null==(l=y.subscription)?void 0:l.status)==="active";
1return x&&!d&&!h&&!g&&!v&&!f&&p&&j&&c&&(0,a.rT)(c.tier)};n.d(t,{f:()=>l})},595260(e,t,n){"use strict";var r=n(933578),o=n(51730),i=n(915779);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l=function(){var e=s((0,r.useState)(!1),2),t=e[0],n=e[1],a=s((0,r.useState)(null),2),l=a[0],c=a[1],u=s((0,r.useState)(!1),2),d=u[0],p=u[1];return{isJoined:t,joinSpace:function(e){return fetch((0,i.uR)(),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},credentials:"same-origin",body:JSON.stringify({space_id:e})}).then(function(e){return e.json()}).then(function(){n(!0)}).catch(function(e){console.error(e)})},space:l,fetchSpace:function(e){return(0,o.Ez)((0,i.Uw)(String(e))).then(function(e){return null==e?void 0:e.json()}).then(function(e){c(e)})},updateSpace:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};p(!0);var a=(null!=(n=FormData)&&"u">typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)?e:JSON.stringify({space:e}),s=t||(null==l?void 0:l.id);if(!s)throw Error("Space ID is required");return(0,o.Ez)((0,i.p3)(String(s)),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({method:"PATCH",body:a},r)).then(function(e){return null==e?void 0:e.json()}).then(function(e){return c(e),e}).finally(function(){p(!1)})},createSpace:function(e){var t=JSON.stringify({space:e});return(0,o.Ez)(i.iK.spaces.create(),{method:"POST",body:t,forReactQuery:!0})},maxSpaceLimit:function(e){return(0,o.Ez)(i.iK.spaces.maxSpaceLimit(e),{method:"GET",forReactQuery:!0})},isSubmitting:d,reSetWelcomeBannerPreference:function(e){return(0,o.kS)(i.iK.spaces.resetSpaceWelcomeBannerPreferencePath(e))}}};n.d(t,{G:()=>l})},684859(e,t,n){"use strict";var r=n(322249),o=function(){return(0,r.g)({strict:!1})};n.d(t,{V:()=>o})},806124(e,t,n){"use strict";var r=n(230763),o=n(424668),i=n(339551),a=n(51730),s=n(915779),l=n(933578),c=n(258752),u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,o.cj)(),n=!!(0,r.Od)().currentCommunityMember,i=(0,c.IT)({queryKey:["space-sidebar-notifications",e],queryFn:function(){return(0,a.i_)(s.iK.sidebarNotifications.index({space_ids:e}))},enabled:!1,onSuccess:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];1===e.length?t({type:"UPDATE_SPACE_NOTIFICATIONS",payload:{space:e[0]}}):t({type:"SET_SPACE_NOTIFICATIONS",payload:{spaces:e||[]}})},onError:function(e){console.error("Something went wrong",e)}}),u=i.isInitialLoading,d=i.refetch;return{refetchSpaceNotifications:(0,l.useCallback)(function(){return n?d():Promise.resolve()},[n,d]),isLoading:u}},d=function(e){var t=(0,i.E)(),n=u([e]).refetchSpaceNotifications;return{resetUnreadCount:(0,c.n_)({mutationFn:function(){return(0,a.oK)(s.iK.spaces.resetUnreadCount({spaceId:e}),{forReactQuery:!0})},onSuccess:function(e){t.actions.updateSpace(e),n()},onError:function(e){console.error("Error while resetting the unread count",e)}}).mutateAsync}};n.d(t,{p:()=>d,s:()=>u})},488872(e,t,n){"use strict";var r=n(322249),o=function(){var e=(0,r.g)({from:"/_protected/_dynamicLayout/c/$spaceSlug",shouldThrow:!1});return null==e?void 0:e.spaceSlug};n.d(t,{E:()=>o})},382544(e,t,n){"use strict";var r=n(258954),o=n(258752);function i(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.n_)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({mutationFn:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){return[2,r.W.update(e)]})},function(){var e=this,n=arguments;
1return new Promise(function(r,o){var a=t.apply(e,n);function s(e){i(a,r,o,s,l,"next",e)}function l(e){i(a,r,o,s,l,"throw",e)}s(void 0)})})()}},e))};n.d(t,{a:()=>a})},498024(e,t,n){"use strict";var r=n(933578),o=n(15819);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var s=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4,s=function(e){if(Array.isArray(e))return e}(t=(0,r.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return i(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=s[0],c=s[1];return(0,r.useEffect)(function(){var t;(t=function(){var t;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:return[4,(0,o.Y)(e,{timeout:n})];case 1:var i,a;return i=t=r.sent(),(null!=(a=HTMLElement)&&"u">typeof Symbol&&a[Symbol.hasInstance]?!!a[Symbol.hasInstance](i):i instanceof a)&&c(t),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function s(e){a(i,r,o,s,l,"next",e)}function l(e){a(i,r,o,s,l,"throw",e)}s(void 0)})})()},[e,n]),l};n.d(t,{q:()=>s})},544819(e,t,n){"use strict";var r=n(933578),o=n(705705);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e){if(Array.isArray(e))return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){s(e,t,n[t])})}return e}function u(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function d(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}var p=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=a(t=[e,n])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||d(t)||l(),p=i[0],f=i.slice(1),m=p.channel,b=p.onMessageReceive,y=p.canCreateConnection,h=void 0===y||y,g=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(p,["channel","onMessageReceive","canCreateConnection"]),v=(a(f)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(f)||d(f,1)||l())[0],x=(0,r.useRef)(b),j=(0,r.useRef)({}),_=JSON.stringify(g),w=JSON.stringify(void 0===v?[]:v),O=(0,r.useRef)(g);O.current=g,x.current=b;var S=(0,r.useCallback)(function(e){return x.current(e)},[]);return(0,r.useEffect)(function(){if(h){var e=O.current,t=(0,o.h)(c({channel:m},e),S);return t&&(j.current=u(c({},j.current),s({},m,t))),function(){(0,o.a)(c({channel:m},e),S),j.current=u(c({},j.current),s({},m,null))}}},[m,h,_,w,S]),j.current[m]};n.d(t,{h:()=>p})},189363(e,t,n){"use strict";var r=n(230763),o=function(){var e=(0,r.Od)().currentCommunity,t=!!(null==e?void 0:e.white_label);return{whiteLabel:t,shouldShowBranding:!t}};n.d(t,{H:()=>o})},813455(e,t,n){"use strict";var r=n(697652),o=n(933578);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a=function(e){var t,n=e.defaultCommunityView,a=e.views,s=e.activeStorageKey,l=(0,r.M)(void 0===s?"members-directory-view-v2":s),c=l.getValue,u=l.setValue,d=(0,o.useRef)(n),p=(0,o.useCallback)(function(){var e=c(),t=d.current;if(!e)return null!=t?t:a.LIST;var n=e.defaultCommunityView,r=e.defaultUserView;return n===t?r:null!=t?t:a.LIST},[c]),f=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(p))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return i(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=f[0],b=f[1];return(0,o.useEffect)(function(){u({defaultCommunityView:d.current,defaultUserView:m})},[m,u]),(0,o.useEffect)(function(){d.current=n,b(p())},[n,p]),[m,b]};n.d(t,{D:()=>a})},14930(e,t,n){"use strict";var r=n(933578);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var i=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=function(e){if(Array.isArray(e))return e}(e=(0,r.useState)(t))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return o(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],a=n[1];return[i,(0,r.useCallback)(function(){return a(function(e){return!e})},[a]),a]};n.d(t,{C:()=>i})},554013(e,t,n){"use strict";var r=n(933578);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var i=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,r.useState)(void 0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return o(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],i=t[1];return{ref:(0,r.useCallback)(function(e){e&&i(e.clientHeight)},[]),height:n}};n.d(t,{v:()=>i})},199062(e,t,n){"use strict";var r=n(771425),o=function(){var e=(0,r.j$)(),t=e.document,n=e.window;return{frameDocument:t||document,frameWindow:null!=n?n:window,isInFrame:t&&t!==document}};n.d(t,{S:()=>o})},728884(e,t,n){"use strict";var r=n(933578),o=n(684716),i=n(199062),a=function(e,t,n,a){var s=(0,i.S)(),l=s.frameDocument,c=s.isInFrame,u=(0,r.useMemo)(function(){if(c){var e,t;return e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},n),t=t={document:l},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}return n},[n,l,c]);return(0,o.vC)(e,t,u,a)};n.d(t,{I:()=>a})},795317(e,t,n){"use strict";var r=n(933578);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var i=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=(0,r.useRef)(null),i=function(e){if(Array.isArray(e))return e}(e=(0,r.useState)(!0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return o(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1];return(0,r.useEffect)(function(){var e=new IntersectionObserver(function(e){s(null==e?void 0:e[0].isIntersecting)});return n.current&&e.observe(n.current),function(){e.disconnect()}},t),[n,a]};n.d(t,{Z:()=>i})},168293(e,t,n){"use strict";var r=n(451430),o=n(933578),i=n(361971),a=n(244405),s=n(697652),l=function(e){var t=e.cacheKey,n=e.fields,a=e.enabled,l=void 0===a||a,c=(0,i.FH)(),u=(0,r.pick)(c,void 0===n?[]:n),d=(0,s.M)(t).setValue;(0,o.useEffect)(function(){l&&t&&d(u)},[u,t,l,d])},c=function(e){var t=e.cacheKey;if(!t)throw Error("CacheKey is required");var n=(0,s.M)(t);return{getPersistedFormFieldValues:n.getValue,resetValues:n.resetValue}},u=function(e){try{a.H.removeItem(e)}catch(e){console.error("LocalStorage is not accessible",e)}};n.d(t,{Bp:()=>l,XF:()=>u,bE:()=>c})},607370(e,t,n){"use strict";var r=n(933578),o=function(e){var t=(0,r.useRef)(null);return(0,r.useLayoutEffect)(function(){var n=t.current;e&&n&&n.scrollIntoView({behavior:"smooth",block:"center"})},[e]),t};n.d(t,{q:()=>o})},730550(e,t,n){"use strict";var r=n(933578),o=function(e,t){var n=(0,r.useRef)(null);return(0,r.useLayoutEffect)(function(){var r=n.current;if(t&&r&&e){var o=e.getBoundingClientRect(),i=r.getBoundingClientRect(),a=e.scrollTop+i.top-o.top-(e.clientHeight-r.clientHeight)/2;e.scrollTo({behavior:"smooth",top:Math.max(0,a)})}},[e,t]),n};n.d(t,{O:()=>o})},614729(e,t,n){"use strict";var r=n(933578);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var i=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,r.useState)(!0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return o(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],a=n[1];return(0,r.useEffect)(function(){a(!0);var t=function(){return a(!1)};return null==e||e.addEventListener("wheel",t,{passive:!0}),null==e||e.addEventListener("touchmove",t,{passive:!0}),function(){null==e||e.removeEventListener("wheel",t),null==e||e.removeEventListener("touchmove",t)}},[e]),i};n.d(t,{Z:()=>i})},750127(e,t,n){"use strict";var r=n(942852),o=n(933578),i=n(361971),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.enabled,n=void 0===t||t,a=e.targetRef,s=(0,i.xW)();(0,o.useEffect)(function(){if(n){var e=a?a.current:document;if(e){var t=function(e){var t;(null!=(t=KeyboardEvent)&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t)&&"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(0,r.N)(s)&&s.triggerFormSubmit()};return e.addEventListener("keydown",t),function(){e.removeEventListener("keydown",t)}}}},[n,s,a])};n.d(t,{B:()=>a})},988484(e,t,n){"use strict";var r=n(933578),o=function(e){(0,r.useEffect)(function(){var t=function(t){e(t)};return window.addEventListener("resize",t),e(),function(){window.removeEventListener("resize",t)}},[e])};n.d(t,{G:()=>o})},18477(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(792515),l=n(934415),c=(0,i.y)("ai-agent"),u=function(e){return"boolean"!=typeof e?"any":e?"true":"false"},d=function(e){var t=e.allowDirectMessages,n=e.enabledStatus,r=e.name;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({name:void 0===r?"":r},"boolean"==typeof n&&{enabled:n},"boolean"==typeof t&&{allow_direct_messages:t})},p={list:function(e){var t=e.page,n=e.perPage;return(0,s.j)({queryKey:c.key("list",t,n),queryFn:function(){return(0,r.i_)(o.iK.communityBot.agents.index({params:{page:t,per_page:n}}))}})},detail:function(e){return(0,s.j)({queryKey:c.key("detail",e),queryFn:function(){return(0,r.i_)(o.iK.communityBot.agents.show({id:e}))}})},search:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.allowDirectMessages,n=void 0===t?null:t,i=e.enabledStatus,a=void 0===i?null:i,l=e.name,p=void 0===l?"":l;return(0,s.j)({queryKey:c.key("search",p,u(a),u(n)),queryFn:function(){return(0,r.i_)(o.iK.communityBot.agents.search({params:d({allowDirectMessages:n,enabledStatus:a,name:p})}))}})},spotlightSearch:function(){return(0,s.j)({queryKey:c.key("spotlight-search"),queryFn:function(){return(0,r.i_)(o.iK.communityBot.agents.indexForSearch())}})},comments:function(e){var t=e.profileId,n=e.perPage;return(0,l.L)({initialPageParam:1,queryKey:c.key("comments",t,n),queryFn:function(e){var i=e.pageParam;return(0,r.i_)(o.iK.communityBot.agents.comments({id:t,params:{page:void 0===i?1:i,per_page:n}}))}})}},f={all:function(){return a.qQ.invalidateQueries({queryKey:c.root()})},detail:function(e){return a.qQ.invalidateQueries({queryKey:c.key("detail",e)})}};n.d(t,{WQ:()=>p,ZU:()=>f,pN:()=>c})},994260(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(934415),l=(0,i.y)("bookmark"),c={list:function(e){return(0,s.L)({initialPageParam:1,queryKey:l.key("list",null!=e?e:"all"),queryFn:function(t){var n=t.pageParam;return(0,r.i_)(o.iK.bookmarks.index({params:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({page:void 0===n?1:n},e&&{bookmark_type:e})}))}})}},u={all:function(){return a.qQ.invalidateQueries({queryKey:l.root()})},list:function(e){return a.qQ.invalidateQueries({queryKey:c.list(e).queryKey})}};n.d(t,{XM:()=>c,cS:()=>u})},552189(e,t,n){"use strict";var r=n(864861),o=n(649942),i=n(75132),a=n(934415),s=n(792515);function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var c=(0,o.y)("circle-ai-project"),u={list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.query,n=void 0===t?"":t,o=e.perPage,i=void 0===o?20:o,s=e.initialPage,u=void 0===s?1:s;return(0,a.L)({initialPageParam:u,queryKey:c.key("list",n,i,u),queryFn:function(e){var t=e.pageParam,o=void 0===t?u:t;return r.v.list({params:l({page:o>0?o:1,per_page:i},n&&{query:n})})},getNextPageParam:function(e){return e.pagination.page*e.pagination.per_page<e.pagination.total_count?e.pagination.page+1:void 0}})},archivedList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.query,n=void 0===t?"":t,o=e.perPage,i=void 0===o?20:o,s=e.initialPage,u=void 0===s?1:s;return(0,a.L)({initialPageParam:u,queryKey:c.key("archivedList",n,i,u),queryFn:function(e){var t=e.pageParam,o=void 0===t?u:t;return r.v.archivedList({params:l({page:o>0?o:1,per_page:i},n&&{query:n})})},getNextPageParam:function(e){return e.pagination.page*e.pagination.per_page<e.pagination.total_count?e.pagination.page+1:void 0}})},detail:function(e){return(0,s.j)({queryKey:c.key("detail",e),queryFn:function(){return r.v.show({uuid:e})}})},files:function(e){return(0,s.j)({queryKey:c.key("files",e),queryFn:function(){return r.v.filesList({uuid:e,params:{per_page:100}})}})}},d={all:function(){return i.qQ.invalidateQueries({queryKey:c.root()})},files:function(e){return i.qQ.invalidateQueries({queryKey:c.key("files",e)})}};n.d(t,{HN:()=>d,S_:()=>u,n4:()=>c})},466330(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(934415),l=(0,i.y)("comment-like"),c={list:function(e,t){return(0,s.L)({initialPageParam:1,queryKey:l.key("list",e,null!=t?t:"all"),queryFn:function(n){var i=n.pageParam;return(0,r.i_)(o.iK.comments.userLikes({id:e,params:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({page:void 0===i?1:i,per_page:15},t&&{reaction_type:t})}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0}})}},u={list:function(e){return a.qQ.invalidateQueries({queryKey:l.key("list",e)})}};n.d(t,{R:()=>c,e:()=>u})},824847(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(934415),l=n(792515);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function d(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var p=(0,i.y)("comment"),f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return p.key("list",e,null!=t?t:"")},m={list:function(e){var t=e.postId,n=e.parentCommentId,i=void 0===n?null:n;return(0,s.L)({initialPageParam:1,queryKey:f(t,i),queryFn:function(e){var n=e.pageParam;return(0,r.i_)(o.iK.comments.index({postId:t,params:u({per_page:15,page:void 0===n?1:n},i?{parent_comment_id:i}:{})}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},gcTime:0,staleTime:1/0})},hierarchy:function(e){var t=e.postId,n=e.id;return(0,l.j)({queryKey:p.key("hierarchy",t,n),queryFn:function(){return(0,r.i_)(o.iK.comments.commentHierarchy({postId:t,id:n}))},retry:function(e,t){return 404!==t.status&&e<3},gcTime:0,staleTime:1/0})}},b={forPost:function(e){var t=e.postId;a.qQ.removeQueries({queryKey:p.key("list",t)}),a.qQ.removeQueries({queryKey:p.key("hierarchy",t)})}},y={all:function(){return a.qQ.invalidateQueries({queryKey:p.root()})}},h=function(e,t,n){var r;return e.id===t?n(e):(null==(r=e.replies)?void 0:r.some(function(e){return e.id===t}))?d(u({},e),{replies:e.replies.map(function(e){return e.id===t?n(e):e})}):e},g=function(e,t){var n;return(null==(n=e.replies)?void 0:n.some(function(e){return e.id===t}))?d(u({},e),{replies:e.replies.filter(function(e){return e.id!==t})}):e},v={update:function(e){var t=e.postId,n=e.id,r=e.updater;a.qQ.setQueriesData({queryKey:p.key("list",t)},function(e){return e&&d(u({},e),{pages:e.pages.map(function(e){return d(u({},e),{records:e.records.map(function(e){return h(e,n,r)})})})})}),a.qQ.setQueriesData({queryKey:p.key("hierarchy",t)},function(e){return e?h(e,n,r):e})},add:function(e){var t=e.postId,n=e.parentCommentId,r=void 0===n?null:n,o=e.comment;a.qQ.setQueryData(f(t,r),function(e){if(!e||0===e.pages.length)return{pages:[{records:[o],page:1,has_next_page:!1,count:1,page_count:1,per_page:15}],pageParams:[void 0]};var t=e.pages.length-1;return d(u({},e),{pages:e.pages.map(function(e,n){var r;return n===t?d(u({},e),{records:((function(e){if(Array.isArray(e))return c(e)})(r=e.records)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e){if(e){if("string"==typeof e)return c(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,void 0)}}(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([o])}):e})})}),null!==r&&v.update({postId:t,id:r,updater:function(e){return d(u({},e),{replies_count:e.replies_count+1})}})},remove:function(e){var t=e.postId,n=e.id,r=e.parentCommentId,o=void 0===r?null:r;a.qQ.setQueriesData({queryKey:p.key("list",t)},function(e){return e&&d(u({},e),{pages:e.pages.map(function(e){return d(u({},e),{records:e.records.filter(function(e){return e.id!==n}).map(function(e){return g(e,n)})})})})}),a.qQ.setQueriesData({queryKey:p.key("hierarchy",t)},function(e){return e?e.id===n?null:g(e,n):e}),null!==o&&v.update({postId:t,id:o,updater:function(e){return d(u({},e),{replies_count:e.replies_count-1})}})},setBookmark:function(e){var t=e.postId,n=e.id,r=e.bookmarkId;v.update({postId:t,id:n,updater:function(e){return d(u({},e),{bookmark_id:r})}})},moderationApprove:function(e){var t=e.postId,n=e.id;v.update({postId:t,id:n,updater:function(e){return d(u({},e),{flagged_for_approval_at:null,unresolved_flagged_reports_count:0})}})},moderationReject:function(e){var t=e.postId,n=e.id,r=e.parentCommentId;v.remove({postId:t,id:n,parentCommentId:void 0===r?null:r})}};n.d(t,{Kd:()=>m,NP:()=>b,S0:()=>v,fe:()=>y})},117211(e,t,n){"use strict";var r=n(649942),o=n(583598),i=n(75132),a=(0,r.y)("community-link"),s={all:function(){return Promise.all([i.qQ.invalidateQueries({queryKey:a.root()}),o.PE.all()])}};n.d(t,{b:()=>s})},313567(e,t,n){"use strict";var r=n(632623),o=n(51730),i=n(915779),a=n(649942),s=n(75132),l=n(451430),c=n(934415),u=n(792515);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var m=(0,a.y)("course"),b=function(e){return Number(e)||0},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return JSON.stringify(Object.entries(e).sort(function(e,t){var n=f(e,1)[0],r=f(t,1)[0];return n.localeCompare(r)}))},h={list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.status,n=e.page,r=void 0===n?1:n,a=e.perPage,s=void 0===a?20:a,u=e.query,d=e.course_type,f=e.order;return(0,c.L)({initialPageParam:r,queryKey:m.key("list",null!=t?t:"all",r,s,null!=u?u:"",null!=d?d:"",JSON.stringify(null!=f?f:{})),queryFn:function(e){var n=e.pageParam,a=void 0===n?r:n,c=p({},u&&{query:u},d&&{course_type:d});return(0,o.i_)(i.iK.courses.index({params:p({page:a,per_page:s},t&&{status:t},!(0,l.isEmpty)(c)&&{filter:c},!(0,l.isEmpty)(f)&&{order:f})}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},getPreviousPageParam:function(e){return e.page>1?e.page-1:void 0},keepPreviousData:!0})},adminSummary:function(e){return(0,u.j)({queryKey:m.key(b(e),"admin-summary"),queryFn:function(){return(0,o.i_)(i.iK.courses.adminSummary({courseId:b(e)}))},enabled:!!e})},sections:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.j)({queryKey:m.key(b(e),"sections",y(t)),queryFn:function(){return(0,o.i_)(i.iK.courses.listSections({courseId:b(e),params:t}))},enabled:!!e})},lesson:function(e,t,n){return(0,u.j)({queryKey:m.key(b(e),"lessons",b(t)),queryFn:function(){return(0,o.i_)(i.iK.courses.getLesson({courseId:b(e),lessonId:b(t),sectionId:b(n)}))},enabled:!!(e&&t&&n)})},editLesson:function(e,t){return(0,u.j)({queryKey:m.key(b(e),"lessons",b(t),"edit"),queryFn:function(){return(0,o.i_)(i.iK.settings.courses.lessons.show({id:b(t)}))},enabled:!!(e&&t)})},lessonFiles:function(e,t){return(0,u.j)({queryKey:m.key(b(e),"lessons",b(t),"files"),queryFn:function(){return(0,o.i_)(i.iK.courses.lessonFiles.index({courseId:b(e),lessonId:b(t),params:{per_page:1}}))},enabled:!!(e&&t)})},lessonEditorFilesList:function(e,t){return(0,u.j)({queryKey:m.key(b(e),"lessons",b(t),"files","editor"),queryFn:function(){return(0,o.i_)(i.iK.courses.lessonFiles.index({courseId:b(e),lessonId:b(t),params:{per_page:20}}))},enabled:!!(e&&t)})},students:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.j)({queryKey:m.key(b(e),"students",y(t)),queryFn:function(){return(0,o.i_)(i.iK.courses.students.index({courseId:b(e),params:t}))},enabled:!!e})},quizAttempts:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.j)({queryKey:m.key(b(e),"quiz-attempts",y(t)),queryFn:function(){return(0,o.i_)(i.iK.courses.quizAttempts.index({courseId:b(e),params:t}))},enabled:!!e})},show:function(e){return(0,u.j)({queryKey:m.key(b(e),"show"),queryFn:function(){return r.R.show({id:b(e),forReactQuery:!0})},enabled:!!e})},recentlyEdited:function(){return(0,u.j)({queryKey:m.key("overview","recently-edited"),queryFn:function(){return(0,o.i_)(i.iK.courses.overview())}})}},g={all:function(){return s.qQ.invalidateQueries({queryKey:m.root()})},course:function(e){return s.qQ.invalidateQueries({queryKey:m.key(b(e))})},lesson:function(e,t){return s.qQ.invalidateQueries({queryKey:m.key(b(e),"lessons",b(t))})},lessonFiles:function(e,t){return s.qQ.invalidateQueries({queryKey:m.key(b(e),"lessons",b(t),"files")})},list:function(){return s.qQ.invalidateQueries({queryKey:m.key("list")})}};n.d(t,{B3:()=>m,gZ:()=>h,nb:()=>g})},592447(e,t,n){"use strict";var r=n(918336),o=n(649942),i=n(75132),a=n(792515);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var c=(0,o.y)("credits"),u={balance:function(){return(0,a.j)({queryKey:c.key("balance"),queryFn:r.n.balance})}},d={all:function(){return i.qQ.invalidateQueries({queryKey:c.root()})}},p=function(e){i.qQ.setQueryData(c.key("balance"),e)},f=function(){i.qQ.setQueryData(c.key("balance"),function(e){return e?l(s({},e),{usage:l(s({},e.usage),{available_credits:0,used_credits:e.usage.total_credits,percent_used:100,status:"danger",low_on_credits:!1})}):e}),d.all()};n.d(t,{$f:()=>d,VK:()=>f,gn:()=>p,m6:()=>u,um:()=>"credits_exhausted"})},372308(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(250313),a=n(649942),s=n(146917),l=n(292626),c=n(75132),u=n(792515),d=n(934415);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var y=(0,a.y)("event"),h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return JSON.stringify(Object.entries(e).sort(function(e,t){var n=b(e,1)[0],r=b(t,1)[0];return n.localeCompare(r)}))},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return y.key("list",h(e),t?"calendar":"default")},v={helpWidgetList:function(){return(0,u.j)({queryKey:y.key("list","help-widget"),queryFn:function(){return(0,r.i_)(o.iK.helpWidget.listEvents())}})},filterList:function(){return(0,d.L)({initialPageParam:1,queryKey:y.key("list","filter"),queryFn:function(e){var t=e.pageParam;return(0,r.i_)(i.L.events.index({params:{page:void 0===t?1:t,per_page:100}}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0}})},allEventsList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.params,n=void 0===t?{}:t,i=e.isCalendarView,a=void 0!==i&&i,s=e.perPage,l=void 0===s?a?120:20:s;return(0,d.L)({initialPageParam:1,queryKey:g(n,a),queryFn:function(e){var t=e.pageParam;return(0,r.i_)(o.iK.events.allEvents({params:m({page:void 0===t?1:t,per_page:l},n)}))},getNextPageParam:function(e){return e.has_next_page?Number(e.page)+1:void 0}})},detailBySlug:function(e,t){return(0,u.j)({queryKey:y.key("detail",e,t),queryFn:function(){return(0,r.i_)(o.iK.events.show({slug:t,spaceId:e}))}})},detailById:function(e){return(0,u.j)({queryKey:y.key("detail",e),queryFn:function(){return(0,r.i_)(i.L.events.show({id:String(e)}))}})},attendees:function(e){var t=e.spaceId,n=e.slug,i=e.page,a=void 0===i?1:i,s=e.role,l=e.perPage,c=null!=t?t:0,d=null!=n?n:"",p=null!=l?l:10;return(0,u.j)({queryKey:y.key("attendees",c,d,null!=s?s:"",a,p),queryFn:function(){return(0,r.i_)(o.iK.eventAttendees.index({spaceId:c,slug:d,params:{page:a,role:s,per_page:p}}))}})},attendeesInfinite:function(e){var t=e.spaceId,n=e.slug,i=e.role,a=null!=t?t:0,s=null!=n?n:"";return(0,d.L)({initialPageParam:1,queryKey:y.key("attendees",a,s,"infinite",null!=i?i:""),queryFn:function(e){var t=e.pageParam;return(0,r.i_)(o.iK.eventAttendees.index({spaceId:a,slug:s,params:{page:void 0===t?1:t,role:i,per_page:10}}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0},staleTime:0})},peopleV4:function(e){var t=e.spaceId,n=e.slug,i=e.page,a=void 0===i?1:i,s=e.perPage,l=e.rsvpStatus,c=null!=t?t:0,d=null!=n?n:"",p=null!=s?s:10;return(0,u.j)({keepPreviousData:!0,queryKey:y.key("people-v4",c,d,null!=l?l:"",a,p),queryFn:function(){return(0,r.i_)(o.iK.eventAttendees.index({spaceId:c,slug:d,params:m({page:a,people_v4:!0,per_page:p},void 0!==l?{rsvp_status:l}:{})}))}})},transactions:function(e){var t=e.spaceId,n=e.slug,i=e.page,a=void 0===i?1:i,s=null!=t?t:0,l=null!=n?n:"";return(0,u.j)({queryKey:y.key("transactions",s,l,a,5),queryFn:function(){return(0,r.i_)(o.iK.eventAttendees.index({spaceId:s,slug:l,params:{page:a,payment_transactions_only:!0,per_page:5}}))},keepPreviousData:!0})},homepageUpcoming:function(){return(0,u.j)({queryKey:y.key("homepage-upcoming"),queryFn:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,(0,r.i_)((0,o.V8)())];case 1:return[2,e.sent().events]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){f(i,r,o,a,s,"next",e)}function s(e){f(i,r,o,a,s,"throw",e)}a(void 0)})})()}})}},x={all:function(){return c.qQ.invalidateQueries({queryKey:y.root()})},detail:function(e){return c.qQ.invalidateQueries({queryKey:y.key("detail",e)})},attendeesForEvent:function(e,t){return c.qQ.invalidateQueries({queryKey:y.key("attendees",e,t)})},postBackedSurfaces:function(){return Promise.all([s.w.allPostDetails(),s.w.feedPosts(),s.w.allSpacePosts(),c.qQ.invalidateQueries({queryKey:l.uW.key("detail"),refetchType:"all",predicate:function(e){return"number"==typeof e.queryKey[2]}})])}};n.d(t,{Mk:()=>y,d8:()=>5,dS:()=>v,eW:()=>x})},285834(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(451430),l=n(934415),c=n(792515),u=n(477593);function d(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var p=(0,i.y)("flagged-content"),f={list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.from,n=e.content_type,i=e.flagged_by,a=e.order,c=e.query,u=void 0===c?"":c,d=e.perPage,f=void 0===d?20:d,m=e.initialPage,b=void 0===m?1:m,y=e.reason_type,h=e.status,g=void 0===h?"inbox":h;return(0,l.L)({initialPageParam:b,queryKey:p.key("list",{content_type:n,flagged_by:i,from:t,initialPage:b,order:a,perPage:f,query:u,reason_type:y,status:g}),queryFn:function(e){var l=e.pageParam,c=void 0===l?b:l;return(0,r.i_)(o.iK.flaggedContent.index({params:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({page:c>0?c:1,per_page:f,status:g},u&&{query:u},t&&{from:t},n&&{content_type:n},y&&{reason_type:y},i&&{flagged_by:i},!(0,s.isEmpty)(a)&&{order:a})}))}})},detail:function(e){return(0,c.j)({queryKey:p.key("detail",e),queryFn:function(){return(0,r.i_)(o.iK.flaggedContent.show({id:e}))}})},byContentable:function(e,t){return(0,c.j)({queryKey:p.key("contentable",e,t),queryFn:function(){var n;return(n=function(){var n;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(i){switch(i.label){case 0:return[4,(0,r.i_)(o.iK.flaggedContent.index({params:t===u.M$?{post_id:e}:t===u.Sk?{chat_room_message_id:e}:{comment_id:e}}))];case 1:return[2,null!=(n=i.sent().records[0])?n:null]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){d(i,r,o,a,s,"next",e)}function s(e){d(i,r,o,a,s,"throw",e)}a(void 0)})})()}})}},m={all:function(){return a.qQ.invalidateQueries({queryKey:p.root()})}};n.d(t,{nu:()=>m,oq:()=>f})},11992(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(934415);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function d(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function p(e){return function(e){if(Array.isArray(e))return l(e)}(e)||c(e)||f(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}}var m=(0,i.y)("gamification"),b=function(e){var t=m.key("rewards","list",e.community_member_id),n=d(u({},e),{event_name:"gamification.member.points_awarded",triggered_at:e.created_at});a.qQ.setQueryData(t,function(e){var t,r,o=null!=(t=null==e?void 0:e.pages)?t:[{has_next_page:!1,page:1,records:[]}],i=function(e){if(Array.isArray(e))return e}(o)||c(o)||f(o)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i.slice(1);return o.some(function(e){return e.records.some(function(e){return e.id===n.id})})?e:{pageParams:null!=(r=null==e?void 0:e.pageParams)?r:[1],pages:[d(u({},a),{records:[n].concat(p(a.records))})].concat(p(s))}})},y={memberScores:function(e){var t=e.memberIds,n=e.enabled;return{queryKey:m.key("members",null!=t?t:[]),queryFn:function(){return(0,r.i_)(o.iK.gamification.members({params:{member_ids:t}}))},gcTime:6e4,staleTime:6e4,enabled:void 0===n||n}},rewardsList:function(e){return(0,s.L)({initialPageParam:1,queryKey:m.key("rewards","list",e),queryFn:function(t){var n=t.pageParam;return(0,r.i_)(o.iK.gamification.pointAwards({params:{member_id:e,page:void 0===n?1:n}}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0}})}};n.d(t,{H2:()=>m,HG:()=>b,g7:()=>y})},904781(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(792515);function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var u=(0,i.y)("gamification-settings"),d={settings:function(){return(0,s.j)({queryKey:u.root(),queryFn:function(){return(0,r.i_)(o.iK.gamification.settings())}})}},p={all:function(){return a.qQ.invalidateQueries({queryKey:u.root()})}},f=function(){a.qQ.setQueryData(u.root(),function(e){return e?c(l({},e),{points_reset_status:"processing",points_reset_action:"reset"}):e})},m=function(){a.qQ.setQueryData(u.root(),function(e){return e?c(l({},e),{point_calculation_start_at:null,points_reset_action:"undo",points_reset_status:"processing",reset_by_name:null}):e})};n.d(t,{B$:()=>m,NB:()=>d,Oq:()=>f,uV:()=>p})},154097(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(792515),l=(0,i.y)("header-navigation-link"),c=function(e){return e?l.key("list",e):l.key("list")},u=function(e){return l.key("detail",e)},d={list:function(e){return(0,s.j)({queryKey:c(e),queryFn:function(){return(0,r.i_)(o.iK.settings.navigation.list(e?{params:{audience:e}}:{}))},staleTime:432e5,gcTime:864e5})},detail:function(e){return(0,s.j)({queryKey:u(e),queryFn:function(){return(0,r.i_)(o.iK.settings.navigation.show({id:e}))}})}},p={all:function(){return a.qQ.invalidateQueries({queryKey:l.root()})},list:function(e){return a.qQ.invalidateQueries({queryKey:c(e)})},detail:function(e){return a.qQ.invalidateQueries({queryKey:u(e)})},removeDetail:function(e){return a.qQ.removeQueries({queryKey:u(e)})}};n.d(t,{G3:()=>d,xp:()=>p})},502216(e,t,n){"use strict";n.d(t,{Jy:()=>u,EN:()=>c});var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(792515),l=(0,i.y)("live-room"),c={liveNow:function(){return(0,s.j)({queryKey:l.key("live-now",1),queryFn:function(){return(0,r.i_)(o.iK.liveStreams.liveNow({params:{per_page:1}}))}})},detail:function(e){return(0,s.j)({queryKey:l.key("detail",e||"disabled"),queryFn:function(){return e?(0,r.i_)(o.iK.liveStreams.show({id:e})):Promise.reject(Error("liveRoomId is required"))},enabled:!!e})},settingsList:function(e){return(0,s.j)({queryKey:l.key("settings-list",JSON.stringify(e)),queryFn:function(){return(0,r.i_)(o.iK.liveStreams.index({params:e}))}})}},u={all:function(){return a.qQ.invalidateQueries({queryKey:l.root()})}}},274762(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(489840),l=n(2830);function c(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function u(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){c(i,r,o,a,s,"next",e)}function s(e){c(i,r,o,a,s,"throw",e)}a(void 0)})}}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function p(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var f=(0,i.y)("paywall"),m={formFetch:function(e){return{queryKey:f.key("form-fetch",e),queryFn:function(){return(0,r.i_)(o.iK.search.paywalls.index({params:{filters:{paywall_id:String(e)}}}))}}},settingsList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.query,n=void 0===t?"":t,i=e.filters,a=void 0===i?{}:i,s=e.perPage,l=void 0===s?30:s,c=e.initialPage,u=void 0===c?1:c,d=e.sort,p=void 0===d?{}:d;return{queryKey:f.key("search",n,JSON.stringify(a),l,JSON.stringify(p)),initialPageParam:u,queryFn:function(e){var t=e.pageParam,i=void 0===t?u:t,s={page:"number"==typeof i&&i>0?i:1,filters:a,per_page:l};return n&&(s.query=n),Object.keys(p).length>0&&(s.order=p),(0,r.i_)(o.iK.search.paywalls.index({params:s}))}}},upsellsAvailableList:function(e){var t=e.mainPaywallId,n=e.currencyCode,i=e.paywallGroupId;return{queryKey:f.key("upsells-available",String(null!=t?t:""),String(null!=i?i:""),null!=n?n:""),queryFn:function(){return u(function(){return p(this,function(e){switch(e.label){case 0:return[4,(0,r.i_)(o.iK.search.paywalls.index({params:{filters:d({status:s.m4.ACTIVE,currency:n},i?{not_subscription_group:i}:{})}}))];case 1:return[2,e.sent().records.filter(function(e){return Number(e.id)!==Number(t)})]}})})()}}},upgradeAvailableList:function(e){var t=e.mainPaywallId,n=e.currencyCode,i=e.paywallGroupId;return{queryKey:f.key("upgrade-available",String(null!=t?t:""),String(null!=i?i:""),null!=n?n:""),queryFn:function(){return u(function(){return p(this,function(e){switch(e.label){case 0:return[4,(0,r.i_)(o.iK.search.paywalls.index({params:{filters:d({status:s.m4.ACTIVE,currency:n},i?{subscription_group:String(i)}:null!=t?{paywall_id:String(t)}:{})}}))];case 1:return[2,e.sent().records]}})})()}}},offers:function(e){return{queryKey:f.key("offers",e),queryFn:function(){return(0,r.i_)(o.iK.paywalls.offers.index({paywall_id:e}))}}},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.communityMemberId,n=e.status,i=void 0===n?[]:n,a=e.spaceIds,s=void 0===a?[]:a;return{queryKey:f.key("list",String(null!=t?t:""),JSON.stringify({status:i,spaceIds:s})),queryFn:function(){var e;return(0,r.i_)(o.iK.paywalls.index({params:{community_member_id:null!=(e=null==t?void 0:t.toString())?e:"",status:i.join(","),space_ids:s.filter(function(e){return null!=e}).map(function(e){return String(e)}).join(",")}}))}}},currencies:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{queryKey:f.key("currencies",String(e)),queryFn:function(){return(0,r.i_)(o.iK.supportedCurrencies.index(e?{include_traded:!0}:{}))}}},filterList:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{queryKey:f.key("filter",e),queryFn:function(){var e,n;return(0,r.i_)(o.iK.paywalls.index({params:(e=d({},t),n=n={status:t.status||l.Oc},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}),e)}))}}}},b={all:function(){return a.qQ.invalidateQueries({queryKey:f.root()})}};n.d(t,{Cc:()=>f,N5:()=>m,PA:()=>30,ql:()=>b})},367764(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return r(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var i,a,s=(0,n(649942).y)("post"),l=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=s).key.apply(i,["list"].concat(o(t)))},c=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(a=s).key.apply(a,["detail"].concat(o(t)))},u={list:l(),feed:l("feed"),detail:c()};n.d(t,{B7:()=>c,Ro:()=>u,ai:()=>l,yd:()=>s})},758904(e,t,n){"use strict";var r=n(451430),o=n(367764);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var s=function(e){return((function(e){if(Array.isArray(e))return i(e)})(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return i(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(function(e,t){return e-t}).join(",")},l=function(e){var t=e.pageParam;return"number"==typeof t?t:1},c=function(e){return e.has_next_page?e.page+1:void 0},u=function(e){return function(t){var n=t.queryKey;if(!(0,r.isEqual)(n.slice(0,2),(0,o.B7)()))return!1;var i=n[2];if("batch"!==i&&"shared-batch"!==i)return!1;var s=n[3];return!!s&&(void 0===s?"undefined":a(s))==="object"&&"post_ids"in s&&"string"==typeof s.post_ids&&",".concat(s.post_ids,",").includes(",".concat(e,","))}},d=function(e){var t=function(t){var n=t.queryKey,i=t.state;return!!(0,r.isEqual)(n.slice(0,3),(0,o.B7)("record"))&&!!i.data&&"object"===a(i.data)&&"id"in i.data&&i.data.id===e},n=u(e);return function(e){return t(e)||n(e)}};n.d(t,{$w:()=>s,cn:()=>l,fm:()=>d,iP:()=>c,ip:()=>u})},146917(e,t,n){"use strict";var r=n(51730),o=n(151129),i=n(915779),a=n(75132),s=n(792515),l=n(934415),c=n(367764),u=n(758904);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function m(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var b={spacePosts:function(e){var t=e.spaceId,n=e.params,a=(0,o.s)(null!=n?n:{});return{queryKey:t?(0,c.ai)("space",t,a):(0,c.ai)("space"),initialPageParam:1,queryFn:function(e){var n=e.pageParam;return t?(0,r.i_)(i.iK.posts.index({spaceId:t,params:m(f({},a),{page:(0,u.cn)({pageParam:n})})})):Promise.reject(Error("spaceId is required"))},getNextPageParam:u.iP}},feedPosts:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.sort,a=void 0===n?"":n,s=(0,o.s)("connections"===a?{sort:"latest",only_connections:!0}:{sort:a});return{queryKey:((function(e){if(Array.isArray(e))return d(e)})(e=c.Ro.feed)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return d(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([s]),initialPageParam:1,queryFn:function(e){var t=e.pageParam;return(0,r.i_)(i.iK.homePagePosts.index({params:m(f({},s),{page:(0,u.cn)({pageParam:t})})}))},getNextPageParam:u.iP}},profilePosts:function(e){var t=e.memberPublicId,n=e.params,a=(0,o.s)(null!=n?n:{});return{queryKey:(0,c.ai)("profile",t,a),initialPageParam:1,queryFn:function(e){var n=e.pageParam;return(0,r.i_)(i.iK.profile.posts({memberPublicId:t,params:m(f({},a),{page:(0,u.cn)({pageParam:n})})}))},getNextPageParam:u.iP}},postDetails:function(e){var t=e.spaceId,n=e.spaceSlug,o=void 0===n?"":n,a=e.postSlug,l=void 0===a?"":a;return(0,s.j)({queryKey:(0,c.B7)("record",null!=t?t:o,l),queryFn:function(){return(0,r.i_)(i.iK.posts.show({spaceId:t,spaceSlug:o,postSlug:l}))}})},postLikes:function(e){var t=e.postId,n=e.reactionType;
1return(0,l.L)({initialPageParam:1,queryKey:c.yd.key("likes",t,null!=n?n:"all"),queryFn:function(e){return(0,r.i_)(i.iK.posts.userLikesList({postId:t,params:f({per_page:15,page:(0,u.cn)(e)},n&&{reaction_type:n})}))},getNextPageParam:u.iP})},trendingPosts:function(){return(0,s.j)({queryKey:c.yd.key("trending"),queryFn:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,(0,r.i_)((0,i.hh)())];case 1:return[2,e.sent().posts]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){p(i,r,o,a,s,"next",e)}function s(e){p(i,r,o,a,s,"throw",e)}a(void 0)})})()}})},postBatchDetails:function(e){var t=e.isSharedPostView,n=e.postIds,a=e.spaceId,s={for_shared_post_view:t||void 0,post_ids:(0,u.$w)(n),space_id:a},l=(0,o.s)(s);return{queryKey:(0,c.B7)(t?"shared-batch":"batch",l),queryFn:function(){return(0,r.i_)(i.iK.postDetails.index({params:f({},l)}))}}}},y={all:function(){return a.qQ.invalidateQueries({queryKey:c.yd.root()})},feedPosts:function(){return a.qQ.invalidateQueries({queryKey:c.Ro.feed})},trendingPosts:function(){return a.qQ.invalidateQueries({queryKey:c.yd.key("trending")})},spacePosts:function(e){return a.qQ.invalidateQueries({queryKey:(0,c.ai)("space",e)})},allSpacePosts:function(){return a.qQ.invalidateQueries({queryKey:(0,c.ai)("space")})},profilePosts:function(e){return a.qQ.invalidateQueries({queryKey:(0,c.ai)("profile",e)})},allPosts:function(){return a.qQ.invalidateQueries({queryKey:c.Ro.list})},postDetails:function(e){return a.qQ.invalidateQueries({queryKey:c.Ro.detail,predicate:(0,u.fm)(e)})},allPostDetails:function(){return a.qQ.invalidateQueries({queryKey:c.Ro.detail})},postLikes:function(e){return a.qQ.invalidateQueries({queryKey:c.yd.key("likes",e)})}};n.d(t,{w:()=>y,x:()=>b})},912569(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(792515),l=(0,i.y)("profile-field"),c={list:function(){return(0,s.j)({queryKey:l.key("list"),queryFn:function(){return(0,r.i_)(o.iK.profileFields.index())}})},archived:function(){return(0,s.j)({queryKey:l.key("archived"),queryFn:function(){return(0,r.i_)(o.iK.profileFields.archivedList())}})},detail:function(e){return(0,s.j)({queryKey:l.key("detail",String(e)),queryFn:function(){return(0,r.i_)(o.iK.profileFields.detail(e))}})},searchable:function(){return(0,s.j)({queryKey:l.key("searchable"),queryFn:function(){return(0,r.i_)(o.iK.profileFields.searchableList())}})},byKey:function(e){return(0,s.j)({queryKey:l.key("by-key",e),queryFn:function(){return(0,r.i_)(o.iK.profileFields.showByKey(e))}})},page:function(e){return(0,s.j)({queryKey:l.key("page",e),queryFn:function(){return(0,r.i_)(o.iK.profileFields.pageIndex(e))}})}},u={all:function(){return a.qQ.invalidateQueries({queryKey:l.root()})}};n.d(t,{oI:()=>c,xp:()=>u})},945955(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(75132),s=n(792515),l=(0,i.y)("space-group"),c={list:function(){return(0,s.j)({queryKey:l.key("list"),queryFn:function(){return(0,r.i_)(o.iK.spaceGroups.index())}})},detail:function(e){return(0,s.j)({queryKey:l.key("detail",e),queryFn:function(){return(0,r.i_)(o.iK.spaceGroups.show({id:e}))}})},disabledDetail:function(){return(0,s.j)({queryKey:l.key("detail","disabled"),queryFn:function(){return Promise.reject(Error("spaceGroupId is required"))},enabled:!1})}
1,resourceDetail:function(e){return(0,s.j)({queryKey:e?l.key("detail",e):l.key("detail","disabled"),queryFn:function(){return e?(0,r.i_)(o.iK.spaceGroups.show({id:e})):Promise.reject(Error("spaceGroupId is required"))},enabled:!!e})},includeDeletedList:function(){return(0,s.j)({queryKey:l.key("include-deleted","list"),queryFn:function(){return(0,r.i_)(o.iK.spaceGroups.index({include_deleted:"true"}))}})},helpWidgetList:function(){return(0,s.j)({queryKey:l.key("help-widget","list"),queryFn:function(){return(0,r.i_)(o.iK.helpWidget.listSpaceGroups())},staleTime:36e5,retry:!1})}},u={all:function(){return a.qQ.invalidateQueries({queryKey:l.root()})}};n.d(t,{Wo:()=>c,tY:()=>u})},292626(e,t,n){"use strict";var r=n(632623),o=n(51730),i=n(915779),a=n(649942),s=n(75132),l=n(792515),c=n(934415);function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function d(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var p=(0,a.y)("space"),f={list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.includeSidebar,n=void 0!==t&&t;return(0,l.j)({queryKey:p.key("list",n?"with-sidebar":"without-sidebar"),queryFn:function(){return r.R.list({params:{include_sidebar:n}})}})},detail:function(e){return(0,l.j)({queryKey:p.key("detail",e),queryFn:function(){return r.R.show({id:Number(e),forReactQuery:!0})}})},show:function(e){return f.detail(e)},resourceDetail:function(e){return(0,l.j)(d(u({},f.detail(null!=e?e:"disabled")),{enabled:!!e}))},workflowDetail:function(e){return(0,l.j)({queryKey:p.key("detail",e),queryFn:function(){return(0,o.i_)(i.iK.spaces.show({id:e}))}})},activeMembersCount:function(e){return(0,l.j)({queryKey:p.key("active-members-count",e),queryFn:function(){return(0,o.i_)(i.iK.spaces.activeMembersCount({id:e}))}})},workflowsList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return(0,l.j)({queryKey:p.key("workflows","list",e),queryFn:function(){return r.R.list({params:{per_page:e}})}})},settingsList:function(e){var t=e.page,n=e.filter,r=e.perPage,a=e.sort;return(0,l.j)({queryKey:p.key("settings","list",t,JSON.stringify(n)),queryFn:function(){return(0,o.i_)(i.iK.search.spaces.index({params:d(u({},n),{page:t,per_page:r,sort:a})}))}})},settingsCount:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,l.j)({queryKey:p.key("settings","count",e),queryFn:function(){return(0,o.i_)(i.iK.search.spaces.index({params:u({page:1,per_page:1},e?{status:e}:{})}))}})},spaceGroupDetailsList:function(e){return(0,l.j)({queryKey:p.key("space-group-details",null!=e?e:"disabled"),queryFn:function(){return(0,o.i_)(i.iK.spaces.index({params:{space_group_id:e,include_details:!0}}))},enabled:!!e})},courseSpaces:function(){return(0,l.j)({queryKey:p.key("course-spaces"),queryFn:function(){return(0,o.i_)(i.iK.spaces.index({params:{post_type:"course",per_page:100}})).then(function(e){return e.records})},staleTime:3e5})},courseDirectory:function(e){var t=e.filter,n=e.topics;return(0,c.L)({initialPageParam:1,queryKey:p.key("course-directory",t,JSON.stringify(null!=n?n:[])),queryFn:function(e){var r=e.pageParam;return(0,o.i_)(i.iK.search.spaces.index({params:{page:void 0===r?1:r,space_type:"course",sort:"directory",per_page:30,only_joined:"joined"===t,topics:n||[]}}))},getNextPageParam:function(e){return e.has_next_page?e.page+1:void 0}})}},m={all:function(){return s.qQ.invalidateQueries({queryKey:p.root()})},courseDirectory:function(){return s.qQ.invalidateQueries({queryKey:p.key("course-directory")})}};n.d(t,{Qg:()=>m,l9:()=>f,uW:()=>p})}
1,699241(e,t,n){"use strict";var r=n(51730),o=n(915779),i=n(649942),a=n(292626),s=n(75132),l=n(451430),c=n(934415),u=n(792515);function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var p=(0,i.y)("topic"),f=function(e){var t;return null!=(t=null==e?void 0:e.join(","))?t:""},m={settingsList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.adminOnly,n=e.created_by,i=e.order,a=e.query,s=void 0===a?"":a,u=e.perPage,f=void 0===u?20:u,m=e.initialPage,b=void 0===m?1:m,y=e.spaces;return(0,c.L)({initialPageParam:b,queryKey:p.key("settings",s,f,b,null!=t?t:"",null!=n?n:"",JSON.stringify(i),null!=y?y:""),queryFn:function(e){var a=e.pageParam,c=void 0===a?b:a;return(0,r.i_)(o.iK.settings.topics.index({params:d({page:c>0?c:1,per_page:f},s&&{query:s},t&&{admin_only:t},n&&{created_by:n},!(0,l.isEmpty)(i)&&{order:i},y&&{spaces:y})}))}})},detail:function(e){return(0,u.j)({queryKey:p.key("detail",e),queryFn:function(){return(0,r.i_)(o.iK.settings.topics.show({uuid:e}))}})},settingsSelectList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.perPage,n=void 0===t?250:t;return(0,u.j)({queryKey:p.key("settings","select",n),queryFn:function(){return(0,r.i_)(o.iK.settings.topics.index({params:{per_page:n}}))}})},spaceTopics:function(e){var t=e.spaceId;return(0,u.j)({queryKey:p.key("spaces",t),queryFn:function(){return(0,r.i_)(o.iK.topics.spaceTopics({spaceId:t}))}})},courseTopics:function(){return(0,u.j)({queryKey:p.key("courses"),queryFn:function(){return(0,r.i_)(o.iK.courseTopics.index())}})},filterList:function(e){var t=e.isCourseDirectory,n=e.spaceId;return(0,u.j)({queryKey:t?p.key("courses"):p.key("spaces",n),queryFn:function(){return t?(0,r.i_)(o.iK.courseTopics.index()):(0,r.i_)(o.iK.topics.spaceTopics({spaceId:n}))}})},communityMemberTopics:function(e){return(0,u.j)({queryKey:p.key("community-member",e),queryFn:function(){return(0,r.i_)(o.iK.topics.communityMemberTopics({}))}})},pickerList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.spaceId,n=void 0===t?"":t,i=e.ids,a=e.query,s=void 0===a?"":a;return(0,u.j)({queryKey:n?p.key("picker","space",n,f(i),s):p.key("picker",f(i),s),queryFn:function(){return(0,r.i_)(n?o.iK.topics.spaceTopics({spaceId:n,params:d({},i&&i.length>0&&{ids:i},s&&{query:s})}):o.iK.settings.topics.index({params:d({per_page:100},i&&i.length>0&&{ids:i},s&&{query:s})}))}})}},b={all:function(){return Promise.all([s.qQ.invalidateQueries({queryKey:p.root()}),a.Qg.all()])},courseTopics:function(){return s.qQ.invalidateQueries({queryKey:p.key("courses")})},detail:function(e){return s.qQ.invalidateQueries({queryKey:p.key("detail",e)})},removeDetail:function(e){return s.qQ.removeQueries({queryKey:p.key("detail",e)})},spaceTopics:function(e){return s.qQ.invalidateQueries({queryKey:p.key("spaces",e)})}};n.d(t,{$7:()=>b,AB:()=>m,x5:()=>20})},400854(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return r(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var i=["unified-inbox","support","conversations"],a={all:function(){return i},detail:function(e){return o(i).concat([e])},list:function(e,t){return o(i).concat(["list",e,t])},listRoot:function(){return o(i).concat(["list"])},unreadCount:function(){return o(i).concat(["unread-count"])}};n.d(t,{g:()=>a})},561411(e,t,n){"use strict";var r=n(162108),o={list:(0,r.w)("/settings/access_groups",{title:"Access groups",requires:"admin",description:"Lists all access groups in the community's settings area."}),detail:(0,r.w)("/settings/access_groups/:id",{title:"Access group detail",requires:"admin",description:"Detail page for a specific access group.",pathParams:{id:{type:"number",description:"Numeric identifier of the access group."}}}),edit:(0,r.w)("/settings/access_groups/:id/edit",{title:"Edit access group",requires:"admin",description:"Edit form for a specific access group.",pathParams:{id:{type:"number",description:"Numeric identifier of the access group to edit."}}})};n.d(t,{m:()=>
1o})},965216(e,t,n){"use strict";var r={index:(0,n(162108).w)("/settings/dashboard",{title:"Dashboard",requires:"admin",description:"Admin home dashboard. High-level overview of recent community activity, member growth, website traffic, and quick links into the rest of the settings area."})};n.d(t,{S:()=>r})},361893(e,t,n){"use strict";var r=n(162108),o={list:(0,r.w)("/settings/affiliates_directory",{title:"Affiliates directory",requires:"admin",description:"Lists all affiliates in the community's affiliate program directory.",queryParams:{name_or_email:{type:"string",description:"Optional affiliate member name or exact email filter for the affiliates directory table."},page:{type:"number",description:"Optional page number for the affiliates directory table."}}}),commissions:(0,r.w)("/settings/affiliates_commissions",{title:"Affiliate commissions",requires:"admin",description:"Review affiliate commissions that are pending, due, processing, or paid.",queryParams:{active:{type:"string",description:"Optional commissions tab to open: all, pending, due, processing, or paid."},page:{type:"number",description:"Optional page number for the commissions table."},query:{type:"string",description:"Optional member name or exact email search query for the commissions table."}}}),settings:(0,r.w)("/settings/affiliates_settings",{title:"Affiliate settings",requires:"admin",description:"Set default affiliate commission amounts, pending periods, and payout methods."})};n.d(t,{a:()=>o})},602103(e,t,n){"use strict";var r=n(162108),o={audienceOverview:(0,r.w)("/settings/audience/connect",{title:"Audience connect",requires:"admin",description:"Measure and manage member-to-member connections, including top connectors and recent connection activity."}),communitySettings:(0,r.w)("/settings/connect",{title:"Connect settings",requires:"admin",description:"Community-level Circle Connect configuration — member-directory visibility, messaging defaults, and member-to-member discovery settings."})};n.d(t,{L:()=>o})},870547(e,t,n){"use strict";var r=n(162108),o={type:"string",description:"asc or desc"},i={overview:(0,r.w)("/settings/courses/overview",{title:"Courses overview",requires:"admin",description:"Courses settings overview — entry point into course and lesson management."}),list:(0,r.w)("/settings/courses",{title:"Courses",requires:"admin",description:"Browse, filter, and manage all courses in the community. Supports pagination, status filtering, name search, and column sorting.",queryParams:{page:{type:"number",description:"Pagination page number (1-indexed)."},status:{type:"string",description:"Filter by course status (e.g. 'all', 'published', 'draft'). When omitted, all statuses are shown."},query:{type:"string",description:"Filter by course name (partial match)."},course_type:{type:"string",description:"Filter by course type. Comma-separated values supported. Valid values: 'self_paced', 'scheduled'."},order:{type:"object",description:"Sort order as nested params, e.g. order[name]=asc. Valid columns: 'name', 'students_count', 'lessons_count', 'created_at', 'course_type'. Direction: 'asc' or 'desc'.",properties:{name:o,students_count:o,lessons_count:o,created_at:o,course_type:o}}}}),edit:(0,r.w)("/settings/courses/:id/edit",{title:"Edit course",requires:"admin",description:"Edit a specific course by its ID.",pathParams:{id:{type:"number",description:"Numeric identifier of the course to edit."}},queryParams:{tab:{type:"string",description:"Tab to display on course edit page. Possible values are: 'overview', 'lessons', 'customize', 'paywalls', 'lock_screen', 'members', 'options', and 'workflows'."},scrollToId:{type:"string",description:"Element ID to scroll to when the page loads."}}})};n.d(t,{v:()=>i})},788138(e,t,n){"use strict";var r=n(162108),o={index:(0,r.w)("/settings/live_streams",{title:"Live streams",requires:"admin",description:"Browse past live events, access recordings, track usage, and start new live streams.",queryParams:{page:{type:"number",description:"Pagination page number (1-indexed). Omit or pass 1 for the first page."},filter:{type:"object",description:"Filter the live-stream list. All sub-fields optional; combine to narrow results.",properties:{name:{type:"string",description:"Substring match on live stream name."},status:{type:"string",description:"Room status. Accepts a single value, comma-separated list, or array. Allowed values: initializing, backstage, active, inactive, closing, scheduled."},room_type:{type:"string",description:"Room type. Accepts a single value, comma-separated list, or array. Allowed values: stream, conference."},closed:{type:"boolean",description:"Filter by whether the room has closed (`closed_at IS NOT NULL`). `true` shows only closed rooms; `false` shows only open rooms."},recording:{type:"boolean",description:"When `true`, show only rooms with at least one attached recording. `false` is a no-op (returns the unfiltered scope)."},live_at:{type:"object",description:"Time-range filter on when the stream went live. Values are UNIX timestamps in milliseconds (matches the BE's `to_i / 1000.0` conversion).",properties:{gte:{type:"number",description:"Lower bound (inclusive) on stream live-at time, as a UNIX timestamp in milliseconds."},lte:{type:"number",description:"Upper bound (inclusive) on stream live-at time, as a UNIX timestamp in milliseconds."}}}}},order:{type:"object",description:"Sort the live-stream list. Each key is a sortable column; each value is 'asc' or 'desc'. Multiple keys compose into a multi-column s
1ort. Defaults to `live_at: desc` when omitted.",properties:{name:{type:"string",description:"Sort by stream name. Value must be 'asc' or 'desc'."},room_type:{type:"string",description:"Sort by room type. Value must be 'asc' or 'desc'."},status:{type:"string",description:"Sort by status. Value must be 'asc' or 'desc'."},live_at:{type:"string",description:"Sort by when the stream went live. Value must be 'asc' or 'desc'."}}}}}),detail:(0,r.w)("/settings/live_streams/:id",{title:"Live stream details",requires:"admin",description:"Detail surface for a specific live stream (participants, recording, chat transcript modals open here).",pathParams:{id:{type:"number",description:"Numeric identifier of the live stream."}}})};n.d(t,{y:()=>o})},211738(e,t,n){"use strict";var r=n(162108),o={list:(0,r.w)("/settings/member_tags",{title:"Member tags",requires:"admin",description:"Lists all member tags in the community's settings area.",queryParams:{page:{type:"number",description:"Pagination page number (default: 0)."},query:{type:"string",description:"Search filter applied to tag name."}}}),new:(0,r.w)("/settings/member_tags/new",{title:"Create member tag",requires:"admin",description:"Form to create a new member tag."}),edit:(0,r.w)("/settings/member_tags/:id/edit",{title:"Edit member tag",requires:"admin",description:"Edit form for a specific member tag.",pathParams:{id:{type:"number",description:"Numeric identifier of the member tag to edit."}}})};n.d(t,{N:()=>o})},875602(e,t,n){"use strict";var r=n(162108),o={overview:(0,r.w)("/settings/newsletter",{title:"Newsletters",requires:"admin",description:"Newsletter overview in the community settings area."}),posts:(0,r.w)("/settings/newsletter/posts",{title:"Newsletter posts",requires:"admin",description:"List of newsletter posts."}),settings:(0,r.w)("/settings/newsletter/settings",{title:"Newsletter settings",requires:"admin",description:"Newsletter settings placeholder."}),postContent:(0,r.w)("/settings/newsletter/posts/:id/content",{title:"Newsletter post content",requires:"admin",description:"TipTap content editor for a newsletter post.",pathParams:{id:{type:"number",description:"Numeric identifier of the newsletter post for the content editor."}}}),postPreview:(0,r.w)("/settings/newsletter/posts/:id/preview",{title:"Preview newsletter post",requires:"admin",description:"Desktop or mobile preview of a newsletter post before sending.",pathParams:{id:{type:"number",description:"Numeric identifier of the newsletter post for the preview page."}}}),postSettings:(0,r.w)("/settings/newsletter/posts/:id/settings",{title:"Newsletter post settings",requires:"admin",description:"Meta settings for a newsletter post.",pathParams:{id:{type:"number",description:"Numeric identifier of the newsletter post for the settings page."}}})};n.d(t,{q:()=>o})},831575(e,t,n){"use strict";var r={list:(0,n(162108).w)("/settings/paywall_groups",{title:"Paywall groups",requires:"admin",description:"Lists all paywall groups (subscription groups) in the community's settings area.",queryParams:{page:{type:"number",description:"Pagination page number (default: 1)."}}})};n.d(t,{s:()=>r})},581318(e,t,n){"use strict";var r=n(162108),o={onboarding:(0,r.w)("/settings/paywalls/onboarding",{title:"Connect Stripe",requires:"admin",description:"Stripe Connect embedded onboarding."}),list:(0,r.w)("/settings/paywalls",{title:"Paywalls",requires:"admin",description:"Lists all paywalls in the community's settings area."}),new:(0,r.w)("/settings/paywalls/new",{title:"Create paywall",requires:"admin",description:"Form to create a new paywall."}),edit:(0,r.w)("/settings/paywalls/:id/edit",{title:"Edit paywall",requires:"admin",description:"Edit form for a specific paywall.",pathParams:{id:{type:"number",description:"Numeric identifier of the paywall to edit."}}}),editCheckoutCustomization:(0,r.w)("/settings/paywalls/:id/edit/checkout/customization",{title:"Customize checkout page",requires:"admin",description:"Visual editor for a paywall's main checkout page appearance — hero section, badges, benefits, testimonials, countdown timer, price callouts, and reduced-price display. This is the checkout-page customization surface, distinct from the upsell offer customization surface at the upsell/customization route.",pathParams:{id:{type:"number",description:"Numeric identifier of the paywall whose checkout page is being customized."}}}),editUpsellCustomization:(0,r.w)("/settings/paywalls/:id/edit/upsell/customization",{title:"Customize upsell offer",requires:"admin",description:"Visual editor for a paywall's upsell offer appearance — hero section, badges, benefits, testimonials, media blocks, countdown timer, and price callouts. Scoped to the paywall; the specific offer being edited is selected within the screen, so this route only takes the paywall id. Distinct from the main checkout-page customization surface at the checkout/cu
1stomization route.",pathParams:{id:{type:"number",description:"Numeric identifier of the paywall whose upsell offer is being customized."}}}),paymentSettings:(0,r.w)("/settings/paywall_payment_settings",{title:"Paywall payment settings",requires:"admin",description:"Manage payment method settings for paywalls (Apple Pay, Klarna, SEPA Debit, etc.)."}),taxSettings:(0,r.w)("/settings/paywall_tax_settings",{title:"Paywall tax settings",requires:"admin",description:"Manage tax settings for paywalls (tax collection, tax ID, and tax-inclusive pricing)."})};n.d(t,{t:()=>o})},39740(e,t,n){"use strict";var r=n(162108),o={theme:(0,r.w)("/settings/theme",{title:"Customize theme",requires:"admin",description:"Customize your community's theme and appearance"}),general:(0,r.w)("/settings/general",{title:"General settings",requires:"admin",description:"General community settings, in four sections. Core info: community name, default language, and community ID. Visibility: public vs. private toggle, allow-visitor-signup toggle, Circle desktop app access toggle, and community URL/slug (with a link to set up a custom domain). Branding: community icon, logo, default Open Graph image (used when the community link is shared on social media), brand color (light and dark mode), and the reply-to email address used on notification emails. Defaults: the Default notifications section (community-wide default email and in-app toggles for new community activity — comments, likes, replies, mentions, direct messages), plus disable community switcher, allow members to deactivate their own account, allow search engines to index member profiles, truncate post/comment body in email notifications, hide Circle branding (white label), customize the call-to-action on private-post share links, default search-result sorting, hide emails on member profiles, allow members to go live, allow members to upload media, allow members to record voice messages in posts, enforce email verification (OTP) for new signups, and allow moderators to download event-attendee CSVs."}),communityAi:(0,r.w)("/settings/community_ai",{title:"Community AI",requires:"admin",description:"Enable and configure the community-facing AI features: AI summaries (on-demand summaries for posts, comments, space
1s), AI content writer (in-editor writing assistant), and Activity scores (weekly ML-generated member scores based on Presence, Participation, Contribution, and Messaging signals). Each feature has its own enable toggle."}),customDomain:(0,r.w)("/settings/custom_domain",{title:"Custom domain",requires:"admin",description:"Set up a custom domain (e.g. community.yoursite.com) by entering the domain and adding a CNAME record in your DNS provider pointing to the Circle subdomain. Includes a built-in CNAME validator and setup-domain action."}),weeklyDigest:(0,r.w)("/settings/weekly_digest",{title:"Weekly digest",requires:"admin",description:"Configure the personalized weekly digest email sent to members every Thursday at 9am PT. Set the subject line (supports variables like community name and date range), set an introduction body (optionally updated weekly to use the digest as a newsletter), and toggle which sections appear: popular posts, popular comments, stats, new members."}),embed:(0,r.w)("/settings/embed",{title:"Embed",requires:"admin",description:"Copy embed code snippets to add Circle widgets to external websites. Includes the Community widget (a floating community icon that opens a community modal in the bottom-right of an external site) and the Post widget (embed individual posts). Snippets are JS that paste into your site's <head>."}),singleSignOn:(0,r.w)("/settings/sso",{title:"Single sign-on",requires:"admin",description:"Set up Single Sign-On via an OAuth provider (e.g. MemberSpace, Auth0, custom OAuth). Configure: enable SSO, OAuth state-param security, fallback for Circle-account members, button label for the sign-in screen, custom sign-up URL, and an option to skip the profile-confirmation step for first-time SSO members. NOT for SAML — this is OAuth-based SSO."}),integrations:(0,r.w)("/settings/integrations",{title:"Integrations",requires:"admin",description:"Connect your community to external services."}),legal:(0,r.w)("/settings/legal",{title:"Legal",requires:"admin",description:"Manage legal notices shown during signup. Configure: legal email and legal address (shown inside ToS and privacy policy), Terms of Service with an optional 'Exhibit A' custom-terms toggle for additional clauses, and Privacy policy with three options (use Circle's template, write your own, or link to an external privacy policy page). New members must agree to these to sign up."}),mobileApp:(0,r.w)("/settings/mobile_app",{title:"Mobile app",requires:"admin",description:"Runtime configuration for Circle's generic Communities iOS / Android apps — NOT the custom branded mobile app (that lives at /settings/branded_apps_builder_ui and is a separate product). This page controls which tabs appear in the bottom nav of the generic Communities apps (drag-and-drop reorder of Feed / Leaderboard / Spaces / Events / Courses plus custom tabs), whether members can sign in via the Communities app at all, and whether to show an app-download banner on mobile browsers and outbound emails. If the user asks about home tabs for the *branded* mobile app, route to /settings/branded_apps_builder_ui instead."})};n.d(t,{O:()=>o})},218839(e,t,n){"use strict";var r={index:(0,n(162108).w)("/settings",{title:"Settings",requires:"admin",description:"Top-level admin settings landing page. Default redirect target when a more specific settings page is unavailable or feature-gated off for the current community."})};n.d(t,{L:()=>r})},117034(e,t,n){"use strict";var r=n(162108),o={index:(0,r.w)("/settings/home",{title:"Site settings",requires:"admin",description:"Configure site defaults: logged-out landing page, default home page selection, and other community-wide site behavior."}),navigation:(0,r.w)("/settings/navigation",{title:"Navigation",requires:"admin",description:"Manage the community's top-level navigation links — add, reorder, and edit items shown in the main nav (including links into the Circle directory).",queryParams:{selectedLinkId:{type:"number",description:"When present, the page auto-opens the edit-link modal for this navigation link id on mount. Used to deep-link from elsewhere in the app (e.g. the admin-only-route notice) straight into editing a specific link."},isCircleDirectoryLink:{type:"boolean",description:"Paired with `selectedLinkId`. When `true`, the edit modal opens in Circle-directory-link mode, which locks the link kind to `custom`. Set this for links auto-derived from Circle directory items; omit (or pass non-`true`) for regular community-defined navigation links."}}}),seo:(0,r.w)("/settings/seo",{title:"SEO",requires:"admin",description:"Configure community SEO settings: site title, meta description, social preview image, indexing controls."}),redirects:(0,r.w)("/settings/redirects",{title:"Redirects",requires:"admin",description:"Manage URL redirects for the community — create and edit source → destination redirect rules."}),codeSnippets:(0,r.w)("/settings/code_snippets",{title:"Code snippets",requires:"admin",description:"Inject custom HTML / JS / CSS 
1snippets into the community (e.g. analytics tags, third-party widgets, custom styles)."})};n.d(t,{u:()=>o})},586555(e,t,n){"use strict";var r=n(162108),o={list:(0,r.w)("/settings/workflows",{title:"Workflows",requires:"admin",description:"Create and manage automation workflows. Tabbed by workflow type (dynamic / bulk action / scheduled / archived) and filterable by status. Name search uses a Ransack predicate.",queryParams:{status:{type:"string",description:"Filter by workflow status. Allowed values: all, active, inactive, draft, published, archived, in_progress."},workflow_type:{type:"string",description:"Active tab on the workflows list. Allowed values: dynamic, bulk_action, scheduled, all."},page:{type:"number",description:"Pagination page number (1-indexed)."},q:{type:"object",description:"Ransack search predicates. Serialized in the URL via bracket notation (e.g. `q[name_i_cont]=foo`).",properties:{name_i_cont:{type:"string",description:"Case-insensitive substring match on workflow name (Ransack `*_i_cont`)."}}}}}),history:(0,r.w)("/settings/workflows/history",{title:"Workflow history",requires:"admin",description:"Review run history and status for workflow automations. Tabbed by workflow type (dynamic / bulk action / scheduled) and filterable by run status, workflow name, run id, and triggering member.",queryParams:{workflow_type:{type:"string",description:"Active tab on the history page. Allowed values: dynamic, bulk_action, scheduled."},status:{type:"string",description:"Filter by run result. Allowed values: success, failed, partial_success, skipped, in_progress, duplicate_skipped, cancelled."},workflow_name:{type:"string",description:"Substring match on workflow name (flat param, not Ransack — distinct from the list page's `q[name_i_cont]`)."},run_id:{type:"string",description:"Filter by a specific workflow run id."},member_id:{type:"string",description:"Filter to runs triggered for a specific community member id."},page:{type:"number",description:"Pagination page number (1-indexed)."}}}),new:(0,r.w)("/settings/workflows/new",{title:"Create workflow",requires:"admin",description:"Create a new workflow. This is the right destination whenever the user wants to make / add / set up / create a new workflow — including when they mention a specific category like moderation or paywalls (use the `category` query param to pre-select that template context). NOT the same as the workflows list page (`/settings/workflows`), which is for browsing existing workflows.",queryParams:{category:{type:"string",description:"Pre-selects the workflow template category context on the create page. Allowed values: moderation, paywalls."}}}),view:(0,r.w)("/settings/workflows/view/:id",{title:"View workflow",requires:"admin",description:"View a specific workflow's overview / configuration tab. For run history of this workflow, use the `runs` route.",pathParams:{id:{type:"number",description:"Numeric identifier of the workflow."}}}),runs:(0,r.w)("/settings/workflows/view/:id/runs",{title:"Workflow runs",requires:"admin",description:"View run history for a specific workflow. Lists all runs with status, timing, and member details.",pathParams:{id:{type:"number",description:"Numeric identifier of the workflow."}}}),edit:(0,r.w)("/settings/workflows/edit/:id",{title:"Edit workflow",requires:"admin",description:"Edit a specific workflow's configuration.",pathParams:{id:{type:"number",description:"Numeric identifier of the workflow."}}})};n.d(t,{L:()=>o})},444153(e,t,n){"use strict";n.d(t,{IA:()=>"circle_ai_briefs",Ui:()=>"/ai/briefs",ok:()=>20})},682610(e,t,n){"use strict";n.d(t,{$T:()=>"/ai/projects/$projectId",Hl:()=>"circle_ai_projects",e1:()=>300,fc:()=>20,g_:()=>"/ai/projects",hF:()=>896,m9:()=>"active",nC:()=>"circle-ai-projects-scroll-container",yz:()=>"archived"})},639770(e,t,n){"use strict";var r=n(207800),o=n(961355),i=n(960122),a=Object.values(r.ZQ),s=Object.values(r.TU),l=o.Ik({chat_type:o.k5(a).optional().catch(void 0),sort:o.k5(s).catch(r.TU.LATEST),agent_id:i.ai().int().optional().catch(void 0),q:o.Yj().optional().catch(void 0)});n.d(t,{K:()=>l})}
1,242530(e,t,n){"use strict";n.d(t,{M:()=>b});var r=n(962506),o=n(400854),i=n(274685),a=n(258752),s=n(417980),l=n(717526),c=n(51730),u=n(915779),d=n(215089),p=function(e){return(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"&&null!==e&&"conversation_id"in e&&"string"==typeof e.conversation_id},f=function(){var e=(0,i.jE)(),t=(0,l.d)(),n=(0,r.B)(function(e){return e.openConversation}),f=(0,a.n_)({mutationFn:function(){return(0,c.oK)(u.iK.circleAiOfferHumanSupport.create())},onError:function(e){var n;t.error((null!=(n=Error)&&"u">typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)?e.message:(0,s.t)("request_failure_message"))},onSuccess:function(r){p(r)?(e.invalidateQueries({queryKey:[d.A]}),e.invalidateQueries({queryKey:o.g.listRoot(),exact:!1}),n(r.conversation_id)):t.error((0,s.t)("request_failure_message"))}});return{handleOfferHumanSupport:f.mutate,isOfferHumanSupportLoading:f.isPending}},m=n(172327),b=function(){var e=(0,m.J)(),t=e.data,n=e.isError,o=e.isLoading,i=(0,r.B)(function(e){return e.startChatWithPrompt}),a=f(),l=a.handleOfferHumanSupport,c=a.isOfferHumanSupportLoading,u=void 0!==t&&0===t.usage.available_credits;return{handleAskCircleAi:function(){if(!o){if(n||u)return void l();i((0,s.t)("settings.unified_inbox.human_support_ai_cta.draft_message"))}},isAskCircleAiLoading:o||c}}},972717(e,t,n){"use strict";var r=n(400854),o=n(258752),i=n(51730),a=n(915779),s=r.g.unreadCount(),l=function(){return(0,o.IT)({queryKey:s,queryFn:function(){return(0,i.i_)(a.iK.unifiedInboxSupport.unreadConversations())},select:function(e){return e.unread_count}})};n.d(t,{e:()=>s,l:()=>l})},306266(e,t,n){"use strict";var r=n(391426),o=n(933578),i=n(544445),a=(0,o.createContext)(void 0);a.displayName="ContentPropsContext";var s=function(e){var t=e.children,n=e.contentProps;return(0,r.jsx)(a.Provider,{value:n,children:t})},l=function(){var e=(0,o.useContext)(a);return(0,i.A)(e,"useContentProps must be used within a ContentPropsProvider"),e};n.d(t,{X:()=>s,b:()=>l})},436623(e,t,n){"use strict";n.d(t,{Rs:()=>r.Rs,_3:()=>a,Wj:()=>r.Wj});var r=n(545066),o=n(391426),i=n(933578),a=function(e){var t=e.section,n=e.children,a=(0,i.useMemo)(function(){var e=t===r.Rs.ADMIN;return{section:t,isAdminUsageContext:e}},[t]);return(0,o.jsx)(r.XW.Provider,{value:a,children:n})}},693546(e,t,n){"use strict";var r=n(805134),o=n(819837),i=function(){var e=(0,o.T)(),t=(0,r.M)();return{get isSpaceRoute(){return!!e("/c/$spaceSlug")},get isSpaceGroupRoute(){return!!e("/s/$spaceGroupSlug")},get isFeedRoute(){return!!e("/feed")},get isHomePage(){return!!e("/feed")},get isSpaceShowPage(){var n;return!!(null==(n=e("/c/$spaceSlug"))?void 0:n.isExact)},get isMemberDirectoryPage(){return e("/members")},get isMessagesPage(){var i;return!!(null==(i=t(["/messages/$uuid","/messages"]))?void 0:i.isExact)},get isSettingsPage(){return!!e("/settings")},get isGettingStartedRoute(){var a;return!!(null==(a=e("/getting-started"))?void 0:a.isExact)},get isLivePage(){return!!e("/live/$roomSlug")},get isDiscoverPage(){return!!e("/discover")},get isPostDetailPage(){return e("/c/$spaceSlug/$postSlug")}}};n.d(t,{a:()=>i})},169353(e,t,n){"use strict";var r=n(310860),o=n(92406),i=function(){var e=(0,r.z)({select:function(e){return e.pathname}}),t=(0,o.i)().pages_app_page;if(!t)return{isSitePageRoute:!1,sitePageId:void 0,sitePageSlug:void 0};var n=e.toLowerCase(),i="/".concat(t.slug).toLowerCase();return{isSitePageRoute:n===i||n==="".concat(i,"/"),sitePageId:t.id,sitePageSlug:t.slug}};n.d(t,{J:()=>i})},529506(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_minimal/custom_logins/debug_sessions/$uuid")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(39312)]).then(n.bind(n,866931))},"component")});n.d(t,{q:()=>o})},783838(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_minimal/live/$roomSlug/_protected/")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(59921),n.e(70892),n.e(73739),n.e(10443),n.e(34372),n.e(21643),n.e(12090),n.e(70197),n.e(28179),n.e(45208),n.e(22850),n.e(14982),n.e(84338),n.e(11753),n.e(88502),n.e(70011),n.e(6251),n.e(57372),n.e(20477),n.e(10670),n.e(34869),n.e(50472),n.e(51159)]).then(n.bind(n,134538))},"component")});n.d(t,{q:()=>o})}
1,195346(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_minimal/live/$roomSlug/_protected/mobile")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(59921),n.e(70892),n.e(73739),n.e(10443),n.e(34372),n.e(21643),n.e(12090),n.e(70197),n.e(28179),n.e(45208),n.e(41684),n.e(14982),n.e(84338),n.e(11753),n.e(88502),n.e(70011),n.e(6251),n.e(57372),n.e(20477),n.e(10670),n.e(46116)]).then(n.bind(n,168175))},"component")});n.d(t,{q:()=>o})},815849(e,t,n){"use strict";var r=n(819436),o=n(778771),i=n(961355),a=n(960122),s=i.Ik({edit:i.KC([i.Yj(),i.zM()]).optional().catch(void 0),preview:i.zM().optional().catch(void 0),pastEvents:i.zM().optional().catch(void 0),status:i.Yj().optional().catch(void 0),topics:i.KC([i.Yj(),i.ai()]).optional().catch(void 0),sort:i.Yj().optional().catch(void 0),iframe:i.zM().optional().catch(void 0),message_id:a.ai().optional().catch(void 0)}),l=(0,o.WK)("/_protected/_dynamicLayout/c/$spaceSlug")({validateSearch:s,component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(83729),n.e(53516)]).then(n.bind(n,67310))},"component")});n.d(t,{q:()=>l})},733911(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_embed/c/$embedSpaceSlug/$embedPostSlug")({component:(0,r.Z)(function(){return n.e(8492).then(n.bind(n,378919))},"component")});n.d(t,{q:()=>o})},242759(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_embed/c/$embedSpaceSlug/")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(7392),n.e(67442),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(78911),n.e(1467),n.e(86625),n.e(56345),n.e(51090),n.e(66239),n.e(71886),n.e(49297),n.e(2923),n.e(62258),n.e(4230),n.e(12717),n.e(86891),n.e(39551),n.e(32428)]).then(n.bind(n,705206))},"component")});n.d(t,{q:()=>o})},673132(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_embed/c/$embedSpaceSlug")({component:(0,r.Z)(function(){return n.e(13820).then(n.bind(n,61943))},"component")});n.d(t,{q:()=>o})},124308(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/ai-agents/edit/$botPublicId")({component:(0,r.Z)(function(){return Promise.all([n.e(24678),n.e(47931),n.e(31040),n.e(25266),n.e(94764),n.e(61778),n.e(80334),n.e(48384),n.e(36918),n.e(72942),n.e(37209),n.e(98790),n.e(21523)]).then(n.bind(n,336615))},"component")});n.d(t,{q:()=>o})},227066(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/ai-inbox/conversations/$id")({component:(0,r.Z)(function(){return Promise.all([n.e(4746),n.e(60930)]).then(n.bind(n,233537))},"component")});n.d(t,{q:()=>o})},694135(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/emails/broadcast/$id")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(56345),n.e(22018),n.e(49785),n.e(52276)]).then(n.bind(n,578548))},"component")});n.d(t,{q:()=>o})},144011(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/emails/forms/$id/$tab")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(48675),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(94155),n.e(66812),n.e(82359),n.e(56345),n.e(22018),n.e(41372),n.e(88854),n.e(85288),n.e(11179),n.e(97556),n.e(52904)]).then(n.bind(n,656411))},"component")});n.d(t,{q:()=>o})},815391(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/emails/forms/$id")({component:(0,r.Z)(function(){return n.e(74810).then(n.bind(n,552353))},"component")});n.d(t,{q:()=>o})},57443(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/emails/templates/$id")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(42975),n.e(82359),n.e(56345),n.e(22018),n.e(91669),n.e(58954)]).then(n.bind(n,530673))},"component")});n.d(t,{q:()=>o})},471e3(e,t,n){"use strict";var r=n(819436),o=n(778771),i=n(961355),a=i.Ik({integration_authorization:i.k5(["cancelled","failed","
1succeeded"]).optional(),integration_connection_name:i.Yj().optional()}),s=(0,o.WK)("/_protected/_settingsLayout/settings/integrations/")({validateSearch:a,component:(0,r.Z)(function(){return Promise.all([n.e(82359),n.e(7125)]).then(n.bind(n,454257))},"component")});n.d(t,{q:()=>s})},84792(e,t,n){"use strict";var r=n(819436),o=n(238350),i=(0,n(778771).WK)("/_protected/_settingsLayout/settings/profile_fields/$id/edit")({validateSearch:o.Kf,component:(0,r.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(82359),n.e(6028),n.e(32314),n.e(5064)]).then(n.bind(n,885691))},"component")});n.d(t,{q:()=>i})},973638(e,t,n){"use strict";var r=n(819436),o=n(238350),i=(0,n(778771).WK)("/_protected/_settingsLayout/settings/profile_fields/new")({validateSearch:o.Kf,component:(0,r.Z)(function(){return Promise.all([n.e(53078),n.e(48675),n.e(82359),n.e(6028),n.e(32314),n.e(44350)]).then(n.bind(n,732301))},"component")});n.d(t,{q:()=>i})},376624(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/topics/$topicId/edit")({component:(0,r.Z)(function(){return Promise.all([n.e(44942),n.e(11341),n.e(96400)]).then(n.bind(n,489715))},"component"),remountDeps:function(e){return[e.params.topicId]}});n.d(t,{q:()=>o})},239057(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/workflows/edit/$id")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(55089),n.e(48675),n.e(14899),n.e(73108),n.e(31040),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(55839),n.e(86625),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(25150),n.e(15292),n.e(93169),n.e(16010),n.e(67491)]).then(n.bind(n,4046))},"component")});n.d(t,{q:()=>o})},261558(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/workflows/edit/$id/send-email/$broadcastId")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(38313),n.e(66182),n.e(22396),n.e(14899),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(56345),n.e(22018),n.e(49785),n.e(18326),n.e(16838)]).then(n.bind(n,89509))},"component")});n.d(t,{q:()=>o})},535237(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/workflows/new/dynamic/$id")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(55089),n.e(48675),n.e(14899),n.e(73108),n.e(31040),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(55839),n.e(86625),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(25150),n.e(15292),n.e(93169),n.e(16010),n.e(73663)]).then(n.bind(n,199522))},"component")});n.d(t,{q:()=>o})},8516(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/workflows/new/one_time/$id")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(55089),n.e(48675),n.e(14899),n.e(73108),n.e(31040),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(55839),n.e(86625),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(25150),n.e(15292),n.e(93169),n.e(16010),n.e(44572)]).then(n.bind(n,437623))},"component")});n.d(t,{q:()=>o})},537987(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/workflows/new/preview/$id")({component:(0,r.Z)(function(){return Promise.all([n.e(1983),n.e(27114)]).then(n.bind(n,369745))},"component")});n.d(t,{q:()=>o})},914747(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/workflows/new/scheduled/$id")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(55089),n.e(48675),n.e(14899),n.e(73108),n.e(31040),n.e(31789),n.e(18608),n.e(26466),n.e(48895),n.e(30213),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(55839),n.e(86625),n.e(56345),n.e(22018),n.e(49785),n.e(92972),n.e(29619),n.e(25150),n.e(15292),n.e(93169),n.e(16010),n.e(76381)]).then(n.bind(n,496492))},"component")});n.d(t,{q:()=>o})},389198(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/_settingsLayout/settings/workflows/view/$id")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(51735),n.e(53078),n.e(38313),n.e(66182),n.e(22396),n.e(24678),n.e(55089),n.e(48675),n.e(14899),n.e(47931),n.e(73108),n.e(48433),n.e(31040),n.e(25266),n.e(31789),n.e(18608),n.e(26466),n.e(94764),n.e(48895),n.e(61778),n.e(30213),n.e(80334),n.e(48384),n.e(90969),n.e(58996),n.e(64040),n.e(71208),n.e(90583),n.e(46006),n.e(86625),n.e(56345),n.e(22018),n.e(36918),n.e(72942),n.e(37209),n.e(49785),n.e(92972),n.e(29619),n.e(44942),n.e(3823),n.e(25150),n.e(89787),n.e(15292),n.e(93169),n.e(18706),n.e(1983),n.e(32702),n.e(36035),n.e(31139),n.e(74178),n.e(60987)]).then(n.bind(n,882081))},"component")});n.d(t,{q:()=>o})},366592(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/ai/$conversationId")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(83729),n.e(88849),n.e(61448)]).then(n.bind(n,148539))},"component"),staticData:{shellMode:"canvas-only"}});n.d(t,{q:()=>o})},391516(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/ai/daily-briefs/$dailyBriefId")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(62375),n.e(79749),n.e(88993),n.e(81080),n.e(28196),n.e(22870)]).then(n.bind(n,537877))},"component")});n.d(t,{q:()=>o})},770543(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/ai/projects/$projectId")({component:(0,r.Z)(function(){return Promise.all([n.e(24014),n.e(62375),n.e(88993),n.e(81080),n.e(19921),n.e(49800)]).then(n.bind(n,150235))},"component")});n.d(t,{q:()=>o})},958116(e,t,n){"use strict";var r=n(819436),o=n(913395),i=n(348480),a=n(778771),s=n(938209);function l(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var c=(0,a.WK)("/_protected/getting-started/ai")({beforeLoad:function(e){var t,n=e.context;return(t=function(){var e,t,r,a,l,c,u;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(d){switch(d.label){case 0:if(r=(t=null!=(e=n.punditUserContext)?e:{}).currentCommunitySettings,a=t.currentCommunity,l=t.currentUser,!(null==a?void 0:a.id)||!(null==l?void 0:l.id))return(0,s.V2)({href:"/getting-started",throw:!0}),[2];if(c=!!window.V4_UI,(0,o.$)({currentCommunitySettings:r}))return[2];return[4,n.queryClient.ensureQueryData((0,i.Yr)(a.id))];case 1:return u=d.sent(),(c||!(0,o.$)({experimentationFlags:null==u?void 0:u.flags}))&&(0,s.V2)({href:"/getting-started",throw:!0}),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){l(i,r,o,a,s,"next",e)}function s(e){l(i,r,o,a,s,"throw",e)}a(void 0)})})()},component:(0,r.Z)(function(){return n.e(42300).then(n.bind(n,883159))},"component")});n.d(t,{q:()=>c})},53499(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/settings/admin/audience/$sqid/billing/subscriptions/new")({component:(0,r.Z)(function(){return Promise.all([n.e(62375),n.e(31040),n.e(25266),n.e(94764),n.e(41156),n.e(85483),n.e(2709),n.e(86625),n.e(22505),n.e(20782),n.e(19758),n.e(27853)]).then(n.bind(n,735499))},"component")});n.d(t,{q:()=>o})},571831(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/settings/admin/audience/$sqid/gamification")({component:(0,r.Z)(function(){return n.e(99083).then(n.bind(n,897510))},"component")});n.d(t,{q:()=>o})},16633(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/settings/admin/audience/$sqid")({component:(0,r.Z)(function(){return Promise.all([n.e(31040),n.e(25266),n.e(94764),n.e(10948),n.e(46921)]).then(n.bind(n,285996))},"component")});n.d(t,{q:()=>o})},219017(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/settings/inbox/ai/conversations/$id")({component:(0,r.Z)(function(){return Promise.all([n.e(4746),n.e(56379)]).then(n.bind(n,296654))},"component")});n.d(t,{q:()=>o})},253400(e,t,n){"use strict";var r=n(819436),o=(0,n(778771).WK)("/_protected/settings/inbox/human-support/conversations/$id")({component:(0,r.Z)(function(){return n.e(30098).then(n.bind(n,168169))},"component")});n.d(t,{q:()=>o})},5219(e,t,n){"use strict";var r={paywall:"paywall",access_group:"access_group",other:"other"}
1,o={Space:"Space",SpaceGroup:"SpaceGroup",AccessGroup:"AccessGroup"};n.d(t,{E:()=>o,YW:()=>r})},991303(e,t,n){"use strict";var r={LAST_7_DAYS:"last_7_days",LAST_MONTH:"last_month",FROM_UNREAD:"from_unread"};n.d(t,{a:()=>r})},806500(e,t,n){"use strict";var r={COMMUNITY_MEMBER:"CommunityMember",COMMUNITY_LEAD:"CommunityLead"},o=function(e){return e.type===r.COMMUNITY_MEMBER};n.d(t,{A:()=>o,q:()=>r})},411718(e,t,n){"use strict";var r=["like","celebrate","love","support","insightful","funny"],o={like:0,celebrate:0,love:0,support:0,insightful:0,funny:0};n.d(t,{O:()=>r,l:()=>o})},477593(e,t,n){"use strict";n.d(t,{M$:()=>"Post",Sk:()=>"ChatRoomMessage",fE:()=>"Connect::Connection",lr:()=>"Comment"})},547938(e,t,n){"use strict";var r=n(472385),o=function(e){var t=e.pathname,n=e.search,o=e.hash,i=n?n.startsWith("?")?n:"?".concat(n):"",a=(0,r.f)(o);return"".concat(t).concat(i).concat(a)};n.d(t,{n:()=>o})},472385(e,t,n){"use strict";var r=function(e){return e?e.startsWith("#")?e:"#".concat(e):""};n.d(t,{f:()=>r})},690210(e,t,n){"use strict";var r=function(e){return e.replace(/\u00A0/g," ")},o=function(e,t){return r(e)===r(t)};n.d(t,{x:()=>o})},934143(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var o=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.element=e}return e=[{key:"addAttachmentClickEventHandler",value:function(e){var t=this,n=function(n){var r=n.target.closest("action-text-attachment");if(r){var o=t.parseAttachmentAttributes(r);if(t.isPreviewableAttachment(o)){var i=t.getSimilarAttachments(o),a=i.findIndex(function(e){return e.sgid===o.sgid});e({attachments:i,currentIndex:a})}}};return this.element.addEventListener("click",n),function(){return t.element.removeEventListener("click",n)}}},{key:"getSimilarAttachments",value:function(e){var t,n=this.isImageAttachment(e)&&this.isImageAttachment||this.isPdfAttachment(e)&&this.isPdfAttachment;return((function(e){if(Array.isArray(e))return r(e)})(t=this.element.querySelectorAll("action-text-attachment"))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return r(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(this.parseAttachmentAttributes).filter(n)}},{key:"isPreviewableAttachment",value:function(e){return!!(e.url&&(this.isPdfAttachment(e)||this.isImageAttachment(e)))}},{key:"isImageAttachment",value:function(e){return["image/png","image/jpeg","image/jpg","image/gif"].includes(e.content_type)}},{key:"isPdfAttachment",value:function(e){return["application/pdf"].includes(e.content_type)}},{key:"parseAttachmentAttributes",value:function(e){var t,n;return{sgid:e.getAttribute("sgid"),content_type:e.getAttribute("content-type"),url:(null==(n=e.querySelector("[data-target~='blob-container']"))||null==(t=n.dataset)?void 0:t.blobUrl)||"",filename:e.getAttribute("filename")||"",filesize:e.getAttribute("filesize"),width:e.getAttribute("width"),height:e.getAttribute("height")}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();n.d(t,{P:()=>o})},443111(e,t,n){"use strict";var r=function(e,t,n){var r=null==e?void 0:e.trim(),o=null==t?void 0:t.trim();return n?o||r||void 0:r||o||void 0};n.d(t,{X:()=>r})},141320(e,t,n){"use strict";var r=function(e,t){try{var n=new URL(e);return n.searchParams.set("automatic_login","true"),n.searchParams.set("token",t),n.toString()}catch(t){return e}},o=function(e){var t=e.trim();return t?t.slice(0,1).toUpperCase():"?"};n.d(t,{U:()=>r,s:()=>o})}}]);
2//# sourceMappingURL=/packs/js/76939-94b2aa04e82dd5be.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.