PageSourceSearch

https://opensnow.com/_nuxt/bFthhutt.js

js opensnow.com collected 2026-09-24 09:00:43 UTC 11,804 bytes, 9 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`b377fbd3d6985619ac0310c323b19c128157e01c`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`a84e55db-059e-49ef-aa7e-b7363ae24d28`,e._sentryDebugIdIdentifier=`sentry-dbid-a84e55db-059e-49ef-aa7e-b7363ae24d28`)}catch{}})();import{B as e,D as t,Et as n,F as r,I as i,M as a,N as o,P as s,X as c,bn as l,ft as u,hn as d,m as f,mt as p,st as m,z as h}from"./7K1jQTOJ.js";import{o as g,s as _,t as v}from"./DtUT-xPp.js";import{a as y}from"./D6PF0nu8.js";import{n as b}from"./pzj_8HwE.js";import{t as x}from"./CAJ92eJI.js";import{t as S}from"./1wWJ6_RE.js";import{n as C}from"./xEdIeKla.js";import{t as w}from"./D0iQAo812.js";import{n as T}from"./BvuLoorf2.js";import{E,F as D}from"./DMSWYW1N.js";import{t as O}from"./DWXsBZW-2.js";import{n as k}from"./DzaiAmp9.js";var A={__name:`AddRelatedFavoritesDisclaimer`,props:{additionalClassNames:{type:String,default:``}},emits:[`close-dialog`],setup(e,{expose:t}){t();let n=e,r=v(),i={props:n,userStore:r,canAddRelatedFavorites:a(()=>r.addRelatedFavorites),paragraphClass:a(()=>[`tw-text-sm text-light-color`,n.additionalClassNames]),get useUserStore(){return v}};return Object.defineProperty(i,`__isScriptSetup`,{enumerable:!1,value:!0}),i}};function j(t,r,a,o,s,c){let l=x;return o.canAddRelatedFavorites?(m(),i(`p`,{key:0,class:d(o.paragraphClass)},[r[3]||=h(`
2    We will also add snow alerts and the most relevant webcams, local experts, and trail maps to
3    your favorites list. You can always change this in your
4    `,-1),e(l,{class:`tw-underline link-color-brand`,to:`/user/settings/preferences#favorites`,onClick:r[0]||=e=>t.$emit(`close-dialog`)},{default:n(()=>[...r[2]||=[h(`Settings`,-1)]]),_:1}),r[4]||=h(`.
5  `,-1)],2)):(m(),i(`p`,{key:1,class:d(o.paragraphClass)},[r[6]||=h(`
6    Want to save time? Turn on Quick Add in `,-1),e(l,{class:`tw-underline link-color-brand`,to:`/user/settings/preferences#favorites`,onClick:r[1]||=e=>t.$emit(`close-dialog`)},{default:n(()=>[...r[5]||=[h(`Settings`,-1)]]),_:1}),r[7]||=h(` to get snow alerts, web cams, local experts, and trail maps added
7    automatically when favoriting locations
8  `,-1)],2))}var M=S(A,[[`render`,j],[`__file`,`AddRelatedFavoritesDisclaimer.vue`]]),N={computed:{..._(D,[`getFavoriteListsForCam`,`getFavoriteListsForDailyRead`,`getFavoriteListsForLocation`,`getFavoriteListsForSeasonPass`,`getFavoriteListsForTrailMap`]),..._(D,{favoriteIds:e=>e.user?.favoriteIds,lists:e=>e.lists})},methods:{...g(D,[`addFavoriteCam`,`addFavoriteDailyRead`,`addFavoriteLocation`,`addFavoriteSeasonPass`,`addFavoriteTrailMap`,`removeFavoriteCam`,`removeFavoriteDailyRead`,`removeFavoriteLocation`,`removeFavoriteSeasonPass`,`removeFavoriteTrailMap`]),async addFavorite(e,t){let n;try{n=await this.addFavoriteResource(e,t),this.$toast.open({message:`${this.getResourceName(e)} was added to your ${this.getListName(t)} favorites.`,type:`default`,position:`bottom-right`})}catch(t){return this.handleError(`add`,t,e),!1}return this.isLocation(e)?n:!0},addFavoriteResource(e,t,n){let r,i;return this.isCam(e)&&({id:r}=e.cam,i=this.addFavoriteCam),this.isDailyRead(e)&&({id:r}=e.dailyRead,i=this.addFavoriteDailyRead),this.isLocation(e)&&({id:r}=e.location,i=this.addFavoriteLocation),this.isSeasonPass(e)&&({id:r}=e.seasonPass,i=this.addFavoriteSeasonPass),this.isTrailMap(e)&&({id:r}=e.trailMap,i=this.addFavoriteTrailMap),i({id:r,list_ids:t,reset_list_membership:n})},getFavoriteListstForResource(e){return this.isCam(e)?this.getFavoriteListsForCam(e.cam):this.isDailyRead(e)?this.getFavoriteListsForDailyRead(e.dailyRead):this.isLocation(e)?this.getFavoriteListsForLocation(e.location):this.isSeasonPass(e)?this.getFavoriteListsForSeasonPass(e.seasonPass):this.isTrailMap(e)?this.getFavoriteListsForTrailMap(e.trailMap):null},getListName(e){return(e?.length===1?this.lists?.find(({id:t})=>t===e[0]).name:null)||``},getResourceName(e){return this.isCam(e)?`${e.cam.name}`:this.isDailyRead(e)?`The ${e.dailyRead.name} Daily Snow`:this.isLocation(e)?e.location.name:this.isSeasonPass(e)?e.seasonPass.name:this.isTrailMap(e)?`${e.trailMap.name} (${e.location.name})`:``},handleError(e,t,n){let r=`Unable to update your favorites`;e===`remove`?r=`Unable to remove ${this.getResourceName(n)} from your favorites`:e===`add`&&(r=`Unable to add ${this.getResourceName(n)} to your favorites`);let i=t.response?.data?.messages?.[0]||r;this.$toast.open({message:i,type:`error`,position:`bottom-right`})},isCam(e){return e.cam!==void 0},isDailyRead(e){return e.dailyRead!==void 0},isLocation(e){return e.location!==void 0&&!this.isCam(e)&&!this.isTrailMap(e)},isSeasonPass(e){return e.seasonPass!==void 0},isTrailMap(e){return e.trailMap!==void 0},async updateFavorite(e,t=[],n=!0){let r=!1,i=this.getFavoriteListstForResource(e);if(y(t,i)===!1)return r;try{if(t.length===0?(await this.removeFavoriteResource(e,i),r=!0):await this.addFavoriteResource(e,t,!0),n){let t=r?`${this.getResourceName(e)} was removed from your favorites`:`Your favorites were updated.`;this.$toast.open({message:t,type:`default`,position:`bottom-right`})}}catch(t){let n=r?`remove`:`update`;this.handleError(n,t,e)}return r},async removeFavorite(e,t=null,n=!0){let r=!0;try{await this.removeFavoriteResource(e,t),n&&this.$toast.open({message:`${this.getResourceName(e)} was removed from your ${this.getListName(t)} favorites.`,type:`default`,position:`bottom-right`})}catch(t){this.handleError(`remove`,t,e),r=!1}return r},async removeFavoriteResource(e,t){let n,r;this.isCam(e)&&({id:n}=e.cam,r=this.removeFavoriteCam),this.isDailyRead(e)&&({id:n}=e.dailyRead,r=this.removeFavoriteDailyRead),this.isLocation(e)&&({id:n}=e.location,r=this.removeFavoriteLocation),this.isSeasonPass(e)&&({id:n}=e.seasonPass,r=this.removeFavoriteSeasonPass),this.isTrailMap(e)&&({id:n}=e.trailMap,r=this.removeFavoriteTrailMap),await r({id:n,list_ids:t})}}},P={dialog:`SelectFavoriteListCard__dialog`,dialogInMapCard:`SelectFavoriteListCard__dialogInMapCard`,title:`SelectFavoriteListCard__title`,loading:`SelectFavoriteListCard__loading`}
8,[F,I]=b(),L={name:`SelectFavoriteListCard`,components:{DefineContent:F,ListContent:I},mixins:[N,k],props:{action:{type:String,default:`add`,validator(e){return[`add`,`update`].includes(e)}},bare:{type:Boolean,default:!1},cam:{type:Object,default:null},dailyRead:{type:Object,default:null},defaultSelectedLists:{type:Array,default:null},hasBodyShadow:{type:Boolean,default:!1},inMapCard:{type:Boolean,default:!1},location:{type:Object,default:null},seasonPass:{type:Object,default:null},trailMap:{type:Object,default:null}},emits:[`close`,`continue`,`saved`],data(){return{initialSelectedLists:[],selectedLists:[],showLoading:!1}},computed:{..._(D,{activeList:`getActiveWriteList`,lists:`getLists`}),buttonText(){return this.isUpdateView?`Update`:`Continue`},canShowAddRelatedFavoritesDisclaimer(){return this.hasLocation&&!this.hasCam&&!this.hasTrailMap},hasCam(){return!!this.cam},hasDailyRead(){return!!this.dailyRead},hasLocation(){return!!this.location},hasSeasonPass(){return!!this.seasonPass},hasTrailMap(){return!!this.trailMap},isAddView(){return this.action===`add`},isButtonDisabled(){return this.isAddView?this.selectedLists.length===0:!y(this.selectedLists,this.initialSelectedLists)},isUpdateView(){return this.action===`update`},loadingClass(){return[`tw-absolute tw-w-full tw-h-full tw-left-0 tw-top-0 tw-z-20`,this.$style.loading]},titleText(){return this.isUpdateView?`Update Favorites`:`Add to Favorites`}},mounted(){this.selectedLists=this.defaultSelectedLists?.length?[...this.defaultSelectedLists]:[this.activeList?.id].filter(Boolean),this.initialSelectedLists=[...this.selectedLists]},methods:{setMapCard(...e){return this.mapStore.setMapCard(...e)},...g(D,[`showSelectFavoriteListDialog`]),getInputProps(e){let t=this.selectedLists.includes(e.id);return this.isAddView||this.isUpdateView?{modelValue:t}:{checked:t,name:`selectedList`,modelValue:String(e.id)}},handleClose(){this.$emit(`close`)},async handleContinue(){if(this.inMapCard){if(this.isAddView&&this.selectedLists.length===0)return;if(this.isAddView&&this.location.is_custom){this.showSaveCustomLocationCard();return}if(this.isUpdateView&&this.location.is_custom&&this.selectedLists.length===0){this.showRemoveCustomLocationDialog();return}this.showLoading=!0;let{location:e}=this;this.isAddView?await this.addFavorite({location:e},this.selectedLists):await this.updateFavorite({location:e},this.selectedLists),this.showLoading=!1,this.$emit(`saved`,{location:e});return}if(this.hasCam||this.hasDailyRead||this.hasSeasonPass||this.hasTrailMap){let{cam:e,dailyRead:t,location:n,seasonPass:r,trailMap:i}=this,a;a=this.hasCam?{cam:e,location:n}:this.hasDailyRead?{dailyRead:t}:this.hasSeasonPass?{seasonPass:r}:{trailMap:i,location:n},this.showLoading=!0,this.isAddView?await this.addFavorite(a,this.selectedLists):await this.updateFavorite(a,this.selectedLists),this.showLoading=!1,this.showSelectFavoriteListDialog(null);return}let{selectedLists:e}=this;this.$emit(`continue`,e)},showRemoveCustomLocationDialog(){this.setMapCard({data:{location:this.location,selectedLists:this.selectedLists},type:T.removeCustomLocationDialog})},showSaveCustomLocationCard(){this.setMapCard({data:{location:this.location,selectedLists:this.selectedLists},type:T.saveCustomLocation})},updateSelectedLists(e,t){if(e)this.isAddView||this.isUpdateView?this.selectedLists.includes(t.id)===!1&&this.selectedLists.push(t.id):this.selectedLists=[t.id];else if(!e){let e=this.selectedLists.findIndex(e=>e===t.id);e>=0&&this.selectedLists.splice(e,1)}}}},R={class:`tw-flex tw-flex-col tw-gap-1 tw-mb-4`},z={class:`tw-w-full tw-flex tw-items-center tw-justify-between tw-gap-3 tw-px-3.5 tw-py-2.5 tw-rounded-lg tw-text-[14px] tw-font-medium tw-border card-background-color heading-color tw-border-[color:var(--os-color-ui-card-border)] tw-cursor-pointer tw-transition-opacity active:tw-opacity-70`},B={class:`tw-truncate tw-min-w-0`};function V(a,g,_,v,y,b){let x=E,S=O,T=C,D=M,k=p(`DefineContent`),A=p(`ListContent`),j=w;return m(),i(`div`,null,[e(k,null,{default:n(()=>[o(`div`,{class:d({"tw-relative":_.bare})},[e(f,{"enter-active-class":`fade-enter-transition`,"enter-from-class":`fade-out`,"leave-active-class":`fade-leave-transition`,"leave-to-class":`fade-out`},{default:n(()=>[y.showLoading?(m(),i(`div`,{key:0,class:d(b.loadingClass)},[e(x)],2)):r(``,!0)]),_:1}),g[1]||=h(),o(`ul`,R,[(m(!0),i(t,null,u(a.lists,t=>(m(),i(`li`,{key:t.id},[o(`label`,z,[o(`span`,B,l(t.name),1),g[0]||=h(),e(S,c({rounded:!0,class:`tw-flex-shrink-0`},{ref_for:!0},b.getInputProps(t),{"onUpdate:modelValue":e=>b.updateSelectedLists(e,t)}),null,16,[`onUpdate:modelValue`])])]))),128))]),g[2]||=h(),e(T,{class:`tw-w-full`,disabled:b.isButtonDisabled,"display-block":!0,type:`primary`,onClick:b.handleContinue},{default:n(()=>[h(l(b.buttonText),1)]),_:1},8,[`disabled`,`onClick`]),g[3]||=h(),b.isAddView&&b.canShowAddRelatedFavoritesDisclaimer?(m(),s(D,{key:0,"additional-class-names":`tw-pt-4`})):r(``,!0)],2)]),_:1}),g[5]||=h(),_.bare?(m(),s(A,{key:1})):(m(),s(j,{key:0,"card-background-color":`view-background-color`,class:d([a.$style.dialog,{[a.$style.dialogInMapCard]:_.inMapCard}
8]),"has-body-padding":!0,"has-body-shadow":_.hasBodyShadow,"show-close-button":!0,onCloseButtonClick:b.handleClose},{body:n(()=>[o(`h2`,{class:d([`section-title heading-color`,a.$style.title])},l(b.titleText),3),g[4]||=h(),e(A)]),_:1},8,[`class`,`has-body-shadow`,`onCloseButtonClick`]))])}var H=Object.assign(S(L,[[`render`,V],[`__cssModules`,{$style:P}],[`__file`,`SelectFavoriteListCard.vue`]]),{__name:`SelectFavoriteListCard`});export{N as n,M as r,H as t};
9//# sourceMappingURL=bFthhutt.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.