The Early Phases of Supernova 2020pni: Shock-Ionization of the Nitrogen-Enriched Circumstellar Material

We present multiwavelength observations of the Type II SN 2020pni. Classified at $\sim 1.3$ days after explosion, the object showed narrow (FWHM $<250\,\textrm{km}\,\textrm{s}^{-1}$) recombination lines of ionized helium, nitrogen, and carbon, as typically seen in flash-spectroscopy events. Using the non-LTE radiative transfer code CMFGEN to model our first high resolution spectrum, we infer a progenitor mass-loss rate of $\dot{M}=(3.5-5.3)\times10^{-3}$ M$_{\odot}$ yr$^{-1}$ (assuming a wind velocity of $v_w=200\,\textrm{km}\,\textrm{s}^{-1}$), estimated at a radius of $R_{\rm in}=2.5\times10^{14}\,\rm{cm}$. In addition, we find that the progenitor of SN 2020pni was enriched in helium and nitrogen (relative abundances in mass fractions of 0.30$-$0.40, and $8.2\times10^{-3}$, respectively). Radio upper limits are also consistent with a dense CSM, and a mass-loss rate of $\dot M>5 \times 10^{-4}\,\rm{M_{\odot}\,yr^{-1}}$. During the first 4 days after first light, we also observe an increase in velocity of the hydrogen lines (from $\sim 250\,\textrm{km}\,\textrm{s}^{-1}$ to $\sim 1000\,\textrm{km}\,\textrm{s}^{-1}$), which suggests a complex CSM. The presence of dense and confined CSM, as well as its inhomogeneous structure, suggest a phase of enhanced mass loss of the progenitor of SN 2020pni during the last year before explosion. Finally, we compare SN 2020pni to a sample of other shock-photoionization events. We find no evidence of correlations among the physical parameters of the explosions and the characteristics of the CSM surrounding the progenitors of these events. This favors the idea that the mass-loss experienced by massive stars during their final years could be governed by stochastic phenomena, and that, at the same time, the physical mechanisms responsible for this mass-loss must be common to a variety of different progenitors.


INTRODUCTION
Strong winds or eruptive events are typical phenomena that lead massive stars to lose large amounts of material during the ark of their lives (e.g., de Jager et al. 1988;Vink et al. 2001; T . reflecting the low velocities of the CSM -FWHM intensity on the order of a few hundred kilometers per second. These types of SNe are usually called SNe IIn (Schlegel 1990;Filippenko 1997). Recent observations have brought to light a growing number of peculiar transitional objects that bridge the gap between SNe IIn and more normal core-collapse explosions (i.e., Hrich Type II and H-poor Type Ibc; e.g., Foley et al. 2007;Roming et al. 2012;Ofek et al. 2013;Gal-Yam et al. 2014;Margutti et al. 2014). Some objects discovered very soon after explosion (hours to days) exhibit recombination signatures for only a few days, followed by a transition to normal SNe II (e.g., Leonard et al. 2000;Terreran et al. 2016;Yaron et al. 2017a). These events are sometimes dubbed flash-spectroscopy SNe or shock-photoionization SNe (Gal-Yam et al. 2014;Khazov et al. 2016), as the spectra typically show recombination lines of highly-ionized helium, carbon, nitrogen, and oxygen. In addition, the velocities measured from these narrow features have been found to be considerably larger than those typically associated with red supergiant (RSG) winds (e.g., Groh 2014;Yaron et al. 2017a), which are usually on the order of a few tens of kilometers per second (e.g., Mauron & Josselin 2011). Further modeling of these lines shows that mass-loss rates on the order of 10 −4 -10 −2 yr −1 are necessary to reproduce the shock-ionization features (e.g., Boian & Groh 2020), in contrast to typical mass-loss rates of RSGs, ∼ 10 −5 yr −1 (e.g., Smith 2014). The presence of dense CSM surrounding RSGs is also suggested by hydrodynamical models of hydrogen-rich SN light curves (Morozova et al. 2018). The interaction of the SN ejecta with this CSM is sometimes inferred by boxy and flat-topped H and H profiles that start to appear a few months after explosion (e.g., Inserra et al. 2011;Terreran et al. 2016;Jerkstrand et al. 2017). In addition, this material is found to be confined within a radius of ∼800-3000 R (e.g., Morozova et al. 2018). All of these facts provide strong evidence for a period of enhanced mass loss in RSG progenitors approaching their demise.
The traditionally accepted scenario of stellar evolution envisions a single massive star (like an RSG) evolving unperturbed during its final ∼ 1000 yr prior to explosion (e.g., Woosley et al. 2002). The neutrino-cooled core keeps violently burning, while the outer envelope stays unperturbed. However, the shock-ionization features exhibited by some SNe, produced by the interaction of the ejecta with confined and nearby CSM, suggests otherwise, hinting toward a period of enhanced mass loss preceding the explosion.
What physical mechanism is responsible for this phenomenon is not clear, and several scenarios have been proposed. Evolved RSGs could eject part of the loosely bound envelope through nuclear flashes (Weaver & Woosley 1979;Dessart et al. 2010;Woosley & Heger 2015). These are expected to be caused by dynamical burning triggered by oxy- -band image of SN 2020pni (marked with the red cross) and its host galaxy UGC 09684. We also report the positions of the other three transients discovered in UGC 09684: SN 2006ed (magenta), SN 2012ib (green cross), and AT 2017cgh (yellow circle). See the main text for references. gen, neon, or silicon igniting off-center. Such late-stage burning instabilities could easily explain the ejection of material in the months and years preceding an SN explosion. However, this phenomenon can occur only for stars of 8-12 (Weaver & Woosley 1979). Different studies have shown that some of the objects presenting shock-ionization features have progenitors with zero-age main-sequence (ZAMS) masses above 12 (e.g., Terreran et al. 2016; Morozova et al. 2017Morozova et al. , 2018Tartaglia et al. 2021) so nuclear flashes cannot be invoked to explain all of the objects showing flash-spectroscopy features. Eruptive mass loss during the late evolution of RSGs can also be caused by large-amplitude pulsations, induced by partial ionization of hydrogen in the envelope (e.g., Li & Gong 1994;Heger et al. 1997;Yoon & Cantiello 2010). Alternatively, gravity waves could be a viable mechanism to unbind up to a few of material (Quataert & Shiode 2012;Shiode & Quataert 2014;Fuller 2017;Linial et al. 2021;Wu & Fuller 2021). These waves are supposed to be created by the vigorous convection during carbon fusion and beyond. Consequently, the timing of this mechanism makes it a very good candidate to explain the enhanced mass loss in evolved massive stars. An alternative explanation is that the material that is interacting with the SN ejecta is not the result from a super-wind phase of the progenitor star; rather, it is rather a "cocoon" of stagnating material, composed actually by gas that does not reach the escape velocity (e.g., Dessart et al. 2017;Soker 2021). This scenario removes the requirement for the fine-tuned stellar activity in the years immediately preceding the SN explosion, although this cannot explain the presence of dense material at larger distances, like the one showed by some of the shock-ionization objects (e.g., SN 1998S; Mauerhan & Smith 2012). The number of SNe showing narrow lines within the first week after explosion has been growing rapidly in recent times (e.g., Boian & Groh 2020;Bruch et al. 2021;Gangopadhyay et al. 2020;Zhang et al. 2020;Tartaglia et al. 2021). According to Khazov et al. (2016), ∼ 20% of core-collapse SNe discovered within 5 days from explosion show flash-ionization features, while Bruch et al. (2021) find that the fraction is 30% for SNe observed within 2 days of explosion. In this context, we present a new addition to the class. SN 2020pni (also known as ATLAS20sxl, Gaia20dus, PS20fyg, ZTF20ablygyy) was discovered on 2020 July 16.19 (UT dates are used throughout this paper; MJD 59,046.19) by ALeRCE (Forster et al. 2020), using the Zwicky Transient Facility (ZTF; Kulkarni 2018) data stream. The transient is located at coordinates J2000 = 15 h 03 m 49 s .964, J2000 = +42 • 06 50. 52, sitting in the outskirts of the spiral galaxy UGC 09684 (see Figure 1). The last nondetection (by ZTF) was < 24 hr earlier (MJD 59,045.25), placing a strong constraint on the time of first light (see Sec. 4.1). A spectroscopic classification was obtained by the ZTF collaboration on 2020 July 17.27 (MJD 59,047.27), ∼ 1 day after discovery, using the Spectral Energy Distribution Machine (SEDM; Blagorodnova et al. 2018;Rigault et al. 2019) on the Palomar 60-inch (P60) telescope. Unresolved lines of hydrogen and ionized helium were detected (Bruch et al. 2020), which are indicative of a young SN II with flash-spectroscopy features. We started observing SN 2020pni on 2020 July 17.32 (MJD 59,047.32), ∼ 1.5 days since discovery, confirming the classification. In this paper we present the results from our optical observing campaign in the first ∼ 60 days since explosion, as well as our radio follow-up observations beyond 300 days after first light.
In Section 2 we present the properties of the host galaxy UGC 09684. We describe our dataset and the data-reduction techniques in Section 3. The multiwavelength evolution of SN 2020pni is described in Section 4, focusing in particular on the early spectroscopic evolution and modeling. Finally, we discuss the results in Section 5, where we compare SN 2020pni to the population of flash-ionization events with the goal of constraining the progenitor properties.

UGC 09684
The host of SN 2020pni, known as UGC 09684, is an SBac star-forming galaxy. It hosted at least three additional transients -the Type II SN 2006ed (Foley et al. 2006;Joubert & Li 2006), the stripped-envelope SN 2012ib (Lipunov et al. 2012;Tomasella et al. 2012), and the unclassified transient AT 2017cgh (Chambers et al. 2017). SN 2020pni is the fourth confirmed SN-like event in UGC 09684 during the past 15 yr, marking a rate of SN production comparable to the most active "SN factory" galaxies.
From our highest-resolution spectrum of SN 2020pni, acquired on 2020 July 22.26 (∼ 6.5 days after first light) with Keck II+ESI (Sheinis et al. 2002), we measure a redshift = 0.01665 ± 0.00030; corrected for Virgo infall, this corresponds to a distance of 73.7 ± 1.3 Mpc ( 0 = 73 km s −1 Mpc −1 , Ω M = 0.27, Ω Λ = 0.73), equivalent to a distance modulus = 34.34 ± 0.15 mag (the errors are propagated from the redshift uncertainties). We can estimate the local reddening by measuring the equivalent width (EW) of the Na 5890, 5896 doublet absorption at the redshift of the host galaxy (Turatto et al. 2003;Poznanski et al. 2012). From the Keck II+ESI spectrum, we also infer an EW of 0.55 ± 0.01 Å for Na D, which corresponds to a host-galaxy extinction of ( − ) host = 0.063 ± 0.010 mag. These values are consistent with measurements performed on spectra at later phases when the ejecta are no longer interacting with the nearby CSM (see Sec. 4.2.1). We can thus confidently associate the Na absorption with an interstellar origin. The Milky Way color excess in the direction of SN 2020pni is ( − ) MW = 0.017 mag (Schlafly & Finkbeiner 2011). We estimate the star-formation rate (SFR) of UGC 09684 with the Fitting and Assessment of Synthetic Templates code (FAST; Kriek et al. 2009). We used ultraviolet (UV, far-UV, near-UV), optical ( ), and near-infrared (NIR; ) luminosity measurements from the GALEX All-Sky Survey Source Catalog (GASC; Seibert et al. 2012), the Sloan Digital Sky Survey (SDSS) Data Release 6, and the final release of the Two Micron All Sky Survey (2MASS) Extended Source Catalog (Jarrett et al. 2000). All of the data were retrieved from the NASA/IPAC Extragalactic Database (NED) . In our initial grid of models, we considered both a Salpeter (1955) and a Chabrier (2003) stellar initial mass function (IMF). For the star-formation history (SFH), we employed an exponentially decreasing function (SFR ∝ − ) and a delayed function as well (SFR ∝ × − ). We also assumed a Calzetti et al. (2000) reddening law. Finally, we used the stellar population libraries of Bruzual & Charlot (2003) Prieto et al. 2008;Kelly & Kirshner 2012), the majority of them agreeing on a metallicity slightly above solar (oxygen abundance 12 + log(O/H) ≈ 9.0, corresponding to ∼2 Z ). Therefore, we limited our search to stellar population libraries with above-solar metallicities ( > 0.019). The range of best-fitting SFRs for UGC 09684 is 0.25-0.39 yr −1 . We also infer a total stellar mass of ★ = (2.0-3.5) ×10 10 , and hence a current specific SFR sSFR ≈ 0.01 Gyr −1 . This is higher than what is found in the literature (e.g., Kelly & Kirshner 2012) but agrees with the relatively large number of recent events reported in this host galaxy. We summarize all of the inferred and adopted parameters for SN 2020pni and UGC 09684 in Table 1. 3. OBSERVATIONS OF SN 2020PNI

UV/Optical/NIR Photometry
We observed SN 2020pni with the Ultraviolet Optical Telescope (UVOT; Roming et al. 2005) on board the Neil Gehrels Swift Observatory (Gehrels et al. 2004) from 2020 July 16.8 until 2020 September 10.8 ( = 1.0-56.9 days since first light). We performed aperture photometry using a 3 -radius circular region with uvotsource within HEAsoft v6.26, following the standard guidelines from Brown et al. (2009). In order to remove contamination from the host galaxy, we employed images acquired at ≈ 105 days after first light, assuming that the SN contribution is negligible. This is supported by visual inspection, in which we found no flux associated with SN 2020pni, although we cannot exclude some residuals given the relatively early phase of the SN, especially in the B and V bands. We subtracted the measured count rate at the location of the SN from the count rates in the SN images following the prescriptions of Brown et al. (2014). We detect UV emission from the earliest Swift epoch ( = 1.0 days; Figure 2) until ≈ 32 days after first light. Subsequent nondetections in the , 1, 2, and 2 bands indicate significant cooling of the photosphere.
Additional -band imaging of SN 2020pni was obtained through the Young Supernova Experiment (YSE) sky survey (Jones et al. 2021) with the Pan-STARRS telescope (PS1; Kaiser et al. 2002) between 2020 July 17.3 and 2020 September 12.2 ( = 1.5-58.4 days since first light). The YSE photometric pipeline is based on photpipe (Rest et al. 2005). Each image template was taken from stacked PS1 exposures, with most of the input data from the PS1 3 survey. All images and templates are resampled and astrometrically aligned to match a skycell in the PS1 sky tessellation. An image zero-point is determined by comparing point-spread function Note that only the Chabrier (2003) IMF was available for the latter library. We used the calibration database (CALDB) version 20201008.
(PSF) photometry of the stars to updated stellar catalogs of PS1 observations (Chambers et al. 2017). The PS1 templates are convolved to match the nightly images, and the convolved templates are subtracted from the nightly images with HOTPANTS (Becker 2015). Finally, a flux-weighted centroid is found for each SN position, and PSF photometry is performed using "forced photometry": the centroid of the PSF is forced to be at the SN position. The nightly zero-point is applied to the photometry to determine the brightness of the SN for that epoch.
We obtained multiband NIR data for SN 2020pni on 2020 July 28 using the Multi-Object Spectrometer For Infra-Red Exploration (MOSFIRE; McLean et al. 2012) at Keck Observatory. We imaged the object using filters. Standard flat-fielding has been applied, and the instrumental magnitudes were extracted through PSF photometry. We used the 2MASS catalog (Skrutskie et al. 2006) for the flux calibration.
In addition to our own observations, we include -band and -band photometry from the ZTF public data stream Graham et al. 2019), which span from 2020 July 16.2 to 2020 September 2.2 ( = 0.4-48.4 days since first light). All photometric observations are listed in Tables A1-A4.

Optical/NIR Spectroscopy
The spectroscopic campaign of SN 2020pni started ∼ 1 day after discovery. Here we present the first 64 days of evolution. All of the spectra were reduced using standard techniques, which included correction for bias, overscan, and flat field. Spectra of comparison lamps and standard stars acquired during the same night and with the same instrumental setting have been used for the wavelength and flux calibrations, respectively. When possible, we further removed the telluric bands using standard stars. Given the various instruments employed, the data-reduction steps described above have been applied using several instrument-specific routines. Data from Keck using the LRIS, DEIMOS, and MOSFIRE instruments were processed with the P I software package . We used standard IRAF commands to extract the spectra from GMOS, Binospec, and ESI data. The SEDM spectrum was downloaded directly from the Transient Name Server (TNS).
Spectra of SN 2020pni were obtained with the Kast spectrograph (Miller & Stone 1993) on the Shane 3 m telescope at Lick Observatory on 2020 July 18, 19, and 28, August 9 and 11, and September 7 (programs 2020A-S008 and 2020Bhttp://www.ipac.caltech.edu/2mass/ IRAF is distributed by NOAO, which is operated by AURA, Inc., under cooperative agreement with the National Science Foundation (NSF). https://wis-tns.weizmann.ac.il/object/2020pni . UV/optical/NIR light curve of SN 2020pni with respect to -band maximum brightness. Observed photometry is presented in the AB magnitude system (Oke & Gunn 1983). PS1 data and 3 upper limits are presented as squares, ZTF as circles, and Swift as diamonds. S001, PI Filippenko; program 2020A-S011, PI Foley). Observations were made with the 452/3306 and the 600/4310 grisms on the blue arm and the 300/7500 grating on the red arm, using the 2.0 slit aligned along the parallactic angle to minimize the effects of atmospheric dispersion (Filippenko 1982). Calibration observations (arc lamps, dome flats, and spectrophotometric standards) were performed on the same night. The data were reduced with standard IRAF/pyRAF and Python routines, including flat-fielding, determining the wavelength solution and small-scale wavelength corrections from night-sky lines, with flux calibration and telluric removal accomplished through the use of spectrophotometric standard stars. An additional spectrum was obtained on July 30 as part of the Lick Supernova Program (ToO) 2020A-S012 (PI Foley), using a different setup compared to the classical program (830/3460 grism, blue arm; 1200/5000 grating, red arm; 2.0 slit). The data were reduced in a similar manner. We obtained spectra of SN 2020pni with the FLOYDS spectrograph on the Faulkes-N telescope at Haleakalā, Hawaii, as part of the Las Cumbres Observatory (LCO; Brown et al. 2013) network. The spectra were acquired on 2020 August 1, 4, 10, and 22 and on September 7, as shown in Table A5. All spectra were obtained with the 1.6 slit under nearly photometric conditions, and the slit was aligned along the parallactic angle. Comparison-lamp and dome-flat exposures were obtained immediately before and after each observation. Following standard procedures in pyraf, we reduced all of these spectra using the FLOYDS pipeline (Valenti et al.   2014) . This included standard image reductions, aperture extraction, flux calibration, wavelength calibration, telluric removal, and order combination. A spectrum was also taken with the Alhambra Faint Object Spectrograph and Camera (ALFOSC) on the Nordic Optical Telescope (NOT) at La Palma on 2020 July 25, using grism 4 and a 1.0 slit, aligned along the parallactic angle, and under clear observing conditions and good seeing. The spectrum was reduced with a custom pipeline running standard pyraf procedures.
We obtained an NIR spectrum of SN 2020pni in the bands on 2020 July 28 using MOSFIRE at Keck Observatory. The data were reduced using the MOSFIRE data-reduction pipeline, which performed flat-field correction, wavelength calibration using night-sky lines and arc-lamp observations, and spectral extraction. We then used xtellcor (Vacca et al. 2003) to perform flux calibration and telluric correction with observations of an A0V star HIP 71172.
A summary of all the telescopes, instruments, and configurations used for the spectroscopic observations of SN 2020pni is presented in Table A5. All of the spectra shown will be available at the Weizmann Interactive Supernova data REPository (WISeREP; Yaron & Gal-Yam 2012).

X-rays
We started observing SN 2020pni with Swift-XRT (Burrows et al. 2005) on 2020 July 16 until September 10 ( ≈ 1.3-56 days since time of first light), for a total exposure time of 31.5 ks. We reduced the data following standard practice using HEASOFT v6.28 and the latest Swift calibration files. We find no evidence for X-ray emission at the location of the SN in the individual exposures and in the merged event file, for which we infer a 3 count-rate upper limit of 8.0 × 10 −4 counts s −1 (0.3-10 keV). The neutral hydrogen column density in the direction of the SN is 1.40×10 20 cm −2 (Kalberla et al. 2005). For a power-law spectrum ∝ −1 , the corresponding unabsorbed flux limit is < 2.9×10 −14 erg s −1 cm −2 , which is < 1.9×10 40 erg s −1 (0.3-10 keV). Individual segments of observations have a typical exposure time of ∼ 1.6 ks, which leads to flux limits < 2.0 × 10 −13 erg s −1 cm −2 ( < 1.2 × 10 41 erg s −1 ). We emphasize that these limits are corrected only for the absorption component that originates in the Galaxy. However, the modeling of the optical spectra and early-time light curve ( §4.3) indicates high densities in the local SN environment at distances < 10 15 cm, from which we estimate large intrinsic absorption corresponding to H−int 10 25 cm −2 at the time of radiation breakout (assuming that a large fraction of the material is neutral). The lack of detected X-rays in SN 2020pni is thus most likely a consequence of the very large local absorption by the extended layer of CSM from which the H lines originate at early times. A later-time Swift-XRT observation was acquired on 2020 October 28 ( ≈ 105 days since time of first light, exposure time 3.5 ks), from which we derive < 9 × 10 40 erg s −1 . The lack of detectable Xray emission is consistent with the low-density, larger-scale environment inferred from the radio observations ( §3.4 and §4.3.3). E P SN 2020 7

Radio
We observed SN 2020pni with the NSF's Karl G. Jansky Very Large Array (VLA) through our joint Fermi/VLA program SD1096/131096 (PI Margutti) on 2020 August 21.8 ( = 37.0 days after time of first light), 2020 November 21.5 ( = 128.7 days), and 2021 May 18.1 ( = 306.3 days). We carried out observations at a mean frequency of 10.0 GHz (X band) with a bandwidth of 4.096 GHz. The data were taken in standard phase-referencing mode, with 3C 286 as the bandpass and flux-density calibrator and 9C J1506+4239 and B3 1456+375 as the complex-gain calibrators. We calibrated the data using the VLA pipeline in the Common Astronomy Software Applications package (CASA; McMullin et al. 2007a) v5.6.2, with additional flagging. For imaging, we used Briggs weighting with a robust parameter of 1. No selfcalibration was performed. The details of these observations are given in Table A7.
We find no evidence for radio emission at the SN location and infer a flux-density limit of < 19 Jy and < 12 Jy (3× image rms) for the first and second epochs, respectively, corresponding to < 1.2 × 10 26 erg s −1 Hz −1 and < 0.8 × 10 26 erg s −1 Hz −1 at the distance of SN 2020pni. In the third epoch the VLA was in its D configuration and there was a significant contribution from the host galaxy at the location of SN 2020pni, but we found no evidence of a point source at the SN location. After fitting and subtracting the host emission in the image plane using PyBDSM (Python Blob Detection and Source Measurement; Mohan & Rafferty 2015), we find a 3 upper limit of < 30 Jy ( < 2 × 10 26 erg s −1 Hz −1 ).

Photometric Properties and Pseudobolometric Light Curve
The complete UV and optical light curves of SN 2020pni are presented in Figure 2. To estimate the time of escape of the first photons, we fit a three-parameter power-law function (e.g., = + ) to the early-time g and r data. From this, we infer a time of first light of MJD 59, 045.8 ± 0.1. The error on the time is estimated based on the nonlinear least-squares fitting routine, and we point out that it likely underestimates the true (systematic) uncertainty of the measurement. We use this value throughout the paper. In order to estimate the peak absolute magnitudes, we fit a low-order polynomial to the SN 2020pni light curve. We obtain = −18.28 ± 0.10 mag at MJD 59, 052.1 ± 0.2 and = −18.02 ± 0.20 mag at MJD 59, 055.6 ± 0.2. Using the adopted time of first light, the rise time of SN 2020pni is = 9.8 ± 0.3 days with respect to -band maximum and = 6.3 ± 0.2 days with respect to -band maximum. We then compare the -band light curve of SN 2020pni to a sample of SNe II with and without shock-ionization features at early times. We include the sample of flash-spectroscopy objects from Khazov et al. (2016) and Bruch et al. (2021), in addition to the sample of "normal" SNe II from de Jaeger et al. (2019). We note that although SN 2013ej and SN 2014G were included in the latter collection, these objects showed flashspectroscopy features in their early-time spectra (Valenti et al. 2014;Terreran et al. 2016), and they are therefore treated as such. Furthermore, we expand the shock-ionization sample with the addition of SN 1998S, SN 2016bkv, and SN 2017ahn (Leonard et al. 2000;Hosseinzadeh et al. 2018;Nakaoka et al. 2018;Tartaglia et al. 2021). The light curves of all the objects presented were retrieved from the OSC (https://sne.space; Guillochon et al. 2017), apart from those of Bruch et al. (2021), which were taken directly from their paper. For some objects the band was not available, and we used the band instead, without loss of generality.
We present the full comparison in the left panel of Figure  3. The great majority of flash-ionization objects populate the upper-end part of the plot, with SN 2020pni sitting right in the middle of the sample. Indeed, Khazov et al. (2016) claimed that the objects showing shock-ionization lines tended to be on average brighter than those that did not exhibit such features. On the other hand, Bruch et al. (2021) did not find the same trend from the analysis of their sample. The addition of the sample of "normal" SNe II from de Jaeger et al. (2019) seems to support the former study, although the presence of one extreme outlier complicates the scenario. In fact, SN 2016bkv (the lowest red line on the plot) is the most striking example that objects presenting shock-ionization features can indeed have luminosities well below the average of SNe II. There is some disagreement on the nature of this event, with claims for it to be an electron-capture SN rather than a core-collapse SN (Hosseinzadeh et al. 2018), but the presence of material around the progenitor star at the time of explosion should transcend the explosion mechanism responsible for the stellar demise.
The apparently higher luminosity shown on average by flash objects could naturally be explained by the extra energy injection from the early interaction responsible for the shock ionization. However, selection criteria could also play a factor in the luminosity distribution. Brighter objects are typically of more interest to the community, and therefore a classification spectrum could be sought with more urgency. More low-luminosity SNe II could indeed exhibit flash-ionization features if observed sufficiently early. The size of the flashspectroscopy sample is still quite small, preventing us from reaching a definitive conclusion on the matter.
We construct a pseudobolometric light curve of SN 2020pni using a combination of multicolor photometry from ZTF, PS1,   and Swift observations. For each epoch, luminosities are calculated through trapezoidal integration of SN flux in the bands (3000-10000 Å). Uncertainties are estimated through a Monte Carlo simulation that includes 1000 realizations of the data. In time intervals without complete color information, we interpolate between light-curve data points using a low-order polynomial spline. The complete pseudobolometric light curve of SN 2020pni is presented in the right panel of Figure 3 for phases < 60 days after explosion. We choose to estimate luminosities for SN 2020pni using a trapezoidal integration method rather than fitting a blackbody model so as to better compare SN 2020pni to other SNe II lacking UV or NIR photometric coverage.
We also construct a complete bolometric light curve of SN 2020pni by fitting the broadband photometry with a blackbody model that is dependent on radius and temperature. Each spectral energy distribution (SED) was generated from the combination of multicolor UV/optical photometry in the 2, 2, 1, , , , , , and bands (1500-9000 Å). In regions without complete color information, we extrapolate between light-curve data points using a low-order polynomial spline. This yields an initial radius of bo = (2.4 ± 0.14) × 10 14 cm, as well as a peak tem- The extremely blue UV colors and early-time ( < 5 days) color evolution of SN 2020pni impose nonnegligible deviations from the standard Swift-UVOT count-to-flux conversion factors. We account for this effect following the prescriptions by Brown et al. (2010). perature and luminosity of = (2.5 ± 0.16) × 10 4 K and bol = (2.7 ± 0.39) × 10 43 erg s −1 . As shown in the left panel of Figure 3, we compare the -band light-curve evolution of SN 2020pni to popular SNe II discovered within a few days of explosion, many of which have flash-ionized spectral features detected in their earlytime spectra, such as SN 1998S (Leonard et al. 2000;Fassia et al. 2001;Shivvers et al. 2015), SN 2013fs (Yaron et al. 2017a), SN 2014G (Terreran et al. 2016), and SN 2017ahn (Tartaglia et al. 2021). These objects were selected for reference to SN 2020pni because of their high-cadence optical sampling, complete pseudobolometric light curves, and distinct shock-ionization features in the early-time spectra that then disappeared at later phases. With respect to this sample, the peak -band absolute magnitude of SN 2020pni is more luminous than that of SN 2013ej, SN 2013fs, and SN 2017ahn, but less luminous than that of SN 1998S and SN 2014G. Its -band rise time and post-maximum decline rate are most similar to those of SN 2013fs. The photometric evolution of SN 2020pni is comparable to that of SN 2017ahn out to < 30 days post-peak, until the plateau in the light curve of SN 2017ahn falls off at ∼ 40 days.
In the right panel of Figure 3, we compare the pseudobolometric light-curve evolution of SNe II discovered within a few days of explosion to that of SN 2020pni. We find that SN 2020pni has a lower overall luminosity than SN 1998S and a pseudobolometric luminosity comparable to or higher then the other presented SNe. Like the -band light curve, the T .
overall pseudobolometric evolution of SN 2020pni is most comparable to that of SN 2013fs at phases < 60 days after explosion. Out to phases < 40 days post-explosion, its pseudobolometric rise time, light-curve decline rate, and peak luminosity are nearly identical to those of SN 2014G and SN 2017ahn.

Optical and NIR Spectroscopic Evolution
The complete optical spectral evolution of SN 2020pni is presented in Figure 4, and a log of the presented spectra is reported in Table A6. We also include the ZTF classification spectrum that was taken 1 hr prior to our first spectrum (Bruch et al. 2020). We started our spectroscopic campaign less than 2 days after our estimated time of first light, and we kept monitoring SN 2020pni for ∼ 60 days, until constrained by the Sun. The early-time spectra show a blue continuum, with prominent narrow lines of H, He , C , N , and N . After 1 week, most of these features disappear, and only the H lines remain, which at this epoch are still narrow but with a P Cygni profile. At a phase of 17 days from first light, the spectrum seems completely featureless, while broad lines ( ≈ 10, 000 km s −1 ) begin to appear a few days later. More typical features of SNe II start to shape the spectrum (see, e.g., Gutiérrez et al. 2017), including H, Fe , Na , Sc , Ba , Ti , and Ca . By the time SN 2020pni became Sun constrained, it was still in the photospheric phase, and no nebular lines were visible yet.
At ∼12 days after first light, we acquired a Keck I+MOSFIRE NIR spectrum, in coordination with an optical spectrum with Shane+Kast (see Figure 5). Although the H Balmer series is clearly visible at this phase in the optical spectrum, we do not detect any Paschen or Brackett lines in the NIR. However, we identify a P Cygni profile of He I 10830 and possibly He I 20581.
In Figure 6 we compare the early phases of SN 2020pni with those of other well-observed flash-spectroscopy events -SN 1998S (Leonard et al. 2000;Fassia et al. 2001;Shivvers et al. 2015), SN 2013fs (Yaron et al. 2017b), SN 2014G (Terreran et al. 2016), and SN 2017ahn (Tartaglia et al. 2021). The spectra were first normalized by the underlying continuum , and then scaled by an arbitrary factor for better display. A diversity in line intensities and timescales is clearly evident, and the presence of different elements with different ionization levels could be linked to variations in CSM composition as well. Prominent, highly ionized oxygen lines are present in the first spectrum of SN 2013fs, although no oxygen is detected in the first spectrum of SN 2020pni. These lines disappear very rapidly in SN 2013fs, so we cannot exclude that these lines were present in SN 2020pni at an earlier phase.
The continuum is estimated using a spline fit to the region free of emission lines.
The presence of a relatively prominent C 5803 line in SN 2020pni, which is missing in the spectra of SN 2013fs, hints at a carbon-rich environment for SN 2020pni (see Figure 6). This carbon line seems to also be quite prominent in SN 2014G, and possibly detected in SN 1998S and SN 2017ahn. The spectroscopic similarities between SN 1998S and SN 2020pni are remarkable (see spectra at ∼ 4 days). Indeed, among the presented sample, SN 1998S is the only object other than SN 2020pni that still shows narrow lines beyond a week after explosion. SN 2013fs and SN 2014G present featureless spectra at ∼ 9 days after explosion, while SN 2020pni and SN 1998S show narrow H lines with P Cygni profiles, both with a low-velocity component in absorption (see also Sec. 4.2.1). This indicates that at this phase the photosphere is still in the slow-moving CSM, suggesting a more radially extended, high-density environment compared to that of SN 2013fs and SN 2014G.
We compare the later spectroscopic evolution of SN 2020pni with the same sample of objects. In Figure 7, we display spectra at ∼ 2 months after explosion. All of the objects present a very similar pattern, with the spectrum being dominated by P Cygni profiles of hydrogen, sodium, iron, and other metal lines like scandium and barium. Focusing on the P Cygni profile of H , SN 2017ahn and SN 1998S exhibit very shallow to no absorption, SN 2013fs shows a relatively deep trough, and SN 2020pni and SN 2014G are intermediate. We find a certain range of velocities of ejected material in the sample. The minimum of the H absorption feature of SN 2020pni sits at ∼ 6500 km s −1 , while that of SN 2014G is at ∼ 7600 km s −1 . Indeed, focusing on the position of the minimum of the absorption of the features in common, we notice that SN 2020pni has the slowest material. From the minimum of the Fe 5169 feature, we measure a velocity of ∼ 3700 km s −1 , which we can use as a proxy for the photospheric velocity (Hamuy et al. 2001). The slower material displayed by SN 2020pni manifests as a higher number of discernible features in the spectra of SN 2020pni, as a consequence of less severe line blending. This can be appreciated especially from the spectrum ∼ 64 days after explosion, where several Fe , Sc , and Ba multiplets can be identified (see Figure 7).
Focusing on the He and Na absorption blend around 5800 Å, it is clear from Figure 7 how this feature looks broad, and possibly with multiple components, in SN 2020pni, SN 2013fs, and SN 2014G. The same feature appears narrower in SN 1998S and SN 2013fs. It is tempting to attribute its reddest component to a resolved He line. In SN 2020pni this identification would correspond to a velocity of the helium material of ∼ 5000 km s −1 , which is considerably slower than what is shown by the H minimum. Ba has a multiplet at 5854, 6142, and 6497. Assuming then that the reddest absorption in the feature at 5800 Å is barium, we obtain a   (Tartaglia et al. 2021). The spectra have been continuum-subtracted and arbitrarily normalized for better display. While CSM-ionization features appear in all these objects, some of them already present a featureless continuum a week after first light. (Without loss of generality, we assume that the reported time of explosion for the targets found in the literature is actually the time of first light.) All of the spectra are in the rest frame and have been corrected for Galactic and host-galaxy reddening.
velocity of ∼ 4000 km s −1 , while from the feature at 6100 Å we measure ∼ 3000 km s −1 . Therefore, the Ba association also seems in conflict with other identifications of the same ion. It is likely that a combination of helium and barium is responsible for the broader feature at 5800 Å observed in some SNe II, such as SN 2020pni and SN 2013fs.

Line Evolution
At 6 days after first light, a very broad, although shallow, absorption starts to appear on the blue side of H (see Figure  8). This feature extends to ∼ 8000 km s −1 , while the emission component remains narrow. The broad component is clearly associated with the SN ejecta. After a few days, the ab-sorption component develops a more pronounced dip. From the position of the minimum, we measure a velocity in close agreement with what is determined from the FWHM of the emission feature. The narrow H now has the full appearance of a P Cygni profile. The broad component is still present at these phases. This morphology, with a narrow P Cygni profile superimposed on a broader absorption, was also observed in SN 1998S (Leonard et al. 2000;Fassia et al. 2001;Shivvers et al. 2015;Dessart et al. 2016 (Tartaglia et al. 2021) at phase 48-64 days. The spectra have been continuum-subtracted and arbitrarily normalized for better display. All of the spectra are in the rest frame and corrected for Galactic and host-galaxy reddening.
with a minimum at similar velocities, forming the classical P Cygni profile of typical evolved SNe II.
We now focus on the complex evolution of the H profile by studying the velocity evolution of each component described above. At < 5 days, in order to reproduce both the narrow core and the broad wings of the pure emission feature, we used two Lorentzian components. Beyond this phase and until < 13 days, we used single Lorentzian profiles to reproduce the narrow emission and absorption, while the broad absorption is well reproduced by a flat, boxy profile, with boundaries defined by a sigmoidal function. In Figure 9 we show an example of the modeling we performed during these phases. When the broad P Cygni profile is fully formed ( > 20 days), we instead used only two Gaussians to reproduce the line profile. We then used the FWHM as a proxy for the velocity of the emission component and the minimum of the absorption component as a proxy for the bulk velocity of the narrow absorption component. We also kept track of the middle point of the red-most sigmoidal boundary of the boxy profile (orange squares in Figure 9). The evolution in time of the velocity of these features is shown in the bottom panel of Figure 9. At early phases, the narrow emission shows a clear increase in velocity, reaches a peak ∼ 4 days after first light, and then starts to decrease. We remark that this is not a spectral resolution effect, as the lines are fully resolved in all of the spectra (apart from the first epoch with the SEDM). One possible conclusion could be that the ejecta inside the CSM are accelerating the inner material  (Moriya et al. 2011). However, the emission originates from the CSM in front of the shock (this is unshocked CSM).
The shock then has yet to reach this part, so it could not be responsible for any acceleration at this phase. The increasing velocity with time likely maps a velocity gradient of the CSM at larger radii from the explosion, hinting at complex CSM. Given that we see these narrow lines only during the early phases of evolution of SN 2020pni, it is fair to assume that this CSM was created by recent mass loss, and it is possible that the progenitor lost material having different velocities with time. In particular, we observe that the progenitor lost material with larger velocities at earlier times and then smaller velocities as it approached the explosion time. We point out, though, that this does not naturally reflect a variable mass-loss rate during this phase, as the ve- The symbols refer to the velocities measured at the positions marked in the upper panel. We use half-hollow symbols to denote marginally resolved lines, and upper limits for unresolved lines. The inset presents a zoom-in of the early phases, when the narrow emission first shows an increase in velocity and then a decrease, which we interpret as a signature of complex CSM. locity of the material is not necessarily linked to the amount of the material lost by the progenitor of SN 2020pni.
Finally, from Figure 9, one could also argue that the boxy profile extension evolves with time, as the orange square seems to increase in velocity from ∼ 8000 to ∼ 9500 km s −1 . However, given the modeling we performed, this parameter does not directly link to a specific physical property of the explosion. Although this parameter could be seen as a proxy for the maximum velocity of the ejecta, the signal-to-noise T . ratio (S/N) of the spectrum, the depth of the absorption function, the shallowness of the transition from the continuum to the floor of the boxy profile, and the fit to the continuum level all play a role in inferring this value. Therefore, the observed increase in velocity is probably not as significant as the figure might suggest, as the uncertainties are also likely underestimated. However, further studies of other objects showing this extended absorption are encouraged, and possibly a more meaningful physical quantity could be inferred from a larger sample.

CSM Properties at ≤ 10 15 cm from Early Light-curve Modeling
A number of observational features suggest that the shock's radiation is breaking out of a compact shell of dense CSM extending out to a radius . Specifically, these include the fast rise to maximum optical light over a timescale of ≈ 2 days, the bright and hot UV emission reaching a color temperature 20, 000 K (e.g., Sec. 4.1 and Figure 2), the rapid fading of shock-ionized spectral features, and the narrow P Cygni profiles (Figure 8 and 4; Sec. 4.3.2) by ∼ 15 days after first light. We expect ≈ 10 15 cm, comparable to the inferred best-fitting blackbody radius when the shock-ionized spectral features become subdominant (e.g., Sec. 4.1).
We employ the formalism by Chevalier & Irwin (2011) (see Waxman & Katz 2017 for a recent review) to model the onset of the emission that breaks out from the thick shell of CSM under the reasonable assumption < , where is the radius of the contact discontinuity at the diffusion time (i.e., the radius where the diffusion of radiation becomes important). This assumption is motivated by the persistence of shock-ionized spectral features well beyond the time of bolometric peak. Indeed, the low-velocity P Cygni profiles of H are detectable until at least 15 days after first light. Under these circumstances, the escape of the radiation is delayed with respect to the onset of the explosion on a timescale ∼ , which is set by the time necessary for the radiation to reach an optical depth ≈ / sh , where sh is the shock velocity. Radiation is also released on the diffusion timescale, leading to a bolometric rise time rise ≈ , which implies that the explosion started ∼ rise (i.e., at most a few days) before the estimated time of first light (Table 1). This result is consistent with the time of explosion estimated from the emergence of spectral features with ≈ 8000 km s −1 at ≈ 8 days since first light and the measured radius of the photosphere at this time, which implies that the time of first light is delayed from the time of explosion by at most 1-2 days.
Following Chevalier & Irwin (2011) and using the solutions by Margutti et al. (2014), we find that the observed rise , radiated energy at breakout rad ≈ 0.5×10 49 erg, and breakout radius bo ≈ 2 × 10 14 cm constrain the wind mass-loss rate to ≈ 0.01 M yr −1 for a wind velocity = 200 km s −1 , similar to the FWHM of the narrow hydrogen component in the first optical spectrum. For these parameters the windshell mass is ≈ 0.02 M enclosed within ≈ 10 15 cm. The wind mass within the breakout radius is (≤ bo ) ≈ 0.005 M . In this model, after shock breakout, continued interaction with the wind material supports a luminosity 10 43 erg s −1 for a few days, consistent with the observations. We note that these parameter values should be treated as orderof-magnitude estimates given the likely complexity of the SN environment and some simplifying assumptions inherent to our analytical modeling approach.

CSM Properties at ≤ 10 15 cm from Spectral Modeling
We employ the radiative transfer code CMFGEN (Hillier & Miller 1998), with the implementation of Groh (2014), to study the properties of the material surrounding the progenitor of SN 2020pni a few days after the time of first light. The photons produced by the interaction between the SN ejecta and the progenitor wind diffuse out through the extended CSM around the progenitor. Subsequently, the material heats up, achieves radiative equilibrium, and reemits according to its composition, velocity, temperature, and density structure. For simplicity, we assume a spherical and stationary wind, , in non-LTE. We also assume that no energy is generated in the progenitor wind, that time-dependent effects are negligible, and that the medium is not clumpy. These assumptions and caveats affect the inferred observables, but we expect our modeling to still provide realistic quantities during the early phases, when the photosphere is located in the progenitor wind and the SN shock front is located at high optical depths.
We fit our first spectrum, obtained with Keck II+DEIMOS ∼ 1.5 days after first light, which also exhibits the high S/N necessary for this analysis. With the CMFGEN modeling we are able to constrain the progenitor mass loss , its chemical surface abundances, as well as the inner boundary of the CSM in , and the bolometric luminosity of the event SN . Figure 10 shows the comparison between the best-fit model and the observations of SN 2020pni at ∼ 1.5 days. We find excellent agreement between the observed and modeled spectral morphologies, with strong He , H , N , and N features.
See also Boian & Groh (2018), Boian & Groh (2019), and Boian & Groh (2020) for more details. Although the observations indicate a wind with stratified velocity (see Sec. 4.2.1) these assumptions concern the volume of the CSM swept by the ejecta at the time of the modeled spectrum. Considering that we use the spectrum taken ∼ 1.5 days after first light, we can assume the inner wind to be stationary without loss of generality. The inner boundary roughly corresponds to where the source of ionization photons is in the models (actually the steep density increase) at the time of the observations. This is not to be mistaken for the inner boundary of the actual CSM, as we cannot infer anything for < in .  Our modeling suggests SN = (2.3 − 3.5) × 10 43 erg s −1 , = (3.5 − 5.3) × 10 −3 yr −1 (assuming a wind velocity wind = 200 km s −1 ), in = 2.5 × 10 14 cm, and a flux temperature at a Rosseland optical depth of 10 of ★ = 27, 500 − 29, 400 K. We obtain a progenitor helium surface mass fraction of ≈ 0.30-0.40, and we constrain the CNO surface abundances to C sur = 2.6 × 10 −4 , N sur = 8.2 × 10 −3 , and O sur 1.3 × 10 −4 , with an estimated 3 uncertainty of 50%. Dessart et al. (2017) computed a grid of models presenting the spectroscopic outcome of early-time interaction of the SN ejecta with material near the star's surface. They used radiation hydrodynamics and radiative transfer to reproduce the explosion of RSG stars, embedded in different dense material, in contrast to our approach, where we adopted a static wind configuration. We did not solve for the timedependent radiation hydrodynamics of the CSM, as assuming the radiative equilibrium is still a reasonable approximation at very early phases, when the photosphere forms in the CSM. We compare the early-time spectra of SN 2020pni with the grid of models from Dessart et al. (2017) and find a good match with their r1w6 model. This was evolved from the progenitor model m15mlt3 from Dessart et al. (2013), which corresponds to a star with ★ = 501 , ej = 12.52 , = 1.35 × 10 51 erg, and = 10 −2 yr −1 . We show a comparison of the early-time spectra of SN 2020pni with the model from Dessart et al. (2017) in Figure 11, as well as our CMFGEN model. All of the main features shown by SN 2020pni in its ∼ 2 day spectrum are also present in the r1w6 model by Dessart et al. (2017), including the strong He lines, although the model seems to show less prominent N emission. For reference, Dessart et al. (2017) adopted a nitrogen surface abundance of N sur ≈ 3 × 10 −3 . Their first synthetic spectrum is remarkably similar to the one obtained with our CMFGEN modeling. The C 5803 line, which is underestimated by our modeling, looks particularly prominent in the model by Dessart et al. (2017), although in this case it is even stronger than the line shown by SN 2020pni.

Properties of the Larger-scale > 10 15 cm Environment from Radio Observations
We infer the density properties of the larger-scale environment at distances of (1-3) ×10 16 cm using the radio nondetection in Sec. 3.4. In the context of synchrotron emission from the explosion's forward shock, and self-consistently accounting for both synchrotron self-absorption (SSA) and free-free absorption (FFA) (e.g., Chevalier 1998;Weiler et al. 2002), the radio nondetections at = 37.3-307 days enable constraints on the vs. shock parameter space shown in Figure  12. We followed the prescriptions from Chevalier (1998) to compute the SSA emission as a function of the radio-spectrum observables (see also the equations reported by Terreran et al. 2019) and we accounted for external FFA using the formalism for the optical depth to free-free radiation by Weiler et al. (2002). The shock velocity is self-consistently calculated using the self-similar solutions by Chevalier (1982). For this calculation, we have assumed a wind-like density profile of the CSM ( CSM ∝ −2 ) and a plasma temperature of ∼ 10 4 K. We describe this process in further detail in Appendix A. We find that for a typical shock velocity of ∼ 0.1 , the lack of detectable radio emission is consistent with either a low-density medium, with density corresponding to < 10 −5 -10 −6 M yr −1 , or a higher-density medium, with > 5 × 10 −4 M yr −1 that would absorb the emission (Figure 12). These values reported are for a wind velocity  Figure 11. Comparison of the early-time spectra of SN 2020pni (black) with model r1w6 from Dessart et al. (2017) (magenta). We also included our CMFGEN modeling for comparison (red). The phases, from first light, are reported on the right. The models from Dessart et al. (2017) have been evolved from the progenitor model m15mlt3 (Dessart et al. 2013), which corresponds to a star with ★ = 501 , ej = 12.52 , = 1.35 × 10 51 erg, and = 10 −2 yr −1 . These results are consistent with those from our CMFGEN modeling. The main spectral features are labeled. Although the initial spectrum is well matched by the model, SN 2020pni shows long-lasting line emission, in particular the H lines, persisting for more than 10 days (see Figure 8). We interpret this discrepancy as the consequence of a more radially extended, thick CSM with respect to the one assumed by Dessart et al. (2017) in their grid of models.
= 200 km s −1 . The range of allowed mass-loss rates in the lower-density case is sensitive to the choice of shock microphysical parameter values and , which represent the fraction of post-shock thermal energy in relativistic electrons and magnetic fields, respectively.
In Figure 13 we summarize our inferences concerning the CSM that surrounded the progenitor of SN 2020pni at the time of explosion, similar to what Yaron et al. (2017a) did for SN 2013fs. We marked in blue the densities we inferred from the CMFGEN modeling of the Keck II+DEIMOS optical spectrum taken ∼ 1.5 days after first light (see Sec. 4.3.2). The radio upper limits from the previous paragraph translate to an excluded region at a higher distance, marked in orange in the figure. The shock-ionization features are present in the spectra until ∼12 d after first light. The position of the shock at this phase (assuming a typical velocity of 0.1 ) is marked in the figure with a vertical dashed, magenta line. Considering the lack of narrow features after this epoch, it is fair to assume that the CSM was less dense beyond a radius of (2-4) ×10 15 cm. The radio analysis suggested that both a high-density configuration and a low-density configuration were possible; however, the lack of narrow lines at later phases disfavors the high-density scenario. In Figure 13 we suggest a possible configuration of the CSM.

The Population of Shock-ionization Events
In this section we compare the inferred physical properties of SN 2020pni with the growing population of flashspectroscopy events. For this purpose we use the sample by Boian & Groh (2020), as they performed spectral modeling using the same code, CMFGEN. Boian & Groh (2020) used a grid of models for their analysis and three different surface abundance scenarios: solar-like, CNO-processed, and He-rich (see Boian & Groh 2020, for more details). In Figure 14 we show the inferred relations between the mass-loss rate , density factor ≡ /(4 wind ), temperature at the CSM inner boundary (where the optical depth to electron scattering is ≈ 10), and SN luminosity SN . The mass-loss rate estimates rely on a measure of the wind velocity, which is not always possible to obtain, owing to the resolution of the classification spectra. Plotting the density factor instead of the mass loss has the advantage of not relying on an assumed wind velocity; however, it is less trivial to link this quantity with the general characteristics of the progenitor star. The electron temperature can be used as a proxy for the ionization level of the CSM, with higher temperatures indicating a  Figure 13. Proposed CSM configuration around the progenitor star of SN 2020pni. The dashed diagonal lines represent constant massloss rates as described in the legend, assuming a wind velocity of 200 km s −1 . The blue box is inferred from the early optical spectrum modeling. The orange box is the region excluded by the radio upper limits. The dashed magenta line marks the position of the shock at 12 days after first light (assuming a typical shock velocity of ∼ 0.1 ). The narrow lines from shock ionization disappear after this epoch; therefore, we can assume that the confined CSM extended to a radius of ∼ (2-4) ×10 15 cm. higher ionization. SN 2020pni sits right in the middle of the distribution of all parameters. Indeed, the initial spectrum did not show features related to highly ionized ions such as O , O , or N the way SN 2013fs did ( Figure 6). However, the temperature (and therefore the ionization level) is strongly influenced by the epoch at which the classification spectrum was acquired. SN 2013fs and PTF10gva are among the objects with the earliest spectra ( < 1 day), while the first spectrum of SN 2020pni was acquired later.
In flash-ionization events, the ejecta lose kinetic energy as they are slowed down by the CSM. A denser medium allows for a more efficient conversion of kinetic energy into radiation, which can power a more luminous continuum and contribute to a more luminous SN at early phases. This energy conversion should follow ∝ 3/4 , which is in rough agreement with what is shown in the right panel of Figure 14. Also, in this case SN 2020pni sits roughly in the middle of the distribution, with mass loss from the progenitor and therefore density parameter slightly lower than the average. One conclusion by Boian & Groh (2020) was that the overall mass-loss estimates from the spectral modeling do not significantly differ from those inferred for SNe II (from optical observations), showing narrow lines for hundreds of days. This suggests that the difference between these more extreme interacting SNe and the shock-ionization events is not to be found in the density of the CSM surrounding the progenitor stars. Boian & Groh (2020) suggest, therefore, that the radial T .  (2020); temperature, luminosity, mass-loss rate, and density relations from their sample. We also add SN 2017ahn (Tartaglia et al. 2021), which was not included in the Boian & Groh (2020) sample, and SN 2020pni. The latter is highlighted with a star symbol. The surface abundances of the progenitor of each object are color-coded following the legend in the top right panel (solar-like in red, CNO-processed in blue, intermediate between these two in magenta, and He-rich in green; see Boian & Groh 2020, for more details). All of the values are derived from CMFGEN modeling of the optical spectra of the presented SNe.
extension of the thick CSM could play a major role in shaping the evolution of the SN. The persistence of the narrow lines in time line (i.e., for how long the shock-ionization lines are visible in the spectra) is an observable that was not taken into consideration by the analysis of Boian & Groh (2020). The hydrogen recombination timescale (for pure H composition) can be approximated by rec = ( ) −1 , where ≈ (2−4)×10 −13 cm 3 s −1 for = 10 4 K (Osterbrock & Ferland 2006). Given the previously inferred density of ∼ 1.5×10 8 particles cm −3 , we find rec ≈ 2.2×10 4 s, or 0.26 days. This is considerably smaller than line , implying the need for a source of ionizing photons that is active well beyond the time of shock breakout. Therefore, the CSM is likely kept ionized by the prolonged interaction of the SN ejecta with the inner boundary of the CSM. We can thus link the persistence of the narrow shock-ionization lines with some physical properties of the explosion itself: (i) an explosion that launches faster shocks would have the ejecta ram through the thick CSM earlier, and (ii) a radially less extended CSM would be engulfed at earlier times by the ejecta, and therefore the narrow lines would disappear sooner. This second point is particularly important, as a less extended CSM would have been created by the progenitor star at a time closer to the explosion. Hence, the persistence of these lines could be linked to the mass-loss history right before explosion.
We estimate the persistence of the narrow lines for all of the objects from the Boian & Groh (2020) sample that also had a published spectroscopic sequence beyond the classification spectrum. We identified the last spectrum showing narrow lines from the ionized CSM and the first spectrum in  Figure 15. Subsample of the objects studied by Boian & Groh (2020) for which the extensive spectral coverage allowed for an estimate of the duration of the flash-ionization lines. We compare this quantity with the temperature, luminosity, mass-loss rate, and density relations from this sample derived from CMFGEN modeling. The surface abundances of the progenitor of each object are color-coded following the legend in the top right panel (solar-like in red, CNO-processed in blue, intermediate between these two in magenta, and He-rich in green; see Boian & Groh 2020, for more details).
which the lines were absent, taking the midway point as the time of disappearance. For the majority of the targets, especially those with long-lived narrow lines, hydrogen is usually the only species left at the time of narrow-line disappearance, while the He and CNO lines disappear at earlier phases. These measurements are presented in Figure 15, where we look for correlations with the other physical properties studied above. The sample size does not allow us to come to any definitive conclusion, but at this time we do not see any clear correlations among the plotted quantities. However, an important conclusion to take is that the persistence of the narrow lines does not seem to depend on the composition of the CSM, considering that no clear distinction is evident among solar-like, CNO-processed, and He-rich events. Assuming that the CSM composition could be used as a proxy for the composition of the progenitor, this suggests that the composition probably does not play a major role in shaping the CSM.
If we refer to point (ii) mentioned above, this conclusion could lead us to suggest that any physical mechanism responsible for the observed late-time mass loss must operate under different physical conditions and stellar progenitors. We caution that the sample studied here is quite limited. A significantly larger sample size than what is currently available might reveal correlations among the parameters of Figures 14  and 15, and has the potential to constrain the nature of the mass-loss mechanism at work. T .

The Progenitor of SN 2020pni
So far we have shown that SN 2020pni was a particularly luminous (see Figure 3) hydrogen-rich SN. We found that the CSM surrounding the progenitor star was He-rich, suggesting that the progenitor had shed a large part of its envelope at the time of explosion, or alternatively that mixing was particularly high in the progenitor star. Assuming that the progenitor was a single star, the abundance of CN-processed material at the surface of the star, and therefore in the CSM immediately surrounding it, tends to increase with the ZAMS mass of the progenitor (Ekström et al. 2012). Therefore, the strong nitrogen and carbon lines observed at early phases would favor a stellar mass in the higher end of the progenitors of SNe II. A comparison with stellar evolution models computed with the Geneva code (Ekström et al. 2012) suggests an RSG or a yellow hypergiant progenitor star for SN 2020pni, with a ZAMS mass between 15 and 25 (Groh et al. 2013). These studies have also shown that luminous blue variables (LBVs) could be the potential progenitors of some of the more H-depleted SNe II. Both direct observations and models of stellar evolution revealed that LBVs are enriched in helium and nitrogen, while being depleted in carbon and oxygen (e.g., Meynet et al. 1994;Smith et al. 1994;Crowther 1997;Najarro et al. 1997), just as is shown by SN 2020pni. In addition, in Section 4.2.1, we demonstrated that the CSM surrounding the progenitor of SN 2020pni was not uniform. This is something that is also often observed in LBV nebulae (e.g., Smith 2006Smith , 2014. Considering the further evolution of SN 2020pni as a relatively normal SN II, we favor an RSG as its most probable progenitor. However, the fact that some characteristics of the CSM resemble LBV-like winds is remarkable. This once again highlights the lack of a full understanding of the massloss processes in RSG stars, especially during the last phases of their lives. On a final note, binarity could have played a major role in shaping the CSM surrounding the progenitor of SN 2020pni and the other shock-ionization events. Considering the high percentage of progenitors of SNe II that are expected to be in binary systems (e.g., Zapartas et al. 2019), it is possible that the surface composition of the progenitor star could have been heavily modified by the interaction of a stellar companion or even by a merger event. However, one key aspect that emerges from Section 5.1 is that the mass loss observed in shock-ionization events appears to have been sustained for a very brief period of time (years), when compared to the whole lives of the stars themselves (millions of years). This necessarily means that the physical mechanism responsible for this mass loss is somehow linked to the actual end of the star's life. In other words, the mechanism "knows" that the end is coming. Interaction with a binary companion would not know about the advanced stage of evolution of the companion star. Considering that 30% of core-collapse SNe observed within 2 days since explosion show shock-ionization features (Bruch et al. 2021), the chances that so many objects exhibit enhanced mass loss induced by the binary interaction with a companion right before the death of the progenitor star are remarkably low. Therefore, although we cannot exclude the presence of a binary companion in the system of these stars, we disfavor the idea that the physical mechanism responsible for the appearance of shock-ionization features in young corecollapse SNe is directly related to the presence of a companion star.

CONCLUSIONS
In this work we presented the multiwavelength evolution of the Type II SN 2020pni, which exploded in the host galaxy UGC 09684. The object was discovered by ALeRCE in the ZTF data stream only a few hours after explosion, and we promptly activated a multiwavelength radio through X-ray follow-up campaign. Our first optical spectrum, obtained ∼ 1.5 days after our estimated explosion epoch, highlighted the presence of flash-ionization features of He , N , N , and C , with a partially resolved FWHM of 200-250 km s −1 . We interpret these features to have originated from a dense, confined shell of material, likely ejected by the progenitor of SN 2020pni in the last year before explosion. From the modeling of the first spectrum using the non-LTE radiative transfer code CMFGEN, we inferred a mass-loss rate of the progenitor of = (3.5 − 5.3) × 10 −3 yr −1 . This is in agreement with the constraints obtained from the radio upperlimit analysis, which allows for a thick absorbing medium produced by a mass loss of > 5 × 10 −4 M yr −1 . We then compared the inferred physical properties with those of other shock-ionization SNe, in particular with the sample presented by Boian & Groh (2020). SN 2020pni displays characteristics that are typical of this class of objects, and no correlation between the shown physical quantities appears evident. We further investigated the persistence of the narrow lines in these objects, as this parameter could be linked to the physical extent of the CSM at the time of explosion and the timing of the mass-loss episodes responsible for the creation of this thick CSM. The sample of objects where this timescale can be measured is smaller, owing to the need for further spectroscopic follow-up observations beyond the classification spectrum in order to assess the actual persistence of the narrow lines; the comparison does not highlight any strong correlation either. This leads to a possible conclusion that the mass loss responsible for the creation of the nearby CSM is not linked to any obvious characteristics of the progenitor star. The mechanism inducing this mass loss not only has to be common to a relatively wide range of progenitor stars (with different surface compositions and size) but also needs to be linked to processes occurring toward the end of the life of a star in order to explain the timing of the mass loss. The core convection that occurs during the late-stage nuclear burning could be a viable mechanism to transmit energy, through gravity waves, from the core of the progenitor to the envelope. Wu & Fuller (2021) estimated that up to 10 46 − 10 47 erg could be transmitted to the outer envelope during oxygen and neon burning, and this should happen 0.1-10 yr before core collapse. The amount of energy transferred is even higher for low-mass (< 12 ) and high-mass (> 30 ) stars. The growing number of objects discovered within days of explosion should provide more evidence for these types of phenomena, resulting in a better understanding of the final phases of massive stars. As the SN blast wave expands, it collides with the surrounding CSM and forms a shock front. The accelerated electrons within the forward-shock region produce synchrotron emission, which is attenuated by synchrotron self-absorption (SSA) and by external free-free absorption. The SSA spectrum can be approximated by a smoothed broken power law of the form where is the peak flux at the SSA frequency ( ), is the optically thick spectral index, is the optically thin spectral index, and is a smoothing factor. For a fiducial SSA spectrum, = 2.5, = −1, and = 1. This emission is attenuated by free-free absorption by the unshocked material in front of the blast wave. We follow Weiler et al. (1986) (Equations (3)-(16)) to determine the optical depth of this material. Assuming that the progenitor star had a constant mass-loss rate in the years prior to explosion, its wind would form CSM with a density profile ∝ −2 (a wind-profile medium). The amount of material in front of the shock (and hence the optical depth) can thus be determined if the time-dependent radius of the forward shock is known. Chevalier (1998) and Chevalier & Fransson (2006) show that for a progenitor star having a density profile ∝ − (where is the stellar radius) and a wind-profile CSM, the SN blast wave will expand according to sh ∝ ( −3)/( −2) , which means that the shock velocity is given by where sh and sh are, respectively, the shock radius and velocity at time post-explosion and appropriate progenitors (e.g., Wolf-Rayet stars) have ≈ 10. If the peak flux and frequency of the SSA are measured, then Chevalier & Fransson (2006) show that the shock radius is given by sh = 4.0 × 10 14 where is the angular distance of the SN, is the post-shock relativistic electron energy density, is the post-shock magnetic energy density, and is the filling factor such that the emitting volume of the blast wave is × 4 3 sh /3. The parameters and are poorly constrained, but the shock radius is not strongly dependent on these parameters as sh ∝ −1/19 and sh ∝ ( /0.5) −1/19 . A fiducial value of = 0.5 is used in the literature (e.g., Chevalier & Fransson 2006), and for relativistic shocks ≈ 0.1 (Sironi et al. 2015).
Following Weiler et al. (1986), for a blast wave expanding at this velocity (Eq. A2, with = 10) in an ionized material with solar composition, the optical depth of the CSM is where is the plasma temperature normalized to 10 4 K, is the frequency of the emission, is the mass-loss rate of the progenitor star, sh is the velocity of the shock normalized to 0.1 , and is the time since explosion in days (Weiler et al. 2002).
The radio emission spectrum at a given time can thus be calculated using Equations A1 and A4. Specifically, we used a progenitor wind velocity of 200 km s −1 (as derived from our spectroscopic observations) and assumed a plasma temperature of 10 4 K (which is typical of photoionized gas), = 2.5, = −1, = 1, = 10, and = 0.5. We then formed a grid of , , , , and values covering the range appropriate to SNe. In particular, we used ≈ 0.1, = 0.1 and 0.01 (which are representative values derived from modeling of long-duration gamma-ray bursts), and = = 1/3 (which assumes equipartition of the post-shock energy density between the relativistic electrons and magnetic fields). For each set of these parameters, we calculated the shock velocity (Eq. A3 and Γ = 1/ √︁ 1 − /c, where is the shock velocity in units of the speed of light ) and radio spectrum at the time of each radio observation (i.e., at 37.3, 129, and 307 days post-explosion). The radio upper limits rule out some of these spectra, and hence also the corresponding combinations of the progenitor mass-loss rate and shock velocity. The shaded regions of Figure 12 show the parameter space that we ruled out for SN 2020pni in this manner.
where sh is in units of the speed of light, is the kinetic energy of the blast wave, and ej is the ejecta mass. In Figure 12 the dashed blue lines showing representative values for the progenitor mass-loss rate and shock velocity are derived using Equation A5 for ≈ 10 51 erg and ej ≈ 1.

P SN 2020 27 B. FOLLOW-UP OBSERVATIONS OF SN 2020pni
In Table A1 we report the ground-based optical photometry of 2020pni, while in Tables A2 and A3 we report the photometry quired with UVOT, on board the Neil Gehrels Swift Observatory. The only epoch of NIR photometry is reported in Table A4. In Table A5, we provide a summary of the telescopes and instruments employed in the spectroscopic follow-up of SN 2020pni, while the complete log of the spectroscopic observations is shown in Table A6. The radio observations measurements are reported in Table A7. T .