PageSourceSearch

https://www.shangri-la.com/fe-static/sl-fe-revamp-prod/_next/stati…/preference/[section]-eda943bce6a95f6a.js

js shangri-la.com collected 2026-09-24 08:32:31 UTC 6,763 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4816],{34824:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/corporate/shangrilacircle/online-services/preference/[section]",function(){return r(99977)}])},63842:function(e,n){"use strict";n.Z={src:"/fe-static/sl-fe-revamp-prod//_next/static/media/[email protected]",height:128,width:128,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAQAAABuBnYAAAAAYklEQVR42k2NsQmAMBREf699JhBnEEtBBTuTuIitnUqWvLeLQRTl4BUH985wJB3s7JkJZwQiRpljRILJq6PVqjWzkzc8g2pFLaoZeAsWgipG/D2h0aZepknzJy0e6e/2JOEuq/1JoC7cxn4AAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},66248:function(e,n,r){"use strict";var t=r(85893),c=r(11163),i=r(17248),o=r.n(i),s=r(86073),a=r(94184),l=r.n(a),u=r(57852);n.Z=function(e){var n=e.title,r=e.back,i=e.backFn,a=e.show,f=void 0!==a&&a,p=(0,c.useRouter)(),d=(0,u.Z)();return(0,t.jsxs)("div",{className:l()("h-50px bg-color-fff relative flex justify-center items-center sm:hidden",{hidden:f?!f:d}),children:[(void 0===r?null:r)||(0,t.jsx)("span",{className:"".concat(o().iconBack," py-10px px-15px absolute left-0"),onClick:function(){"function"==typeof i?i():p.back()}}),(0,t.jsx)(s.Z,{className:"text-st line-clamp-1 px-30px",children:n})]})}},52860:function(e,n,r){"use strict";var t=r(26042),c=r(10092),i=r(60826),o=r(96486),s={hobby:"HobbiesChoice","dietary-preferences":"DietaryChoice","food-allergies":"AllergenChoice"},a={namespace:"preferenceModel",state:(0,t.Z)({},{title:"",preferenceList:[],preferenceListChecked:[]}),reducers:{setValue:function(e,n){var r=n.payload;return(0,t.Z)({},e,r)}},effects:{getPreferences:function(e,n){var r,t,a,l,u,f,p,d,_,h,v,m,g,b,x,y,k,A,P;return(0,c.__generator)(this,function(c){switch(c.label){case 0:t=void 0===(r=e.payload)?{}:r,a=n.put,l=n.call,f=void 0===(u=t.onError)?o.noop:u,d=void 0===(p=t.onSuccess)?o.noop:p,_=t.query.pageName,c.label=1;case 1:return c.trys.push([1,5,,6]),[4,l(i.I)];case 2:if(!(null==(g=((null==(m=void 0===(v=c.sent().data)?{}:v)?void 0:m.preferences)||[]).filter(function(e){return e.key===s[_]}))?void 0:g[0]))return[3,4];return A=null===(b=g[0])||void 0===b?void 0:null===(x=b.htmlOptionList)||void 0===x?void 0:x.filter(function(e){return e.defaults}),[4,a({type:"setValue",payload:{title:null===(y=g[0])||void 0===y?void 0:y.title,preferenceList:null===(k=g[0])||void 0===k?void 0:k.htmlOptionList,preferenceListChecked:A}})];case 3:c.sent(),c.label=4;case 4:return d(),[3,6];case 5:return f(c.sent()),[3,6];case 6:return[2]}})},editPreference:function(e,n){var r,t,s,a,l,u,f,p,d,_,h;return(0,c.__generator)(this,function(c){switch(c.label){case 0:t=void 0===(r=e.payload)?{}:r,s=n.call,l=void 0===(a=t.onError)?o.noop:a,f=void 0===(u=t.onSuccess)?o.noop:u,d=void 0===(p=t.query)?{}:p,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,s(i.X,d)];case 2:return _=c.sent(),null==f||f(_),[3,4];case 3:return h=c.sent(),console.log("edit preference error ----->",h),null==l||l(h),[3,4];case 4:return[2]}})}}};n.Z=a},99977:function(e,n,r){"use strict";r.r(n),r.d(n,{__N_SSG:function(){return C},default:function(){return E}});var t=r(26042),c=r(85893),i=r(74555),o=r(67294),s=r(10268),a=r(46005),l=r(25675),u=r.n(l),f=r(11163),p=r(48071),d=r(84740),_=r(57852),h=r(35829),v=r(23279),m=r.n(v),g=r(47983),b=r.n(g),x=r(63842),y=r(66248),k="preferenceModel",A={"dietary-preferences":"Click_
1Edit_DietaryPreferencesPage","food-allergies":"Click_Edit_FoodAllergiesPage",hobby:"Click_Edit_HobbiesPage"},P=function(e){var n=e.dispatch,r=e.pageName,t=e.preferenceListChecked,i=void 0===t?[]:t,l=e.title,v=void 0===l?"":l,g=(0,s.$G)("preference").t,P=(0,f.useRouter)(),N=P.locale,j=P.query,Z=(0,o.useState)(!1),C=Z[0],E=Z[1],w=(0,_.Z)(),B=function(){n({type:"".concat(k,"/getPreferences"),payload:{query:{pageName:r}}})},L=function(){w&&E(!0);var e=(0,d.XW)(p.Xi,{locale:N,section:null==j?void 0:j.section});(0,h.openUrl)({url:e,appNativeParam:{resume:!0},onComplete:E(!1)})};return(0,o.useEffect)(function(){B()},[]),(0,o.useEffect)(function(){document.title=v},[v]),(0,c.jsxs)(c.Fragment,{children:[v&&(0,c.jsx)(y.Z,{title:v}),v&&(0,c.jsxs)("div",{className:b()["preference-page"],children:[(0,c.jsx)("div",{className:b().content,children:i.length?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:b().title,children:"".concat(v,"(").concat(i.length,")")}),(0,c.jsx)("div",{className:b()["preference-checked"],children:i.map(function(e){return(0,c.jsx)("div",{className:b()["preference-checked-item"],children:e.value},e.code)})})]}):(0,c.jsxs)("div",{className:b()["preference-empty"],children:[(0,c.jsx)("div",{className:b().icon,children:(0,c.jsx)(u(),{unoptimized:!0,src:x.Z,alt:"shangri-la.com"})}),(0,c.jsx)("span",{className:b().text,children:g("".concat(r,"-emptyText"))})]})}),(0,c.jsx)("div",{className:b()["btn-box"],children:(0,c.jsx)(a.Z,{type:"primary",className:b().btn,adobeTrack:{editable:A[null==j?void 0:j.section]},disabled:C,onClick:m()(L,300),children:g(i.length?"edit":"add")})})]})]})},N=(0,i.$j)(function(e){return e[k]||{}})(P),j=r(52860),Z=function(e){return(0,c.jsx)(N,(0,t.Z)({},e))};Z.model=[j.Z];var C=!0,E=Z},60826:function(e,n,r){"use strict";r.d(n,{I:function(){return f},X:function(){return p}});var t,c,i=r(47568),o=r(10092),s=r(44946),a=r(56891),l=r.n(a),u=r(90902),f=(t=(0,i.Z)(function(){return(0,o.__generator)(this,function(e){switch(e.label){case 0:return[4,(0,s.v_)({url:u.mobile,data:{service:l().getProfileInfo,query:{unMask:!1}}})];case 1:return[2,e.sent()]}})}),function(){return t.apply(this,arguments)}),p=(c=(0,i.Z)(function(e){return(0,o.__generator)(this,function(n){switch(n.label){case 0:return[4,(0,s.v_)({url:u.mobile,data:{service:l().updateGcInfo,query:e}})];case 1:return[2,n.sent()]}})}),function(e){return c.apply(this,arguments)})},17248:function(e){e.exports={iconBack:"MobileBack_iconBack__fSzge"}},47983:function(e){e.exports={"preference-page":"Preference_preference-page___o3OC",content:"Preference_content__87wEn",title:"Preference_title__vxxXb","preference-checked":"Preference_preference-checked__fKSwe","preference-checked-item":"Preference_preference-checked-item__Tik6z","preference-empty":"Preference_preference-empty__GBH9o",icon:"Preference_icon__r0IrB",text:"Preference_text__Zngbv","btn-box":"Preference_btn-box__DDGoX",btn:"Preference_btn__yYafM","preference-container":"Preference_preference-container__LfQmC","top-line":"Preference_top-line__agN6T","preference-content":"Preference_preference-content__tkS_D","preference-item":"Preference_preference-item__TZ8Tr","right-icon":"Preference_right-icon__DHa7r","edit-profile-tips":"Preference_edit-profile-tips__S_Tnc","profile-tips-go":"Preference_profile-tips-go__noVMM"}}},function(e){e.O(0,[3662,5675,9774,2888,179],function(){return e(e.s=34824)}),_N_E=e.O()}]);

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.