{"id":2956,"date":"2022-11-17T10:01:55","date_gmt":"2022-11-17T10:01:55","guid":{"rendered":"https:\/\/letsgetfit-game.com\/store-page\/"},"modified":"2022-11-18T08:03:20","modified_gmt":"2022-11-18T08:03:20","slug":"store-page","status":"publish","type":"page","link":"https:\/\/letsgetfit-game.com\/en-aus\/store-page\/","title":{"rendered":"Store"},"content":{"rendered":"\t\n \n\t<section data-scrolltitle=\"store\">                \n\t\t<div class=\"store_wrap\">\n\t\t\n                        \n            <div class=\"inner\">\n                <div class=\"select\">\n                    \n<div id=\"store\">\n\t\n    <!--{{country}}:{{system}}:{{version}}-->\n    \n    <div class=\"select\">\n        <label for=\"store_country\">Select country<\/label>\n        \n        <div class=\"w-full\">            \n            <select v-model=\"country\" @change=\"update\" class=\"country\">\n                <option :value=undefined>Please select<\/option>\n                <option v-for=\"(country, i) of arCountry\" v-html=\"country\" :value=\"i\"><\/option>\n            <\/select>\n        <\/div>\n        \n    <\/div>\n    \n    <div class=\"select\" v-if=\"arSystemFiltered.length > 1\" style=\"display:none;\">\n        \n        <label>Select platforms<\/label>\n        \n        <div class=\"system_select\">\n            <template v-for=\"(s, i) of arSystemFiltered\">\n                <a :class=\"{'active': s.key === system}\" @click.prevent=\"setSystem(s.key)\" v-if=\"s.value\">\n                    <img :src=\"'\/wp-content\/plugins\/store\/assets\/brands\/' + s.key + '.svg'\" :alt=\"s.value\" \/>\n                <\/a>\n            <\/template>\n        <\/div>\n        \n    <\/div>\n    \n    <template v-if=\"arData\">\n    \n        <template v-if=\"arVersionFiltered.length > 1\">\n            <div class=\"select\">\n                \n                <label for=\"store_version\">Select edition<\/label>\n                 \n                <select v-model=\"version\" class=\"version\" id=\"store_version\">\n                    <option :value=undefined>Please select<\/option>\n                    <option v-for=\"(v, i) of arVersionFiltered\" v-html=\"v.label\" :value=\"v.key\"><\/option>\n                <\/select>\n                \n            <\/div>\n        <\/template>\n         \n        <template v-if=\"arFilteredData.length > 0\">\n            <div class=\"select\">\n                \n                <label>Select store<\/label>\n        \n                <div class=\"store_link_wrap\">\n                    <a v-for=\"(store, i) of arFilteredData\" :href=\"store.url\" :title=\"store.title\" target=\"_blank\">\n                        <img v-if=\"store.img\" :src=\"'\/wp-content\/plugins\/store\/assets\/stores\/' + store.img_name + '.png'\" \/>\n                        <div v-else>{{store.title}}<\/div>\n                    <\/a>\n                <\/div>\n        \n        <\/template>\n        \n    <\/template>\n    \n    \t\n<\/div>\n\n<script>\n        \n    document.addEventListener(\"DOMContentLoaded\", function() {\n        \n        Vue.createApp({\n            data() {\n                return {\n\t\t\t\t\tarData: undefined,\n\t\t\t\t\tcountry: undefined,\n                    version: undefined,\n                    platform: undefined,\n                    system: undefined,\n                    store: undefined,\n                    arSystem: {\"switch\":\"Switch\",\"xboxOne\":\"XBox One\",\"ps4\":\"PS4\",\"ps5\":\"PS5\"},\n                    arCountry: {\"UK\":\"United Kingdom\",\"GER\":\"Germany\",\"AT\":\"Austria\",\"CH\":\"Switzerland\",\"France\":\"France\",\"Italy\":\"Italy\",\"Spain\":\"Spain\",\"Poland\":\"Poland\",\"Australia\":\"Australia\",\"New Zealand\":\"New Zealand\",\"Japan\":\"Japan\",\"NL\":\"Netherlands\",\"Sweden\":\"Sweden\",\"Norway\":\"Norway\",\"Finnland\":\"Finnland\",\"Denmark\":\"Denmark\"}, \n                    arVersion: {\"Bundle\":\"Bundle\",\"Straps-only\":\"Straps-only\",\"Single\":\"Single\"} \n                }\n            },\n            computed: { \n                arVersionFiltered() {\n\t\t\t\t\n\t\t\t\t    let r = {};\n\t\t\t\t\t \n\t\t\t\t\tfor (let d of this.arData) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!Object.keys(r).includes(d.version)) r[d.version] = { key: d.version, label: this.arVersion[d.version]};\n\t\t\t\t\t\t\n                    }\n\t\t\t\t\t\n\t\t\t\t\treturn Object.values(r);\n\t\t\t\t\t\n                },\n                arSystemFiltered() {\n\t\t\t\t\t\n\t\t\t\t\tlet r = {};\n\t\t\t\t\t\n\t\t\t\t\tif (!this.arData) return Object.values(r);\n\t\t\t\t\t\n\t\t\t\t\tfor (let i of this.arData) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (this.matchFilter(i, 'system') && !Object.keys(r).includes(i.system) && this.arSystem[i.system]) r[i.system] = {\n\t\t\t\t\t\t\tkey: i.system,\n                            value: this.arSystem[i.system]\n\t\t\t\t\t\t};\n\t\t\t\t\t\t\n                    }\n\t\t\t\t\t\n\t\t\t\t\treturn Object.values(r);\n\t\t\t\t\t\n                }, \n                arFilteredData() {\n\t\t\t\t\t\n\t\t\t\t\tlet r = [];\n\t\t\t\t\t console.log(this.version);\n\t\t\t\t\tif (this.country) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (let d of this.arData) {\n\t\t\t\t\t\t \n\t\t\t\t\t\t\tif (this.country === d.country && ((this.version && this.version === d.version) || this.arVersionFiltered.length <= 1)) r.push(d);\n\t\t\t\t\t\t\t\n                        }\n\t\t\t\t\t\t\n                    }\n\t\t\t\t\tconsole.log(r);\n\t\t\t\t\treturn r;\n\t\t\t\t\t\n                }\n            },\n            methods: {\n\t\t\t\tmatchFilter(i, exclude) {\n\n\t\t\t\t\tlet r = true;\n\t\t\t\t\t\n\t\t\t\t\t\/*\n\t\t\t\t\tif (exclude !== 'system') {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!this.system || this.system === i.system) r = true;\n\t\t\t\t\t\telse r = false;\n\t\t\t\t\t\t\n                    }  *\/\n\t\t\t\t\t\n\t\t\t\t\tif (r && exclude !== 'version') {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!this.version || this.version === i.version) r = true;\n\t\t\t\t\t\telse r = false;\n\t\t\t\t\t\t\n                    } \n\t\t\t\t\t\n\t\t\t\t\treturn r;\n\t    \n                },   \n\t\t\t\tclickStore(event, store) {\n\t\t\t\t\t \n\t\t\t\t\tif (this.storeUrl(store) === undefined) { \n\t\t\t\t\t\t\n\t\t\t\t\t\tevent.preventDefault(); \n\t\t\t\t\t\tevent.stopPropagation(); \n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.store = store;\n\t\t\t\t\t\t\n\t\t\t\t    }\n\t\t\t\t\t \n                },\n                storeUrl(store, system) {\n\t\t\t\t\t \n\t\t\t\t\tif (system) {\n\t\t\t\t\t\t \n\t\t\t\t\t\tif (store && Object.keys(store.system).includes(system)) return store.system[system];\n\t\t\t\t\t\telse return undefined;\n\t\t\t\t\t\t\n                    } else {\n                        \n                        if (Object.keys(store.system).length === 1) return Object.values(store.system)[0];\n                        \n                        return undefined;\n\n\t\t\t\t\t}\n\t\t\t\t\t\t\n                },\n                setSystem(system) {\n\t\t\t\t\t\n\t\t\t\t\tthis.system = system;\n\t\t\t\t\t\n\t\t\t\t\tif (this.arVersionFiltered.length === 1) this.version = this.arVersionFiltered[0].key;\n\t\t\t \t\n                },\n\t\t\t\tupdate() {\n\t\t\t\t\t \n\t\t\t\t\tthis.arData = undefined;\n\t\t\t\t\t\n\t\t\t\t\tlet el_store_image = document.getElementById('store_image');\n\t\t\t\t\t\n\t\t\t\t\tif (el_store_image) {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tfor (let el of el_store_image.querySelectorAll('span')) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tel.style.display = 'none';\n\t\t\t\t\t\t\t\n                        }\n\t\t\t\t\t\t\n\t\t\t\t\t\tlet el_store_image_country = el_store_image.querySelector('.' + this.country);\n\t\t\t\t\t\tlet el_store_image_default = el_store_image.querySelector('.default');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (el_store_image_country) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tel_store_image_country.style.display = 'inline';\n\t\t\t\t\t\t\t\n                        } else if (el_store_image_default) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tel_store_image_default.style.display = 'inline';\n\t\t\t\t\t\t\t\n                        }\n\t\t\t\t\t\t\n                    }\n\t\t\t\t\t\t\t\n\t\t\t\t\tfor (let el of document.querySelectorAll('#store_image > span')) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tel.style.display = 'none';\n\t\t\t\t\t\t\n                    }\n\t\t\t\t\t\n\t\t\t\t\tlet el_selected = document.querySelector('#store_image > span[class=\"' + this.country + '\"]');\n\t\t\t\t\tlet el_default = document.querySelector('#store_image > span.default');\n\t\t\t\t\t\n\t\t\t\t\tif (el_selected) el_selected.style.display = 'inline';\n\t\t\t\t\telse el_default.style.display = 'inline';\n\t\t\t\t\t \n\t\t\t\t\tfetch(store_vue_script.ajaxurl, {\n\t\t\t\t\t\tmethod: 'POST', \n                        body: JSON.stringify({\n\t\t\t\t\t\t    country: this.country                            \n                        })\n                    }).then((response) => {\n                    \n\t\t\t\t\t\treturn response.json();\n                      \n\t\t\t\t\t}).then((data) => {\n\t\t\t\t\t\t\n                        this.arData = data.arData;\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n                }\n            }\n        }).mount('#store')\n        \n    });\n    \n<\/script>\n                <\/div>\n                <div class=\"image\" id=\"store_image\">\n                    <span class=\"default\">\n                        <img decoding=\"async\" src=\"\/wp-content\/themes\/letsgetfit\/assets\/gfx\/Packshots\/packshot_neutral.jpg\" alt=\"\" \/>\n                    <\/span>\n                    <span class=\"Poland\" style=\"display:none;\">\n                        <img decoding=\"async\" src=\"\/wp-content\/themes\/letsgetfit\/assets\/gfx\/Packshots\/Switch_Packshot_2D_POL.png\" alt=\"\" \/>\n                    <\/span>\n                    <span class=\"France\" style=\"display:none;\">\n                        <img decoding=\"async\" src=\"\/wp-content\/themes\/letsgetfit\/assets\/gfx\/Packshots\/Switch_Packshot_2D_ANZ.png\" alt=\"\" \/>\n                    <\/span>\n                    <span class=\"GER\" style=\"display:none;\">\n                        <img decoding=\"async\" src=\"\/wp-content\/themes\/letsgetfit\/assets\/gfx\/Packshots\/Switch_Packshot_2D_GSA.png\" alt=\"\" \/>\n                    <\/span>\n                    <span class=\"AT\" style=\"display:none;\">\n                        <img decoding=\"async\" src=\"\/wp-content\/themes\/letsgetfit\/assets\/gfx\/Packshots\/Switch_Packshot_2D_GSA.png\" alt=\"\" \/>\n                    <\/span>\n                    \n                    <span class=\"Japan\" style=\"display:none;\">\n                        <img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/05\/Switch_Cover_Master-1.jpg\" alt=\"\" \/>\n                    <\/span>\n                    <span class=\"KOR\" style=\"display:none;\">\n                        <img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/10\/packshot_kor-1.png\" alt=\"\" \/>\n                    <\/span>\n                    <span class=\"CHIN\" style=\"display:none;\">\n                        <img decoding=\"async\" src=\"\/letsgetfit-game.com\/wp-content\/uploads\/2022\/10\/packshot_chin-1.png\" alt=\"\" \/>\n                    <\/span>\n                <\/div>\n\t\t\t<\/div>\n                \n\t\t<\/div>\n\t<\/section>\n        \n\n\n\n<div style=\"position: fixed;\n    top: 0px;\n    z-index: 2;\n    width: 150px;\n    left: 40%;\">\n\t<div style=\"display: flex;\n\t\tgap: 30px;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\theight: 135px;\">\n\t\t\t<a href=\"\/en-aus\/\" style=\"font-weight: 700;\n\t\t\t\tfont-size: 25px;\n\t\t\t\tline-height: 38px;\n\t\t\t\tcolor: #FFF;\n\t\t\t\ttext-shadow: 0 6px 6px #00000029;\n\t\t\t\ttext-transform: uppercase;\n\t\t\t\ttext-decoration: none;\">\n                                Home\n\t\t\t<\/a>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Home<\/p>\n","protected":false},"author":2,"featured_media":1154,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2956","page","type-page","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/letsgetfit-game.com\/en-aus\/wp-json\/wp\/v2\/pages\/2956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/letsgetfit-game.com\/en-aus\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/letsgetfit-game.com\/en-aus\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/letsgetfit-game.com\/en-aus\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/letsgetfit-game.com\/en-aus\/wp-json\/wp\/v2\/comments?post=2956"}],"version-history":[{"count":10,"href":"https:\/\/letsgetfit-game.com\/en-aus\/wp-json\/wp\/v2\/pages\/2956\/revisions"}],"predecessor-version":[{"id":3089,"href":"https:\/\/letsgetfit-game.com\/en-aus\/wp-json\/wp\/v2\/pages\/2956\/revisions\/3089"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/letsgetfit-game.com\/en-aus\/wp-json\/wp\/v2\/media\/1154"}],"wp:attachment":[{"href":"https:\/\/letsgetfit-game.com\/en-aus\/wp-json\/wp\/v2\/media?parent=2956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}