@mark1russell7/guidebook-preparedness 0.1.5 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -2906,11 +2906,276 @@ const CASE_STEPS = [
2906
2906
  ["uk-nrr-2025", "swpc-scales"]
2907
2907
  ],
2908
2908
  ...RECOVERY
2909
+ ]),
2910
+ ...stepsOf("security.armed-conflict", [
2911
+ [
2912
+ "ready",
2913
+ "one-week",
2914
+ "Prepare to manage at home on your own for at least 1 week.",
2915
+ ["se-brochure-en"],
2916
+ [DRINK, FOOD]
2917
+ ],
2918
+ [
2919
+ "ready",
2920
+ "water",
2921
+ "Store at least 3 liters of water for each person for each day, in a dark and cool place.",
2922
+ ["se-brochure-en"],
2923
+ [DRINK]
2924
+ ],
2925
+ [
2926
+ "ready",
2927
+ "medicine",
2928
+ "If you need prescription medicines, keep a supply for 1 month at home.",
2929
+ ["se-brochure-en"],
2930
+ [MEDICINE]
2931
+ ],
2932
+ [
2933
+ "ready",
2934
+ "cash",
2935
+ "Keep some cash at home in different notes, and other ways to pay.",
2936
+ ["se-brochure-en"]
2937
+ ],
2938
+ [
2939
+ "ready",
2940
+ "radio",
2941
+ "Keep a radio that works on batteries, solar power or a hand crank. Keep extra batteries.",
2942
+ ["se-brochure-en"]
2943
+ ],
2944
+ [
2945
+ "ready",
2946
+ "signals",
2947
+ "Learn the warning signals of your area, including the air raid warning and the all clear signal.",
2948
+ ["se-brochure-en"]
2949
+ ],
2950
+ [
2951
+ "ready",
2952
+ "shelters",
2953
+ "Find civil defence shelters or other protective places near your home, school and workplace.",
2954
+ ["se-shelters", "se-brochure-en"]
2955
+ ],
2956
+ [
2957
+ "ready",
2958
+ "first-aid",
2959
+ "Do a course in emergency CPR, and learn how to stop severe bleeding.",
2960
+ ["se-brochure-en"]
2961
+ ],
2962
+ [
2963
+ "warned",
2964
+ "alarm-radio",
2965
+ "At an emergency alarm, go indoors and listen to the official emergency radio station.",
2966
+ ["se-brochure-en"]
2967
+ ],
2968
+ [
2969
+ "warned",
2970
+ "posting",
2971
+ "If you have a wartime posting, go to it immediately. If not, go to work as usual.",
2972
+ ["se-brochure-en"]
2973
+ ],
2974
+ [
2975
+ "warned",
2976
+ "evac-list",
2977
+ "Make a list of the items that you must take if you evacuate quickly.",
2978
+ ["se-brochure-en"]
2979
+ ],
2980
+ [
2981
+ "warned",
2982
+ "special-help",
2983
+ "If a person needs special help, plan their transport to a shelter with family, neighbours or carers.",
2984
+ ["se-brochure-en"]
2985
+ ],
2986
+ [
2987
+ "warned",
2988
+ "pets",
2989
+ "Keep food, water and medicines for your pets for at least 1 week.",
2990
+ ["se-brochure-en"]
2991
+ ],
2992
+ [
2993
+ "P0",
2994
+ "air-raid",
2995
+ "At an air raid warning, take cover at once in the nearest shelter, cellar or other protective place.",
2996
+ ["se-brochure-en"]
2997
+ ],
2998
+ [
2999
+ "P0",
3000
+ "no-windows",
3001
+ "If no shelter is near, stay indoors in a room without windows.",
3002
+ ["se-brochure-en"]
3003
+ ],
3004
+ [
3005
+ "P0",
3006
+ "lie-down",
3007
+ "If you are outside with no time to take cover, lie down on the ground, in a pit or ditch.",
3008
+ ["se-brochure-en"]
3009
+ ],
3010
+ [
3011
+ "P0",
3012
+ "run-hide",
3013
+ "In an armed attack near you, get far away. If you cannot, lock yourself in a room.",
3014
+ ["se-brochure-en"]
3015
+ ],
3016
+ [
3017
+ "P0",
3018
+ "silent",
3019
+ "When you hide, put your phone on silent. Call the emergency number to report what happened.",
3020
+ ["se-brochure-en"]
3021
+ ],
3022
+ [
3023
+ "P0",
3024
+ "no-call",
3025
+ "Do not call a person who is in danger. The call can show where the person hides.",
3026
+ ["se-brochure-en"]
3027
+ ],
3028
+ [
3029
+ "P1",
3030
+ "bleeding",
3031
+ "To stop severe bleeding, push hard on the wound with a cloth. Keep the pressure until paramedics arrive.",
3032
+ ["se-brochure-en"]
3033
+ ],
3034
+ [
3035
+ "P1",
3036
+ "all-clear",
3037
+ "After the all clear signal, help people who are injured or trapped.",
3038
+ ["se-brochure-en"]
3039
+ ],
3040
+ [
3041
+ "P1",
3042
+ "calls",
3043
+ "Call only to ask for help, so that the network does not overload.",
3044
+ ["se-brochure-en"]
3045
+ ],
3046
+ [
3047
+ "P1",
3048
+ "officials",
3049
+ "Obey the instructions of the police, the rescue services and the officials.",
3050
+ ["se-brochure-en"]
3051
+ ],
3052
+ [
3053
+ "P1",
3054
+ "rumours",
3055
+ "Do not spread rumours or information that nobody has verified.",
3056
+ ["se-brochure-en"]
3057
+ ],
3058
+ [
3059
+ "P1",
3060
+ "verify",
3061
+ "Be careful with content that causes a strong reaction. Check serious news with official sources.",
3062
+ ["se-brochure-en"]
3063
+ ],
3064
+ [
3065
+ "P2",
3066
+ "shelter-days",
3067
+ "Be ready to stay in a shelter for a few days. If there is time, take food, warm clothes and toiletries.",
3068
+ ["se-brochure-en"]
3069
+ ],
3070
+ [
3071
+ "P2",
3072
+ "evacuate",
3073
+ "If officials order an evacuation, follow the instructions that they give on the radio.",
3074
+ ["se-brochure-en"]
3075
+ ],
3076
+ [
3077
+ "P2",
3078
+ "evac-bag",
3079
+ "For an evacuation, take food and water for a few days, ID, cash, medicines, warm clothes and a map.",
3080
+ ["se-brochure-en"],
3081
+ [
3082
+ DRINK,
3083
+ FOOD,
3084
+ MEDICINE
3085
+ ]
3086
+ ],
3087
+ [
3088
+ "P2",
3089
+ "cold",
3090
+ "If the power stops in winter, stay together in one room. Hang blankets over the windows.",
3091
+ ["se-brochure-en"]
3092
+ ],
3093
+ [
3094
+ "P2",
3095
+ "heater",
3096
+ "With a gas or paraffin heater, open a window for air. Turn off the heater before you sleep.",
3097
+ ["se-brochure-en"]
3098
+ ],
3099
+ [
3100
+ "P2",
3101
+ "toilet",
3102
+ "If the toilet does not flush, put a plastic bag in the bowl. Cover the waste with sawdust or litter.",
3103
+ ["se-brochure-en"]
3104
+ ],
3105
+ [
3106
+ "P2",
3107
+ "pets-left",
3108
+ "If you must leave a pet at home, leave extra food and water for it.",
3109
+ ["se-brochure-en"]
3110
+ ],
3111
+ [
3112
+ "P3",
3113
+ "share",
3114
+ "Share supplies with your neighbours where you can. In a war, all people must help each other.",
3115
+ ["se-brochure-en"]
3116
+ ],
3117
+ [
3118
+ "P3",
3119
+ "boil",
3120
+ "If you are not sure that water is safe, boil it until it bubbles strongly.",
3121
+ ["se-brochure-en"],
3122
+ [DRINK]
3123
+ ],
3124
+ [
3125
+ "P3",
3126
+ "grow",
3127
+ "Grow food in a garden, on a balcony or on a windowsill. Use the fruits and berries near you.",
3128
+ ["se-brochure-en"],
3129
+ [FOOD]
3130
+ ],
3131
+ [
3132
+ "P3",
3133
+ "worry",
3134
+ "Talk about your worries with family, friends or neighbours. Limit the news that you read.",
3135
+ ["se-brochure-en"]
3136
+ ],
3137
+ [
3138
+ "P3",
3139
+ "children",
3140
+ "Explain the situation to children with only verified information. Be honest when you do not know.",
3141
+ ["se-brochure-en"]
3142
+ ],
3143
+ [
3144
+ "P3",
3145
+ "updates",
3146
+ "Install security updates immediately, and make backups of important information.",
3147
+ ["se-brochure-en"]
3148
+ ],
3149
+ [
3150
+ "P4",
3151
+ "anxiety",
3152
+ "If you have severe anxiety, get help from a health professional.",
3153
+ ["se-brochure-en"]
3154
+ ],
3155
+ [
3156
+ "P4",
3157
+ "help-prepare",
3158
+ "Help other people to prepare. This can give you a sense of purpose.",
3159
+ ["se-brochure-en"]
3160
+ ],
3161
+ [
3162
+ "P4",
3163
+ "volunteer",
3164
+ "Join a voluntary defence organisation, or give blood if you can.",
3165
+ ["se-brochure-en"]
3166
+ ],
3167
+ [
3168
+ "P5",
3169
+ "join-recovery",
3170
+ "Take part in the recovery plans of your community. Recovery can take years.",
3171
+ ["uk-nrr-2025"]
3172
+ ],
3173
+ ...RECOVERY
2909
3174
  ])
2910
3175
  ];
2911
3176
  /** The steps of the cuts. A cut is a service that an event stops. A plan of a case adds the steps of its cuts. */
2912
3177
  const CUT_STEPS = [
2913
- ...stepsOf("energy.grid", [
3178
+ ...stepsOf("power.grid", [
2914
3179
  [
2915
3180
  "ready",
2916
3181
  "list",
@@ -3171,7 +3436,7 @@ const CUT_STEPS = [
3171
3436
  [DRINK, FOOD]
3172
3437
  ]
3173
3438
  ]),
3174
- ...stepsOf("telecom.network", [
3439
+ ...stepsOf("phone.network", [
3175
3440
  [
3176
3441
  "ready",
3177
3442
  "radio",
@@ -3216,6 +3481,32 @@ const CUT_STEPS = [
3216
3481
  ["ready-earthquakes"]
3217
3482
  ]
3218
3483
  ]),
3484
+ ...stepsOf("network.access", [
3485
+ [
3486
+ "ready",
3487
+ "radio",
3488
+ "Keep a radio with batteries or a hand crank, so that news comes without the internet.",
3489
+ ["ready-kit"]
3490
+ ],
3491
+ [
3492
+ "ready",
3493
+ "paper",
3494
+ "Keep on paper the addresses, the phone numbers and the documents that you keep online.",
3495
+ ["uk-ready"]
3496
+ ],
3497
+ [
3498
+ "ready",
3499
+ "backup",
3500
+ "Make backups of important information on an external drive or a USB drive.",
3501
+ ["se-brochure-en"]
3502
+ ],
3503
+ [
3504
+ "P1",
3505
+ "news",
3506
+ "With no internet, get the news and the instructions of officials from a local radio station.",
3507
+ ["ready-earthquakes"]
3508
+ ]
3509
+ ]),
3219
3510
  ...stepsOf("gas.main", [
3220
3511
  [
3221
3512
  "ready",
@@ -3260,7 +3551,7 @@ const CUT_STEPS = [
3260
3551
  ["cdc-co"]
3261
3552
  ]
3262
3553
  ]),
3263
- ...stepsOf("store.pharmacy", [
3554
+ ...stepsOf("care.local", [
3264
3555
  [
3265
3556
  "ready",
3266
3557
  "list",
@@ -3336,10 +3627,10 @@ const CUT_STEPS = [
3336
3627
  /** All the steps of the content. */
3337
3628
  const STEPS = [...CASE_STEPS, ...CUT_STEPS];
3338
3629
  // src/data/gaps.ts
3339
- const OF_GRID = "This case is the power cut itself. The steps of the cut `energy.grid` apply.";
3630
+ const OF_GRID = "This case is the power cut itself. The steps of the cut `power.grid` apply.";
3340
3631
  const OF_WATER = "This case is the water cut itself. The steps of the cut `water.main` apply.";
3341
3632
  const NO_HOME_STEP = "The emergency team and the hospital give the care after the first minutes. The sources give no household step.";
3342
- const NO_EMP = "The sources give no household step for this phase of an EMP. The steps of the cuts `energy.grid` and `telecom.network` apply.";
3633
+ const NO_EMP = "The sources give no household step for this phase of an EMP. The steps of the cuts `power.grid` and `phone.network` apply.";
3343
3634
  const NO_LONG_STEP = "The sources give no step for a cut of this length. The steps of the earlier phases continue.";
3344
3635
  /** The marked gaps of the cases and the cuts. */
3345
3636
  const GAPS = [
@@ -3439,17 +3730,17 @@ const GAPS = [
3439
3730
  why: "No official household page read gives a step for unrest that continues for weeks."
3440
3731
  },
3441
3732
  {
3442
- on: "energy.grid",
3733
+ on: "power.grid",
3443
3734
  phase: "warned",
3444
3735
  why: "A power cut often comes with no warning. The warning steps of the case and of the network apply."
3445
3736
  },
3446
3737
  {
3447
- on: "energy.grid",
3738
+ on: "power.grid",
3448
3739
  phase: "P4",
3449
3740
  why: NO_LONG_STEP
3450
3741
  },
3451
3742
  {
3452
- on: "energy.grid",
3743
+ on: "power.grid",
3453
3744
  phase: "P5",
3454
3745
  why: NO_LONG_STEP
3455
3746
  },
@@ -3484,22 +3775,52 @@ const GAPS = [
3484
3775
  why: NO_LONG_STEP
3485
3776
  },
3486
3777
  {
3487
- on: "telecom.network",
3778
+ on: "phone.network",
3488
3779
  phase: "P0",
3489
3780
  why: "A cut of the network does not change the first minutes. The steps of the case apply."
3490
3781
  },
3491
3782
  {
3492
- on: "telecom.network",
3783
+ on: "phone.network",
3493
3784
  phase: "P3",
3494
3785
  why: NO_LONG_STEP
3495
3786
  },
3496
3787
  {
3497
- on: "telecom.network",
3788
+ on: "phone.network",
3498
3789
  phase: "P4",
3499
3790
  why: NO_LONG_STEP
3500
3791
  },
3501
3792
  {
3502
- on: "telecom.network",
3793
+ on: "phone.network",
3794
+ phase: "P5",
3795
+ why: NO_LONG_STEP
3796
+ },
3797
+ {
3798
+ on: "network.access",
3799
+ phase: "warned",
3800
+ why: "A loss of the internet access often comes with no warning. The steps of `ready` are the protection."
3801
+ },
3802
+ {
3803
+ on: "network.access",
3804
+ phase: "P0",
3805
+ why: "A loss of the internet access does not change the first minutes. The steps of the case apply."
3806
+ },
3807
+ {
3808
+ on: "network.access",
3809
+ phase: "P2",
3810
+ why: NO_LONG_STEP
3811
+ },
3812
+ {
3813
+ on: "network.access",
3814
+ phase: "P3",
3815
+ why: NO_LONG_STEP
3816
+ },
3817
+ {
3818
+ on: "network.access",
3819
+ phase: "P4",
3820
+ why: NO_LONG_STEP
3821
+ },
3822
+ {
3823
+ on: "network.access",
3503
3824
  phase: "P5",
3504
3825
  why: NO_LONG_STEP
3505
3826
  },
@@ -3524,17 +3845,17 @@ const GAPS = [
3524
3845
  why: NO_LONG_STEP
3525
3846
  },
3526
3847
  {
3527
- on: "store.pharmacy",
3848
+ on: "care.local",
3528
3849
  phase: "P0",
3529
3850
  why: "A closed pharmacy does not change the first minutes. The steps of the case apply."
3530
3851
  },
3531
3852
  {
3532
- on: "store.pharmacy",
3853
+ on: "care.local",
3533
3854
  phase: "P1",
3534
3855
  why: "A closed pharmacy does not change the first hours. The medicines of the ready phase are the protection."
3535
3856
  },
3536
3857
  {
3537
- on: "store.pharmacy",
3858
+ on: "care.local",
3538
3859
  phase: "P5",
3539
3860
  why: NO_LONG_STEP
3540
3861
  },
@@ -3671,23 +3992,28 @@ const OPEN_CELLS = [
3671
3992
  "cbrne.emp/P2",
3672
3993
  "cbrne.emp/P3",
3673
3994
  "geo.space-weather.geomagnetic-storm/P0",
3674
- "energy.grid/P4",
3675
- "energy.grid/P5",
3995
+ "power.grid/P4",
3996
+ "power.grid/P5",
3676
3997
  "water.main/P4",
3677
3998
  "water.main/P5",
3678
3999
  "road.local/P0",
3679
4000
  "road.local/P4",
3680
4001
  "road.local/P5",
3681
- "telecom.network/P0",
3682
- "telecom.network/P3",
3683
- "telecom.network/P4",
3684
- "telecom.network/P5",
4002
+ "phone.network/P0",
4003
+ "phone.network/P3",
4004
+ "phone.network/P4",
4005
+ "phone.network/P5",
4006
+ "network.access/P0",
4007
+ "network.access/P2",
4008
+ "network.access/P3",
4009
+ "network.access/P4",
4010
+ "network.access/P5",
3685
4011
  "gas.main/P3",
3686
4012
  "gas.main/P4",
3687
4013
  "gas.main/P5",
3688
- "store.pharmacy/P0",
3689
- "store.pharmacy/P1",
3690
- "store.pharmacy/P5"
4014
+ "care.local/P0",
4015
+ "care.local/P1",
4016
+ "care.local/P5"
3691
4017
  ];
3692
4018
  // src/data/rules.ts
3693
4019
  const NOW = ["P0"];
@@ -3799,6 +4125,19 @@ const RULES = [
3799
4125
  when: "An air raid warning sounds.",
3800
4126
  then: "Take cover at once in the nearest shelter, cellar or room without windows."
3801
4127
  },
4128
+ {
4129
+ id: "reflex.armed-attack",
4130
+ kind: "reflex",
4131
+ rank: 5,
4132
+ on: ["security.armed-conflict"],
4133
+ target: {
4134
+ on: "security.armed-conflict",
4135
+ phases: NOW
4136
+ },
4137
+ sources: ["se-brochure-en"],
4138
+ when: "There is shooting or an armed attack near you.",
4139
+ then: "Get far away. If you cannot, lock yourself in a room, and put your phone on silent."
4140
+ },
3802
4141
  {
3803
4142
  id: "reflex.chemical",
3804
4143
  kind: "reflex",
@@ -3881,9 +4220,9 @@ const RULES = [
3881
4220
  id: "module.power",
3882
4221
  kind: "module",
3883
4222
  rank: 1,
3884
- on: ["energy.grid"],
4223
+ on: ["power.grid"],
3885
4224
  target: {
3886
- on: "energy.grid",
4225
+ on: "power.grid",
3887
4226
  phases: FIRST_DAYS
3888
4227
  },
3889
4228
  sources: ["ready-power"],
@@ -3907,14 +4246,27 @@ const RULES = [
3907
4246
  id: "module.phone",
3908
4247
  kind: "module",
3909
4248
  rank: 3,
3910
- on: ["telecom.network"],
4249
+ on: ["phone.network"],
3911
4250
  target: {
3912
- on: "telecom.network",
4251
+ on: "phone.network",
3913
4252
  phases: FIRST_DAYS
3914
4253
  },
3915
4254
  sources: ["ready-alerts"],
3916
- when: "The phone or the internet does not operate.",
3917
- then: "Use the module: no phone or internet."
4255
+ when: "The phone network does not operate.",
4256
+ then: "Use the module: no phone network."
4257
+ },
4258
+ {
4259
+ id: "module.internet",
4260
+ kind: "module",
4261
+ rank: 3,
4262
+ on: ["network.access"],
4263
+ target: {
4264
+ on: "network.access",
4265
+ phases: FIRST_DAYS
4266
+ },
4267
+ sources: ["ready-kit", "uk-ready"],
4268
+ when: "The internet does not operate.",
4269
+ then: "Use the module: no internet access."
3918
4270
  },
3919
4271
  {
3920
4272
  id: "module.gas",
@@ -3946,9 +4298,9 @@ const RULES = [
3946
4298
  id: "module.pharmacy",
3947
4299
  kind: "module",
3948
4300
  rank: 6,
3949
- on: ["store.pharmacy"],
4301
+ on: ["care.local"],
3950
4302
  target: {
3951
- on: "store.pharmacy",
4303
+ on: "care.local",
3952
4304
  phases: [
3953
4305
  "ready",
3954
4306
  "warned",
@@ -4018,7 +4370,7 @@ const RULES = [
4018
4370
  rank: 3,
4019
4371
  on: [],
4020
4372
  target: {
4021
- on: "energy.grid",
4373
+ on: "power.grid",
4022
4374
  phases: FIRST_DAYS
4023
4375
  },
4024
4376
  sources: ["uk-hazards", "ready-shelter"],
@@ -4068,9 +4420,9 @@ const RULES = [
4068
4420
  id: "fallback.heat-cold",
4069
4421
  kind: "fallback",
4070
4422
  rank: 1,
4071
- on: ["energy.grid"],
4423
+ on: ["power.grid"],
4072
4424
  target: {
4073
- on: "energy.grid",
4425
+ on: "power.grid",
4074
4426
  phases: ["P2"]
4075
4427
  },
4076
4428
  sources: ["ready-power"],
@@ -4094,9 +4446,9 @@ const RULES = [
4094
4446
  id: "long.fridge",
4095
4447
  kind: "long-plan",
4096
4448
  rank: 1,
4097
- on: ["energy.grid", "food.energy"],
4449
+ on: ["power.grid", "food.energy"],
4098
4450
  target: {
4099
- on: "energy.grid",
4451
+ on: "power.grid",
4100
4452
  phases: ["P2"]
4101
4453
  },
4102
4454
  sources: ["ready-power", "ready-food"],
@@ -4107,9 +4459,9 @@ const RULES = [
4107
4459
  id: "long.medicine",
4108
4460
  kind: "long-plan",
4109
4461
  rank: 2,
4110
- on: ["energy.grid", "health.medicine"],
4462
+ on: ["power.grid", "health.medicine"],
4111
4463
  target: {
4112
- on: "energy.grid",
4464
+ on: "power.grid",
4113
4465
  phases: ["P2", "P3"]
4114
4466
  },
4115
4467
  sources: ["ready-power"],
@@ -4122,7 +4474,7 @@ const RULES = [
4122
4474
  rank: 3,
4123
4475
  on: [],
4124
4476
  target: {
4125
- on: "energy.grid",
4477
+ on: "power.grid",
4126
4478
  phases: ["P3"]
4127
4479
  },
4128
4480
  sources: ["uk-ready"],
@@ -4532,16 +4884,18 @@ const MORE_CASES = [
4532
4884
  "cbrne.nuclear-detonation",
4533
4885
  "security.nuclear-war",
4534
4886
  "cbrne.emp",
4535
- "geo.space-weather.geomagnetic-storm"
4887
+ "geo.space-weather.geomagnetic-storm",
4888
+ "security.armed-conflict"
4536
4889
  ];
4537
- /** The cuts of the content. A cut is a service that an event stops. These ids are a proposal until the stack model names them. */
4890
+ /** The cuts of the content. A cut is a service that an event stops. The ids are the ids of `SUPPLY_PARTS` in `stack-hazards`. */
4538
4891
  const CUTS = [
4539
- "energy.grid",
4892
+ "power.grid",
4540
4893
  "water.main",
4541
4894
  "road.local",
4542
- "telecom.network",
4895
+ "phone.network",
4896
+ "network.access",
4543
4897
  "gas.main",
4544
- "store.pharmacy"
4898
+ "care.local"
4545
4899
  ];
4546
4900
  /** The need codes that the steps protect. */
4547
4901
  const NEEDS = [