{
  "always_run_in_app": true,
  "icon": {
    "color": "teal",
    "glyph": "bell"
  },
  "name": "新樓簽章提醒 20",
  "script": "const HOURS=[20];const NAME=\"開啟電子簽章App\";const LINK=\"shortcuts://run-shortcut?name=\"+encodeURIComponent(NAME);function make(id){const n=new Notification();n.identifier=id;n.title=\"新樓電子簽章提醒\";n.body=\"請點此開啟 App，登入並完成簽章。\";n.sound=\"default\";n.openURL=LINK;return n;}try{for(const h of HOURS){const n=make(\"sinlau-sign-\"+h);n.setDailyTrigger(h,0,true);await n.schedule();}const p=(await Notification.allPending()).filter(n=>/^sinlau-sign-\\d+$/.test(n.identifier));const a=new Alert();a.title=\"簽章提醒已排程\";a.message=\"本次設定：\"+HOURS.map(h=>String(h).padStart(2,\"0\")+\":00\").join(\"、\")+\"，每天重複。目前共有 \"+p.length+\" 個簽章時間。請確認已允許 Scriptable 通知。\";a.addAction(\"30 秒後測試通知\");a.addAction(\"開啟電子簽章App\");a.addCancelAction(\"完成\");const c=await a.presentAlert();if(c===0){const n=make(\"sinlau-sign-test\");n.setTriggerDate(new Date(Date.now()+30000));await n.schedule();}if(c===1){await Safari.open(LINK);}}catch(e){const a=new Alert();a.title=\"無法設定提醒\";a.message=String(e);a.addAction(\"關閉\");await a.presentAlert();}Script.complete();\n",
  "share_sheet_inputs": []
}
