PageSourceSearch

https://tjing.se/js/3477.e3e4b3c7.js

js tjing.se collected 2026-09-24 11:35:12 UTC 18,446 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunktjing"]=self["webpackChunktjing"]||[]).push([[3477],{9626:function(t,e,s){s.d(e,{A:function(){return c}});var a=function(){var t=this,e=t._self._c;return e("svg",{class:[t.color,t.direction],attrs:{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"11",viewBox:"0 0 18 11"}},[e("path",{staticClass:"fatchevron",attrs:{id:"Path_2379","data-name":"Path 2379",d:"M602.426,481.611l-9-8.913,2.107-2.087,6.893,6.826,6.893-6.826,2.107,2.087Z",transform:"translate(-593.426 -470.611)",fill:"#2d323c"}})])},i=[],r={props:["color","direction"],name:"ChevronFat"},o=r,n=s(81656),l=(0,n.A)(o,a,i,!1,null,"a15b7a66",null),c=l.exports},80865:function(t,e,s){s.d(e,{A:function(){return p}});var a=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.close,expression:"close"}],staticClass:"action-menu",class:{disabled:t.disabled}},[e("div",{staticClass:"action-menu-container",class:[t.color],on:{click:function(e){!t.disabled&&(t.open=!t.open)}}},[t._t("default"),e("transition",{attrs:{name:"menufade",mode:"out-in"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],ref:"itemsContainer",staticClass:"items-container",class:[t.position,{above:t.isAbove}]},[e("slide-up-down",{attrs:{active:t.open,duration:300}},t._l(t.items,(function(s,a){return e("div",{key:a,staticClass:"item",class:{selected:s.selected,disabled:s.disabled,divider:s.divider},style:{color:s.textColor},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.emitter(s,a)}}},[e("p",[t._v(t._s(s.title))])])})),0)],1)])],2)])},i=[],r=s(25276),o=s.n(r),n=s(43283),l={name:"CustomDropDown",props:["items","color","position","disabled"],components:{SlideUpDown:n.A},data(){return{open:!1,showConfirmation:-1,openSubItem:null,isAbove:!1}},watch:{escapePressed(){this.open=!1},open:function(t){t&&(this.isAbove=!1,this.$nextTick((()=>{this.adjustDropdownPosition()}))),this.$emit("open",t)}},methods:{adjustDropdownPosition(){const t=this.$refs.itemsContainer,e=t.getBoundingClientRect(),s=window.innerHeight;e.bottom+12>s&&(this.isAbove=!0)},emitter(t,e){t.disabled||t.selected||(this.close(),setTimeout((()=>{this.$emit(t.action,t.value)}),300))},close(){this.open=!1}},computed:{escapePressed(){return this.$store.getters.escapePressed}},directives:{ClickOutside:o()}},c=l,d=s(81656),u=(0,d.A)(c,a,i,!1,null,"0e5c19d2",null),p=u.exports},33878:function(t,e,s){s.d(e,{A:function(){return v}});var a=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.hide,expression:"hide"}]},[t._t("default"),e("div",{ref:"card",staticClass:"profile-card"},[e("div",{ref:"cardwrapper",staticClass:"card-wrapper"},[e("div",{staticClass:"top"},[e("span",{staticClass:"close-popover",on:{click:function(e){return t.hide()}}},[e("Crossmark",{attrs:{color:"white"}})],1),[e("div",{staticClass:"user-name"},[e("p",[e("b",[t._v(t._s(t.user.firstName)+" "+t._s(t.user.lastName))])])]),e("div",{staticClass:"club"},[e("p",[t._v(" "+t._s(t.user.profile.mainClubName||t.user.profile.club)+" ")])])]],2),e("div",{staticClass:"bottom"},[e("UserProfileAvatar",{attrs:{size:"XL",initials:t.user.firstName[0]+t.user.lastName[0],profileImageUrl:t.user.profile.profileImageUrl}}),e("div",{staticClass:"pdga"},[t.user.profile.pdgaNumber?e("p",[t._v(" PDGA: "),e("b",[t._v(t._s(t.user.profile.pdgaNumber))])]):t._e()]),t.user.profile.pdgaNumber?e("div",{staticClass:"rating"},[e("p",[t._v(" Rating: "),e("b",[t._v(t._s(t.user.profile.pdgaRating||"-"))])])]):t._e(),t.user.profile.country?e("span",{class:t.flagClass(t.user.profile.country.code)}):t._e(),e("router-link",{staticClass:"view-profile",attrs:{to:{name:"public-user",params:{userId:t.userId}}}},[t._v("View profile")])],1)])])],2)},i=[],r=s(96694),o=s(36498),n=s(25276),l=s.n(n),c=s(27244),d={name:"ProfilePopoverCard",directives:{ClickOutside:l()},components:{Crossmark:r.A,UserProfileAvatar:o.A},props:["userId"],data(){return{popper:null,hoverItem:null,showEvents:["click"],user:{id:" ",firstName:" ",lastName:" ",profile:{id:" ",club:" ",mainClubName:" ",mainClubSlug:" ",pdgaNumber:"-",pdgaRating:"-",profileImageUrl:null,country:{name:" ",code:" "}}}}},watch:{},computed:{},methods:{flagClass(t){return`fib fi-${t.toLowerCase()}`},async loadData(){try{const t=await this.$axios({data:{query:`\n            {\n              user(userId: "${this.userId}") {\n                id\n                firstName\n                lastName\n                profile {\n                  id\n                  club\n                  mainClubName\n                  mainClubSlug\n                  pdgaNumber\n                  pdgaRating\n                  profileImageUrl\n                  country{\n                    name\n                    code\n                  }\n                }\n              }\n            }\n          `}});this.user=t.data.data.user}catch(t){console.log(t)}}
1,async show(){await this.loadData(),this.showEvents.forEach((t=>{this.hoverItem.addEventListener(t,this.show)})),this.$refs.card.setAttribute("data-show",""),this.$nextTick((()=>{this.$refs.cardwrapper.classList.add("show")})),this.popper.setOptions((t=>({...t,modifiers:[...t.modifiers,{name:"eventListeners",enabled:!0}]}))),this.popper.update()},hide(){this.popper&&(this.$refs.cardwrapper.classList.remove("show"),setTimeout((()=>{this.$refs.card&&(this.$refs.card.removeAttribute("data-show",""),this.popper.setOptions((t=>({...t,modifiers:[...t.modifiers,{name:"eventListeners",enabled:!1}]}))))}),150))}},mounted(){this.hoverItem=this.$slots.default[0].elm,this.popper=(0,c.n4)(this.hoverItem,this.$refs.card,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,10]}}]}),this.showEvents.forEach((t=>{this.hoverItem.addEventListener(t,this.show)}))},beforeCreate(){},destroyed(){this.popper&&(this.showEvents.forEach((t=>{this.hoverItem.removeEventListener(t,this.show)})),this.popper.destroy())}},u=d,p=s(81656),h=(0,p.A)(u,a,i,!1,null,"3f209efb",null),v=h.exports},65228:function(t,e,s){s.d(e,{A:function(){return c}});var a=function(){var t=this,e=t._self._c;return e("div",{ref:"smartsticky",staticClass:"smart-sticky-header",class:{sticky:t.isSticky},style:{top:t.itemHeight+"px"}},[t._t("default")],2)},i=[],r={name:"SmartStickyHeader",props:{itemHeight:{type:Number,default:-100}},data(){return{isSticky:!1}},computed:{},methods:{handleScroll(){const t=window.pageYOffset||document.documentElement.scrollTop,e=this.$el.getBoundingClientRect();t<this.lastScrollPosition&&e.top<=0?this.isSticky=!0:(t>this.lastScrollPosition||e.top>0)&&(this.isSticky=!1),this.lastScrollPosition=t}},mounted(){window.addEventListener("scroll",this.handleScroll)},beforeCreate(){},beforeDestroy(){window.removeEventListener("scroll",this.handleScroll)}},o=r,n=s(81656),l=(0,n.A)(o,a,i,!1,null,"4afc7adc",null),c=l.exports},64776:function(t,e,s){s.d(e,{A:function(){return c}});var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"default-toggle",class:[t.size]},[e("label",{staticClass:"toggle",class:{disabled:t.disabled}},[e("input",{attrs:{type:"checkbox",disabled:t.disabled},domProps:{checked:t.value},on:{change:function(e){return t.updateValue(e.target.checked)}}}),e("span",{staticClass:"slider"})])])},i=[],r={name:"DefaultToggle",props:["value","disabled","size"],data(){return{}},computed:{},methods:{updateValue:function(t){this.$emit("input",t)}},mounted(){},beforeCreate(){},destroyed(){}},o=r,n=s(81656),l=(0,n.A)(o,a,i,!1,null,"33fdcb79",null),c=l.exports},73877:function(t,e,s){s.d(e,{A:function(){return p}});var a=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.close,expression:"close"}],staticClass:"tooltip-container",class:t.color,on:{click:function(e){t.active=!0}}},[t.active?e("span",{staticClass:"text-tooltip-content",attrs:{id:t.unique}}
1,[t._t("tooltip"),e("div",{attrs:{id:"arrow","data-popper-arrow":""}})],2):t._e(),e("span",{ref:"content",staticClass:"content-container"},[t._t("content")],2)])},i=[],r=s(27244),o=s(25276),n=s.n(o),l={name:"TjingTextWrapTooltip",props:["position","unique","color"],data(){return{active:!1,popperInstance:null}},directives:{ClickOutside:n()},watch:{active:function(t,e){t?this.open():(this.popperInstance.destroy(),this.popperInstance=null)}},computed:{},methods:{close(){this.active&&(this.active=!1)},open(){this.$nextTick((()=>{const t=this.$refs.content,e=document.getElementById(this.unique);this.popperInstance=(0,r.n4)(t,e,{placement:this.position||"top",modifiers:[{name:"preventOverflow",options:{mainAxis:!0,padding:{right:12,left:12}}},{name:"offset",options:{offset:[0,15]}}]})}))}},mounted(){},beforeCreate(){},destroyed(){}},c=l,d=s(81656),u=(0,d.A)(c,a,i,!1,null,"179aa984",null),p=u.exports},33477:function(t,e,s){s.r(e),s.d(e,{default:function(){return w}});var a=function(){var t=this,e=t._self._c;return t.loading?t._e():e("div",{staticClass:"global-leaderboard"},[e("h1",[t._v("Global Leaderboard")]),e("p",{staticClass:"description"},[t._v(" The global leaderboard shows the top 100 rounds based on Tjing Rating. You can also see the hottest rounds based on the par and only show the best round for each player. ")]),e("div",{staticClass:"content-header"},[e("div",{staticClass:"desktop-nav"},[e("CustomDropDown",{attrs:{position:"left",items:t.sortItems},on:{changeSort:function(e){t.sortBy=e,t.loadData()}}},[e("div",{staticClass:"selector-wrapper"},[e("p",[e("b",[t._v(t._s(t.selectedSortName))])]),e("ChevronFat",{attrs:{direction:"down"}})],1)]),e("div",{staticClass:"unique-toggle-wrapper"},[e("div",{staticClass:"toggle-label"},[e("span",[t._v("Only best rounds")]),e("DefaultToggle",{attrs:{value:t.uniqueUsers},on:{input:function(e){t.uniqueUsers=e,t.loadData()}}})],1)])],1)]),e("SmartStickyHeader",[e("div",{staticClass:"mobile-nav"},[e("select",{directives:[{name:"model",rawName:"v-model",value:t.sortBy,expression:"sortBy"}],staticClass:"sort-selector",on:{change:[function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.sortBy=e.target.multiple?s:s[0]},function(e){t.sortBy=e.target.value,t.loadData()}]}},[e("option",{attrs:{value:"RATING"}},[t._v("Rating")]),e("option",{attrs:{value:"PAR"}},[t._v("Par")])]),e("div",{staticClass:"mobile-toggle"},[e("div",{staticClass:"toggle-label"},[e("span",[t._v("Best rounds only")]),e("DefaultToggle",{attrs:{value:t.uniqueUsers},on:{input:function(e){t.uniqueUsers=e,t.loadData()}}})],1)])])]),e("div",{staticClass:"standings-table"},[t._m(0),e("div",{staticClass:"table-body"},t._l(t.leaderboardData,(function(s){return e("div",{staticClass:"player-row"},[e("div",{staticClass:"position"},[e("p",[t._v(t._s(s.position))])]),e("div",{staticClass:"player"},[e("ProfilePopoverCard",{attrs:{userId:s.userId}},[e("div",{staticClass:"player-wrapper"},[e("UserProfileAvatar",{attrs:{size:"S",desktopSize:"D-M",profileImageUrl:s.user.profile.profileImageUrl,initials:s.user.firstName.charAt(0)+s.user.lastName.charAt(0)}}),e("p",[t._v(t._s(s.user.firstName)+" "+t._s(s.user.lastName))])],1)])],1),e("div",{staticClass:"score"},[e("p",[t._v(t._s(s.totalThrows))])]),e("div",{staticClass:"par"},[e("p",[t._v(t._s(t.convertPar(s.totalPar)))])]),e("div",{staticClass:"rating"},[e("TjingTextWrapTooltip",{staticClass:"tooltip-container",attrs:{unique:"rating-"+s.userId+"-"+s.eventId},scopedSlots:t._u([{key:"tooltip",fn:function(){return[e("p",[e("b",[t._v("Date:")]),t._v(" "+t._s(t.formatDate(s.date)))]),e("p",[e("b",[t._v("Course:")]),t._v(" "+t._s(s.courseName)+", "+t._s(s.layoutName)+" ")]),e("router-link",{staticClass:"event-link",attrs:{to:{name:"public-event-division-results",params:{eventId:s.eventId}}}},[t._v(" View event ")])]},proxy:!0},{key:"content",fn:function(){return[e("span",{staticClass:"rating-value"},[t._v(t._s(s.rating))])]},proxy:!0}],null,!0)})],1),e("div",{staticClass:"date"},[e("p",[t._v(t._s(t.formatDate(s.date)))])]),"PUBLIC"===s.course.type?e("div",{staticClass:"course"},[e("p",[e("router-link",{staticClass:"course-link",attrs:{to:{name:"course-overview",params:{courseId:s.courseId}}}},[t._v(" "+t._s(s.courseName)+" ")]),t._v(" , "),e("router-link",{staticClass:"layout-link",attrs:{to:{name:"course-layout",params:{courseId:s.courseId,layoutId:s.layoutId}}}},[t._v(" "+t._s(s.layoutName)+" ")])],1)]):e("div",{staticClass:"course"},[e("p",[t._v(t._s(s.courseName)+", "+t._s(s.layoutName))])]),e("div",{staticClass:"event"},[e("router-link",{staticClass:"event-link",attrs:{to:{name:"public-event-division-results",params:{eventId:s.eventId}}}},[e("EventIcon")],1)],1)])})),0)])],1)},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"table-header"},[e("div",{staticClass:"position"},[e("p",[t._v("Rank")])]),e("div",{staticClass:"player"},[e("p",[t._v("Player")])]),e("div",{staticClass:"score"},[e("p",[t._v("Score")])]),e("div",{staticClass:"par"},[e("p",[t._v("Par")])]),e("div",{staticClass:"rating"},[e("p",[t._v("Rating")])]),e("div",{staticClass:"date"},[e("p",[t._v("Date")])]),e("div",{staticClass:"course"},[e("p",[t._v("Course")])]),e("div",{staticClass:"event"},[e("p",[t._v("Event")])])])}],r=s(33878),o=s(36498),n=s(80865),l=s(9626),c=s(64776),d=function(){var t=this,e=t._self._c;return e("svg",{class:t.color,attrs:{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"24",viewBox:"0 0 18 24"}},[e("path",{staticClass:"a",attrs:{d:"M16.222,1.756a6.048,6.048,0,0,0-8.522,0L4.858,4.581A5.99,5.99,0,0,0,9.119,14.809a6.054,6.054,0,0,0,2.572-.6A2.826,2.826,0,0,0,10.358,12.6a4.028,4.028,0,0,1-4.08
1-.957,3.986,3.986,0,0,1,0-5.651L9.119,3.169a4.032,4.032,0,0,1,5.682,0,3.982,3.982,0,0,1,0,5.651l-1.213,1.207c.078.072.161.139.237.215a7,7,0,0,1,1.045,1.336l1.352-1.345a5.971,5.971,0,0,0,0-8.476Z",transform:"translate(0.014 0)"}}),e("path",{staticClass:"a",attrs:{d:"M14.8,14.167a5.934,5.934,0,0,0-1.671-3.21,6.006,6.006,0,0,0-1.1-.861h0a5.982,5.982,0,0,0-1.5-.661l-.039-.01A6.092,6.092,0,0,0,9.8,9.28c-.058-.009-.116-.019-.174-.026a6.2,6.2,0,0,0-.76-.053,5.931,5.931,0,0,0-1.017.1c-.067.011-.135.021-.2.035a6,6,0,0,0-.918.266c-.025.01-.053.013-.078.023l.005.008c-.152.06-.3.119-.451.191a2.958,2.958,0,0,0,.7,1.128,3,3,0,0,0,.66.481c.087-.03.179-.046.268-.071.129-.036.257-.075.39-.1a3.7,3.7,0,0,1,.642-.06,4.03,4.03,0,0,1,2.84,1.171,3.981,3.981,0,0,1,0,5.65l-2.84,2.826a4.04,4.04,0,0,1-5.683,0,3.982,3.982,0,0,1,0-5.651l1.17-1.163c-.1-.086-.195-.167-.287-.259A6.985,6.985,0,0,1,3.06,12.494l-1.3,1.288a5.971,5.971,0,0,0,0,8.476,6.059,6.059,0,0,0,8.523,0l2.84-2.826a5.934,5.934,0,0,0,1.765-4.237,6.042,6.042,0,0,0-.082-.957C14.807,14.214,14.8,14.191,14.8,14.167Z",transform:"translate(0 -0.01)"}})])},u=[],p={name:"CopyLink",props:["color"]},h=p,v=s(81656),m=(0,v.A)(h,d,u,!1,null,"5e1a58fc",null),f=m.exports,g=s(65228),C=s(73877),_={name:"GlobalLeaderboard",components:{ProfilePopoverCard:r.A,UserProfileAvatar:o.A,CustomDropDown:n.A,ChevronFat:l.A,DefaultToggle:c.A,EventIcon:f,SmartStickyHeader:g.A,TjingTextWrapTooltip:C.A},data(){return{loading:!0,leaderboardData:[],sortBy:"RATING",uniqueUsers:!1}},computed:{selectedSortName(){const t={RATING:"Rating",PAR:"Total Par"};return t[this.sortBy]||"Rating"},sortItems(){return[{title:"Rating",action:"changeSort",value:"RATING",selected:"RATING"===this.sortBy},{title:"Par",action:"changeSort",value:"PAR",selected:"PAR"===this.sortBy}]},direction(){return"PAR"===this.sortBy?"ASC":"DESC"}},methods:{convertPar(t){return 0==t?"E":t>0?"+"+t:t},formatDate(t){const e=new Date(t);return e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})},async loadData(){try{const t=await this.$axios({data:{query:`\n            query CompetitiveRoundsLeaderboard {\n                competitiveRoundsLeaderboard(sortBy: ${this.sortBy}, direction: ${this.direction}, uniqueUsers: ${this.uniqueUsers}, first: 100) {\n                    poolId\n                    userId\n                    courseId\n                    courseName\n                    layoutId\n                    layoutName\n                    layoutPar\n                    date\n                    totalThrows\n                    totalPar\n                    rating\n                    eventId\n                    course{\n                        type\n                    }\n                    user {\n                        id\n                        firstName\n                        lastName\n                        profile{\n                            profileImageUrl\n                        }\n                    }\n                    position\n                }\n            }\n            `}});this.leaderboardData=t.data.data.competitiveRoundsLeaderboard,this.loading=!1}catch(t){console.error("Error loading leaderboard data:",t),this.loading=!1}}},mounted(){this.loadData()}},y=_,b=(0,v.A)(y,a,i,!1,null,"135854aa",null),w=b.exports},43283:function(t,e){e.A={name:"SlideUpDown",props:{active:Boolean,duration:{type:Number,default:500},tag:{type:String,default:"div"},useHidden:{type:Boolean,default:!0}},data:function(){return{style:{},initial:!1,hidden:!1}},watch:{active:function(){this.layout()}},render:function(t){return t(this.tag,{style:this.style,attrs:this.attrs,ref:"container",on:{transitionend:this.onTransitionEnd}},this.$slots.default)},mounted:function(){this.layout(),this.initial=!0},created:function(){this.hidden=!this.active},computed:{el:function(){return this.$refs.container},attrs:function(){var t={"aria-hidden":!this.active,"aria-expanded":this.active};return this.useHidden&&(t.hidden=this.hidden),t}},methods:{layout:function(){var t=this;this.active?(this.hidden=!1,this.$emit("open-start"),this.initial&&this.setHeight("0px",(function(){return t.el.scrollHeight+"px"}))):(this.$emit("close-start"),this.setHeight(this.el.scrollHeight+"px",(function(){return"0px"})))}
1,asap:function(t){this.initial?this.$nextTick(t):t()},setHeight:function(t,e){var s=this;this.style={height:t},this.asap((function(){s.__=s.el.scrollHeight,s.style={height:e(),overflow:"hidden","transition-property":"height","transition-duration":s.duration+"ms"}}))},onTransitionEnd:function(t){t.target===this.el&&(this.active?(this.style={},this.$emit("open-end")):(this.style={height:"0",overflow:"hidden"},this.hidden=!0,this.$emit("close-end")))}}}}}]);
2//# sourceMappingURL=3477.e3e4b3c7.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.