(function(){
function Ke(ue,l,L){var h;return L!=null&&L.post_detail_page_link?ue==="list_detail"?((h=l.List)==null?void 0:h.ClickAction)==="detail_page":!0:!1}(ue=>{var ve,Fe,Ie,Ee,$e,Te,Me,Re;const l=new URLSearchParams(document.currentScript.src.split("?")[1]),L=new URLSearchParams(location.search),h=l.get("tag_id"),u=(ve=LeeepCite.tagStyle[h])==null?void 0:ve.Style,g=(Fe=LeeepCite.tagStyle[h])==null?void 0:Fe.Filter,M=u.Common.Viewer,z=L.get("leeep_sdk")==="1",f=e=>document.querySelector(`#leeep-embedded-${h} `+e),K=e=>document.querySelectorAll(`#leeep-embedded-${h} `+e),c=(e,o)=>u.List[e]===o,H=e=>window.innerWidth<=640,E="p";let te=0,q=[];l.set("page","1"),c("SeeMore","paging")&&L.get(E)&&l.set("page",L.get(E)),l.set("count",D()),(Ie=LeeepCite.tagStyle[h])!=null&&Ie.IsRandomSort&&l.set("rand_seed",""+Math.floor(Math.random()*1e8)),M==="list_fullscreen"&&l.set("content_type","video");const xe=window.navigator.languages.map(e=>e.slice(0,2)).filter(e=>["ja","en"].includes(e))[0]||"en";f(".LeeepSeeMore").innerText=u.List.SeeMoreText||{ja:"もっと見る",en:"See more"}[xe];const W=f(".LeeepList"),me=M==="staff_post_list"?"staff_post":u.List.MediaAspectRatio||"square";W.classList.add("LeeepAr-"+me);const G=u.List.Column||4;W.classList.add("LeeepCol"+G);const ne=u.List.ColumnMobile||2;W.classList.add("LeeepMobCol"+ne),M==="staff_post_list"&&W.classList.add("LeeepListStaffPost");const ge=g.List.Sort==="pv"&&u.List.RankNumber==="shown"&&!u.Filter.Enabled;ge&&W.classList.add("LeeepShowRankNumber");const Oe=500,le="leeep_like_state_session_storage_key",ae=new Map,Be=500,re="leeep_follow_state_session_storage_key",Y=new Map;if(u.Common.CustomCss){const e=document.createElement("style");e.innerText=u.Common.CustomCss.replaceAll(`
`,""),document.body.appendChild(e)}if(u.Common.CustomJs&&new Function(u.Common.CustomJs)(),c("Frame","border")&&W.classList.add("LeeepStyleBorder"),c("Scroll","horizontal")){if(W.classList.add("LeeepScrollHorizontal"),f(".LeeepFooter").classList.add("LeeepScrollHorizontal"),f(".LeeepListScrollOuter").addEventListener("scroll",_e),!H()){const e=f(".LeeepList").clientWidth||1200,o={square:[100,48.5,31.6,23.8,18.8,15.5],portrait:[177.8,86.2,56.2,42.3,33.4,27.6],staff_post:[133.3,64.7,42.1,31.7,25.1,20.7],ig_portrait:[125,60.6,39.5,29.8,23.5,19.4],landscape:[52.4,25.4,16.5,12.5,9.8,8.1]}[me][G-1];K(".LeeepListScrollButton").forEach(i=>i.style.top=(e*o/100-48)/2+"px"),f(".LeeepListScrollButtonL").addEventListener("click",i=>Pe(!0)),f(".LeeepListScrollButtonR").addEventListener("click",i=>Pe(!1))}if(z&&window.LeeepAndroidSdk){const e=f(".LeeepListScrollOuter"),o=t=>{window.LeeepAndroidSdk.postMessage(JSON.stringify({horizontalScrolling:!0}))};e.addEventListener("touchstart",t=>{e.addEventListener("scroll",o)});const i=t=>{e.removeEventListener("scroll",o),window.LeeepAndroidSdk.postMessage(JSON.stringify({horizontalScrolling:!1}))};e.addEventListener("touchend",i),e.addEventListener("touchcancel",i)}}else{const e=f(".LeeepList").clientWidth,o=H()?[4,2,2,1.6][ne-1]:[4,3,2.6,1.6,1.5,1.4][G-1];f(".LeeepListScrollInner").style.rowGap=e*o/100+"px"}let U=null,oe=[];if((c("VideoLength","full")||c("VideoLength","head"))&&(c("VideoAutoPlayType","sequential")?setInterval(()=>{const e=[];K("video.LeeepLoadedVideo").forEach(o=>{he(o)&&o.style.display==="block"&&e.push(o)}),e.length===0&&ce(null),e.length>0&&!e.includes(U)&&ce(e[0]),oe=e},200):setInterval(e=>{K("video.LeeepLoadedVideo").forEach(o=>{const i=he(o);i&&o.style.display==="block"&&o.paused&&(o.muted=!0,o.play()),!i&&!o.paused&&o.pause()})},200)),z&&c("SeeMore","auto")){document.addEventListener("onLeeepSDKTagViewSeeMore",o=>de());const e=JSON.stringify({styleSeeMoreAuto:!0});(Te=($e=(Ee=window.webkit)==null?void 0:Ee.messageHandlers)==null?void 0:$e.LeeepIosSdk)==null||Te.postMessage(e),(Me=window.LeeepAndroidSdk)==null||Me.postMessage(e)}function he(e){const o=e.getBoundingClientRect(),i=o.y+o.height/2;if(i>window.innerHeight||i<0)return!1;if(!c("Scroll","horizontal"))return!0;const t=f(".LeeepListScrollOuter");if(!t)return!0;const a=t.getBoundingClientRect(),r=o.x+o.width/2;return r>=a.left&&r<=a.right&&i>=a.top&&i<=a.bottom}function ce(e){U&&(U.pause(),U.currentTime=0),U=e,U&&(U.mute=!0,U.play())}function D(e){return(H()?u.List.CountMobile:u.List.Count)||l.get("count")||8}function ye(){LeeepCite.insertByLeeep(h,f(".LeeepListByLeeepContainer"),"afterbegin");const e={"{ProductId}":l.get("product_id")||""};LeeepCite.insertCommonElement(h,e)}(Re=u.Filter)!=null&&Re.Enabled&&(ye(),LeeepCite.insertSearchFilter(h,l.get("_cache_key"))),(async()=>{var o,i,t,a,r,p;if((o=u.Filter)!=null&&o.Enabled)try{const s=l.get("_cache_key")?"?_cache_key="+l.get("_cache_key"):"",w=`${LeeepCite.apiBase}/embed/${h}/filters${s}`,y=await(await fetch(w)).json();window.LeeepEmbedFilters=y.Filters||[]}catch(s){console.error("Failed to fetch filters:",s),window.LeeepEmbedFilters=[]}await we();const e=f("");if((te>0||(i=u.Filter)!=null&&i.Enabled)&&((t=u.Filter)!=null&&t.Enabled||ye(),M==="staff_post_list"&&((a=u.Filter)!=null&&a.Enabled)&&He(),!z)){const s=new IntersectionObserver((w,F)=>{w.length>0&&w[0].isIntersecting&&w[0].target===e&&(h&&LeeepCite.isTrackable("PostList-viewTag")&&LeeepCite.doOnce("trackingViewTag"+h,y=>{ParteTracking.viewTag({site_id:LeeepCite.site_id,tid:h,ab_id:LeeepCite.patternTagIds.includes(h)?LeeepCite.abId:null,pattern_id:LeeepCite.patternTagIds.includes(h)?LeeepCite.patternId:null,user:{id:LeeepCite.uid}})}),s.unobserve(e))},{threshold:0});s.observe(e)}te===0&&((r=u.Filter)!=null&&r.Enabled?f(".LeeepStaffPostListEmpty").style.display="block":(e.remove(),(p=document.querySelector(`#leeep-tag-section-${h}`))==null||p.style.setProperty("display","none","important")))})();function He(){var Q,X,Z,ee,k,T,_,d,j;const e="スタッフの投稿一覧";document.title=e;let o="スタッフの投稿を一覧・検索するページです。";const i=document.querySelector('meta[name="description"]');if(i)i.setAttribute("content",o);else{const n=document.createElement("meta");n.name="description",n.content=o,document.head.appendChild(n)}const t=`${location.protocol}//${location.host}${location.pathname}`,a=document.querySelector('link[rel="canonical"]');if(a)a.setAttribute("href",t);else{const n=document.createElement("link");n.rel="canonical",n.href=t,document.head.appendChild(n)}const r={"@context":"https://schema.org","@type":"CollectionPage",name:e,description:o,url:t},p=new URLSearchParams(window.location.search),s=[],w=((X=(Q=window.LeeepEmbedFilters)==null?void 0:Q.find(n=>n.Key.Name==="product_category"))==null?void 0:X.Values)||[],F=(n,m)=>n.split(",").map(b=>{var A;return((A=m.find(B=>B.Name===b))==null?void 0:A.Label)||b}).join(", "),y=p.get("hashtag_id");if(y){const n=(k=(ee=(Z=window.LeeepEmbedFilters)==null?void 0:Z.find(m=>m.Key.Name==="hashtag_id"))==null?void 0:ee.Values.find(m=>m.Name===y))==null?void 0:k.Label;s.push({"@type":"PropertyValue",name:"ハッシュタグ",value:n||y})}const I=p.get("brand_id");if(I){const n=(d=(_=(T=window.LeeepEmbedFilters)==null?void 0:T.find(m=>m.Key.Name==="brand_id"))==null?void 0:_.Values.find(m=>m.Name===I))==null?void 0:d.Label;s.push({"@type":"PropertyValue",name:"ブランド",value:n||I})}const V=p.get("category");V&&s.push({"@type":"PropertyValue",name:"商品カテゴリ",value:F(V,w)});const N=p.get("sub_category");if(N){const n=w.flatMap(m=>m.Children||[]);s.push({"@type":"PropertyValue",name:"商品小カテゴリ",value:F(N,n)})}const x=p.get("min_height"),O=p.get("max_height");x&&O&&s.push({"@type":"PropertyValue",name:"身長",value:`${x}cm 〜 ${O}cm`});const R=p.get("post_genre");if(R&&R!=="-"){const n={womens:"レディース",mens:"メンズ",kids:"キッズ",others:"その他"},m=R.split(",").map(b=>n[b]||b);s.push({"@type":"PropertyValue",name:"種別",value:m.join(", ")})}p.getAll("post_custom_props").concat(p.getAll("user_custom_props")).forEach(n=>{if(!n)return;const m=n.split(","),b=m.slice(1).join(",");b.length!==0&&s.push({"@type":"PropertyValue",name:m[0],value:b})});const S=p.get("sort")||((j=g==null?void 0:g.List)==null?void 0:j.Sort);if(S){const n={pv:"閲覧数順",created_at:"新着順",updated_at:"更新順",publish:"新着順"};s.push({"@type":"PropertyValue",name:"並び順",value:n[S]||S})}s.length>0&&(r.about=s);const P=n=>{var A,B,J,C,v,se,Ae,Ue,Ve,Ne;const m={"@type":"Person",name:n==null?void 0:n.name},b=((A=n==null?void 0:n.staff)==null?void 0:A.staff_page_link)||((J=(B=n==null?void 0:n.sns)==null?void 0:B.instagram)==null?void 0:J.link_value)||((v=(C=n==null?void 0:n.sns)==null?void 0:C.twitter)==null?void 0:v.link_value)||((Ae=(se=n==null?void 0:n.sns)==null?void 0:se.tiktok)==null?void 0:Ae.link_value)||((Ue=n==null?void 0:n.parte)==null?void 0:Ue.url)||((Ve=n==null?void 0:n.instagram)==null?void 0:Ve.url)||((Ne=n==null?void 0:n.twitter)==null?void 0:Ne.url);return b&&(m.url=b),m};q&&q.length>0&&(r.mainEntity={"@type":"ItemList",numberOfItems:q.length,itemListElement:q.map((n,m)=>{var b,A,B,J,C;return{"@type":"ListItem",position:m+1,item:{"@type":"BlogPosting",headline:n.title||`${(b=n.post_user)==null?void 0:b.name}の投稿`,url:n.post_detail_page_link,datePublished:n.first_published_at||n.created_at,author:P(n.post_user),image:((B=(A=n.contents)==null?void 0:A[0])==null?void 0:B.media_url)||((C=(J=n.contents)==null?void 0:J[0])==null?void 0:C.thumbnail_url)}}})});let $=document.querySelector('script[type="application/ld+json"]');$?$.textContent=JSON.stringify(r):($=document.createElement("script"),$.type="application/ld+json",$.textContent=JSON.stringify(r),document.head.appendChild($))}async function de(){if(c("Scroll","horizontal"))return;f(".LeeepSeeMore").style.display="none";const e=l.get("page")*1||1;l.set("page",e+1),qe(),await we()}function _e(){if(c("Scroll","horizontal")){const e=f(".LeeepListScrollOuter");f(".LeeepListScrollButtonL").style.display=!H()&&e.scrollLeft>0?"block":"none",f(".LeeepListScrollButtonR").style.display=!H()&&e.scrollLeft+e.clientWidth<=e.scrollWidth-4?"block":"none"}}function qe(){for(let e=0;e<D();e++){const o=f(".LeeepTemplatePostEmpty").content.cloneNode(!0),i=t=>o.querySelector(t);i(".LeeepListContent").style.display=c("User","hidden")&&!c("Caption","shown")&&!c("Date","shown")?"none":"block",i(".LeeepListUser").style.display=c("User","hidden")?"none":"flex",i(".LeeepListCaption").style.display=c("Caption","shown")?"-webkit-box":"none",i(".LeeepListDate").style.display=c("Date","shown")?"block":"none",f(".LeeepListScrollInner").appendChild(o)}}async function we(){var F,y,I,V,N,x,O,R,S,P,$,Q,X,Z,ee;const e=window.innerWidth===0;if(e&&!z){const k=""+Math.max(D(),u.List.CountMobile||0,u.List.Count||0);l.set("count",k)}c("SeeMore","paging")||l.set("without_total","true");let o=h?`${LeeepCite.apiBase}/embed/${h}/contents?${l.toString()}`:`${LeeepCite.apiBase}/posts?${l.toString()}`;if(M==="staff_post_list"){l.set("without_total","true"),l.set("website_id",LeeepCite.site_id),l.set("user_id",LeeepCite.uid),l.set("offset",`${l.get("count")*(l.get("page")-1)}`);const k=!!((F=u.Filter)!=null&&F.Enabled);if(k?L.get("sort")||((y=g==null?void 0:g.List)!=null&&y.Sort?L.set("sort",(I=g==null?void 0:g.List)==null?void 0:I.Sort):L.set("sort","publish")):(l.set("sort",((V=g==null?void 0:g.List)==null?void 0:V.Sort)||"publish"),l.get("brands")&&l.set(((O=(x=(N=g==null?void 0:g.List)==null?void 0:N.Filter)==null?void 0:x.Common)==null?void 0:O.BrandTarget)==="item"?"product_brand_code":"brand_code",l.get("brands")),l.delete("brands"),g.List.Filter.Common.SpecifyBrandCodes||(l.delete("brand_code"),l.delete("product_brand_code")),g.List.Filter.Common.SpecifyShopCodes||l.delete("shop_code"),g.List.Filter.Common.SpecifyProductID||l.delete("product_id"),(S=(R=g.List.Filter)==null?void 0:R.StaffPost)!=null&&S.Genre&&l.set("post_genre",g.List.Filter.StaffPost.Genre)),((Q=($=(P=g.List.Filter)==null?void 0:P.Common)==null?void 0:$.PostCustomProps)==null?void 0:Q.length)>0)for(const _ of g.List.Filter.Common.PostCustomProps)l.getAll("post_custom_props").includes(_)||l.append("post_custom_props",_);if(((ee=(Z=(X=g.List.Filter)==null?void 0:X.Common)==null?void 0:Z.UserCustomProps)==null?void 0:ee.length)>0)for(const _ of g.List.Filter.Common.UserCustomProps)l.getAll("user_custom_props").includes(_)||l.append("user_custom_props",_);let T="";if(M!=="staff_post_list"||k||c("SeeMore","paging")){const _=LeeepCite.removeInternalQueryParams(new URLSearchParams(L));L.get("sort")||(L.set("sort","publish"),_.set("sort","publish")),_.keys().forEach&&_.keys().forEach(d=>{l.keys().forEach(j=>{d===j&&l.delete(j)})}),T=_.toString()}l.get("product_id")==="undefined"&&l.delete("product_id"),l.get("user_id")==="undefined"&&l.delete("user_id"),o=`${LeeepCite.domain}/v3/posts?${T}&${l.toString()}`}const t=await(await fetch(o)).json(),a=(t.posts||[]).length;te+=a;const r=LeeepCite.removeUnpublishedFromList(t);if(e&&(r.posts=r.posts.slice(0,D())||[]),q=q.concat(r.posts),r.posts===void 0)return console.error(".posts is undefined: ",r.error),[];We(r.posts);const p=document.getElementsByClassName("LeeepEmpty");for(let k=p.length-1;k>=0;k--)p[k].remove();c("Scroll","horizontal")&&(f(".LeeepListScrollButtonR").style.display=!H()&&te>G&&(r.posts||[]).length>0?"block":"none");const s=D()<=a,w=!["hidden","auto","paging"].includes(u.List.SeeMore)&&!c("Scroll","horizontal");if(f(".LeeepSeeMore").style.display=s&&w?"block":"none",f(".LeeepSeeMore").addEventListener("click",de),c("SeeMore","auto")&&s&&!z){let k=function(){const _=window.visualViewport,d=f(".LeeepListScrollOuter");_.pageTop+_.height>d.offsetTop+d.offsetHeight&&(window.clearInterval(T),de())};const T=window.setInterval(k,200)}if(c("SeeMore","paging")){f(".LeeepPager").style.display="block";const k="M14 5l-7 7l7 7",T="M10 5l7 7l-7 7",_=se=>`<svg class="LeeepPagerChevron" viewBox="0 0 24 24"><path d="${se}" /></svg>`,d=l.get("page")*1,j=l.get("count")*1,n=LeeepCite.removeInternalQueryParams(new URLSearchParams(L));n.delete("sort"),n.delete("p");const m=new URLSearchParams(l);m.delete("page"),m.delete("count"),m.delete("offset"),m.delete("url");const b=`${LeeepCite.domain}/v3/posts/count?${n.toString()}&${m.toString()}`,J=(await(await fetch(b)).json()).total,C=Math.ceil(J/j),v=f(".LeeepPagerList");z&&L.set("leeep_pager_link","1"),L.set(E,`${d-1}`),v.innerHTML+=d>1?`<li><a class="LeeepPagerItem" href="?${L.toString()}">${_(k)}</a></li>`:`<li class="LeeepPagerItem">${_(k)}</li>`,d>=(d>=C?4:3)&&(L.set(E,"1"),v.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">1</a></li>`),d>=(d>=C?5:4)&&(v.innerHTML+='<li class="LeeepPagerItem">･･･</li>'),d>=C&&C>=3&&(L.set(E,`${d-2}`),v.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">${d-2}</a></li>`),d>=2&&(L.set(E,`${d-1}`),v.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">${d-1}</a></li>`),L.set(E,`${d}`),v.innerHTML+=`<li class="LeeepPagerItem LeeepPagerItemCurrent">${d}</li>`,d<=C-1&&(L.set(E,`${d+1}`),v.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">${d+1}</a></li>`),d<=1&&C>=3&&(L.set(E,`${d+2}`),v.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">${d+2}</a></li>`),d<=C-(d<=1?4:3)&&(v.innerHTML+='<li class="LeeepPagerItem">･･･</li>'),d<=C-(d<=1?3:2)&&(L.set(E,`${C}`),v.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">${C}</a></li>`),L.set(E,`${d+1}`),v.innerHTML+=d<C?`<li><a class="LeeepPagerItem" href="?${L.toString()}">${_(T)}</a></li>`:`<li class="LeeepPagerItem">${_(T)}</li>`}}function We(e){const o=M==="staff_post_list",i=f(".LeeepListScrollInner");e==null||e.forEach(t=>{var N,x,O,R;o&&t.contents.length>0&&(t.media_url=t.contents[0].media_url,t.thumbnail_url=t.contents[0].thumbnail_url,t.video_thumbnail_url=t.contents[0].video_thumbnail_url,t.duration=t.contents[0].duration);const a=Ke(M,u,t)?t.post_detail_page_link:"",r=a&&u.Common.TargetBlank==="enabled"?"_blank":"_self",p=f(o?".LeeepTemplateStaffPost":".LeeepTemplatePost").content.cloneNode(!0),s=S=>p.querySelector(S);s(".LeeepListAnchor").dataset.id=t.id,s(".LeeepListAnchor").href=a||"javascript:void(0);",s(".LeeepListAnchor").setAttribute("onclick",a?"":"return false;"),s(".LeeepListAnchor").target=r,a||s(".LeeepListAnchor").addEventListener("click",S=>{LeeepCite.openModal({tagId:h,clickedPostId:t.id,postIds:e.map(P=>P.id),viewer:M,count:D(),page:l.get("page"),randSeed:l.get("rand_seed")},l.toString()),S.stopPropagation()});const w=(c("VideoLength","full")||c("VideoLength","head"))&&t.duration>0,F=t.duration||!o&&i.clientWidth/(H()?ne:G)<=180;if(s(".LeeepListMedia .LeeepLoadedImg").src=(F?t.thumbnail_url:null)||t.media_url||t.image_url||t.thumbnail_url,s(".LeeepListMedia .LeeepLoadedImg").alt=t.post_user.name+"の投稿("+t.id+")",s(".LeeepListMedia .LeeepLoadedImg").style.display=w?"none":"block",s(".LeeepListMedia .LeeepLoadedVideo").style.display=w?"block":"none",s(".LeeepListMedia .LeeepLoadedVideo").poster=t.thumbnail_url||t.image_url,s(".LeeepListMedia .LeeepLoadedVideo").src=w?c("VideoLength","full")?t.media_url:c("VideoLength","head")?t.video_thumbnail_url:"":"",w&&c("VideoAutoPlayType","sequential")&&(s(".LeeepListMedia .LeeepLoadedVideo").loop=!1,s(".LeeepListMedia .LeeepLoadedVideo").addEventListener("ended",S=>{const P=oe.indexOf(S.target),$=oe[(P+1)%oe.length]||null;ce($)})),s(".LeeepListMedia .LeeepIconPlayBase").style.display=!w&&t.duration>0?"block":"none",ge&&(s(".LeeepPostRankNumber").innerText=`${K(".LeeepPost:not(.LeeepEmpty)").length+1}`),u.List.Like==="shown"){const S=Se(le,t.id);ae.set(t.id,S?{...S,timer:null,inFlight:!1}:{finalLikeState:t.user_action.liked,tempCurrentLikeState:t.user_action.liked,timer:null,inFlight:!1}),s(".LeeepReactionLike").addEventListener("click",P=>Je(P,t.id)),s(".LeeepReactionLikeIconLike").addEventListener("animationend",P=>P.target.classList.remove("animated")),s(".LeeepReactionLike").style.display="flex",ae.get(t.id).tempCurrentLikeState?s(".LeeepReactionLikeIconLike").style.display="block":s(".LeeepReactionLikeIconUnlike").style.display="block"}if(s(".LeeepListContent").style.display=c("User","hidden")&&!c("Caption","shown")&&!c("Date","shown")?"none":"block",o&&(s(".LeeepListUserImage").href=t.post_user.staff.staff_page_link,s(".LeeepListUserImage").target=r,s(".LeeepListUserName").href=t.post_user.staff.staff_page_link,s(".LeeepListUserName").target=r),o&&u.List.Follow==="shown"){if(Y.has(t.post_user.id))Y.get(t.post_user.id).elements.add(s(".LeeepFollowButton"));else{const S=Se(re,t.post_user.id),P=S?{...S,timer:null,inFlight:!1}:{finalFollowState:t.post_user.user_action.followed,tempCurrentFollowState:t.post_user.user_action.followed,timer:null,inFlight:!1};Y.set(t.post_user.id,{...P,elements:new Set([s(".LeeepFollowButton")])})}s(".LeeepFollowButton").addEventListener("click",S=>De(S,t.post_user.id)),s(".LeeepFollowButton").style.display="block",Y.get(t.post_user.id).tempCurrentFollowState?s(".LeeepFollowIconFollowed").style.display="inline":s(".LeeepFollowIconFollow").style.display="inline"}s(".LeeepListUserImage .LeeepLoadedImg").src=t.post_user.thumbnail_url,s(".LeeepListUserImage .LeeepLoadedImg").alt=t.post_user.name+"のアイコン",s(".LeeepListUserName").innerText=t.post_user.name;const y=t.post_height||t.post_user.height,I=s(".LeeepListUserHeight"),V=!c("UserHeight","hidden")&&y;I.innerText=V?y+"cm":"",I.style.display=V?"":"none",o&&(s(".LeeepListUserBrand").style.display=c("UserBrand","hidden")?"none":"block",s(".LeeepListUserBrand").innerText=((x=(N=t.post_user.staff)==null?void 0:N.brands[0])==null?void 0:x.name)||"",s(".LeeepListUserShop").style.display=c("UserShop","hidden")?"none":"block",s(".LeeepListUserShop").style.color=c("UserBrand","hidden")?"#999":"#444",s(".LeeepListUserShop").innerText=((R=(O=t.post_user.staff)==null?void 0:O.shops[0])==null?void 0:R.name)||""),s(".LeeepListCaption").innerText=t.caption,s(".LeeepListDate").innerText=(t.first_published_at||t.created_at).replaceAll("-","/").split(" ")[0].split("T")[0],s(".LeeepListUser").style.display=c("User","hidden")?"none":"flex",s(".LeeepListCaption").style.display=c("Caption","shown")&&t.caption!==""?"-webkit-box":"none",s(".LeeepListDate").style.display=c("Date","shown")?"block":"none",i.appendChild(p)}),document.dispatchEvent(new CustomEvent("onLeeepContentsRendered",{detail:o?{tag_id:h,staff_posts:e}:{tag_id:h,posts:e}}))}const Se=(e,o)=>{const i=sessionStorage.getItem(e);return i?JSON.parse(i)[o]??null:null},ie=(e,o,i,t)=>{const a=JSON.parse(sessionStorage.getItem(e)||"{}");a[o]=t?Object.keys(i).reduce((r,p)=>t.includes(p)?r:{...r,[p]:i[p]},a[o]):i,sessionStorage.setItem(e,JSON.stringify(a))},pe=(e,o)=>{e(".LeeepReactionLikeIconLike").style.display=o?"block":"none",e(".LeeepReactionLikeIconUnlike").style.display=o?"none":"block",o?e(".LeeepReactionLikeIconLike").classList.add("animated"):e(".LeeepReactionLikeIconLike").classList.remove("animated")},je=async(e,o,i,t,a)=>{const r=i?"like":"unlike";let p;try{p=await fetch(`${LeeepCite.domain}/v3/posts/${o}/${r}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({website_id:LeeepCite.site_id,user_id:LeeepCite.uid})})}catch(s){console.error(`/${r} fetch error`,s),e.version===t&&(e.isDetail&&(e.likeCount+=i?-1:1),e.tempCurrentLikeState=e.finalLikeState,pe(a,e.finalLikeState));return}if(!p.ok){console.error(`/${r} response error`,p),e.version===t&&(e.isDetail&&(e.likeCount+=i?-1:1),e.tempCurrentLikeState=e.finalLikeState,pe(a,e.finalLikeState));return}e.finalLikeState=i},Ce=async(e,o,i)=>{if(e.inFlight)return;if(e.finalLikeState===e.tempCurrentLikeState){ie(le,o,e);return}const t=e.tempCurrentLikeState,a=e.version;e.inFlight=!0;try{await je(e,o,t,a,i)}finally{e.inFlight=!1}ie(le,o,e),e.finalLikeState!==e.tempCurrentLikeState&&await Ce(e,o,i)},ke=e=>{const o=e.target.closest(".LeeepAlertTooltipContainer").querySelector(".LeeepAlertTooltip");o.classList.add("LeeepAlertTooltipVisible"),setTimeout(()=>{o.classList.remove("LeeepAlertTooltipVisible")},1e3)},Je=async(e,o)=>{e.preventDefault(),e.stopPropagation();const i=r=>e.target.closest(".LeeepReactionLike").querySelector(r),t=ae.get(o);if(!LeeepCite.uid){ke(e);return}const a=!t.tempCurrentLikeState;t.tempCurrentLikeState=!t.tempCurrentLikeState,t.version=(t.version||0)+1,pe(i,a),t.timer&&clearTimeout(t.timer),t.timer=setTimeout(async()=>{await Ce(t,o,i),t.timer=null},Oe)},Le=(e,o)=>{e.forEach(i=>{const t=a=>i.querySelector(a);t(".LeeepFollowIconFollow").style.display=o?"none":"inline",t(".LeeepFollowIconFollowed").style.display=o?"inline":"none"})},ze=async(e,o,i,t)=>{const a=i?"follow":"unfollow";let r;try{r=await fetch(`${LeeepCite.domain}/v3/staffs/${o}/${a}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({website_id:LeeepCite.site_id,user_id:LeeepCite.uid})})}catch(p){console.error(`/${a} fetch error`,p),e.version===t&&(e.tempCurrentFollowState=e.finalFollowState,Le(e.elements,e.finalFollowState));return}if(!r.ok){console.error(`/${a} response error`,r),e.version===t&&(e.tempCurrentFollowState=e.finalFollowState,Le(e.elements,e.finalFollowState));return}e.finalFollowState=i},be=async(e,o)=>{if(e.inFlight)return;if(e.finalFollowState===e.tempCurrentFollowState){ie(re,o,e,["elements"]);return}const i=e.tempCurrentFollowState,t=e.version;e.inFlight=!0;try{await ze(e,o,i,t)}finally{e.inFlight=!1}ie(re,o,e,["elements"]),e.finalFollowState!==e.tempCurrentFollowState&&await be(e,o)},De=async(e,o)=>{e.preventDefault(),e.stopPropagation();const i=Y.get(o);if(!LeeepCite.uid){ke(e);return}const t=!i.tempCurrentFollowState;i.tempCurrentFollowState=!i.tempCurrentFollowState,i.version=(i.version||0)+1,Le(i.elements,t),i.timer&&clearTimeout(i.timer),i.timer=setTimeout(async()=>{await be(i,o),i.timer=null},Be)};let fe=!1;function Pe(e){if(fe)return;fe=!0;const o=f(".LeeepListScrollOuter"),i=20,t=o.scrollLeft,a=Array.from(K(".LeeepPost")).map(y=>y.offsetLeft),r=f(".LeeepPost").clientWidth;let p=e?a.filter(y=>y<o.scrollLeft-o.clientWidth+r).pop()||0:a.filter(y=>y>o.scrollLeft+o.clientWidth-r).shift()||o.scrollWidth-o.clientWidth;p>o.scrollWidth-o.clientWidth&&(p=o.scrollWidth-o.clientWidth);const s=y=>{const I=y*(2-y);return t*(1-I)+p*I};let w=0;const F=y=>{w++,o.scrollTo(s(w/i),0),w<i?requestAnimationFrame(F):fe=!1};requestAnimationFrame(F)}window.addEventListener("resize",_e),window.addEventListener("message",e=>{var i;const o=e.data||{};o.ready&&o.tagId===h&&((i=document.querySelector("#LeeepTagIframeFullscreen").contentWindow)==null||i.postMessage({posts:q},"*"))})})();

})();
