PageSourceSearch

https://www.treedom.net/_next/static/chunks/pages/my/organization/[slug]/map/[[...route]]-61ed36dd6524924c.js

js treedom.net collected 2026-10-02 04:12:15 UTC 43,941 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3665,3189],{21347:function(e,n,i){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserProfileForests"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"locale"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pagination"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PaginationInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"forests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"pagination"},value:{kind:"Variable",name:{kind:"Name",value:"pagination"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ForestCard"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"endCursor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasNextPage"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:402}};t.loc.source={body:"#import '@/components/molecules/ForestCard/ForestCard.treedom-next.gql'\n\nquery UserProfileForests(\n  $slug: String!\n  $locale: String!\n  $pagination: PaginationInput!\n) {\n  user(slug: $slug) {\n    id\n    forests(pagination: $pagination) {\n      totalCount\n      edges {\n        node {\n          ...ForestCard\n        }\n      }\n      pageInfo {\n        endCursor\n        hasNextPage\n      }\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};t.definitions=t.definitions.concat(i(34970).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!a[n]&&(a[n]=!0,!0)}));var r={};function s(e,n){for(var i=0;i<e.definitions.length;i++){var t=e.definitions[i];if(t.name&&t.name.value==n)return t}}t.definitions.forEach(function(e){if(e.name){var n=new Set;(function e(n,i){if("FragmentSpread"===n.kind)i.add(n.name.value);else if("VariableDefinition"===n.kind){var t=n.type;"NamedType"===t.kind&&i.add(t.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,i)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,i)}),n.definitions&&n.definitions.forEach(function(n){e(n,i)})})(e,n),r[e.name.value]=n}}),e.exports=t,e.exports.UserProfileForests=function(e,n){var i={kind:e.kind,definitions:[s(e,n)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var t=r[n]||new Set,a=new Set,l=new Set;for(t.forEach(function(e){l.add(e)});l.size>0;){var o=l;l=new Set,o.forEach(function(e){a.has(e)||(a.add(e),(r[e]||new Set).forEach(function(e){l.add(e)}))})}return a.forEach(function(n){var t=s(e,n);t&&i.definitions.push(t)}),i}(t,"UserProfileForests")},12180:function(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"UserProfileTreesTree"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Tree"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"registryId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profileName"},arguments:[{kind:"Argument",name:{kind:"Name",value:"locale"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profilePicture"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[{kind:"Argument",name:{kind:"Name",value:"transform"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"240"}},{kind:"ObjectField",name:{kind:"Name",value:"height"},value:{kind:"IntValue",value:"250"}},{kind:"ObjectField",name:{kind:"Name",value:"resizeMode"},value:{kind:"EnumValue",value:"FILL"}}
1,{kind:"ObjectField",name:{kind:"Name",value:"quality"},value:{kind:"IntValue",value:"100"}}]}}],directives:[]},{kind:"Field",alias:{kind:"Name",value:"blurDataUrl"},name:{kind:"Name",value:"url"},arguments:[{kind:"Argument",name:{kind:"Name",value:"transform"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"10"}},{kind:"ObjectField",name:{kind:"Name",value:"height"},value:{kind:"IntValue",value:"10"}},{kind:"ObjectField",name:{kind:"Name",value:"resizeMode"},value:{kind:"EnumValue",value:"FILL"}},{kind:"ObjectField",name:{kind:"Name",value:"quality"},value:{kind:"IntValue",value:"80"}}]}}],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"projectSpecie"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scientificSpecie"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scientificName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"project"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"flagImage"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[{kind:"Argument",name:{kind:"Name",value:"transform"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"30"}},{kind:"ObjectField",name:{kind:"Name",value:"height"},value:{kind:"IntValue",value:"30"}}]}}],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[{kind:"Argument",name:{kind:"Name",value:"locale"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profile"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserProfileTrees"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"locale"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pagination"}},type:{kind:"NamedType",name:{kind:"Name",value:"PaginationInput"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"countryCode"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"trees"},arguments:[{kind:"Argument",name:{kind:"Name",value:"pagination"},value:{kind:"Variable",name:{kind:"Name",value:"pagination"}}},{kind:"Argument",name:{kind:"Name",value:"where"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"countryCode"},value:{kind:"Variable",name:{kind:"Name",value:"countryCode"}}},{kind:"ObjectField",name:{kind:"Name",value:"ownershipType"}
1,value:{kind:"ListValue",values:[{kind:"EnumValue",value:"OWNED"}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"UserProfileTreesTree"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"cursor"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endCursor"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"countries"},arguments:[{kind:"Argument",name:{kind:"Name",value:"where"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"treeType"},value:{kind:"EnumValue",value:"ALL"}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[{kind:"Argument",name:{kind:"Name",value:"locale"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:1245}};n.loc.source={body:"fragment UserProfileTreesTree on Tree {\n  id\n  registryId\n  name\n  profileName(locale: $locale)\n  status\n  profilePicture {\n    url(transform: { width: 240, height: 250, resizeMode: FILL, quality: 100 })\n    blurDataUrl: url(\n      transform: { width: 10, height: 10, resizeMode: FILL, quality: 80 }\n    )\n  }\n  projectSpecie {\n    id\n    scientificSpecie {\n      id\n      scientificName\n    }\n    project {\n      id\n      country {\n        flagImage {\n          url(transform: { width: 30, height: 30 })\n        }\n        name(locale: $locale)\n      }\n    }\n  }\n  owner {\n    type\n    profile {\n      slug\n    }\n  }\n}\n\nquery UserProfileTrees(\n  $slug: String!\n  $locale: String!\n  $pagination: PaginationInput\n  $countryCode: ID\n) {\n  user(slug: $slug) {\n    id\n    trees(\n      pagination: $pagination\n      where: { countryCode: $countryCode, ownershipType: [OWNED] }\n    ) {\n      edges {\n        node {\n          ...UserProfileTreesTree\n        }\n        cursor\n      }\n      pageInfo {\n        hasNextPage\n        endCursor\n      }\n      totalCount\n    }\n    countries(where: { treeType: ALL }) {\n      edges {\n        node {\n          country {\n            name(locale: $locale)\n            code\n          }\n        }\n      }\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function t(e,n){for(var i=0;i<e.definitions.length;i++){var t=e.definitions[i];if(t.name&&t.name.value==n)return t}}function a(e,n){var a={kind:e.kind,definitions:[t(e,n)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var r=i[n]||new Set,s=new Set,l=new Set;for(r.forEach(function(e){l.add(e)});l.size>0;){var o=l;l=new Set,o.forEach(function(e){s.has(e)||(s.add(e),(i[e]||new Set).forEach(function(e){l.add(e)}))})}return s.forEach(function(n){var i=t(e,n);i&&a.definitions.push(i)}),a}n.definitions.forEach(function(e){if(e.name){var n=new Set;(function e(n,i){if("FragmentSpread"===n.kind)i.add(n.name.value);else if("VariableDefinition"===n.kind){var t=n.type;"NamedType"===t.kind&&i.add(t.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,i)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,i)}),n.definitions&&n.definitions.forEach(function(n){e(n,i)})})(e,n),i[e.name.value]=n}}
1),e.exports=n,e.exports.UserProfileTreesTree=a(n,"UserProfileTreesTree"),e.exports.UserProfileTrees=a(n,"UserProfileTrees")},66011:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my/organization/[slug]/map/[[...route]]",function(){return i(41429)}])},40501:function(e,n,i){"use strict";i.d(n,{a:function(){return a}});var t=i(85893);i(67294);let a=e=>{let{percent:n=0,radius:i,color:a="rgba(235, 250, 239, 1)",percentColor:r="rgba(55, 137, 78, 1)",...s}=e,l=.15*i,o=i-l,d=2*o*Math.PI,c=.75*d,u="".concat(c," ").concat(d),m="rotate(135, ".concat(i,", ").concat(i,")");return(0,t.jsxs)("svg",{viewBox:"0 0 ".concat(i,"px ").concat(2*i,"px"),width:"".concat(2*i,"px"),height:"".concat(2*i,"px"),...s,children:[(0,t.jsx)("circle",{cx:i,cy:i,fill:"transparent",r:o,stroke:a,strokeDasharray:u,strokeLinecap:"round",strokeWidth:l,transform:m}),(0,t.jsx)("circle",{cx:i,cy:i,fill:"transparent",r:o,stroke:r,strokeDasharray:u,strokeDashoffset:c-n/100*c,strokeLinecap:"round",strokeWidth:1.1*l,style:{transition:"stroke-dashoffset 0.3s"},transform:m})]})}},64726:function(e,n,i){"use strict";i.d(n,{l:function(){return f}});var t=i(85893),a=i(67294),r=i(89382),s=i(93967),l=i.n(s),o=i(55768),d=i(89568),c=i(12639),u=i.n(c);let m=e=>{let{currentIndex:n,hasPrev:i,hasNext:a,onNext:r,onPrev:s,slideTo:l}=e;return(0,t.jsxs)(d.W,{maxWidth:"xl",className:u().controls,children:[i&&(0,t.jsx)("button",{type:"button",className:u().controlPrev,onClick:s,children:(0,t.jsx)(o.Z,{})}),a&&(0,t.jsx)("button",{type:"button",className:u().controlNext,onClick:r,children:(0,t.jsx)(o.Z,{})})]})},v={loop:!1,align:"start",active:!0,axis:"x",direction:"ltr",dragFree:!1,inViewThreshold:1,skipSnaps:!0},f=e=>{var n;let{slides:i,classes:s={},components:o={Controls:m},noControls:d=!1,sliderOptions:c}=e,{Controls:f=m}=o,[p,g]=(0,r.Z)({...v,...c}),[h,k]=(0,a.useState)(0),[x,N]=(0,a.useState)(!1),[j,b]=(0,a.useState)([0,i.length-1]),A=(0,a.useCallback)(e=>{g&&(g.scrollTo(e,!1),N(!0),setTimeout(()=>{N(!1)},500))},[g]);(0,a.useEffect)(()=>{if(!g)return()=>null;let e=()=>{k(g.selectedScrollSnap()),b(g.slidesInView())},n=()=>{N(!0)},i=()=>{N(!1)};return g.on("init",e),g.on("select",e),g.on("resize",e),g.on("scroll",n),g.on("select",i),g.on("settle",i),()=>{g.off("init",e),g.off("select",e),g.off("resize",e),g.off("scroll",n),g.off("select",i),g.off("settle",i)}},[g]),(0,a.useEffect)(()=>{g&&b(g.slidesInView())},[g]);let y=Math.max(...j)<i.length-1,S=Math.min(...j)>0;return(0,t.jsxs)("div",{className:l()(u().root,{[null!==(n=s.sliding)&&void 0!==n?n:""]:x}),children:[(0,t.jsx)("div",{ref:p,className:l()(u().slider,s.slider),children:(0,t.jsx)("div",{ref:()=>null==g?void 0:g.reInit(),className:l()(u().slides,s.slides),children:i.map(e=>(0,t.jsx)(a.Fragment,{children:e.value},e.key))})}),!d&&(0,t.jsx)(f,{hasPrev:S,hasNext:y,onPrev:()=>A(h-1),onNext:()=>A(h+1),currentIndex:h,slideTo:A})]})}},19425:function(e,n,i){"use strict";i.d(n,{Y:function(){return u}});var t=i(85893);i(67294);var a=i(93967),r=i.n(a),s=i(25675),l=i.n(s),o=i(60500),d=i(34219),c=i.n(d);let u=e=>{let{src:n,blurDataURL:i,alt:a,variant:s,plus:d,className:u,...m}=e;return(0,t.jsxs)("div",{...m,className:r()(c().root,{[c().plus]:d,[c().compact]:"compact"===s},u),children:[(0,t.jsx)("div",{className:c().image,children:(0,t.jsx)(l(),{src:n,blurDataURL:i,placeholder:"blur",alt:a,fill:!0,unoptimized:!0,unselectable:"on",style:{objectFit:"cover"}})}),d&&(0,t.jsx)("div",{className:c().badge,children:(0,t.jsx)(o.Z,{})})]})}},18437:function(e,n,i){"use strict";i.d(n,{s:function(){return v}});var t=i(85893),a=i(93967),r=i.n(a),s=i(36220),l=i(87646),o=i(75162),d=i(84545);i(67294);var c=i(78377),u=i.n(c);let m=e=>{let{icon:n,children:i,className:a,...l}=e;return(0,t.jsxs)("span",{...l,className:r()(u().root,a),children:[n,(0,t.jsx)(s.r,{variant:"body",component:"span",color:"inherit",className:u().text,children:i})]})},v=e=>{let{badges:n,variant:i}=e;switch(i){case"registered":return(0,t.jsx)(m,{className:u().registered,children:(0,t.jsx)(d.cC,{i18nKey:"common.user.badges.registered",children:"Registered"})});case"newbie":return(0,t.jsx)(m,{className:u().newbie,children:(0,t.jsx)(d.cC,{i18nKey:"common.user.badges.newbie",children:"Newbie"})});case"premium":return(0,t.jsx)(m,{className:u().premium,icon:(0,t.jsx)(l.Z,{}),children:(0,t.jsx)(d.cC,{i18nKey:"common.user.badges.treedomer",children:"Treedomer"})});case"badge":return(0,t.jsx)(m,{className:u().badge,icon:(0,t.jsx)(o.Z,{}),children:(0,t.jsxs)(d.cC,{i18nKey:"common.user.badges.badges",count:n,children:[{count:n}," Badge"]})});default:throw Error("Invalid variant ".concat(i))}}},8226:function(e,n,i){"use strict";i.d(n,{ht:function(){return h},Zl:function(){return k.Zl}});var t=i(85893),a=i(93967),r=i.n(a),s=i(67294),l=i(5152),o=i.n(l),d=i(20469),c=i(39556),u=i.n(c),m=i(4676),v=i(94680),f=i(72756);let p=(0,s.forwardRef)(function(e,n){let{"data-testid":i,onClickButtonHandler:a,transparent:l}=e,{totalItems:o}=(0,d.j)(),c=(0,s.useCallback)(e=>{a(e)},[a]);return(0,t.jsx)(m.C,{badgeContent:o,invisible:o<1,"data-testid":"".concat(i,"-count-badge"),children:(0,t.jsx)(v.z,{className:r()(u()["anchor-button"],{[u().transparent]:l}),"data-testid":i,onClick:c,ref:n,"aria-label":"Cart Summary",startIcon:(0,t.jsx)(f.Z,{size:"large"})})})}),g=o()(()=>i.e(29324).then(i.bind(i,29324)).then(e=>e.CartMenu),{loadableGenerated:{webpack:()=>[29324]},ssr:!1}),h=e=>{let{"data-testid":n="CartDropdown",transparent:i}=e,a=(0,s.useRef)(null),l=(0,s.useRef)(null),{dropdownState:o,items:c,handleDropdownInteraction:m}=(0,d.j)(),v=r()([u().caret,{[u()["caret-visible"]]:o.isOpen}]);return(0,t.jsxs)("div",{className:u()["cart-dropdown"],"data-testid":n,children:[(0,t.jsx)(p,{"data-testid":"".concat(n,"-anchor"),onClickButtonHandler:e=>m(e,!o.isOpen),ref:l,transparent:i}),(0,t.jsxs)("div",{className:u()["cart-dropdown-shadow"],role:"presentation",onMouseEnter:e=>{o.isFocused||m(e,!0)},ref:a,children:[(0,t.jsx)("i",{className:v}),o.isOpen&&(0,t.jsx)(g,{anchorEl:l.current,container:a.current,"data-testid":"".concat(n,"-menu"),isOpen:o.isOpen,items:c})]})]})};var k=i(21537)},3189:function(e,n,i){"use strict";i.d(n,{Iw:function(){return e5},fm:function(){return L},kd:function(){return _}});var t=i(85893),a=i(67294),r=i(39332),s=i(93967),l=i.n(s),o=i(89568),d=i(24890),c=i(37641),u=i(36220),m=i(45636),v=i(94680),f=i(52733),p=i(30505),g=i(55768),h=i(93432),k=i(71424),x=i(34501),N=i(17008),j=i(11163),b=i.n(j),A=i(69307),y=i(84545),S=i(94356),C=i(10786),w=i(14239),F=i(91992),T=i(63754),P=i.n(T);let E=e=>{let{children:n,active:i,duration:r=100,delay:s=0,style:o,animateO
1nMount:d=!1}=e,[c,u]=(0,a.useState)("not-started");(0,a.useEffect)(()=>{setTimeout(()=>u("ended"),r+s),u("started")},[r,s,i]);let[m,v]=(0,a.useState)(d);return(0,a.useEffect)(()=>{d||setTimeout(()=>{v(!0)},s+r)},[m,d,s,r]),(0,t.jsx)("div",{className:l()(P().root,{[P().doNotAnimate]:!m}),style:{...o({status:c,matches:i}),animationDuration:"".concat(r,"ms"),animationDelay:"".concat(s,"ms"),animationFillMode:"both"},children:n})};var V=i(61498),I=i.n(V);let O=e=>{let{children:n,active:i,duration:a=300,delay:r=0,animateOnMount:s=!1}=e;return(0,t.jsx)(E,{animateOnMount:s,duration:a,delay:r,active:i,style:e=>{let{matches:n,status:i}=e;return n&&"started"===i?{animationName:I().fadeOut}:n&&"ended"===i?{display:"none",visibility:"hidden",animationName:I().fadeOut}:n?{}:{animationName:I().fadeIn}},children:n})};var D=i(15967),U=i(19425),B=i(18437),M=i(82171);let _=e=>{var n;return"object"==typeof e&&null!==e&&"routes"in e&&"user"in e&&"object"==typeof e.user&&null!==e.user&&"type"in e.user&&(null===(n=e.user)||void 0===n?void 0:n.type)===M.FW.Private},L=(0,a.createContext)(null),z=()=>{let e=(0,a.useContext)(L);if(!e)throw Error("useUserProfile must be used within a UserProfileContext");return e};var K=i(28478),R=i.n(K);let Z=e=>{let{icon:n,value:i,label:a,premium:r}=e;return(0,t.jsxs)("div",{className:l()(R().number,{[R().premium]:r}),children:[(0,t.jsx)(c.N,{children:n}),(0,t.jsxs)("div",{className:R().text,children:[(0,t.jsx)(u.r,{variant:"body",component:"h5",color:"inherit",className:R().value,bold:!0,children:i}),(0,t.jsxs)(u.r,{variant:"body",component:"div",color:"inherit",className:R().label,children:[(0,t.jsx)(m.i,{className:R().icon,children:n}),a]})]})]})},G=()=>{let e=(0,w.Sy)(),n=(0,C.b)(),{user:i}=z(),a=(0,d.w8)(i.profile);return(0,t.jsxs)("div",{className:R().actions,children:[a&&(0,t.jsx)(v.z,{classNameExtended:R().settings,variant:"negative",onClick:()=>b().push(F.PATHS.settings.index),"data-testid":"organization-profile-layout-header-settings",children:(0,t.jsx)(f.Z,{size:"large"})}),(0,t.jsx)(v.z,{classNameExtended:R().share,variant:"contained",onClick:()=>e({url:"".concat(window.location.origin,"/").concat(n).concat(F.PATHS.user(i.profile.slug).news)}),"data-testid":"organization-profile-header-share",children:(0,t.jsx)(p.Z,{size:"large"})})]})},W=()=>{let[e,n]=(0,a.useState)({width:0,height:0}),[i]=(0,A.x)(e=>{let[i]=e;i&&n(i.contentRect)});return[i,(0,t.jsx)("div",{style:{height:e.height,width:e.width}})]},H={lemuri:"/_next/static/media/LemureBannerBig.1fbf7edd.webp",elefanti:"/_next/static/media/ElefanteBannerBig.d9ce5d9f.webp",pappagalli:"/_next/static/media/PappagalloBannerBig.04e0d193.webp"},Q=e=>{var n;let{variant:i}=e,[a,r]=W(),s=(0,C.b)(),{user:o,routes:d,userTeam:c}=z(),m=o.profile.badges.filter(e=>{let{unlocked:n}=e;return n}).length,v=o.trees.totalCount,f=!(0,D.i)()&&"compact"===i,p=c&&null!==(n=H[c])&&void 0!==n?n:null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:a,className:l()(R().root,{[R().standard]:"standard"===i,[R().compact]:"compact"===i,[R().fixed]:f}),style:p?{"--squad-bg":"url(".concat(p,")")}:void 0,children:[(0,t.jsx)("div",{className:R().background,"aria-hidden":"true"}),(0,t.jsxs)("div",{className:R().content,children:[(0,t.jsx)(O,{active:"compact"!==i,animateOnMount:!1,children:(0,t.jsx)("button",{"data-testid":"user-profile-header-back-button",type:"button",className:R().back,onClick:()=>{b().push(d.main,void 0,{shallow:!0,scroll:!0})},children:(0,t.jsx)(g.Z,{size:"large",rotate:180})})}),(0,t.jsx)(U.Y,{src:o.profile.avatar.url,blurDataURL:o.profile.avatar.blurDataURL,alt:o.profile.displayName,plus:o.profile.isPlus,variant:i}),(0,t.jsx)(u.r,{variant:"standard"===i?"h2":"h6",component:"h1",color:"inherit",align:"standard"===i?"center":"left",className:R().name,children:o.profile.displayName}),(0,t.jsx)(O,{animateOnMount:!1,active:"compact"===i,children:(0,t.jsxs)("div",{className:R().badges,children:[o.profile.isPlus&&(0,t.jsx)(B.s,{variant:"premium"}),!o.profile.isPlus&&!!v&&(0,t.jsx)(B.s,{variant:"newbie"}),!o.profile.isPlus&&!v&&(0,t.jsx)(B.s,{variant:"registered"}),!!m&&(0,t.jsx)(B.s,{variant:"badge",badges:m})]})}
1),(0,t.jsx)(O,{animateOnMount:!1,active:"compact"===i,children:(0,t.jsxs)("div",{className:R().numbers,children:[(0,t.jsx)(Z,{icon:(0,t.jsx)(h.Z,{}),value:o.trees.totalCount,label:(0,t.jsx)(y.cC,{i18nKey:"common.user.numbers.trees",count:o.trees.totalCount,children:"Trees"})}),(0,t.jsx)(Z,{icon:(0,t.jsx)(k.Z,{}),value:o.forests.totalCount,label:(0,t.jsx)(y.cC,{i18nKey:"common.user.numbers.forests",count:o.forests.totalCount,children:"Foreste"})}),(0,t.jsx)(Z,{icon:(0,t.jsx)(x.Z,{}),value:o.countries.totalCount,label:(0,t.jsx)(y.cC,{i18nKey:"common.user.numbers.countries",count:o.countries.totalCount,children:"Countries"})}),(0,t.jsx)(Z,{icon:(0,t.jsx)(N.Z,{}),value:(0,S.Cu)(o.ownedTreesTotalCo2,s),label:(0,t.jsxs)(y.cC,{i18nKey:"common.user.numbers.co2",children:["CO",(0,t.jsx)("sub",{children:"2"})]})})]})}),"standard"===i&&(0,t.jsx)(G,{})]})]}),f&&r]})};var X=i(63715),Y=i(52553),q=i(98756),J=i(5119),$=i.n(J);let ee=()=>{let{user:e,routes:n}=z(),{slug:i}=e.profile;return(0,t.jsxs)("div",{className:$().root,children:[(0,t.jsx)(Y.Y,{className:$().map,slug:i,userType:q.FWD.Private}),(0,t.jsx)(v.z,{classNameExtended:$().explore,startIcon:(0,t.jsx)(X.Z,{}),onClick:()=>{b().push(n.map)},children:(0,t.jsx)(y.cC,{i18nKey:"profile.user.treesPreview.map.explore",children:"Explore"})})]})};var en=i(83479),ei=i(63584),et=i(25675),ea=i.n(et),er=i(86565),es=i.n(er);let el=e=>{let{title:n,action:i,children:a,className:r,...s}=e;return(0,t.jsxs)("div",{...s,className:l()(es().root,r),children:[(0,t.jsxs)("div",{className:es().header,children:[(0,t.jsx)(u.r,{variant:"h6",component:"h2",color:"inherit",children:n}),i]}),(0,t.jsx)("div",{className:es().content,children:a})]})};var eo=i(30803),ed=i.n(eo);let ec=e=>{let{onClick:n,...i}=e;return(0,t.jsx)(v.z,{...i,variant:"text",classNameExtended:ed().root,endIcon:(0,t.jsx)(g.Z,{}),onClick:n,children:(0,t.jsx)(y.cC,{i18nKey:"profile.user.findOutMore",children:"Find out more"})})};var eu=i(63608),em=i.n(eu),ev={src:"/_next/static/media/defaultAvatar.349932b7.webp"};let ef=e=>{let{icon:n,value:i,label:a,premium:r}=e;return(0,t.jsxs)("div",{className:l()(em().number,{[em().premium]:r}),children:[(0,t.jsx)("div",{children:n}),(0,t.jsxs)("div",{className:em().text,children:[(0,t.jsx)(u.r,{variant:"body",component:"h5",color:"inherit",className:em().value,bold:!0,children:i}),(0,t.jsx)(u.r,{variant:"body",component:"div",color:"inherit",className:em().label,children:a})]})]})},ep=()=>(0,t.jsxs)("div",{className:em().emptyState,children:[(0,t.jsx)("div",{className:em().image,children:(0,t.jsx)(ea(),{src:"/_next/static/media/claim.8ec0e445.png",blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAAS1BMVEVMaXF8QUH///9eGxvo4NHp08lqOjb76tz669tuIiJ9QUBWExOSX1////eBSEdoJydzNTVeGxuRYGD77u5qKSn/+veOW1uTY2NxMTHvrpi6AAAAGHRSTlMA/TAgCyIXFRAKvFafIaia7e/IS+NptfGK2UpLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAOklEQVR4nAXBhQHAMAwEsQvYHypT9p+0EspGBSR5yuK5elujMca7t1g4wtfdCmHeXiuEMy0FmBvK8AM5dgHQaDbvOQAAAABJRU5ErkJggg==",alt:"Claim icon",fill:!0,unoptimized:!0,unselectable:"on",style:{left:0,bottom:0,objectFit:"contain"}})}),(0,t.jsxs)("div",{className:em().content,children:[(0,t.jsx)(u.r,{variant:"h4",component:"div",color:"inherit",children:(0,t.jsx)(y.cC,{i18nKey:"profile.user.forest.createCard.title",children:"Crea una nuova foresta"})}),(0,t.jsx)(u.r,{variant:"body",color:"inherit",children:(0,t.jsx)(y.cC,{i18nKey:"profile.user.forest.createCard.description",children:"Per ogni occasione importante, c'\xe8 una Foresta da creare. Celebrare insieme rende tutto pi\xf9 speciale!"})}),(0,t.jsx)("div",{children:(0,t.jsx)(v.z,{variant:"negative",startIcon:(0,t.jsx)(ei.Z,{}),onClick:()=>b().push(F.PATHS.forest.create.base),children:(0,t.jsx)(y.cC,{i18nKey:"profile.user.forest.createCard.button",children:"Crea una foresta"})})})]})]}),eg=()=>{var e;let{user:n,routes:i}=z(),r=(0,a.useMemo)(()=>{var e;return null===(e=n.forests.edges[0])||void 0===e?void 0:e.node},[n]),{t:s}=(0,y.$G)();return(0,t.jsxs)(el,{"data-testid":"forests-card",className:em().root,title:s("profile.user.forestsPreview.title","Forests"),action:!!r&&(0,t.jsx)(ec,{"data-testid":"forests-card-action",onClick:()=>b().push(i.forests,void 0,{shallow:!0,scroll:!0})}),children:[r&&(0,t.jsxs)("div",{className:em().content,children:[(0,t.jsx)(u.r,{variant:"h4",component:"h2",color:"inherit",align:"center",children:(0,t.jsx)(y.cC,{i18nKey:"profile.user.forestsPreview.content.title",children:"Last created forest"})}),(0,t.jsxs)("div",{className:em().card,children:[(0,t.jsx)("div",{className:em().avatar,children:(0,t.jsx)(ea(),{src:(null===(e=r.avatar)||void 0===e?void 0:e.url)||ev.src,alt:r.name,unselectable:"on",unoptimized:!0,fill:!0})}),(0,t.jsxs)("div",{className:em().content,children:[(0,t.jsx)(u.r,{variant:"h4",color:"inherit",children:r.name}),(0,t.jsx)("div",{className:em().numbers,children:(0,t.jsx)(ef,{icon:(0,t.jsx)(h.Z,{}),value:r.trees.totalCount,label:(0,t.jsx)(y.cC,{i18nKey:"profile.user.forestsPreview.card.trees",count:r.trees.totalCount,children:"Trees"})})})]})]})]}),!r&&(0,t.jsx)(ep,{})]})};var eh=i(26176),ek=i(6812),ex=i(66580),eN=i(4986),ej=i(74640),eb=i(92978),eA=i.n(eb),ey=i(21347),eS=i.n(ey);let eC=()=>{var e,n,i,t,r,s,l;let o=z(),d=(0,C.b)(),{loading:c,data:u,fetchMore:m}=(0,ek.aM)(eS(),{client:ex.uM,variables:{slug:o.user.profile.slug,locale:d,pagination:{first:4}},fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0}),v=!c&&!!(null==u?void 0:null===(n=u.user)||void 0===n?void 0:null===(e=n.forests)||void 0===e?void 0:e.pageInfo.hasNextPage);return{loading:c,forests:null!==(l=null==u?void 0:null===(t=u.user)||void 0===t?void 0:null===(i=t.forests)||void 0===i?void 0:i.edges.map(e=>e.node))&&void 0!==l?l:[],hasMore:v,loadMore:(0,a.useCallback)(async()=>{var e,n;let i=null==u?void 0:null===(n=u.user)||void 0===n?void 0:null===(e=n.forests)||void 0===e?void 0:e.pageInfo.endCursor;await m({variables:{slug:o.user.profile.slug,pagination:{after:i,first:4}},updateQuery:(e,n)=>{let{fetchMoreResult:i}=n,{pageInfo:t,edges:a,totalCount:r}=i.user.forests;return{user:{...e.user,forests:{pageInfo:t,edges:[...e.user.forests.edges,...a],totalCount:r}}}}})},[null==u?void 0:null===(s=u.user)||void 0===s?void 0:null===(r=s.forests)||void 0===r?void 0:r.pageInfo.endCursor,m,o.user.profile.slug])}},ew=()=>{let e=z(),{forests:n,hasMore:i,loadMore:a}=eC();return(0,t.jsxs)("div",{className:eA().root,children:[(0,t.jsx)(u.r,{variant:"h3",component:"h2",gutterBottom:!0,children:(0,t.jsxs)(y.cC,{i18nKey:"profile.user.forests.title",children:[{displayName:e.user.profile.displayName}," Forests"]})}),(0,t.jsxs)("div",{className:eA().forests,children:[n.map(e=>(0,t.jsx)(eN.H,{forest:e},e.id)),i&&(0,t.jsx)(ej.s,{onVisible:a,children:(0,t.jsx)(eh.a,{variant:"primary"})})]})]})};var eF=i(95038),eT=i(11337),eP=i(40501),eE=i(64726),eV=i(84028),eI=i.n(eV);let eO=e=>{let{percent:n,title:i,icon:a}=e;
1return(0,t.jsxs)("div",{className:eI().benefit,children:[(0,t.jsxs)("div",{className:eI().graph,children:[(0,t.jsx)(eP.a,{radius:60,percent:n,className:eI().gauge}),(0,t.jsx)("div",{children:a}),(0,t.jsxs)(u.r,{variant:"h6",component:"div",color:"inherit",bold:!0,children:[n.toFixed(0),"%"]})]}),(0,t.jsx)(u.r,{variant:"h6",component:"div",color:"inherit",align:"center",children:i})]})},eD=()=>{let{routes:e,user:n}=z(),{t:i}=(0,y.$G)();return(0,t.jsx)(el,{"data-testid":"trees-card",className:eI().root,title:i("profile.user.treesPreview.title","Trees"),action:(0,t.jsx)(ec,{"data-testid":"trees-card-action",onClick:()=>b().push(e.trees,void 0,{shallow:!0,scroll:!0})}),children:(0,t.jsxs)("div",{children:[(0,t.jsx)(u.r,{variant:"h4",component:"h3",color:"inherit",gutterBottom:!0,children:(0,t.jsx)(y.cC,{i18nKey:"profile.user.treesPreview.content.title",children:"Benefits"})}),(0,t.jsx)(u.r,{variant:"body",color:"inherit",gutterBottom:!0,children:(0,t.jsx)(y.cC,{i18nKey:"profile.user.treesPreview.content.description",children:"The positive effects generated by your trees on the environment and economy"})}),(0,t.jsx)(eE.l,{noControls:!0,classes:{slides:eI().benefits},slides:[{key:"1",value:(0,t.jsx)(eO,{percent:n.ownedTreesBenefits.foodBenefit,title:i("profile.user.treesPreview.content.benefits.food","Food Security"),icon:(0,t.jsx)(eF.Z,{size:"xlarge"})})},{key:"2",value:(0,t.jsx)(eO,{percent:n.ownedTreesBenefits.incomeBenefit,title:i("profile.user.treesPreview.content.benefits.income","Economic development"),icon:(0,t.jsx)(eT.Z,{size:"xlarge"})})},{key:"3",value:(0,t.jsx)(eO,{percent:n.ownedTreesBenefits.co2Benefit,title:i("profile.user.treesPreview.content.benefits.co2","CO₂ Absorption"),icon:(0,t.jsx)(N.Z,{size:"xlarge"})})},{key:"4",value:(0,t.jsx)(eO,{percent:n.ownedTreesBenefits.soilBenefit,title:i("profile.user.treesPreview.content.benefits.soil","Environmental protection"),icon:(0,t.jsx)(k.Z,{size:"xlarge"})})}]})]})})};var eU=i(99203),eB=i(90057),eM=i(28338),e_=i(36217),eL=i.n(e_),ez=i(12180),eK=i.n(ez);let eR=()=>{var e;let{push:n,query:i}=(0,j.useRouter)();return[null!==(e=i.countryCode)&&void 0!==e?e:"",e=>{n({query:{...i,countryCode:e}},void 0,{shallow:!0,scroll:!0})}]},eZ=()=>{var e,n,i,t,r,s,l,o,d,c;let u=z(),m=(0,C.b)(),[v,f]=eR(),{loading:p,data:g,fetchMore:h}=(0,ek.aM)(eK(),{client:ex.uM,variables:{slug:u.user.profile.slug,locale:m,pagination:{first:8},countryCode:v||void 0},fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,returnPartialData:!0,errorPolicy:"all"}),k=(0,a.useCallback)(async e=>{f(e)},[f]),x=!p&&!!(null==g?void 0:null===(n=g.user)||void 0===n?void 0:null===(e=n.trees)||void 0===e?void 0:e.pageInfo.hasNextPage);return{loading:p,trees:null!==(d=null==g?void 0:null===(t=g.user)||void 0===t?void 0:null===(i=t.trees)||void 0===i?void 0:i.edges.map(e=>e.node))&&void 0!==d?d:[],countries:null!==(c=null==g?void 0:null===(s=g.user)||void 0===s?void 0:null===(r=s.countries)||void 0===r?void 0:r.edges.map(e=>e.node.country))&&void 0!==c?c:[],hasMore:x,loadMore:(0,a.useCallback)(async()=>{var e,n;let i=null==g?void 0:null===(n=g.user)||void 0===n?void 0:null===(e=n.trees)||void 0===e?void 0:e.pageInfo.endCursor;await h({variables:{slug:u.user.profile.slug,pagination:{after:i,first:8}},updateQuery:(e,n)=>{let{fetchMoreResult:i}=n,{pageInfo:t,edges:a,totalCount:r}=i.user.trees;return{user:{...e.user,trees:{pageInfo:t,edges:[...e.user.trees.edges,...a],totalCount:r}}}}})},[null==g?void 0:null===(o=g.user)||void 0===o?void 0:null===(l=o.trees)||void 0===l?void 0:l.pageInfo.endCursor,h,u.user.profile.slug]),selectCountry:k,selectedCountry:v}},eG=()=>{let e=(0,eM.d)(),{user:n,routes:i}=z(),{loading:r,countries:s,trees:l,hasMore:o,loadMore:d,selectCountry:c,selectedCountry:m}=eZ(),{t:v}=(0,y.$G)(),f=(0,a.useMemo)(()=>[{value:"",label:v("user.profile.trees.allCountries",{defaultValue:"All"})}].concat(s.map(e=>({label:e.name,value:e.code})).sort((e,n)=>e.label.localeCompare(n.label))),[s,v]);return(0,t.jsxs)("div",{className:eL().root,children:[(0,t.jsxs)("div",{className:eL().topSection,children:[(0,t.jsx)("div",{children:(0,t.jsx)(u.r,{variant:"h4",component:"h2",children:(0,t.jsxs)(y.cC,{i18nKey:"user.profile.trees.title",children:[{displayName:n.profile.displayName}," Trees"]})})}),(0,t.jsx)(eU.m,{value:m,options:f,onChange:e=>c(e.target.value),disabled:r})]}),(0,t.jsxs)("div",{className:eL().trees,children:[l.map(n=>(0,t.jsx)(eB.Y,{tree:n,layout:e?"horizontal":"vertical",onClick:()=>b().push("".concat(i.trees,"/").concat(n.registryId))},n.id)),o&&(0,t.jsx)(ej.s,{onVisible:d,children:(0,t.jsx)(eh.a,{variant:"primary"})})]})]})};var eW=i(54714),eH=i.n(eW);let eQ=()=>(0,t.jsxs)("div",{className:eH().emptyState,children:[(0,t.jsx)("div",{className:eH().icon,children:(0,t.jsx)(ea(),{src:"/_next/static/media/empty-state-icon.fd9473c4.png",blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAVFBMVEVOeV19smjI43XY+LWm0YeWvXiZtmy1zHNMaXGw04GOu4Ce0ImWvXijzG/J9JCdz495vGa32Xbo+4ZWlldKh0/R/57a/ZXE+J9Mik/I6YPX9YvY/5mIJR2gAAAAEnRSTlMn/v7+8LCz8wDoruur+/v9+vs2HgHjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAQElEQVR4nAXBhQHAMAzAMJdTGKUw+P/QSQgxpYhAUms1QdCt90sb+R3P6F/GLzO6WZkwd3ecs4Gf7r49CKXWgvxhXwLHF9t2+gAAAABJRU5ErkJggg==",alt:"Empty state icon",fill:!0,unoptimized:!0,unselectable:"on"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(u.r,{className:eH().title,variant:"h4",component:"div",color:"inherit",gutterBottom:!0,children:(0,t.jsxs)(y.cC,{i18nKey:"profile.user.badgesPreview.emptyState.title",children:["Plant a tree and get the badge ",(0,t.jsx)("strong",{children:"Newbie"}),"!"]})}),(0,t.jsx)(v.z,{variant:"contained",onClick:()=>b().push(F.PATHS.plantATree),children:(0,t.jsx)(y.cC,{i18nKey:"profile.user.badgesPreview.emptyState.button",children:"Plant a tree"})})]})]}),eX=e=>{let{icon:n,title:i,description:a}=e;return(0,t.jsxs)("div",{className:eH().badge,"data-testid":"badge",children:[(0,t.jsx)("div",{className:eH().icon,children:n}),(0,t.jsxs)("div",{children:[(0,t.jsx)(u.r,{variant:"h4",color:"inherit",gutterBottom:!0,"data-testid":"badge-title",children:i}),(0,t.jsx)(u.r,{variant:"body",color:"inherit",gutterTop:!0,"data-testid":"badge-description",children:a})]})]})},eY=()=>{let{user:e,routes:n}=z(),i=(0,a.useMemo)(()=>e.profile.badges.filter(e=>e.unlocked).toSorted((e,n)=>new Date(n.unlockedAt).getTime()-new Date(e.unlockedAt).getTime())[0],[e]),{t:r}=(0,y.$G)();return(0,t.jsx)(el,{"data-testid":"badges-card",className:eH().root,title:r("profile.user.badgesPreview.title","Badges"),action:(0,t.jsx)(ec,{"data-testid":"badges-card-action",onClick:()=>b().push(n.badges,void 0,{shallow:!0,scroll:!0})}
1),children:(0,t.jsxs)("div",{className:eH().content,children:[(0,t.jsx)(u.r,{variant:"h5",component:"h3",color:"inherit",gutterBottom:!0,children:(0,t.jsx)(y.cC,{i18nKey:"profile.user.badgesPreview.content.title",children:"Last received badge"})}),i&&(0,t.jsx)(eX,{icon:(0,t.jsx)(ea(),{src:i.badge.image.url,blurDataURL:i.badge.image.url,alt:i.badge.title,fill:!0,unoptimized:!0,unselectable:"on"}),title:i.badge.title,description:i.badge.description}),!i&&(0,t.jsx)(eQ,{})]})})};var eq=i(80461),eJ={src:"/_next/static/media/locked-badge-icon.c1027aa0.png",blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAALVBMVEXP3+DB0tS5y87L291teYWcs7PC09W+0NK9zdHN3eDo9fTV5OXI2Nrt/fzh7+4j+bjyAAAAD3RSTlP7/f7GBRuubnHe//////52YgfhAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAOElEQVR4nB3ECQrAMAzEQPlIWty1///ckghG6LsJaqQp4LgrM7eCKJe8g7fN3foho2c6klwb9sofP4cBmhZYFdwAAAAASUVORK5CYII="},e$=i(14468),e0=i.n(e$);let e1=()=>{let e=(0,C.b)(),{user:n}=z(),{displayName:i}=n.profile;return(0,t.jsxs)("div",{className:e0().root,children:[(0,t.jsx)(u.r,{variant:"h3",component:"h2",align:"center",children:(0,t.jsxs)(y.cC,{i18nKey:"profile.user.badges.title",values:{displayName:i},children:[{displayName:i}," badges"]})}),(0,t.jsx)("div",{className:e0().badges,children:n.profile.badges.map(n=>{let{badge:i,unlocked:a,unlockedAt:r}=n;return(0,t.jsxs)("div",{className:l()(e0().badge,{[e0().unlocked]:a}),children:[(0,t.jsxs)("div",{className:e0().icon,children:[a&&(0,t.jsx)(ea(),{src:i.image.url,blurDataURL:i.image.blurDataURL,alt:i.title,unoptimized:!0,fill:!0,unselectable:"on"}),!a&&(0,t.jsx)(ea(),{src:eJ.src,blurDataURL:eJ.blurDataURL,alt:i.title,unoptimized:!0,fill:!0,unselectable:"on"})]}),(0,t.jsxs)("div",{className:e0().content,children:[(0,t.jsx)(u.r,{variant:"h4",align:"center",gutterBottom:!0,children:i.title}),(0,t.jsxs)(u.r,{variant:"body",align:"center",gutterTop:!0,children:[a&&i.description,!a&&i.howToGet]}),(0,t.jsx)("div",{className:e0().divider}),a&&r&&(0,t.jsxs)(u.r,{variant:"caption",component:"div",align:"center",className:e0().date,children:[(0,t.jsx)(eq.Z,{size:"small"})," ",new Date(r).toLocaleDateString(e)]})]})]},i.slug)})})]})};var e8=i(49199),e2=i.n(e8);let e4=()=>{let{user:e}=z(),n=(0,d.w8)(e.profile),i=(0,a.useMemo)(()=>e.forests.totalCount>0,[e]),r=(0,a.useMemo)(()=>e.profile.badges.some(e=>e.unlocked),[e]);return(0,t.jsxs)("div",{className:e2().main,children:[(i||n)&&(0,t.jsx)(eg,{}),(r||n)&&(0,t.jsx)(eY,{}),(0,t.jsx)(eD,{}),(0,t.jsx)(ee,{})]})},e6=()=>{let{user:e,mapParams:n,routes:i}=z();return(0,t.jsx)(en.r,{slug:e.profile.slug,displayName:e.profile.displayName,mapParams:n,routes:i})},e3=e=>["main","forests","trees","map","badges"].includes(e),e9=e=>{let n=(0,r.useParams)(),i=(null==n?void 0:n.route)||e||"main";return(0,a.useMemo)(()=>{if(!i)return e||"main";let[n]="string"==typeof i?[i]:i;return"map"===e?"map":e3(n)?n:"main"},[e,i])},e5=e=>{let{forceView:n}=e,i=e9(n),a="map"===i;return(0,t.jsxs)("div",{className:l()(e2().root,a&&e2().isMap),children:[(0,t.jsx)(Q,{variant:"main"===i?"standard":"compact"}),(0,t.jsxs)(o.W,{maxWidth:a?void 0:"lg",className:l()(e2().content,a&&e2().flexGrow),children:["main"===i&&(0,t.jsx)(e4,{}),"forests"===i&&(0,t.jsx)(ew,{}),"trees"===i&&(0,t.jsx)(eG,{}),"map"===i&&(0,t.jsx)(e6,{}),"badges"===i&&(0,t.jsx)(e1,{})]})]})}},41429:function(e,n,i){"use strict";i.r(n),i.d(n,{__N_SSP:function(){return d}});var t=i(85893),a=i(57723),r=i(8226),s=i(14974),l=i(3189);let o=e=>{let{data:n}=e;return(0,s.c0)(n)?(0,t.jsx)(s.A,{forceView:"map"}):(0,t.jsx)(l.Iw,{forceView:"map"})};o.getLayout=(e,n)=>{let{data:i,layoutData:o}=n;return(0,t.jsx)(r.Zl,{children:(0,t.jsxs)(a.c,{user:o.me,impersonateSlug:i.user.profile.slug,isMap:!0,children:[(0,s.c0)(i)&&(0,t.jsx)(s.Z$.Provider,{value:i,children:e}),(0,l.kd)(i)&&(0,t.jsx)(l.fm.Provider,{value:i,children:e})]})})};var d=!0;n.default=o},61498:function(e){e.exports={none:"AwNDPA",fadeIn:"_2CoWqz",fadeOut:"RWMD6i"}},63754:function(e){e.exports={root:"JVaZBp",doNotAnimate:"v4CQjl"}},12639:function(e){e.exports={root:"nMsm78",slider:"nRlq_F",slides:"_Wdi0Z",slidesNavigationButton:"xiQUEN",controlNext:"fNBU_G",controlPrev:"Y3CI_x",controls:"UXD_jx"}},34219:function(e){e.exports={root:"K4JZhB",compact:"YdqXqP",plus:"c07dbk",image:"YQfx3f",badge:"iWipTv"}},78377:function(e){e.exports={root:"_7Oe86j",badge:"BMTuu5",newbie:"PK8_gL",registered:"rUVhVV",premium:"PI5FuT"}},49199:function(e){e.exports={root:"Q9AReH",isMap:"_7oB9AE",header:"_0McOUb",standard:"_8skucX",compact:"ZzemSL",content:"KccZ2V",flexGrow:"xQLsWM",main:"uCVJew",section:"_28Q8BT"}},14468:function(e){e.exports={badges:"Qhs_CA",badge:"odnD56",icon:"huKB0K",content:"_0UMcnS",divider:"idNubs",date:"OdxXyS",unlocked:"nQ13Rk"}},54714:function(e){e.exports={root:"jLGulS",badge:"xnv3EP",icon:"n8E7vB",emptyState:"_8AS5sh",t
1itle:"RqARyW"}},30803:function(e){e.exports={root:"i5d8Hq"}},92978:function(e){e.exports={root:"qRG_tY",forests:"a_1ZUH"}},63608:function(e){e.exports={root:"_4GzTgT",content:"E52vgs",card:"D_dKB7",avatar:"lW2_AI",emptyState:"V6TldE",image:"FlfKB5",number:"uvEcL5",premium:"dLBU5t",text:"CCN_DG",value:"ohOAF6",label:"_82zC1c",icon:"O_JaZh"}},28478:function(e){e.exports={root:"KwCW63",fixed:"_1ueemT",standard:"RfdVdF",compact:"RKighO",name:"_3YPrfB",badges:"ok2Tgd",numbers:"nwUvkU",number:"aqWAn5",premium:"gFNN3W",text:"NHtgw_",value:"D__sYw",label:"_1xJTTi",icon:"yzbLKH",actions:"_7bJHUc",share:"_02ec24",settings:"SbdZKH",background:"kzKv_O",content:"_5NeK_s",back:"tmOnO6"}},5119:function(e){e.exports={root:"_2T2Jrb",map:"wa_IRf",explore:"GMCSCM",link:"Z7iwgY"}},86565:function(e){e.exports={root:"O7wWo7",header:"JY2Nr_",content:"WNu70L"}},36217:function(e){e.exports={root:"L2p5R5",topSection:"_8GqPU9",trees:"ycCfeU"}},84028:function(e){e.exports={root:"l9LqLG",benefits:"e84qUV",benefit:"BxO_Se",graph:"xUFioy",gauge:"kUAL6H"}}},function(e){e.O(0,[52634,25675,7969,6812,76647,9034,75309,48764,37630,5121,24673,89382,11129,63520,93169,66441,83570,5013,67183,98669,20469,57723,7351,53622,41888,92888,49774,40179],function(){return e(e.s=66011)}),_N_E=e.O()}]);
2//# sourceMappingURL=[[...route]]-61ed36dd6524924c.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.