{
    "tailapp": 2,
    "manifest": {
        "format": 2,
        "app_id": "where-i-am",
        "name": "Where I Am",
        "version": 1,
        "schema": "tailapps/v0",
        "exported_at": 1795564636,
        "from": "gallery",
        "connections": [],
        "files": {
            "app.json": "5e39cf848227df3a417c5425af951d2bfa60a9879499d61ff3fb678510e9bf47"
        },
        "signature": "AGg9CPBKB9Lpsp+DC4QdBMc855rtK6J0DmZhpQnPMTH0yAdDw7FRfXqoaxiQB9DxjPo7iLvnTCKe80O0+yOFBg==",
        "key_id": "gallery-1"
    },
    "app": {
        "schema": "tailapps/v0",
        "app": "where-i-am",
        "name": "Where I Am",
        "description": "Tap Share Where I Am on your iPhone (or Mac) and your other devices see the place on a map. One fix per tap, never in the background, with no script.",
        "icon": "location",
        "version": 1,
        "permissions": [
            "location",
            "inbox:places",
            "send:places"
        ],
        "state": {
            "here": {
                "type": "any",
                "default": null,
                "sync": false
            },
            "places": {
                "type": "list",
                "default": []
            }
        },
        "sources": {
            "shared": {
                "inbox": "places",
                "on_receive": "received"
            }
        },
        "actions": {
            "share": {
                "steps": [
                    {
                        "location.get": {
                            "accuracy": "best"
                        },
                        "as": "fix"
                    },
                    {
                        "set": {
                            "here": "$fix"
                        }
                    },
                    {
                        "send": {
                            "places": {
                                "lat": "$fix.lat",
                                "lng": "$fix.lng",
                                "accuracy": "$fix.accuracy",
                                "at": "$fix.at"
                            }
                        }
                    }
                ]
            },
            "received": {
                "steps": [
                    {
                        "push": {
                            "places": {
                                "lat": "$args.event.lat",
                                "lng": "$args.event.lng",
                                "accuracy": "$args.event.accuracy",
                                "at": "$args.event.at",
                                "label": "$args.from"
                            }
                        },
                        "at": "front",
                        "max": 10
                    }
                ]
            },
            "clear": {
                "confirm": "Forget the places on this device?",
                "steps": [
                    {
                        "set": {
                            "places": [],
                            "here": null
                        }
                    }
                ]
            }
        },
        "cards": [
            {
                "id": "main",
                "layout": {
                    "column": [
                        {
                            "map": "$places",
                            "center": "$here",
                            "height": "l",
                            "when": "$places | count"
                        },
                        {
                            "column": [
                                {
                                    "list": "$places",
                                    "item": {
                                        "cell": "$item.label",
                                        "subtitle": "{$item.at | ago} \u00b7 within {$item.accuracy | number} m",
                                        "leading": "mappin.and.ellipse"
                                    }
                                }
                            ],
                            "style": "inset",
                            "when": "$places | count"
                        },
                        {
                            "text": "Nothing shared yet. Tap Share Where I Am on another of your devices.",
                            "size": "s",
                            "emphasis": "subtle",
                            "when": "$places | count | map:{0:true, else:false}"
                        },
                        {
                            "row": [
                                {
                                    "button": "Share Where I Am",
                                    "on": "share",
                                    "style": "primary",
                                    "icon": "location.fill",
                                    "grow": true
                                },
                                {
                                    "button": "Clear",
                                    "on": "clear",
                                    "style": "secondary",
                                    "when": "$places | count"
                                }
                            ],
                            "gap": "s"
                        }
                    ],
                    "gap": "m"
                }
            }
        ],
        "views": {
            "menubar": {
                "icon": "location",
                "card": "main"
            },
            "floating": {
                "card": "main",
                "width": "default"
            }
        }
    },
    "app_json": "{\n  \"schema\": \"tailapps/v0\",\n  \"app\": \"where-i-am\",\n  \"name\": \"Where I Am\",\n  \"description\": \"Tap Share Where I Am on your iPhone (or Mac) and your other devices see the place on a map. One fix per tap, never in the background, with no script.\",\n  \"icon\": \"location\",\n  \"version\": 1,\n  \"permissions\": [\"location\", \"inbox:places\", \"send:places\"],\n  \"state\": {\n    \"here\": { \"type\": \"any\", \"default\": null, \"sync\": false },\n    \"places\": { \"type\": \"list\", \"default\": [] }\n  },\n  \"sources\": {\n    \"shared\": { \"inbox\": \"places\", \"on_receive\": \"received\" }\n  },\n  \"actions\": {\n    \"share\": {\n      \"steps\": [\n        { \"location.get\": { \"accuracy\": \"best\" }, \"as\": \"fix\" },\n        { \"set\": { \"here\": \"$fix\" } },\n        { \"send\": { \"places\": { \"lat\": \"$fix.lat\", \"lng\": \"$fix.lng\", \"accuracy\": \"$fix.accuracy\", \"at\": \"$fix.at\" } } }\n      ]\n    },\n    \"received\": {\n      \"steps\": [\n        {\n          \"push\": { \"places\": { \"lat\": \"$args.event.lat\", \"lng\": \"$args.event.lng\", \"accuracy\": \"$args.event.accuracy\", \"at\": \"$args.event.at\", \"label\": \"$args.from\" } },\n          \"at\": \"front\",\n          \"max\": 10\n        }\n      ]\n    },\n    \"clear\": {\n      \"confirm\": \"Forget the places on this device?\",\n      \"steps\": [{ \"set\": { \"places\": [], \"here\": null } }]\n    }\n  },\n  \"cards\": [\n    {\n      \"id\": \"main\",\n      \"layout\": {\n        \"column\": [\n          { \"map\": \"$places\", \"center\": \"$here\", \"height\": \"l\", \"when\": \"$places | count\" },\n          {\n            \"column\": [\n              {\n                \"list\": \"$places\",\n                \"item\": { \"cell\": \"$item.label\", \"subtitle\": \"{$item.at | ago} \u00b7 within {$item.accuracy | number} m\", \"leading\": \"mappin.and.ellipse\" }\n              }\n            ],\n            \"style\": \"inset\",\n            \"when\": \"$places | count\"\n          },\n          { \"text\": \"Nothing shared yet. Tap Share Where I Am on another of your devices.\", \"size\": \"s\", \"emphasis\": \"subtle\", \"when\": \"$places | count | map:{0:true, else:false}\" },\n          {\n            \"row\": [\n              { \"button\": \"Share Where I Am\", \"on\": \"share\", \"style\": \"primary\", \"icon\": \"location.fill\", \"grow\": true },\n              { \"button\": \"Clear\", \"on\": \"clear\", \"style\": \"secondary\", \"when\": \"$places | count\" }\n            ],\n            \"gap\": \"s\"\n          }\n        ],\n        \"gap\": \"m\"\n      }\n    }\n  ],\n  \"views\": {\n    \"menubar\": { \"icon\": \"location\", \"card\": \"main\" },\n    \"floating\": { \"card\": \"main\", \"width\": \"default\" }\n  }\n}\n",
    "files": []
}